Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a

product
This commit is contained in:
Laurent Destailleur 2014-02-24 17:29:52 +01:00
parent e5136487bd
commit b1eef7cd42
2 changed files with 12 additions and 4 deletions

View File

@ -637,7 +637,9 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer)
else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer)
{
// 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='';
$idprod=0;
@ -645,7 +647,9 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$price_ht = GETPOST('price_ht');
$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' : '');
$idprod=GETPOST('idprod', 'int');

View File

@ -571,7 +571,9 @@ else if ($action == 'addline' && $user->rights->commande->creer)
$error = false;
// 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='';
$idprod=0;
@ -579,7 +581,9 @@ else if ($action == 'addline' && $user->rights->commande->creer)
$price_ht = GETPOST('price_ht');
$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' : '');
$idprod=GETPOST('idprod', 'int');