[fix] upper max qty to match at least qty in website shop

This commit is contained in:
Niels Göttsch 2024-07-12 18:32:50 +02:00
parent 44f7380e22
commit 75f2be6c07

View file

@ -43,6 +43,9 @@ odoo.define("nfu_sale_product_min_max_qty.website_min_max_qty", function (requir
$input.data("update_change", true); $input.data("update_change", true);
var max_qty = parseInt($input.closest("tr").find('input[name="max-qty"]').val(), 10); var max_qty = parseInt($input.closest("tr").find('input[name="max-qty"]').val(), 10);
var set_qty = parseInt($input.closest("tr").find('input[name!="max-qty"]').val(), 10); var set_qty = parseInt($input.closest("tr").find('input[name!="max-qty"]').val(), 10);
if (max_qty < set_qty) {
max_qty = set_qty;
}
this._rpc({ this._rpc({
route: "/shop/cart/update_json", route: "/shop/cart/update_json",
params: { params: {