hvp-shared 6.16.0 → 6.18.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.
|
@@ -14,6 +14,8 @@ export declare enum JobType {
|
|
|
14
14
|
SYNC_TRANSFERS = "SYNC_TRANSFERS",
|
|
15
15
|
SYNC_MOVEMENTS = "SYNC_MOVEMENTS",
|
|
16
16
|
SYNC_COLLECTIONS = "SYNC_COLLECTIONS",
|
|
17
|
+
SYNC_CASH_CLOSINGS = "SYNC_CASH_CLOSINGS",
|
|
18
|
+
SYNC_CASH_FLOWS = "SYNC_CASH_FLOWS",
|
|
17
19
|
SYNC_STOCK_CONFIG = "SYNC_STOCK_CONFIG",
|
|
18
20
|
SYNC_CATALOG = "SYNC_CATALOG",
|
|
19
21
|
SYNC_CLIENTS = "SYNC_CLIENTS",
|
|
@@ -36,6 +38,10 @@ export declare enum ReportType {
|
|
|
36
38
|
TRANSFERS = "TRANSFERS",
|
|
37
39
|
/** Collections (Cobros) report - uses date range params */
|
|
38
40
|
COLLECTIONS = "COLLECTIONS",
|
|
41
|
+
/** Cash closings (Cierres de Caja) report - uses date range params */
|
|
42
|
+
CASH_CLOSINGS = "CASH_CLOSINGS",
|
|
43
|
+
/** Cash flows (Entradas/Salidas de Caja) report - uses date range params */
|
|
44
|
+
CASH_FLOWS = "CASH_FLOWS",
|
|
39
45
|
/** Inventory snapshot - uses snapshot date param */
|
|
40
46
|
INVENTORY_SNAPSHOT = "INVENTORY_SNAPSHOT",
|
|
41
47
|
/** Clients list - no date params required */
|
|
@@ -18,6 +18,8 @@ var JobType;
|
|
|
18
18
|
JobType["SYNC_TRANSFERS"] = "SYNC_TRANSFERS";
|
|
19
19
|
JobType["SYNC_MOVEMENTS"] = "SYNC_MOVEMENTS";
|
|
20
20
|
JobType["SYNC_COLLECTIONS"] = "SYNC_COLLECTIONS";
|
|
21
|
+
JobType["SYNC_CASH_CLOSINGS"] = "SYNC_CASH_CLOSINGS";
|
|
22
|
+
JobType["SYNC_CASH_FLOWS"] = "SYNC_CASH_FLOWS";
|
|
21
23
|
JobType["SYNC_STOCK_CONFIG"] = "SYNC_STOCK_CONFIG";
|
|
22
24
|
JobType["SYNC_CATALOG"] = "SYNC_CATALOG";
|
|
23
25
|
JobType["SYNC_CLIENTS"] = "SYNC_CLIENTS";
|
|
@@ -41,6 +43,10 @@ var ReportType;
|
|
|
41
43
|
ReportType["TRANSFERS"] = "TRANSFERS";
|
|
42
44
|
/** Collections (Cobros) report - uses date range params */
|
|
43
45
|
ReportType["COLLECTIONS"] = "COLLECTIONS";
|
|
46
|
+
/** Cash closings (Cierres de Caja) report - uses date range params */
|
|
47
|
+
ReportType["CASH_CLOSINGS"] = "CASH_CLOSINGS";
|
|
48
|
+
/** Cash flows (Entradas/Salidas de Caja) report - uses date range params */
|
|
49
|
+
ReportType["CASH_FLOWS"] = "CASH_FLOWS";
|
|
44
50
|
/** Inventory snapshot - uses snapshot date param */
|
|
45
51
|
ReportType["INVENTORY_SNAPSHOT"] = "INVENTORY_SNAPSHOT";
|
|
46
52
|
/** Clients list - no date params required */
|
|
@@ -70,6 +76,8 @@ exports.REPORT_PARAM_TYPES = {
|
|
|
70
76
|
[ReportType.MOVEMENTS]: 'date_range',
|
|
71
77
|
[ReportType.TRANSFERS]: 'date_range',
|
|
72
78
|
[ReportType.COLLECTIONS]: 'date_range',
|
|
79
|
+
[ReportType.CASH_CLOSINGS]: 'date_range',
|
|
80
|
+
[ReportType.CASH_FLOWS]: 'date_range',
|
|
73
81
|
[ReportType.INVENTORY_SNAPSHOT]: 'snapshot',
|
|
74
82
|
[ReportType.CLIENTS]: 'no_params',
|
|
75
83
|
[ReportType.CATALOG]: 'no_params',
|
|
@@ -106,6 +114,8 @@ exports.JOB_TYPE_LABELS = {
|
|
|
106
114
|
[JobType.SYNC_TRANSFERS]: 'Sincronizar Traspasos',
|
|
107
115
|
[JobType.SYNC_MOVEMENTS]: 'Sincronizar Movimientos',
|
|
108
116
|
[JobType.SYNC_COLLECTIONS]: 'Sincronizar Cobros',
|
|
117
|
+
[JobType.SYNC_CASH_CLOSINGS]: 'Sincronizar Cierres de Caja',
|
|
118
|
+
[JobType.SYNC_CASH_FLOWS]: 'Sincronizar Entradas/Salidas',
|
|
109
119
|
[JobType.SYNC_STOCK_CONFIG]: 'Sincronizar Config. Stock',
|
|
110
120
|
[JobType.SYNC_CATALOG]: 'Sincronizar Catálogo',
|
|
111
121
|
[JobType.SYNC_CLIENTS]: 'Sincronizar Clientes',
|
|
@@ -122,6 +132,8 @@ exports.REPORT_TYPE_LABELS = {
|
|
|
122
132
|
[ReportType.MOVEMENTS]: 'Movimientos',
|
|
123
133
|
[ReportType.TRANSFERS]: 'Traspasos',
|
|
124
134
|
[ReportType.COLLECTIONS]: 'Cobros',
|
|
135
|
+
[ReportType.CASH_CLOSINGS]: 'Cierres de Caja',
|
|
136
|
+
[ReportType.CASH_FLOWS]: 'Entradas/Salidas',
|
|
125
137
|
[ReportType.INVENTORY_SNAPSHOT]: 'Cortes de Inventario',
|
|
126
138
|
[ReportType.CLIENTS]: 'Clientes',
|
|
127
139
|
[ReportType.CATALOG]: 'Catálogo',
|
|
@@ -569,6 +569,30 @@ export interface QvetCashClosingsByStaffItem {
|
|
|
569
569
|
totalSales: number;
|
|
570
570
|
branches: string[];
|
|
571
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* Cash closing grouped response - one entry per closing with payment methods nested.
|
|
574
|
+
* Used for displaying closings as single cards/rows in the UI.
|
|
575
|
+
* Backend returns: ApiListSuccessResponse<QvetCashClosingGroupedResponse>
|
|
576
|
+
*
|
|
577
|
+
* @example GET /api/qvet/cash-closings/grouped?year=2026&month=1
|
|
578
|
+
*/
|
|
579
|
+
export interface QvetCashClosingGroupedResponse {
|
|
580
|
+
closingNumber: number;
|
|
581
|
+
closingDate: string;
|
|
582
|
+
previousClosingDate: string;
|
|
583
|
+
cashRegister: string;
|
|
584
|
+
branch: string;
|
|
585
|
+
staffName: string;
|
|
586
|
+
closingTotal: number;
|
|
587
|
+
collectedAmount: number;
|
|
588
|
+
dayCollections: number;
|
|
589
|
+
cashOut: number;
|
|
590
|
+
syncedAt: string;
|
|
591
|
+
paymentMethods: {
|
|
592
|
+
method: string;
|
|
593
|
+
amount: number;
|
|
594
|
+
}[];
|
|
595
|
+
}
|
|
572
596
|
/**
|
|
573
597
|
* Query parameters for cash closings endpoint
|
|
574
598
|
*/
|
|
@@ -587,3 +611,86 @@ export interface QvetCashClosingsQueryParams {
|
|
|
587
611
|
skip?: number;
|
|
588
612
|
sort?: string;
|
|
589
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Single cash flow record from QVET (Entradas/Salidas de Caja)
|
|
616
|
+
* Represents cash in/out transactions outside of regular sales
|
|
617
|
+
* Examples: petty cash, reimbursements, supplier payments
|
|
618
|
+
*
|
|
619
|
+
* Transaction types:
|
|
620
|
+
* - ENTRADA CAJA: Cash in (positive amount)
|
|
621
|
+
* - SALIDA CAJA: Cash out (negative amount)
|
|
622
|
+
*/
|
|
623
|
+
export interface QvetCashFlowResponse {
|
|
624
|
+
id: string;
|
|
625
|
+
branch: string;
|
|
626
|
+
cashRegister: string;
|
|
627
|
+
transactionDate: string;
|
|
628
|
+
transactionType: string;
|
|
629
|
+
paymentMethod: string;
|
|
630
|
+
amount: number;
|
|
631
|
+
comments: string;
|
|
632
|
+
supplier: string;
|
|
633
|
+
staffName: string;
|
|
634
|
+
closingDate: string;
|
|
635
|
+
syncedAt: string;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Cash flows summary statistics data.
|
|
639
|
+
* Backend wraps with: ApiSingleSuccessResponse<QvetCashFlowsSummaryData>
|
|
640
|
+
*/
|
|
641
|
+
export interface QvetCashFlowsSummaryData {
|
|
642
|
+
totalRecords: number;
|
|
643
|
+
totalCashIn: number;
|
|
644
|
+
totalCashOut: number;
|
|
645
|
+
netFlow: number;
|
|
646
|
+
byTransactionType: {
|
|
647
|
+
type: string;
|
|
648
|
+
totalAmount: number;
|
|
649
|
+
count: number;
|
|
650
|
+
}[];
|
|
651
|
+
byPaymentMethod: {
|
|
652
|
+
method: string;
|
|
653
|
+
totalAmount: number;
|
|
654
|
+
count: number;
|
|
655
|
+
}[];
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Cash flows grouped by staff member.
|
|
659
|
+
* Backend returns: ApiSingleSuccessResponse<QvetCashFlowsByStaffItem[]>
|
|
660
|
+
*/
|
|
661
|
+
export interface QvetCashFlowsByStaffItem {
|
|
662
|
+
staffName: string;
|
|
663
|
+
totalCashIn: number;
|
|
664
|
+
totalCashOut: number;
|
|
665
|
+
netFlow: number;
|
|
666
|
+
recordCount: number;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Cash flows grouped by supplier/recipient.
|
|
670
|
+
* Backend returns: ApiSingleSuccessResponse<QvetCashFlowsBySupplierItem[]>
|
|
671
|
+
*/
|
|
672
|
+
export interface QvetCashFlowsBySupplierItem {
|
|
673
|
+
supplier: string;
|
|
674
|
+
totalAmount: number;
|
|
675
|
+
recordCount: number;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Query parameters for cash flows endpoint
|
|
679
|
+
*/
|
|
680
|
+
export interface QvetCashFlowsQueryParams {
|
|
681
|
+
startDate?: string;
|
|
682
|
+
endDate?: string;
|
|
683
|
+
year?: number;
|
|
684
|
+
month?: number;
|
|
685
|
+
halfMonth?: 1 | 2;
|
|
686
|
+
branch?: string;
|
|
687
|
+
cashRegister?: string;
|
|
688
|
+
transactionType?: string;
|
|
689
|
+
paymentMethod?: string;
|
|
690
|
+
staffName?: string;
|
|
691
|
+
supplier?: string;
|
|
692
|
+
limit?: number;
|
|
693
|
+
page?: number;
|
|
694
|
+
skip?: number;
|
|
695
|
+
sort?: string;
|
|
696
|
+
}
|