@thecb/components 7.11.0-beta.0 → 7.11.0-beta.1
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/index.cjs.js
CHANGED
|
@@ -46562,6 +46562,9 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46562
46562
|
var minimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
46563
46563
|
var blockPartialPaymentOverpay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
46564
46564
|
var formConfig = lineItems.reduce(function (acc, item) {
|
|
46565
|
+
console.log("maximum is", maximum);
|
|
46566
|
+
console.log("item amount is", item.amount);
|
|
46567
|
+
console.log("block payment overpay", blockPartialPaymentOverpay);
|
|
46565
46568
|
var paymentMax = maximum;
|
|
46566
46569
|
|
|
46567
46570
|
if (blockPartialPaymentOverpay) {
|
|
@@ -46575,7 +46578,7 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46575
46578
|
}, []))];
|
|
46576
46579
|
|
|
46577
46580
|
if (!!maximum || blockPartialPaymentOverpay) {
|
|
46578
|
-
validators.push(validateSum(numberLessThanOrEqualTo(
|
|
46581
|
+
validators.push(validateSum(numberLessThanOrEqualTo(paymentMax), lineItems.filter(function (lineItem) {
|
|
46579
46582
|
return lineItem != item;
|
|
46580
46583
|
}).reduce(function (acc, curr) {
|
|
46581
46584
|
return [].concat(_toConsumableArray(acc), [curr.id]);
|