phase-5: declarations, from generated numbers to a PDF you file yourself
Formulario 120 and 515 assembly, the review screen, approval, the PDF, and the guided checklist that walks the user through presenting it in Marangatu. Approval is a promise about what the user actually saw: the numbers are recomputed on the way in, and if the documents moved since the declaration was generated the answer is a 409 with the fresh figures stored as a draft, not a silent approval of numbers nobody read. An approved declaration is never regenerated or invalidated. Editing, confirming, rejecting or reclassifying a document flips any ready declaration covering its period back to draft, which is what the dashboard reads to stop offering it for review. The PDF is rendered once and cached against the declaration, so two downloads are byte for byte the same document; every write that changes the numbers clears the cache. Approval pre-renders it, and the route renders on demand, so a failed job costs a wait rather than a missing file. It stays Spanish in both locales, like the form it mirrors, and carries a BORRADOR watermark until it is approved. The seeded declarations are computed through the same code path the product uses, so their figures agree with the documents behind them. Three defects the screenshots caught: the floating scan button swallowed the tap meant for Aprobar on a phone, the summary breakdown reused labels meant for other screens, and five tab labels collided at 390px. Tests that can avoid depending on a fresh seed now do; the ones that cannot say so in the assertion rather than timing out. db:reset warns that the API has to be stopped first, having learned that the hard way. 293 vitest tests, 59 Playwright tests, rules coverage still 100%, typecheck and lint clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5dc284c5f2
commit
6620650e9e
@@ -366,6 +366,7 @@ export const en: Record<MessageKey, string> = {
|
||||
"nav.inicio": "Home",
|
||||
"nav.bandeja": "Inbox",
|
||||
"nav.comprobantes": "Documents",
|
||||
"nav.declaraciones": "Declarations",
|
||||
"nav.vencimientos": "Due dates",
|
||||
"vto.empty": "You have no due dates yet. Check what you are registered for in your profile.",
|
||||
"vto.status.upcoming": "Upcoming",
|
||||
@@ -378,6 +379,36 @@ export const en: Record<MessageKey, string> = {
|
||||
"obligation.iva_120": "Monthly IVA",
|
||||
"obligation.irp_515": "Annual IRP",
|
||||
|
||||
// Declarations (phase 5)
|
||||
"decl.stale": "Facturas from this period changed, so we rebuilt the numbers. Check them before approving.",
|
||||
"decl.empty": "You have not prepared any declarations yet.",
|
||||
"decl.emptyBody": "Once you have confirmed facturas for a period, we build the form for you.",
|
||||
"decl.generating": "Building your declaration...",
|
||||
"decl.period": "Period",
|
||||
"decl.form": "Form",
|
||||
"decl.amount": "Amount",
|
||||
"decl.review": "Review",
|
||||
"decl.summary.title": "In short",
|
||||
"decl.detail.title": "The detail",
|
||||
"decl.preview.title": "How the form looks",
|
||||
"decl.preview.spanishNote": "Official DNIT format (in Spanish)",
|
||||
"decl.preview.casilla": "Box",
|
||||
"decl.preview.concept": "Item",
|
||||
"decl.breakdown.debito": "Output IVA",
|
||||
"decl.breakdown.credito": "Input IVA",
|
||||
"decl.breakdown.saldoAnterior": "Credit carried in",
|
||||
"decl.f515.summary": "You earned Gs. {income} and deducted Gs. {deductions}. You owe Gs. {tax}.",
|
||||
"decl.f515.netIncome": "Taxable net income",
|
||||
"decl.f515.effectiveRate": "Effective rate on your income: {rate}%",
|
||||
"decl.checklist.step1": "Sign in to Marangatu with your access key.",
|
||||
"decl.checklist.step2": "Pick Formulario {form} and period {period}.",
|
||||
"decl.checklist.step3": "Copy each value into the box it belongs to.",
|
||||
"decl.checklist.step4": "Submit the declaration and keep the receipt Marangatu gives you.",
|
||||
"decl.checklist.copied": "Copied ✓",
|
||||
"decl.notFiledYet": "You have not marked it as filed yet.",
|
||||
"decl.approvedAt": "Approved on {date}",
|
||||
"decl.filedAt": "Filed on {date}",
|
||||
|
||||
// Chrome (es.extra.ts)
|
||||
"common.language": "Language",
|
||||
"common.languageEs": "Español",
|
||||
|
||||
@@ -167,6 +167,7 @@ export const esExtra = {
|
||||
"nav.inicio": "Inicio",
|
||||
"nav.bandeja": "Bandeja",
|
||||
"nav.comprobantes": "Comprobantes",
|
||||
"nav.declaraciones": "Declaraciones",
|
||||
"nav.vencimientos": "Vencimientos",
|
||||
"vto.empty": "No tenes vencimientos cargados. Revisá tus obligaciones en el perfil.",
|
||||
"vto.status.upcoming": "Proximo",
|
||||
@@ -179,6 +180,36 @@ export const esExtra = {
|
||||
"obligation.iva_120": "IVA mensual",
|
||||
"obligation.irp_515": "IRP anual",
|
||||
|
||||
// Declarations (phase 5)
|
||||
"decl.stale": "Cambiaron facturas de este periodo, asi que rehicimos los numeros. Revisalos antes de aprobar.",
|
||||
"decl.empty": "Todavia no preparaste ninguna declaracion.",
|
||||
"decl.emptyBody": "Cuando tengas facturas confirmadas de un periodo, preparamos el formulario por vos.",
|
||||
"decl.generating": "Armando tu declaracion...",
|
||||
"decl.period": "Periodo",
|
||||
"decl.form": "Formulario",
|
||||
"decl.amount": "Importe",
|
||||
"decl.review": "Revisar",
|
||||
"decl.summary.title": "En pocas palabras",
|
||||
"decl.detail.title": "El detalle",
|
||||
"decl.preview.title": "Asi se ve el formulario",
|
||||
"decl.preview.spanishNote": "Formato oficial DNIT (en español)",
|
||||
"decl.preview.casilla": "Casilla",
|
||||
"decl.preview.concept": "Concepto",
|
||||
"decl.breakdown.debito": "Debito fiscal",
|
||||
"decl.breakdown.credito": "Credito fiscal",
|
||||
"decl.breakdown.saldoAnterior": "Saldo a favor anterior",
|
||||
"decl.f515.summary": "Ganaste Gs. {income} y deduciste Gs. {deductions}. Te corresponde pagar Gs. {tax}.",
|
||||
"decl.f515.netIncome": "Renta neta imponible",
|
||||
"decl.f515.effectiveRate": "Tasa efectiva sobre tus ingresos: {rate}%",
|
||||
"decl.checklist.step1": "Entrá a Marangatu con tu clave de acceso.",
|
||||
"decl.checklist.step2": "Elegí el Formulario {form} y el periodo {period}.",
|
||||
"decl.checklist.step3": "Copiá cada valor en la casilla que corresponde.",
|
||||
"decl.checklist.step4": "Enviá la declaracion y guardá el comprobante que te da Marangatu.",
|
||||
"decl.checklist.copied": "Copiado ✓",
|
||||
"decl.notFiledYet": "Todavia no la marcaste como presentada.",
|
||||
"decl.approvedAt": "Aprobada el {date}",
|
||||
"decl.filedAt": "Presentada el {date}",
|
||||
|
||||
// Chrome
|
||||
"common.language": "Idioma",
|
||||
"common.languageEs": "Español",
|
||||
|
||||
Reference in New Issue
Block a user