diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b72d6ae9115..6193217de79 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -620,10 +620,10 @@ else if ($action == 'addline' && $user->rights->commande->creer) // ajout prix achat $fk_fournprice = GETPOST('np_fournprice'); - if (GETPOST('np_buying_price')) - $pa_ht = GETPOST('np_buying_price'); - else - $pa_ht = null; + $pa_ht = GETPOST('np_buying_price'); + + if (!$fk_fournprice) $fk_fournprice = null; + if (!$pa_ht) $pa_ht = null; $info_bits=0; if ($tva_npr) $info_bits |= 0x01; @@ -1280,7 +1280,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G *********************************************************************/ if ($action == 'create' && $user->rights->commande->creer) { - //WYSIWYG Editor + //WYSIWYG Editor require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); print_fiche_titre($langs->trans('CreateOrder'));