Fix: special code was lost during update

This commit is contained in:
Laurent Destailleur 2014-03-01 16:58:10 +01:00
parent b6cefee45a
commit 7db903e671
2 changed files with 5 additions and 5 deletions

View File

@ -637,7 +637,7 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer)
else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer) else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer)
{ {
// Set if we used free entry or predefined product // Set if we used free entry or predefined product
if (GETPOST('addline_libre') if (GETPOST('addline_libre')
|| (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field || (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field
) )
{ {
@ -647,7 +647,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$price_ht = GETPOST('price_ht'); $price_ht = GETPOST('price_ht');
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
} }
if (GETPOST('addline_predefined') if (GETPOST('addline_predefined')
|| (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field || (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field
) )
{ {
@ -953,7 +953,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
} }
// Define special_code for special lines // Define special_code for special lines
$special_code=0; $special_code=GETPOST('special_code');
if (! GETPOST('qty')) $special_code=3; if (! GETPOST('qty')) $special_code=3;
// Check minimum price // Check minimum price

View File

@ -2732,10 +2732,10 @@ class PropaleLigne extends CommonObject
var $marge_tx; var $marge_tx;
var $marque_tx; var $marque_tx;
var $special_code; // Liste d'options non cumulabels: var $special_code; // Tag for special lines (exlusive tags)
// 1: frais de port // 1: frais de port
// 2: ecotaxe // 2: ecotaxe
// 3: ?? // 3: option line (when qty = 0)
var $info_bits = 0; // Liste d'options cumulables: var $info_bits = 0; // Liste d'options cumulables:
// Bit 0: 0 si TVA normal - 1 si TVA NPR // Bit 0: 0 si TVA normal - 1 si TVA NPR