Fix: [ bug #947 ] Can't create proposal lines with unit price = 0

This commit is contained in:
Marcos García 2013-06-19 10:22:46 +02:00
parent c92471d40b
commit 676191c1f9
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ English Dolibarr ChangeLog
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
- Fix: [ bug #934 ] Error on proformat invoice creation (pgsql)
- Fix: [ bug #947 ] Can't create proposal lines with unit price = 0
***** ChangeLog for 3.3.2 compared to 3.3.1 *****

View File

@ -641,7 +641,8 @@ else if ($action == "addline" && $user->rights->propal->creer)
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
$error++;
}
if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht != 0) || $price_ht == '')) // Unit price can be 0 but not ''. Also price can be negative for proposal.
if ((empty($idprod) || GETPOST('usenewaddlineform')) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal.
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
$error++;