mirror of
https://github.com/grocy/grocy.git
synced 2025-08-16 18:54:35 +00:00
Fixed consume amount validation when consuming a parent product (fixes #1306)
More a workaround for now, the max constraint is just removed when the product has child products, but the amount to be consumed is checked by StockService anyway, so should not be a problem...
This commit is contained in:
@@ -127,6 +127,7 @@
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response);
|
||||
Grocy.FrontendHelpers.EndUiBusy("consume-form");
|
||||
console.error(xhr);
|
||||
}
|
||||
@@ -650,6 +651,11 @@ function RefreshForm()
|
||||
}
|
||||
}
|
||||
|
||||
if (productDetails.has_childs)
|
||||
{
|
||||
$("#display_amount").removeAttr("max");
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm("consume-form");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user