From c6543614850007b0c6590df3c312afbb4b112f10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Mar 2019 20:46:07 +0100 Subject: [PATCH] Show link to invoice at the TOP --- htdocs/takepos/invoice.php | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 0a748ee32d8..ed3f133b2d4 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -274,6 +274,28 @@ if ($action == "order" and $placeid != 0) { $invoice->fetch($placeid); } +$sectionwithinvoicelink=''; +if ($action=="valid") +{ + $sectionwithinvoicelink.=''."\n"; + $sectionwithinvoicelink.=''; + $sectionwithinvoicelink.=''; + $sectionwithinvoicelink.=$invoice->getNomUrl(1, '', 0, 0, '', 0, 0, -1, '_backoffice')." - "; + if ($invoice->getRemainToPay() > 0) + { + $sectionwithinvoicelink.=$langs->trans('Generated'); + } + else + { + if ($invoice->paye) $sectionwithinvoicelink.=$langs->trans("Payed"); + else $sectionwithinvoicelink.=$langs->trans('BillShortStatusValidated'); + } + $sectionwithinvoicelink.=''; + if ($conf->global->TAKEPOSCONNECTOR) $sectionwithinvoicelink.=' '; + else $sectionwithinvoicelink.=' '; + if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink.=''; +} + /* * View @@ -406,6 +428,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) } print $langs->trans('TotalTTC'); print ' : '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).''; +print '
'.$sectionwithinvoicelink; print ''; print '' . $langs->trans('ReductionShort') . ''; print '' . $langs->trans('Qty') . ''; @@ -470,27 +493,6 @@ if ($invoice->socid != $conf->global->CASHDESK_ID_THIRDPARTY) print '

'; } -if ($action=="valid") -{ - print ''."\n"; - print ''; - print '

'; - print $invoice->getNomUrl(1, '', 0, 0, '', 0, 0, -1, '_backoffice')." - "; - if ($invoice->getRemainToPay() > 0) - { - print $langs->trans('Generated'); - } - else - { - if ($invoice->paye) print $langs->trans("Payed"); - else print $langs->trans('BillShortStatusValidated'); - } - print '

'; - if ($conf->global->TAKEPOSCONNECTOR) print '
'; - else print '
'; - if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) print ''; -} - if ($action == "search") { print '