Merge pull request #20794 from altairis-melina/invoicehooks
NEW: TakePos - add hooks for cart display
This commit is contained in:
commit
56c943d4a7
@ -1292,6 +1292,13 @@ if (getDolGlobalString('TAKEPOS_BAR_RESTAURANT')) {
|
|||||||
print $langs->trans("Products");
|
print $langs->trans("Products");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// complete header by hook
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
|
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
|
||||||
print '<td class="linecolqty right">'.$langs->trans('ReductionShort').'</td>';
|
print '<td class="linecolqty right">'.$langs->trans('ReductionShort').'</td>';
|
||||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||||
@ -1445,6 +1452,13 @@ if ($placeid > 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$htmlsupplements[$line->fk_parent_line] .= '</td>';
|
$htmlsupplements[$line->fk_parent_line] .= '</td>';
|
||||||
|
|
||||||
|
// complete line by hook
|
||||||
|
$parameters=array('line' => $line);
|
||||||
|
$reshook=$hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
$htmlsupplements[$line->fk_parent_line] .= $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
|
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
|
||||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
||||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.$line->qty.'</td>';
|
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.$line->qty.'</td>';
|
||||||
@ -1525,6 +1539,13 @@ if ($placeid > 0) {
|
|||||||
$htmlforlines .= '<br><div class="clearboth nowraponall">'.get_date_range($line->date_start, $line->date_end).'</div>';
|
$htmlforlines .= '<br><div class="clearboth nowraponall">'.get_date_range($line->date_start, $line->date_end).'</div>';
|
||||||
}
|
}
|
||||||
$htmlforlines .= '</td>';
|
$htmlforlines .= '</td>';
|
||||||
|
|
||||||
|
// complete line by hook
|
||||||
|
$parameters=array('line' => $line);
|
||||||
|
$reshook=$hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
$htmlforlines .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
$htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
||||||
$htmlforlines .= '<td class="right">';
|
$htmlforlines .= '<td class="right">';
|
||||||
if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire)) {
|
if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user