@vitrina/api 17.36.0 → 17.37.0

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.
package/dist/index.d.cts CHANGED
@@ -38143,7 +38143,7 @@ interface paths {
38143
38143
  *
38144
38144
  * `approved_by` and `approved_at` are all-or-nothing. Timestamps accept either UTC (`…Z`) or an explicit offset (`…-04:00`, Chile). Unknown body keys are a **400** — `tax` is one character from `tax_clp`, and silently discarding it would record "no IVA was entered" for a caller who entered it. Answers 201.
38145
38145
  *
38146
- * **`funding` IS THE BALANCE GATE (ERP S9-5, BR-418)** — where the money for this sale comes from. Supplying it makes the gate BINDING on this request: `price + Σ statutory add-ons` is weighed against `Σ these payments + retoma + credit` BEFORE anything is written, a short plan is a **400 that states the gap** with **no folio consumed**, and a plan that holds is written into the SAME transaction as the document — so a payment the database refuses rolls `V-n` back rather than burning it on a half-funded sale. **Over-funding is allowed** and comes back labelled as `saldo_a_favor_del_cliente_clp`; it is never an error and is never silently clamped.
38146
+ * **`funding` IS THE BALANCE GATE (ERP S9-5, BR-418)** — where the money for this sale comes from. Its payments are validated BEFORE anything is written (a malformed row is a **400** with **no folio consumed**) and written into the SAME transaction as the document — so a payment the database refuses rolls `V-n` back rather than burning it on a half-recorded sale. `price + Σ statutory add-ons` is weighed against `Σ these payments + retoma + credit`: **a plan that comes up short still issues** (201) — the usual case of a sale issued with only the deposit — and the note reads `funding.standing: "short"` with `funding.gap_clp` on `GET /sale-notes/{id}`; record the rest later with `POST /document-payments`. **Over-funding is allowed** and comes back labelled as `saldo_a_favor_del_cliente_clp`; it is never an error and is never silently clamped. A plan stated against a document with no `tax_clp` is a **400** (the balance cannot be computed: an unrecorded IVA is not zero).
38147
38147
  *
38148
38148
  * There is deliberately **no `retoma_clp` and no `credit_clp`** inside `funding`: a hand-typed figure for either would be an unbacked claim the gate then counts as money. **Omitting `funding` is not a bypass** — the document issues as it always has and reads `short` on `GET /sale-notes/{id}` with the gap stated. Use `POST /sale-notes/funding/preview` to see the gap before committing to the issue.
38149
38149
  *
package/dist/index.d.ts CHANGED
@@ -38143,7 +38143,7 @@ interface paths {
38143
38143
  *
38144
38144
  * `approved_by` and `approved_at` are all-or-nothing. Timestamps accept either UTC (`…Z`) or an explicit offset (`…-04:00`, Chile). Unknown body keys are a **400** — `tax` is one character from `tax_clp`, and silently discarding it would record "no IVA was entered" for a caller who entered it. Answers 201.
38145
38145
  *
38146
- * **`funding` IS THE BALANCE GATE (ERP S9-5, BR-418)** — where the money for this sale comes from. Supplying it makes the gate BINDING on this request: `price + Σ statutory add-ons` is weighed against `Σ these payments + retoma + credit` BEFORE anything is written, a short plan is a **400 that states the gap** with **no folio consumed**, and a plan that holds is written into the SAME transaction as the document — so a payment the database refuses rolls `V-n` back rather than burning it on a half-funded sale. **Over-funding is allowed** and comes back labelled as `saldo_a_favor_del_cliente_clp`; it is never an error and is never silently clamped.
38146
+ * **`funding` IS THE BALANCE GATE (ERP S9-5, BR-418)** — where the money for this sale comes from. Its payments are validated BEFORE anything is written (a malformed row is a **400** with **no folio consumed**) and written into the SAME transaction as the document — so a payment the database refuses rolls `V-n` back rather than burning it on a half-recorded sale. `price + Σ statutory add-ons` is weighed against `Σ these payments + retoma + credit`: **a plan that comes up short still issues** (201) — the usual case of a sale issued with only the deposit — and the note reads `funding.standing: "short"` with `funding.gap_clp` on `GET /sale-notes/{id}`; record the rest later with `POST /document-payments`. **Over-funding is allowed** and comes back labelled as `saldo_a_favor_del_cliente_clp`; it is never an error and is never silently clamped. A plan stated against a document with no `tax_clp` is a **400** (the balance cannot be computed: an unrecorded IVA is not zero).
38147
38147
  *
38148
38148
  * There is deliberately **no `retoma_clp` and no `credit_clp`** inside `funding`: a hand-typed figure for either would be an unbacked claim the gate then counts as money. **Omitting `funding` is not a bypass** — the document issues as it always has and reads `short` on `GET /sale-notes/{id}` with the gap stated. Use `POST /sale-notes/funding/preview` to see the gap before committing to the issue.
38149
38149
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "17.36.0",
3
+ "version": "17.37.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",