@react-pakistan/util-functions 1.23.56 → 1.23.57
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.
|
@@ -120,7 +120,7 @@ var postPayment = function (_a) { return __awaiter(void 0, [_a], void 0, functio
|
|
|
120
120
|
allPaymentsForInvoice = _c.sent();
|
|
121
121
|
calculateBalance = function () {
|
|
122
122
|
if (paymentType === 'PARTIAL_AMOUNT') {
|
|
123
|
-
return allPaymentsForInvoice && allPaymentsForInvoice
|
|
123
|
+
return allPaymentsForInvoice && invoice.total - Number(amount) - allPaymentsForInvoice
|
|
124
124
|
.reduce(function (acc, _a) {
|
|
125
125
|
var paymentAmount = _a.amount;
|
|
126
126
|
return acc + paymentAmount;
|