sinfactura-types 1.10.401 → 1.10.402
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/cjs/inventory.js +2 -0
- package/dist/inventory.d.ts +9 -1
- package/dist/inventory.js +2 -0
- package/dist/store.d.ts +5 -5
- package/package.json +1 -1
package/dist/cjs/inventory.js
CHANGED
|
@@ -32,6 +32,8 @@ exports.STOCK_MOVEMENT_TYPES = [
|
|
|
32
32
|
* unions belong to two ledgers that run side by side permanently, so the mapping
|
|
33
33
|
* is what anything showing both has to apply at read time; neither list is being
|
|
34
34
|
* retired and no migration folds one into the other.
|
|
35
|
+
*
|
|
36
|
+
* ⚠️ The union's `cutover_seed` is missing here on purpose: it is server-only.
|
|
35
37
|
*/
|
|
36
38
|
exports.STOCK_MOVEMENT_REASONS = [
|
|
37
39
|
'count_correction',
|
package/dist/inventory.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare const STOCK_MOVEMENT_TYPES: readonly ["receipt", "sale", "sale_un
|
|
|
17
17
|
* unions belong to two ledgers that run side by side permanently, so the mapping
|
|
18
18
|
* is what anything showing both has to apply at read time; neither list is being
|
|
19
19
|
* retired and no migration folds one into the other.
|
|
20
|
+
*
|
|
21
|
+
* ⚠️ The union's `cutover_seed` is missing here on purpose: it is server-only.
|
|
20
22
|
*/
|
|
21
23
|
export declare const STOCK_MOVEMENT_REASONS: readonly ["count_correction", "shrinkage", "damage", "expiry", "theft", "admin_error", "other"];
|
|
22
24
|
/** Every state an individual hold can hold. Runtime value for the api's Zod enum. */
|
|
@@ -636,8 +638,14 @@ declare global {
|
|
|
636
638
|
* is included because the count-session entity emits adjustment rows on
|
|
637
639
|
* finalise: without it, the platform's most common adjustment is the one
|
|
638
640
|
* reason that cannot be stated, and every variance would land as `other`.
|
|
641
|
+
*
|
|
642
|
+
* ⚠️ `cutover_seed` is SERVER-ONLY and deliberately absent from
|
|
643
|
+
* `STOCK_MOVEMENT_REASONS`, the list a request may name: it marks the one-off
|
|
644
|
+
* `adjustment` the per-store cutover to depósito stock writes (the api's
|
|
645
|
+
* ADR-0001), so the seed stays identifiable in the ledger. It is not a loss
|
|
646
|
+
* and a loss report must not count it as one.
|
|
639
647
|
*/
|
|
640
|
-
type StockMovementReason = 'count_correction' | 'shrinkage' | 'damage' | 'expiry' | 'theft' | 'admin_error' | 'other';
|
|
648
|
+
type StockMovementReason = 'count_correction' | 'shrinkage' | 'damage' | 'expiry' | 'theft' | 'admin_error' | 'other' | 'cutover_seed';
|
|
641
649
|
/**
|
|
642
650
|
* What happened to an individual hold.
|
|
643
651
|
*
|
package/dist/inventory.js
CHANGED
|
@@ -29,6 +29,8 @@ export const STOCK_MOVEMENT_TYPES = [
|
|
|
29
29
|
* unions belong to two ledgers that run side by side permanently, so the mapping
|
|
30
30
|
* is what anything showing both has to apply at read time; neither list is being
|
|
31
31
|
* retired and no migration folds one into the other.
|
|
32
|
+
*
|
|
33
|
+
* ⚠️ The union's `cutover_seed` is missing here on purpose: it is server-only.
|
|
32
34
|
*/
|
|
33
35
|
export const STOCK_MOVEMENT_REASONS = [
|
|
34
36
|
'count_correction',
|
package/dist/store.d.ts
CHANGED
|
@@ -776,11 +776,11 @@ declare global {
|
|
|
776
776
|
* moves the level in the same transaction as `Product.stock`, which
|
|
777
777
|
* stays as the cached store total.
|
|
778
778
|
*
|
|
779
|
-
* ⚠️ Absent means `'store'`. Operator-owned: no request body sets it
|
|
780
|
-
*
|
|
781
|
-
* existing gap into its primary depósito. Rollback is flipping
|
|
782
|
-
* the store total is correct either way. The sale paths read it
|
|
783
|
-
* whether to record `OrderLine.warehouseId`.
|
|
779
|
+
* ⚠️ Absent means `'store'`. Operator-owned: no request body sets it. Its
|
|
780
|
+
* only writer is the operator-run cutover, which flips it and then seeds
|
|
781
|
+
* the store's existing gap into its primary depósito. Rollback is flipping
|
|
782
|
+
* it back; the store total is correct either way. The sale paths read it
|
|
783
|
+
* to decide whether to record `OrderLine.warehouseId`.
|
|
784
784
|
*/
|
|
785
785
|
stockAuthority?: StockAuthority;
|
|
786
786
|
afipCertAlert?: {
|