ng-easycommerce 0.0.643 → 0.0.644
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/README.md +2 -0
- package/bundles/ng-easycommerce.umd.js +7 -1
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/services/cart.service.js +8 -2
- package/esm5/lib/services/cart.service.js +8 -2
- package/fesm2015/ng-easycommerce.js +7 -1
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +7 -1
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# version 0.0.644
|
|
2
|
+
- se corrigio para considerar `allowAnyPaymentMethod` y `allowExceedBalance` antes de redirigir al checkout
|
|
1
3
|
# version 0.0.643
|
|
2
4
|
- `detail-checkout-block`: se corrigió la lógica para mostrar "impuestos" o "impuestos nacionales" en el checkout según la configuración del canal.
|
|
3
5
|
# version 0.0.642
|
|
@@ -4975,14 +4975,20 @@
|
|
|
4975
4975
|
return true;
|
|
4976
4976
|
};
|
|
4977
4977
|
this.hasSufficientCreditsForCartTotal = function () {
|
|
4978
|
+
var _a, _b;
|
|
4978
4979
|
var balance = _this.balanceCustomerSubject.value;
|
|
4979
4980
|
if (!balance || balance.creditAmount === null || balance.creditAmount === undefined) {
|
|
4980
4981
|
return true;
|
|
4981
4982
|
}
|
|
4983
|
+
if (balance.allowAnyPaymentMethod) {
|
|
4984
|
+
return true;
|
|
4985
|
+
}
|
|
4982
4986
|
if (balance.remainingCredits === undefined) {
|
|
4983
4987
|
return false;
|
|
4984
4988
|
}
|
|
4985
|
-
|
|
4989
|
+
var total = ((_b = (_a = _this.cartSubject.value) === null || _a === void 0 ? void 0 : _a.totals) === null || _b === void 0 ? void 0 : _b.total) || 0;
|
|
4990
|
+
// Si NO puede exceder saldo y el total supera el credito, bloquear
|
|
4991
|
+
if (!balance.allowExceedBalance && total > balance.creditAmount) {
|
|
4986
4992
|
_this.toastrService.show('not-enough-credits');
|
|
4987
4993
|
return false;
|
|
4988
4994
|
}
|