Make AJAX new line form work again

FIXME: Factorize!
This commit is contained in:
Raphaël Doursenaud 2013-11-19 17:54:36 +01:00
parent 6596a105e7
commit 7945011955
4 changed files with 24 additions and 0 deletions

View File

@ -653,6 +653,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$price_ht = '';
$tva_tx = '';
}
if (GETPOST('usenewaddlineform')) {
$idprod=GETPOST('idprod', 'int');
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
$price_ht = GETPOST('price_ht');
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
}
$qty = GETPOST('qty'.$predef);
$remise_percent=GETPOST('remise_percent'.$predef);

View File

@ -587,6 +587,12 @@ else if ($action == 'addline' && $user->rights->commande->creer)
$price_ht = '';
$tva_tx = '';
}
if (GETPOST('usenewaddlineform')) {
$idprod=GETPOST('idprod', 'int');
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
$price_ht = GETPOST('price_ht');
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
}
$qty = GETPOST('qty'.$predef);
$remise_percent=GETPOST('remise_percent'.$predef);

View File

@ -1145,6 +1145,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$price_ht = '';
$tva_tx = '';
}
if (GETPOST('usenewaddlineform')) {
$idprod=GETPOST('idprod', 'int');
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
$price_ht = GETPOST('price_ht');
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
}
$qty = GETPOST('qty'.$predef);
$remise_percent=GETPOST('remise_percent'.$predef);

View File

@ -359,6 +359,12 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
$price_ht = '';
$tva_tx = '';
}
if (GETPOST('usenewaddlineform')) {
$idprod=GETPOST('idprod', 'int');
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
$price_ht = GETPOST('price_ht');
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
}
$qty = GETPOST('qty'.$predef);
$remise_percent=GETPOST('remise_percent'.$predef);