sinfactura-types 1.10.521 → 1.10.522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/invoice.d.ts +23 -2
  2. package/package.json +1 -1
package/dist/invoice.d.ts CHANGED
@@ -157,8 +157,8 @@ declare global {
157
157
  * frozen exactly as declared to ARCA rather than re-derived at read time.
158
158
  *
159
159
  * Stored alongside the array on purpose: `buildTributos` rounds each entry
160
- * and then rounds the sum, so a reader summing the array reproduces it, but
161
- * only while it uses the same rounding. This is the value ARCA reconciled
160
+ * and sums the rounded entries, so a reader summing the array reproduces it,
161
+ * but only while it uses the same rounding. This is the value ARCA reconciled
162
162
  * `ImpTotal == ImpTotConc + ImpNeto + ImpOpEx + ImpTrib + ImpIVA` against,
163
163
  * and that identity is what makes `total` decomposable.
164
164
  *
@@ -179,6 +179,27 @@ declare global {
179
179
  * (`stacks/lambdas/reports/_format.ts`'s `ventasPesoFactor`).
180
180
  */
181
181
  total: number;
182
+ /**
183
+ * The rounding rule this voucher's amounts were built under.
184
+ *
185
+ * `'decimal'` — every per-unit figure, alícuota bucket and voucher total
186
+ * rounded to centavos half away from zero on the DECIMAL value (unit 0.35
187
+ * at 50 % off is 0.18). Written on every Invoice row built under it since
188
+ * the field shipped — factura, CAEA, `pending_cae`, `rejected`, export, and
189
+ * a credit note whose factura carries it.
190
+ *
191
+ * ABSENT ⇒ the row was built under the LEGACY rule, `Number(x.toFixed(2))`
192
+ * on the binary double (the same 0.35 at 50 % off is 0.17). Forward-only,
193
+ * never backfilled: every row written before the field exists is legacy,
194
+ * and so is a NEW credit note crediting such a factura, which is built
195
+ * under its factura's rule so it can credit it exactly.
196
+ *
197
+ * Read where a voucher is rebuilt or re-rendered rather than read back: a
198
+ * credit note's economics follow its factura's rule, the pending-CAE drain
199
+ * rebuilds a row under its own, and the PDF / ESC/POS receipt replay a
200
+ * line under it.
201
+ */
202
+ amountRounding?: 'decimal';
182
203
  cae: string;
183
204
  caeExpiration: string;
184
205
  observations?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.521",
3
+ "version": "1.10.522",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",