@salesgenterp/ui-components 0.4.428 → 0.4.429
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.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7807,6 +7807,10 @@ var checkMinMaxQty = function checkMinMaxQty(_ref2) {
|
|
|
7807
7807
|
var quantity = _ref2.quantity,
|
|
7808
7808
|
product = _ref2.product;
|
|
7809
7809
|
var quantityReturn = quantity;
|
|
7810
|
+
if (quantityReturn > (product === null || product === void 0 ? void 0 : product.availableQuantity)) {
|
|
7811
|
+
alert("Only " + (product === null || product === void 0 ? void 0 : product.availableQuantity) + " is available");
|
|
7812
|
+
quantityReturn = product === null || product === void 0 ? void 0 : product.availableQuantity;
|
|
7813
|
+
}
|
|
7810
7814
|
if (product !== null && product !== void 0 && product.minQuantityToSale && (product === null || product === void 0 ? void 0 : product.minQuantityToSale) > 1 && quantityReturn < (product === null || product === void 0 ? void 0 : product.minQuantityToSale)) {
|
|
7811
7815
|
alert("Quantity should be minimum " + (product === null || product === void 0 ? void 0 : product.minQuantityToSale));
|
|
7812
7816
|
quantityReturn = product === null || product === void 0 ? void 0 : product.minQuantityToSale;
|
|
@@ -7815,10 +7819,6 @@ var checkMinMaxQty = function checkMinMaxQty(_ref2) {
|
|
|
7815
7819
|
alert("Quantity should not be more than " + (product === null || product === void 0 ? void 0 : product.maxQuantityToSale));
|
|
7816
7820
|
quantityReturn = product === null || product === void 0 ? void 0 : product.maxQuantityToSale;
|
|
7817
7821
|
}
|
|
7818
|
-
if (quantityReturn > (product === null || product === void 0 ? void 0 : product.availableQuantity)) {
|
|
7819
|
-
alert("Only " + (product === null || product === void 0 ? void 0 : product.availableQuantity) + " is available");
|
|
7820
|
-
quantityReturn = product === null || product === void 0 ? void 0 : product.availableQuantity;
|
|
7821
|
-
}
|
|
7822
7822
|
return quantityReturn;
|
|
7823
7823
|
};
|
|
7824
7824
|
|