Fix: [ bug #1318 ] Problem with enter key when adding an existing

product to a customer invoice
This commit is contained in:
Laurent Destailleur 2014-04-02 11:58:59 +02:00
parent f3bbf54447
commit 918fe5dbb5

View File

@ -1140,7 +1140,9 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$error = 0;
// 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;
@ -1148,7 +1150,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');