@zauru-sdk/types 6.14.0 → 6.16.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/Custom.types.d.ts +46 -0
- package/package.json +2 -2
package/dist/Custom.types.d.ts
CHANGED
|
@@ -56,6 +56,39 @@ export type CostCalculationMemo = {
|
|
|
56
56
|
description: string;
|
|
57
57
|
steps: PriceAdjustmentStep[];
|
|
58
58
|
};
|
|
59
|
+
export type RejectionPercentageAdjustmentRule = {
|
|
60
|
+
nombre: string;
|
|
61
|
+
prioridad: number;
|
|
62
|
+
activa: boolean;
|
|
63
|
+
operacion: PriceAdjustmentOperation;
|
|
64
|
+
valor: number;
|
|
65
|
+
filtros: PriceAdjustmentFilters;
|
|
66
|
+
fechaEliminacion: string;
|
|
67
|
+
};
|
|
68
|
+
export type RejectionPercentageAdjustmentContext = {
|
|
69
|
+
itemIds: number[];
|
|
70
|
+
tipo?: string;
|
|
71
|
+
providerCategoryId?: number;
|
|
72
|
+
};
|
|
73
|
+
export type RejectionPercentageAdjustmentStep = {
|
|
74
|
+
ruleName: string;
|
|
75
|
+
operation: PriceAdjustmentOperation;
|
|
76
|
+
value: number;
|
|
77
|
+
appliedAmount: number;
|
|
78
|
+
runningTotal: number;
|
|
79
|
+
};
|
|
80
|
+
export type RejectionPercentageAdjustmentResult = {
|
|
81
|
+
basePercentage: number;
|
|
82
|
+
finalPercentage: number;
|
|
83
|
+
description: string;
|
|
84
|
+
steps: RejectionPercentageAdjustmentStep[];
|
|
85
|
+
};
|
|
86
|
+
export type RejectionCalculationMemo = {
|
|
87
|
+
basePercentage: number;
|
|
88
|
+
finalPercentage: number;
|
|
89
|
+
description: string;
|
|
90
|
+
steps: RejectionPercentageAdjustmentStep[];
|
|
91
|
+
};
|
|
59
92
|
export type ExtendedInsertBookingBody = {
|
|
60
93
|
movements: Partial<MovementGraphQL>[];
|
|
61
94
|
};
|
|
@@ -598,11 +631,21 @@ export type PurchaseOrderFinancialDetail = {
|
|
|
598
631
|
};
|
|
599
632
|
export type CalculatePurchaseOrderFinancialsInput = {
|
|
600
633
|
details?: PurchaseOrderFinancialDetail[] | null;
|
|
634
|
+
/** % de rechazo de origen, o el % final ya guardado en el memo */
|
|
601
635
|
rejectionPercentage?: number | string | null;
|
|
636
|
+
/** memo de la OC, para recuperar el % de origen y no apilar dos veces las reglas */
|
|
637
|
+
memo?: string | object;
|
|
638
|
+
/** reglas activas; si no se pasan, el % se usa tal cual */
|
|
639
|
+
rules?: Array<RejectionPercentageAdjustmentRule | WebAppRowGraphQL<RejectionPercentageAdjustmentRule>>;
|
|
640
|
+
ctx?: RejectionPercentageAdjustmentContext;
|
|
602
641
|
};
|
|
603
642
|
export type CalculatePurchaseOrderFinancialsResult = {
|
|
604
643
|
subtotal: number;
|
|
605
644
|
discount: number;
|
|
645
|
+
/** % de rechazo con el que se calculó el descuento */
|
|
646
|
+
rejectionPercentage: number;
|
|
647
|
+
/** trazabilidad de las reglas aplicadas, para guardar en el memo */
|
|
648
|
+
rejectionCalculations?: RejectionCalculationMemo;
|
|
606
649
|
};
|
|
607
650
|
export type CostoSemanal = {
|
|
608
651
|
item: number;
|
|
@@ -649,6 +692,8 @@ export type CalculateItemPriceFromWeeklyMatrixResult = PriceAdjustmentResult & {
|
|
|
649
692
|
source: WeeklyCostMatrixSource;
|
|
650
693
|
period: WeeklyCostPeriod;
|
|
651
694
|
specialItemId?: number;
|
|
695
|
+
/** categoría (programa) del proveedor con la que se filtraron las reglas */
|
|
696
|
+
providerCategoryId?: number;
|
|
652
697
|
};
|
|
653
698
|
export type DischargeHistory = {
|
|
654
699
|
creadoPor: string;
|
|
@@ -867,6 +912,7 @@ export type JsonMemoType = {
|
|
|
867
912
|
confirmed?: boolean;
|
|
868
913
|
rejectionPercentage?: number;
|
|
869
914
|
costCalculations?: CostCalculationMemo[];
|
|
915
|
+
rejectionCalculations?: RejectionCalculationMemo;
|
|
870
916
|
};
|
|
871
917
|
export type CloseOpenWorkOrderDetailInput = {
|
|
872
918
|
id: number | string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/types",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.16.0",
|
|
4
4
|
"description": "Estructuras de Zauru, tipado de modelos y modelos personalizados.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.1.6"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "9e840d01a540f2ab49233dda2cb2b0c916ffba0b"
|
|
26
26
|
}
|