Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a
This commit is contained in:
parent
de159d569a
commit
74404749c6
@ -186,7 +186,9 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// 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
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$predef='';
|
$predef='';
|
||||||
$idprod=0;
|
$idprod=0;
|
||||||
@ -194,7 +196,9 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
$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
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||||
$idprod=GETPOST('idprod', 'int');
|
$idprod=GETPOST('idprod', 'int');
|
||||||
|
|||||||
@ -532,7 +532,9 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer)
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
// 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
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$predef='';
|
$predef='';
|
||||||
$idprod=0;
|
$idprod=0;
|
||||||
@ -540,7 +542,9 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer)
|
|||||||
$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
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||||
$idprod=GETPOST('idprod', 'int');
|
$idprod=GETPOST('idprod', 'int');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user