From 2a2ff8dd7903bb5d500ccf675a7ba4acabe4afa4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Aug 2024 15:06:19 +0200 Subject: [PATCH] Debug v20 --- htdocs/core/lib/functions.lib.php | 4 ++-- htdocs/takepos/admin/appearance.php | 4 +++- htdocs/takepos/admin/bar.php | 2 +- htdocs/takepos/admin/other.php | 12 +++++++++--- htdocs/takepos/admin/receipt.php | 6 ++++-- htdocs/takepos/admin/setup.php | 9 +++++---- htdocs/takepos/admin/terminal.php | 7 ++++--- htdocs/takepos/invoice.php | 7 ++++++- 8 files changed, 34 insertions(+), 17 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a8bcaefc306..15555ee19b7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6541,8 +6541,8 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0, * @param int<0,1> $form Type of formatting: 1=HTML, 0=no formatting (no by default) * @param Translate|string|null $outlangs Object langs for output. '' use default lang. 'none' use international separators. * @param int $trunc 1=Truncate if there is more decimals than MAIN_MAX_DECIMALS_SHOWN (default), 0=Does not truncate. Deprecated because amount are rounded (to unit or total amount accuracy) before being inserted into database or after a computation, so this parameter should be useless. - * @param int $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT) - * @param int|string $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal + * @param int $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), getDolGlobalString('MAIN_MAX_DECIMALS_TOT')) + * @param int|string $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, -2=keep non zero part, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal * @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency) * @return string String with formatted amount * diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index 7445c7f5dee..1fbe8a52b62 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -84,9 +84,11 @@ print '
'; print ''; +print '
'; + print ''; print ''; -print ''; +print ''; print "\n"; // Color theme diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 86cfa143985..4ed707de669 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -123,7 +123,7 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) { print '
'; print '
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").'
'; print ''; - print ''; + print ''; print "\n"; print ''."\n"; print ''; print ''; -print ''; +print ''; print ''; print "
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").'
'; diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php index 6576f1207a5..f88f72fc447 100644 --- a/htdocs/takepos/admin/other.php +++ b/htdocs/takepos/admin/other.php @@ -96,7 +96,10 @@ $url = 'https://www.dolistore.com/45-pos'; print '
'.$langs->trans("DolistorePosCategory").''.$url.''; +print ''; +print img_picto('', 'url', 'class="pictofixedwidth"'); +print $url.'
\n"; @@ -118,9 +121,12 @@ print ''; $url = 'https://www.takepos.com'; print ''."\n"; -print ''; +print ''; print 'TakePOS original developers'; -print ''.$url.''; +print ''; +print ''; +print img_picto('', 'url', 'class="pictofixedwidth"'); +print $url.''; print ''; print "\n"; diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index 8eb37b306d6..eb0d3ef1fce 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -211,12 +211,14 @@ print "\n"; print ''; print ''; -print '
'; - print $form->buttonsSaveCancel("Save", ''); print "
\n"; + +print '
'; + + print load_fiche_titre($langs->trans("Preview"), '', ''); print '
'; print '
'; diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index dc46e17e717..5f7c2320e66 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -248,6 +248,9 @@ print "\n"; print '
'; + +print load_fiche_titre($langs->trans('Options'), '', ''); + // Mode print '
'; print ''; @@ -257,7 +260,7 @@ print '
'; print ''; print ''; -print ''; +print ''; print "\n"; // Terminals @@ -477,7 +480,7 @@ if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) { print '
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").'
'; print ''; - print ''; + print ''; print "\n"; print '
'.$langs->trans("Sumup").''.$langs->trans("Value").''.$langs->trans("Sumup").'
'; @@ -495,8 +498,6 @@ if (getDolGlobalInt('TAKEPOS_ENABLE_SUMUP')) { print ''; } -print '
'; - print $form->buttonsSaveCancel("Save", ''); print "\n"; diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index f2efe2c6d45..596f14c6698 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -184,7 +184,7 @@ print ''; print '
'; print ''; print ''; -print ''; +print ''; print "\n"; print ''; @@ -477,6 +477,9 @@ if (getDolGlobalString('TAKEPOS_ADDON') == "terminal") { } print '
'.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").'
'.$langs->trans("TerminalNameDesc").'
'; + +print $form->buttonsSaveCancel("Save", ''); + print '
'; // add free text on each terminal of cash desk @@ -536,8 +539,6 @@ if ($atleastonefound == 0 && isModEnabled("bank")) { print info_admin($langs->trans("AtLeastOneDefaultBankAccountMandatory"), 0, 0, 'error'); } -print '
'; - print $form->buttonsSaveCancel("Save", ''); print "\n"; diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index f0fe9c399ed..b9c9a1b0c29 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -2004,13 +2004,18 @@ if ($placeid > 0) { $stock_real = price2num($obj->reel, 'MS'); } $htmlforlines .= $line->qty; + $htmlforlines .= '  '; + $htmlforlines .= ''; + $htmlforlines .= '('; if ($line->qty && $line->qty > $stock_real) { $htmlforlines .= ''; } - $htmlforlines .= ' ('.$langs->trans("Stock").' '.$stock_real.')'; + $htmlforlines .= img_picto('', 'stock', 'class="pictofixedwidth"').price($stock_real, 1, '', 1, 0); if ($line->qty && $line->qty > $stock_real) { $htmlforlines .= ""; } + $htmlforlines .= ')'; + $htmlforlines .= ''; } else { dol_print_error($db); }