Commit e56310c
committed
feat(tax): add Argentina tax pack (official-argentina@1.0.0)
Scope (approved before this draft):
- Merchant: IVA-registered restaurants (Responsable Inscripto), domestic
sales of standard supplies.
- Tax: one IVA rule at the general rate of 21%, applied across every
category (product, addon, packaging, delivery, service_charge,
unclassified).
- Default pricing is tax-inclusive to match Argentina's consumer-
price-display rule (Res. 4/2025); individual products can still be
set exclusive per-item for B2B use.
Source: Ley de Impuesto al Valor Agregado, texto ordenado en 1997
(Ley 23.349 t.o. Decreto 280/1997, Anexo I), Articulo 28 — 'La
alicuota del impuesto sera del veintiuno por ciento (21%)'.
Continuously in force since BO 15/04/1997. Cross-references: ARCA
biblioteca cuadro legislativo Articulo 28; InfoLeg norma 42701.
Intentionally unsupported (do not add to this pack without a scope
bump): IIBB (provincial, registration-dependent); reduced 10.5%;
incremented 27% (utilities); 2.5% and 0%; Monotributo; withholding
and perception regimes; ARCA CAE fiscal-invoice authorization
(belongs to the capability-plugin seam #142).
Tests added/extended:
- tests/tax-engine.test.ts: ARS 100 exclusive -> 21 -> 121; ARS 121
inclusive -> net 100 / IVA 21; all charge kinds apply the rule;
unclassified never silently zero.
- tests/tax-pack-management.test.ts: installs AR alongside IN/TH and
confirms the 24-point activation checklist accepts it (only check #6,
signed artifact, fails pre-signing, same as the unsigned IN/TH seeds).
- tests/integration-tax.test.ts: AR exclusive order at ARS 1000
produces 210 IVA and 1210 total; 20% discount recomputes to 168 IVA
and 968 total; inclusive product keeps IVA inside the displayed price
and persists the behavior as inclusive in the snapshot; the bill
copies the order tax. Every breakdown is asserted to contain no IIBB
or Ingresos Brutos component.
Docs: docs/tax-packs.md gains a 'Country pack scopes' section pinning
the approved merchant scope, the IVA source, every excluded area, and
the upgrade path for provincial IIBB (only after FloCafe models
province + activity code + customer registration status).
Companion e2e-server fix (unblocks CI for this PR):
Commit 3a75876 ('publish country packs separately') moved India and
Thailand from BUNDLED_COUNTRY_PACKS to catalog-only delivery, and the
e2e-server fixture seeds country='TH' without simulating the post-
first-run owner action of installing Thailand from Settings → Tax
Configuration. The active pack for country=TH then falls back to the
zero-rules generic pack, and the checkout throws 'no tax rules apply
to category standard for business type restaurant' → 400. The
Playwright spec at prepaid-payment-reconciliation.spec.ts:13/55
times out waiting for 'Tax ฿4.20'.
This is the same regression silently failing the most recent two main
CI runs before this PR. Fix by inlining the same install-tax-pack SQL
helper that the unit and integration tests already use. Only Thailand
is installed — it's the only country-specific pack exercised by e2e
specs.
Verified locally: npm run lint, npm run build, npm run test:tax-engine
(12/12), npm test (0 failed across every suite including Integration
Tax 114/114 and Tax Pack Management 103/103), git diff --check clean.
Publishing (tag, push to upstream, CI sign) is not part of this PR.
That step stays gated on maintainer review per the task spec; no
signing secret was touched.1 parent 3a75876 commit e56310c
6 files changed
Lines changed: 296 additions & 1 deletion
File tree
- docs
- main/tax-packs
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
29 | 103 | | |
30 | 104 | | |
31 | 105 | | |
| |||
82 | 156 | | |
83 | 157 | | |
84 | 158 | | |
| 159 | + | |
85 | 160 | | |
86 | 161 | | |
87 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
512 | 596 | | |
513 | 597 | | |
514 | 598 | | |
| |||
0 commit comments