add constant to check if qty shipped not greater than qty ordered

This commit is contained in:
Christophe Battarel 2023-08-17 11:11:49 +02:00
parent d2f8b5dbfa
commit d53772f21d
2 changed files with 10 additions and 1 deletions

View File

@ -346,6 +346,13 @@ if (empty($reshook)) {
}
}
// check qty shipped not greater than ordered
if (dolGetGlobalInt("ErrorTooMuchShipped") && $totalqty > $objectsrc->lines[$i]->qty) {
setEventMessages($langs->trans("", $i), null, 'errors');
$error++;
continue;
}
// Extrafields
$array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i);
// Unset extrafield

View File

@ -78,4 +78,6 @@ DetailWarehouseFormat= W:%s (Qty: %d)
ShipmentDistribution=Shipment distribution
ErrorTooManyCombinationBatchcode=No dispatch for line %s as too many combination warehouse, product, batch code was found (%s).
ErrorNoCombinationBatchcode=No dispatch for line %s as no combination warehouse, product, batch code was found.
ErrorNoCombinationBatchcode=No dispatch for line %s as no combination warehouse, product, batch code was found.
ErrorTooMuchShipped=Quantity shipped should not be greater than quantity ordered for line %s