law-common 11.2.1 → 11.3.1-beta.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.
|
@@ -77,7 +77,7 @@ const transitionApprovedStatusDeleteAction = createActionConfig(vendor_invoice_a
|
|
|
77
77
|
const createTransitionApprovedStatusPaymentAction = createTransition((context) => {
|
|
78
78
|
const { vendorInvoicePayment, existingVendorInvoice } = context;
|
|
79
79
|
if (vendorInvoicePayment && existingVendorInvoice) {
|
|
80
|
-
if (existingVendorInvoice.
|
|
80
|
+
if (existingVendorInvoice.totalNetAmount === existingVendorInvoice.paidAmount + existingVendorInvoice.adjustedAmount + vendorInvoicePayment.amount) {
|
|
81
81
|
return vendor_invoice_action_status_enum_1.VendorInvoiceStatusEnum.PAYMENT_DISBURSE;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -157,8 +157,8 @@ exports.vendorInvoiceFlowConfig = {
|
|
|
157
157
|
},
|
|
158
158
|
[vendor_invoice_action_status_enum_1.VendorInvoiceStatusEnum.PAYMENT_DISBURSE]: {
|
|
159
159
|
actions: {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
// [VendorInvoiceActionEnum.UPDATE_PAYMENT]: transitionPaymentDisburseStatusUpdatePaymentAction,
|
|
161
|
+
// [VendorInvoiceActionEnum.DELETE_PAYMENT]: transitionPaymentDisburseStatusDeleteAction,
|
|
162
162
|
},
|
|
163
163
|
},
|
|
164
164
|
};
|
|
@@ -240,7 +240,7 @@ class VendorInvoiceEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
240
240
|
return nextStatus;
|
|
241
241
|
}
|
|
242
242
|
getBalanceAmount() {
|
|
243
|
-
return this.
|
|
243
|
+
return this.totalNetAmount - this.paidAmount - this.adjustedAmount;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
exports.VendorInvoiceEntityModel = VendorInvoiceEntityModel;
|