hvp-shared 6.48.0 → 6.49.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.
|
@@ -43,3 +43,20 @@ export declare enum CashFlowValidationStatus {
|
|
|
43
43
|
* NOT_APPLICABLE is only valid for INFORMAL accounts.
|
|
44
44
|
*/
|
|
45
45
|
export declare const FORMAL_ALLOWED_INVOICE_STATUSES: readonly [CashFlowInvoiceStatus.INVOICED, CashFlowInvoiceStatus.AUTO_INVOICED, CashFlowInvoiceStatus.PENDING];
|
|
46
|
+
/**
|
|
47
|
+
* Structured reasons why a cash flow entry is invalid.
|
|
48
|
+
* Replaces free-text auto-generated observations.
|
|
49
|
+
* Only applies to SALIDA CAJA; ENTRADA CAJA is always valid.
|
|
50
|
+
*/
|
|
51
|
+
export declare enum CashFlowInvalidReason {
|
|
52
|
+
/** accountType missing (except DIFERENCIAS → always INFORMAL) */
|
|
53
|
+
MISSING_ACCOUNT_TYPE = "SIN_TIPO_CUENTA",
|
|
54
|
+
/** review.supplier missing/empty (SALIDA only) */
|
|
55
|
+
MISSING_SUPPLIER = "SIN_PROVEEDOR",
|
|
56
|
+
/** FORMAL account with invoiceStatus NOT_APPLICABLE */
|
|
57
|
+
FORMAL_WITHOUT_INVOICE = "FORMAL_SIN_FACTURA",
|
|
58
|
+
/** evidence field missing */
|
|
59
|
+
MISSING_EVIDENCE = "SIN_EVIDENCIA"
|
|
60
|
+
}
|
|
61
|
+
/** Spanish labels for displaying invalid reasons in UI */
|
|
62
|
+
export declare const INVALID_REASON_LABELS: Record<CashFlowInvalidReason, string>;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* compatibility. Enum keys use descriptive English names.
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.FORMAL_ALLOWED_INVOICE_STATUSES = exports.CashFlowValidationStatus = exports.CashFlowInvoiceStatus = exports.CashFlowEvidence = exports.CashFlowAccountType = void 0;
|
|
13
|
+
exports.INVALID_REASON_LABELS = exports.CashFlowInvalidReason = exports.FORMAL_ALLOWED_INVOICE_STATUSES = exports.CashFlowValidationStatus = exports.CashFlowInvoiceStatus = exports.CashFlowEvidence = exports.CashFlowAccountType = void 0;
|
|
14
14
|
/** Whether the transaction goes through formal or informal accounting */
|
|
15
15
|
var CashFlowAccountType;
|
|
16
16
|
(function (CashFlowAccountType) {
|
|
@@ -54,3 +54,26 @@ exports.FORMAL_ALLOWED_INVOICE_STATUSES = [
|
|
|
54
54
|
CashFlowInvoiceStatus.AUTO_INVOICED,
|
|
55
55
|
CashFlowInvoiceStatus.PENDING,
|
|
56
56
|
];
|
|
57
|
+
/**
|
|
58
|
+
* Structured reasons why a cash flow entry is invalid.
|
|
59
|
+
* Replaces free-text auto-generated observations.
|
|
60
|
+
* Only applies to SALIDA CAJA; ENTRADA CAJA is always valid.
|
|
61
|
+
*/
|
|
62
|
+
var CashFlowInvalidReason;
|
|
63
|
+
(function (CashFlowInvalidReason) {
|
|
64
|
+
/** accountType missing (except DIFERENCIAS → always INFORMAL) */
|
|
65
|
+
CashFlowInvalidReason["MISSING_ACCOUNT_TYPE"] = "SIN_TIPO_CUENTA";
|
|
66
|
+
/** review.supplier missing/empty (SALIDA only) */
|
|
67
|
+
CashFlowInvalidReason["MISSING_SUPPLIER"] = "SIN_PROVEEDOR";
|
|
68
|
+
/** FORMAL account with invoiceStatus NOT_APPLICABLE */
|
|
69
|
+
CashFlowInvalidReason["FORMAL_WITHOUT_INVOICE"] = "FORMAL_SIN_FACTURA";
|
|
70
|
+
/** evidence field missing */
|
|
71
|
+
CashFlowInvalidReason["MISSING_EVIDENCE"] = "SIN_EVIDENCIA";
|
|
72
|
+
})(CashFlowInvalidReason || (exports.CashFlowInvalidReason = CashFlowInvalidReason = {}));
|
|
73
|
+
/** Spanish labels for displaying invalid reasons in UI */
|
|
74
|
+
exports.INVALID_REASON_LABELS = {
|
|
75
|
+
[CashFlowInvalidReason.MISSING_ACCOUNT_TYPE]: "Sin tipo de cuenta",
|
|
76
|
+
[CashFlowInvalidReason.MISSING_SUPPLIER]: "Sin proveedor",
|
|
77
|
+
[CashFlowInvalidReason.FORMAL_WITHOUT_INVOICE]: "Formal sin factura",
|
|
78
|
+
[CashFlowInvalidReason.MISSING_EVIDENCE]: "Sin evidencia",
|
|
79
|
+
};
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
import { CashFlowAccountType, CashFlowEvidence, CashFlowInvoiceStatus, CashFlowValidationStatus } from '../../constants/qvet-cash-flow.enums';
|
|
26
|
+
import { CashFlowAccountType, CashFlowEvidence, CashFlowInvalidReason, CashFlowInvoiceStatus, CashFlowValidationStatus } from '../../constants/qvet-cash-flow.enums';
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated No longer used. Backend uses standard ApiListSuccessResponse with meta.
|
|
29
29
|
* Kept for backward compatibility during migration.
|
|
@@ -635,7 +635,9 @@ export interface CashFlowReview {
|
|
|
635
635
|
validationStatus?: CashFlowValidationStatus;
|
|
636
636
|
/** Tipo de cuenta overridden by admin (used for accounting export) */
|
|
637
637
|
adminAccountType?: CashFlowAccountType;
|
|
638
|
-
/**
|
|
638
|
+
/** Structured reasons why this entry is invalid (SALIDA only) */
|
|
639
|
+
invalidReasons?: CashFlowInvalidReason[];
|
|
640
|
+
/** Free-text observations (human notes only, not auto-generated) */
|
|
639
641
|
observations?: string;
|
|
640
642
|
/** Collaborator ID who last updated */
|
|
641
643
|
lastUpdatedBy?: string;
|
|
@@ -656,6 +658,8 @@ export interface UpdateCashFlowReviewRequest {
|
|
|
656
658
|
validationStatus?: CashFlowValidationStatus;
|
|
657
659
|
/** Only admin can set */
|
|
658
660
|
adminAccountType?: CashFlowAccountType;
|
|
661
|
+
/** Structured reasons why this entry is invalid */
|
|
662
|
+
invalidReasons?: CashFlowInvalidReason[];
|
|
659
663
|
observations?: string;
|
|
660
664
|
}
|
|
661
665
|
/**
|