diff --git a/ChangeLog b/ChangeLog index 3bb088b99f3..ed85d409840 100644 --- a/ChangeLog +++ b/ChangeLog @@ -113,6 +113,7 @@ Fix: [ bug #1306 ] Fatal error when adding an external calendar. New: Added es_CL language Fix: Margin tabs bad data show Fix: [ bug #1318 ] Problem with enter key when adding an existing product to a customer invoice. +Fix: [ bug #1410 ] Add customer order line asks for required Unit Price but doesn't interrupt the creation of the line ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 10856f27c5e..4a00c1a661b 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -617,27 +617,27 @@ else if ($action == 'addline' && $user->rights->commande->creer) if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0)) { setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); - $error++; + $error = true; } if (empty($idprod) && GETPOST('type') < 0) { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors'); - $error++; + $error = true; } if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not '' { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); - $error++; + $error = true; } if ($qty == '') { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); - $error++; + $error = true; } if (empty($idprod) && empty($product_desc)) { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors'); - $error++; + $error = true; } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod)))