Merge pull request #265 from marcosgdf/fix-commande-addline

Fixed 2 fatal errors in commande/fiche.php and a SQL problem too
This commit is contained in:
Regis Houssin 2012-07-28 09:11:16 -07:00
commit edbf104a7b

View File

@ -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'));