BIG-354: Validate the warehouse transfer.

This commit is contained in:
elforjani13
2022-03-31 14:50:40 +02:00
parent a9c2a5c5f0
commit 46d895bef9
3 changed files with 2 additions and 15 deletions

View File

@@ -71,19 +71,6 @@ function WarehouseTransferForm({
// Handles form submit.
const handleSubmit = (values, { setSubmitting, setErrors, resetForm }) => {
setSubmitting(true);
const totalQuantity = sumBy(values.entries, 'quantity');
if (totalQuantity <= 0) {
AppToaster.show({
message: intl.get(
'warehouse_transfer.quantity_cannot_be_zero_or_empty',
),
intent: Intent.DANGER,
});
return;
}
// Transformes the values of the form to request.
const form = {
...transformValueToRequest(values),