FIX: No error message because $price_ht_devise is equal to 0 if not fill because of price2num

This commit is contained in:
Noé Courtier 2023-05-09 17:12:09 +02:00
parent 8b63f7e296
commit bfe7cd76c2

View File

@ -586,7 +586,7 @@ if (empty($reshook)) {
$error++;
}
if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal.
if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && GETPOST('multicurrency_price_ht') === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal.
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPrice")), null, 'errors');
$error++;
}