add reshook test

This commit is contained in:
Christophe Battarel 2022-07-26 15:47:03 +02:00
parent 0c416a1e38
commit 3e930f92b8

View File

@ -569,9 +569,14 @@ if (empty($reshook)) {
$reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (!empty($hookmanager->resArray)) $line = $hookmanager->resArray;
$idoflineadded = $invoice->addline($line['description'], $line['price'], $qty, $line['tva_tx'], $line['localtax1_tx'], $line['localtax2_tx'], $idproduct, $line['remise_percent'], '', 0, 0, 0, '', $price_base_type, $line['price_ttc'], $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $line['array_options'], 100, '', null, 0);
if (empty($reshook)) {
if (!empty($hookmanager->resArray)) {
$line = $hookmanager->resArray;
}
$idoflineadded = $invoice->addline($line['description'], $line['price'], $qty, $line['tva_tx'], $line['localtax1_tx'], $line['localtax2_tx'], $idproduct, $line['remise_percent'], '', 0, 0, 0, '', $price_base_type, $line['price_ttc'], $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $line['array_options'], 100, '', null, 0);
}
if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) {
$CUSTOMER_DISPLAY_line1 = $prod->label;