@win2win/shared 1.0.10 → 1.0.12
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/interfaces/liquidaciones/index.d.ts +2 -1
- package/dist/interfaces/liquidaciones/index.js +2 -1
- package/dist/interfaces/liquidaciones/item-liquidable.d.ts +63 -0
- package/dist/interfaces/liquidaciones/item-liquidable.js +2 -0
- package/dist/interfaces/liquidaciones/regla.d.ts +28 -0
- package/dist/interfaces/liquidaciones/regla.js +24 -0
- package/package.json +1 -1
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./comision"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./item-liquidable"), exports);
|
|
19
|
+
__exportStar(require("./regla"), exports);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Id } from "../shared";
|
|
2
|
+
import { TipoComision } from "./comision";
|
|
3
|
+
interface ItemLiquidable {
|
|
4
|
+
ID_CAPTACION: Id;
|
|
5
|
+
TIPO: string;
|
|
6
|
+
ESTADO: string;
|
|
7
|
+
pedido: ItemLiquidablePedido;
|
|
8
|
+
gerente: ItemLiquidableUsuarioLite;
|
|
9
|
+
jefe_delefacion: ItemLiquidableUsuarioLite;
|
|
10
|
+
situacion: {
|
|
11
|
+
ID_SITUACION: number;
|
|
12
|
+
NOMBRE: string;
|
|
13
|
+
};
|
|
14
|
+
captador: ItemLiquidableUsuarioLite;
|
|
15
|
+
delegacion: {
|
|
16
|
+
ID_DELEGACION: Id;
|
|
17
|
+
COD_DEL_MVX: string;
|
|
18
|
+
NOMBRE: string;
|
|
19
|
+
};
|
|
20
|
+
gerencia: {
|
|
21
|
+
ID_GERENCIA: Id;
|
|
22
|
+
NOMBRE: string;
|
|
23
|
+
};
|
|
24
|
+
comision: ItemLiquidableComision;
|
|
25
|
+
comision_calculada: ItemLiquidableComisionCalculada;
|
|
26
|
+
}
|
|
27
|
+
interface ItemLiquidableUsuarioLite {
|
|
28
|
+
ID_USUARIO: Id;
|
|
29
|
+
CONTACTO: {
|
|
30
|
+
NOMBRE: string;
|
|
31
|
+
APELLIDO: null;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface ItemLiquidableComision {
|
|
35
|
+
ID_COMISION_DET: Id;
|
|
36
|
+
TIPO: TipoComision;
|
|
37
|
+
ORGANIZADOR: number;
|
|
38
|
+
GERENTE: number;
|
|
39
|
+
SUPERVISOR: number;
|
|
40
|
+
PROMOTOR: number;
|
|
41
|
+
OVER1: number;
|
|
42
|
+
OVER2: number;
|
|
43
|
+
OVER3: number;
|
|
44
|
+
OVER4: number;
|
|
45
|
+
OVER5: number;
|
|
46
|
+
BOLSA: number;
|
|
47
|
+
}
|
|
48
|
+
type ItemLiquidableComisionCalculada = Omit<ItemLiquidableComision, 'ID_COMISION_DET' | 'TIPO' | 'BOLSA'>;
|
|
49
|
+
interface ItemLiquidablePedido {
|
|
50
|
+
ID_PEDIDO: Id;
|
|
51
|
+
IMP_TOTAL_PED: number;
|
|
52
|
+
IMP_NETO_PED: number;
|
|
53
|
+
FECHA_CREADO: Date;
|
|
54
|
+
R_PRODUCTOS_PEDIDO: {
|
|
55
|
+
ID_PRODUCTO_PEDIDO: number;
|
|
56
|
+
CODIGO_PIPE: string;
|
|
57
|
+
R_PRODUCTO: {
|
|
58
|
+
ID_PRODUCTO: number;
|
|
59
|
+
NOMBRE: string;
|
|
60
|
+
};
|
|
61
|
+
}[];
|
|
62
|
+
}
|
|
63
|
+
export { ItemLiquidable, ItemLiquidableComision, ItemLiquidableComisionCalculada, ItemLiquidablePedido, ItemLiquidableUsuarioLite };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const RULE_OPERATORS: readonly ["==", "!=", "<", ">", "IN"];
|
|
2
|
+
export declare const LOGIC_OPERATORS: readonly ["AND", "OR"];
|
|
3
|
+
export type RuleOperator = typeof RULE_OPERATORS[number];
|
|
4
|
+
export type LogicOperator = typeof LOGIC_OPERATORS[number];
|
|
5
|
+
export declare const SOURCES: readonly ["IMPORTACION", "TABLA", "CONTENEDOR"];
|
|
6
|
+
export type LiquidacionRuleSourceType = typeof SOURCES[number];
|
|
7
|
+
export interface LiquidacionRule {
|
|
8
|
+
id: string;
|
|
9
|
+
sourceType: LiquidacionRuleSourceType;
|
|
10
|
+
sourceCode: LiquidacionRuleTable | IdImportacion;
|
|
11
|
+
field: string;
|
|
12
|
+
operator: RuleOperator | LogicOperator;
|
|
13
|
+
value: any;
|
|
14
|
+
parentId?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const TABLES_FIELDS: {
|
|
17
|
+
readonly PRODUCTOS: readonly ["TIPO", "NOMBRE", "DESCRIPCION", "ID_GAMA", "ESTADO", "TAGS", "ID_PRODUCTO", "PROPS", "COD_ART_MVX"];
|
|
18
|
+
readonly CAPTACION: readonly ["ESTADO", "TIPO", "CAPTADO", "ID_CAPTACION", "FECHA_CAPTADO"];
|
|
19
|
+
};
|
|
20
|
+
export declare const TABLES: readonly [{
|
|
21
|
+
readonly label: "PRODUCTOS";
|
|
22
|
+
readonly value: "PRODUCTOS";
|
|
23
|
+
}, {
|
|
24
|
+
readonly label: "CAPTACIONES";
|
|
25
|
+
readonly value: "CAPTACION";
|
|
26
|
+
}];
|
|
27
|
+
export type LiquidacionRuleTable = typeof TABLES[number]['value'];
|
|
28
|
+
export type IdImportacion = number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TABLES = exports.TABLES_FIELDS = exports.SOURCES = exports.LOGIC_OPERATORS = exports.RULE_OPERATORS = void 0;
|
|
4
|
+
exports.RULE_OPERATORS = ['==', '!=', '<', '>', 'IN'];
|
|
5
|
+
exports.LOGIC_OPERATORS = ['AND', 'OR'];
|
|
6
|
+
exports.SOURCES = [
|
|
7
|
+
'IMPORTACION',
|
|
8
|
+
'TABLA',
|
|
9
|
+
'CONTENEDOR'
|
|
10
|
+
];
|
|
11
|
+
exports.TABLES_FIELDS = {
|
|
12
|
+
'PRODUCTOS': ['TIPO', 'NOMBRE', 'DESCRIPCION', 'ID_GAMA', 'ESTADO', 'TAGS', 'ID_PRODUCTO', 'PROPS', 'COD_ART_MVX'],
|
|
13
|
+
'CAPTACION': ['ESTADO', 'TIPO', 'CAPTADO', 'ID_CAPTACION', 'FECHA_CAPTADO']
|
|
14
|
+
};
|
|
15
|
+
exports.TABLES = [
|
|
16
|
+
{
|
|
17
|
+
label: 'PRODUCTOS',
|
|
18
|
+
value: 'PRODUCTOS'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'CAPTACIONES',
|
|
22
|
+
value: 'CAPTACION'
|
|
23
|
+
}
|
|
24
|
+
];
|