hvp-shared 6.47.1 → 6.48.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/constants/index.js
CHANGED
|
@@ -30,3 +30,4 @@ __exportStar(require("./job-category.constants"), exports);
|
|
|
30
30
|
__exportStar(require("./special-collaborators.constants"), exports);
|
|
31
31
|
__exportStar(require("./commissions.constants"), exports);
|
|
32
32
|
__exportStar(require("./hr.enums"), exports);
|
|
33
|
+
__exportStar(require("./qvet-cash-flow.enums"), exports);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QVET Cash Flow Review Enums
|
|
3
|
+
*
|
|
4
|
+
* Used in the cash flow review workflow where collaborators and admins
|
|
5
|
+
* annotate QVET cash transactions (entradas/salidas de caja) with
|
|
6
|
+
* supplier, account type, evidence, and invoice status.
|
|
7
|
+
*
|
|
8
|
+
* DB values use QVET abbreviations (CE, SE, FA, etc.) for historical
|
|
9
|
+
* compatibility. Enum keys use descriptive English names.
|
|
10
|
+
*/
|
|
11
|
+
/** Whether the transaction goes through formal or informal accounting */
|
|
12
|
+
export declare enum CashFlowAccountType {
|
|
13
|
+
FORMAL = "FORMAL",
|
|
14
|
+
INFORMAL = "INFORMAL"
|
|
15
|
+
}
|
|
16
|
+
/** Evidence status for the transaction receipt/voucher */
|
|
17
|
+
export declare enum CashFlowEvidence {
|
|
18
|
+
/** Comprobante guardado (receipt saved in Dropbox) */
|
|
19
|
+
SAVED = "CE",
|
|
20
|
+
/** Se extravió (receipt existed but was lost/not captured) */
|
|
21
|
+
MISSING = "SE",
|
|
22
|
+
/** Sin comprobantes (no receipt for this type of payment) */
|
|
23
|
+
NO_RECEIPT = "SC"
|
|
24
|
+
}
|
|
25
|
+
/** Invoice status for formal transactions */
|
|
26
|
+
export declare enum CashFlowInvoiceStatus {
|
|
27
|
+
/** Factura recibida */
|
|
28
|
+
INVOICED = "FA",
|
|
29
|
+
/** Proveedor factura automáticamente */
|
|
30
|
+
AUTO_INVOICED = "FA_AUTO",
|
|
31
|
+
/** Pendiente de factura */
|
|
32
|
+
PENDING = "PE",
|
|
33
|
+
/** No facturable (informales, etc.) */
|
|
34
|
+
NOT_APPLICABLE = "SF"
|
|
35
|
+
}
|
|
36
|
+
/** Validation result for a cash flow entry */
|
|
37
|
+
export declare enum CashFlowValidationStatus {
|
|
38
|
+
VALID = "valid",
|
|
39
|
+
INVALID = "invalid"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Invoice statuses allowed when accountType is FORMAL.
|
|
43
|
+
* NOT_APPLICABLE is only valid for INFORMAL accounts.
|
|
44
|
+
*/
|
|
45
|
+
export declare const FORMAL_ALLOWED_INVOICE_STATUSES: readonly [CashFlowInvoiceStatus.INVOICED, CashFlowInvoiceStatus.AUTO_INVOICED, CashFlowInvoiceStatus.PENDING];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* QVET Cash Flow Review Enums
|
|
4
|
+
*
|
|
5
|
+
* Used in the cash flow review workflow where collaborators and admins
|
|
6
|
+
* annotate QVET cash transactions (entradas/salidas de caja) with
|
|
7
|
+
* supplier, account type, evidence, and invoice status.
|
|
8
|
+
*
|
|
9
|
+
* DB values use QVET abbreviations (CE, SE, FA, etc.) for historical
|
|
10
|
+
* compatibility. Enum keys use descriptive English names.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.FORMAL_ALLOWED_INVOICE_STATUSES = exports.CashFlowValidationStatus = exports.CashFlowInvoiceStatus = exports.CashFlowEvidence = exports.CashFlowAccountType = void 0;
|
|
14
|
+
/** Whether the transaction goes through formal or informal accounting */
|
|
15
|
+
var CashFlowAccountType;
|
|
16
|
+
(function (CashFlowAccountType) {
|
|
17
|
+
CashFlowAccountType["FORMAL"] = "FORMAL";
|
|
18
|
+
CashFlowAccountType["INFORMAL"] = "INFORMAL";
|
|
19
|
+
})(CashFlowAccountType || (exports.CashFlowAccountType = CashFlowAccountType = {}));
|
|
20
|
+
/** Evidence status for the transaction receipt/voucher */
|
|
21
|
+
var CashFlowEvidence;
|
|
22
|
+
(function (CashFlowEvidence) {
|
|
23
|
+
/** Comprobante guardado (receipt saved in Dropbox) */
|
|
24
|
+
CashFlowEvidence["SAVED"] = "CE";
|
|
25
|
+
/** Se extravió (receipt existed but was lost/not captured) */
|
|
26
|
+
CashFlowEvidence["MISSING"] = "SE";
|
|
27
|
+
/** Sin comprobantes (no receipt for this type of payment) */
|
|
28
|
+
CashFlowEvidence["NO_RECEIPT"] = "SC";
|
|
29
|
+
})(CashFlowEvidence || (exports.CashFlowEvidence = CashFlowEvidence = {}));
|
|
30
|
+
/** Invoice status for formal transactions */
|
|
31
|
+
var CashFlowInvoiceStatus;
|
|
32
|
+
(function (CashFlowInvoiceStatus) {
|
|
33
|
+
/** Factura recibida */
|
|
34
|
+
CashFlowInvoiceStatus["INVOICED"] = "FA";
|
|
35
|
+
/** Proveedor factura automáticamente */
|
|
36
|
+
CashFlowInvoiceStatus["AUTO_INVOICED"] = "FA_AUTO";
|
|
37
|
+
/** Pendiente de factura */
|
|
38
|
+
CashFlowInvoiceStatus["PENDING"] = "PE";
|
|
39
|
+
/** No facturable (informales, etc.) */
|
|
40
|
+
CashFlowInvoiceStatus["NOT_APPLICABLE"] = "SF";
|
|
41
|
+
})(CashFlowInvoiceStatus || (exports.CashFlowInvoiceStatus = CashFlowInvoiceStatus = {}));
|
|
42
|
+
/** Validation result for a cash flow entry */
|
|
43
|
+
var CashFlowValidationStatus;
|
|
44
|
+
(function (CashFlowValidationStatus) {
|
|
45
|
+
CashFlowValidationStatus["VALID"] = "valid";
|
|
46
|
+
CashFlowValidationStatus["INVALID"] = "invalid";
|
|
47
|
+
})(CashFlowValidationStatus || (exports.CashFlowValidationStatus = CashFlowValidationStatus = {}));
|
|
48
|
+
/**
|
|
49
|
+
* Invoice statuses allowed when accountType is FORMAL.
|
|
50
|
+
* NOT_APPLICABLE is only valid for INFORMAL accounts.
|
|
51
|
+
*/
|
|
52
|
+
exports.FORMAL_ALLOWED_INVOICE_STATUSES = [
|
|
53
|
+
CashFlowInvoiceStatus.INVOICED,
|
|
54
|
+
CashFlowInvoiceStatus.AUTO_INVOICED,
|
|
55
|
+
CashFlowInvoiceStatus.PENDING,
|
|
56
|
+
];
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
import { CashFlowAccountType, CashFlowEvidence, CashFlowInvoiceStatus, CashFlowValidationStatus } from '../../constants/qvet-cash-flow.enums';
|
|
26
27
|
/**
|
|
27
28
|
* @deprecated No longer used. Backend uses standard ApiListSuccessResponse with meta.
|
|
28
29
|
* Kept for backward compatibility during migration.
|
|
@@ -613,6 +614,50 @@ export interface QvetCashClosingsQueryParams {
|
|
|
613
614
|
skip?: number;
|
|
614
615
|
sort?: string;
|
|
615
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* Review data added by collaborators/admins to a QVET cash flow entry.
|
|
619
|
+
*
|
|
620
|
+
* QVET-sourced fields (branch, amount, etc.) remain immutable.
|
|
621
|
+
* All editable data lives in this subdocument.
|
|
622
|
+
*
|
|
623
|
+
* @example PATCH /api/qvet/cash-flows/:id/review
|
|
624
|
+
*/
|
|
625
|
+
export interface CashFlowReview {
|
|
626
|
+
/** Proveedor (may differ from QVET's supplier field) */
|
|
627
|
+
supplier?: string;
|
|
628
|
+
/** Tipo de cuenta assigned by collaborator */
|
|
629
|
+
accountType?: CashFlowAccountType;
|
|
630
|
+
/** Receipt/voucher evidence status */
|
|
631
|
+
evidence?: CashFlowEvidence;
|
|
632
|
+
/** Invoice status (FORMAL accounts cannot be NOT_APPLICABLE) */
|
|
633
|
+
invoiceStatus?: CashFlowInvoiceStatus;
|
|
634
|
+
/** Auto-calculated or admin-overridden validation result */
|
|
635
|
+
validationStatus?: CashFlowValidationStatus;
|
|
636
|
+
/** Tipo de cuenta overridden by admin (used for accounting export) */
|
|
637
|
+
adminAccountType?: CashFlowAccountType;
|
|
638
|
+
/** Free-text observations */
|
|
639
|
+
observations?: string;
|
|
640
|
+
/** Collaborator ID who last updated */
|
|
641
|
+
lastUpdatedBy?: string;
|
|
642
|
+
/** ISO 8601 timestamp of last update */
|
|
643
|
+
lastUpdatedAt?: string;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Request body for updating a cash flow review.
|
|
647
|
+
*
|
|
648
|
+
* @example PATCH /api/qvet/cash-flows/:id/review
|
|
649
|
+
*/
|
|
650
|
+
export interface UpdateCashFlowReviewRequest {
|
|
651
|
+
supplier?: string;
|
|
652
|
+
accountType?: CashFlowAccountType;
|
|
653
|
+
evidence?: CashFlowEvidence;
|
|
654
|
+
invoiceStatus?: CashFlowInvoiceStatus;
|
|
655
|
+
/** Only admin can override */
|
|
656
|
+
validationStatus?: CashFlowValidationStatus;
|
|
657
|
+
/** Only admin can set */
|
|
658
|
+
adminAccountType?: CashFlowAccountType;
|
|
659
|
+
observations?: string;
|
|
660
|
+
}
|
|
616
661
|
/**
|
|
617
662
|
* Single cash flow record from QVET (Entradas/Salidas de Caja)
|
|
618
663
|
* Represents cash in/out transactions outside of regular sales
|
|
@@ -634,6 +679,7 @@ export interface QvetCashFlowResponse {
|
|
|
634
679
|
supplier: string;
|
|
635
680
|
staffName: string;
|
|
636
681
|
closingDate: string;
|
|
682
|
+
review?: CashFlowReview;
|
|
637
683
|
syncedAt: string;
|
|
638
684
|
}
|
|
639
685
|
/**
|