Debug: two invoices on charge 01a1ea63-391b… were classified as OTHER instead of INVOICE
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Start by checking accounter_schema.documents for both IDs and tracing the stored files and charge through Deel sync, OCR, manual edits, and Green Invoice sync. Read packages/server/src/modules/deel/helpers/deel.helper.ts and packages/server/src/modules/app-providers/anthropic.ts; identify which path assigned OTHER, then add a regression test for that cause. Done means both records are INVOICE with the correct creditor and debtor, the charge ledger is regenerated, and the fix is merged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Two documents on charge 01a1ea63-391b-79dc-9be9-be1d04d7bb72 were saved with type = OTHER ("Other document"). They are invoices and should have been INVOICE.
| Document ID | Charge ID |
|---|---|
01a1ea63-a06d-757e-aac7-ee24279b91c0 |
01a1ea63-391b-79dc-9be9-be1d04d7bb72 |
01a1ea63-5a60-7e9c-8a62-097e88150092 |
01a1ea63-391b-79dc-9be9-be1d04d7bb72 |
Because the type is OTHER, both documents have no creditor or debtor (figureOutSides returns {} for OTHER). They are also left out of VAT, ledger and match scoring as accounting documents.
Steps
- Find which path created the documents. Check
accounter_schema.documentsfor both IDs:file/imageURLs,file_hash, creation time, and whether a Deel or Green Invoice record is linked to them. Also check whether the charge has an email-ingestion record. - Check the path's type logic. These are the places in
packages/serverthat can setOTHER:- Deel sync:
src/modules/deel/helpers/deel.helper.ts, around line 198. It setsDocumentType.Otherwhenevermatch.breakdown_contract_type === 'prepaid_billing'. If these are Deel invoices, this is the most likely cause. Confirm whether that rule is right for these invoices. - OCR (upload, email ingestion, re-OCR):
src/modules/app-providers/anthropic.ts→extractInvoiceDetails. The model pickstypefromz.enum(DocumentType), so it may have returnedOTHERitself. Re-run OCR on the stored files and look at the rawtypereturned. Then check whether the prompt needs guidance on when to useOTHERversusINVOICE. - Manual edits: check whether the type was changed after insert (e.g. by
updateDocument). - Green Invoice sync:
src/modules/green-invoice/helpers/green-invoice.helper.tsmaps unknown types toUNPROCESSED, notOTHER, so this path is unlikely. Rule it out anyway.
- Deel sync:
- Fix the cause and add a regression test. Correct the two existing documents' types afterwards (with creditor and debtor) and regenerate the charge's ledger.
Acceptance criteria
- We know which path set
OTHERand why - The fix is merged, with a test covering this case
- Both documents are
INVOICE, with correct creditor and debtor
- Lingua principale
- TypeScript
- Stelle
- 30
- Fork
- 10
- Merge medio
- 2g 12h
- PR unite (30g)
- 276
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Urigo/accounter-fullstack
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Urigo/accounter-fullstack#5302 ·
I maintainer di solito rispondono entro 2 giorni
-
1214 annual-audit-workflow
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Urigo/accounter-fullstack#5257 ·
I maintainer di solito rispondono entro 2 giorni
-
1214 annual-audit-workflow
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Urigo/accounter-fullstack#5256 ·
I maintainer di solito rispondono entro 2 giorni
-
annual-audit-workflow
Difficoltà 1/5 1-3 ore Idoneità per principianti 87/100
Urigo/accounter-fullstack#5252 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Urigo/accounter-fullstack#4919 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Urigo/accounter-fullstack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
tashfeenahmed/freellmapi#2217 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vercel-labs/ui#1758 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
nicobailon/pi-subagents#3425 ·
I maintainer di solito rispondono entro 1 giorno