Suplier Order, do not insert line if error with missing fields
This commit is contained in:
parent
fb277bbbab
commit
eb8eca5f9d
@ -227,7 +227,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
// Ecrase $pu par celui du produit
|
// Ecrase $pu par celui du produit
|
||||||
// Ecrase $desc par celui du produit
|
// Ecrase $desc par celui du produit
|
||||||
// Ecrase $txtva par celui du produit
|
// Ecrase $txtva par celui du produit
|
||||||
if (GETPOST('prod_entry_mode') != 'free') // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
if ((GETPOST('prod_entry_mode') != 'free') && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||||
{
|
{
|
||||||
$idprod=0;
|
$idprod=0;
|
||||||
$productsupplier = new ProductFournisseur($db);
|
$productsupplier = new ProductFournisseur($db);
|
||||||
@ -285,7 +285,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors');
|
setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='' )
|
else if((GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='') && empty($error))
|
||||||
{
|
{
|
||||||
$pu_ht = price2num($price_ht, 'MU');
|
$pu_ht = price2num($price_ht, 'MU');
|
||||||
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');
|
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user