From 221e8d8ce1810e440a85998a30e935dbf75e92b7 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 24 May 2020 16:30:42 +0200 Subject: [PATCH] invoice.php improvements --- htdocs/takepos/invoice.php | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3b486b7a3bc..859859fbc93 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -865,6 +865,9 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) print $langs->trans('Place')." ".$label." - "; print $langs->trans('Floor')." ".$floor." - "; } + elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) print $mysoc->name; + elseif ($mobilepage == "cats") print $langs->trans('Category'); + elseif ($mobilepage == "products") print $langs->trans('Label'); } // In phone version only show when is invoice page if ($mobilepage == "invoice" || $mobilepage == "") { @@ -879,7 +882,7 @@ if ($_SESSION["basiclayout"] != 1) print ''.$langs->trans('Qty').''; print ''.$langs->trans('TotalTTCShort').''; } -else print ''.$langs->trans('Qty').''; +elseif ($mobilepage == "invoice") print ''.$langs->trans('Qty').''; print "\n"; @@ -892,11 +895,14 @@ if ($_SESSION["basiclayout"] == 1) $categories = $categorie->get_full_arbo('product'); $htmlforlines = ''; foreach ($categories as $row) { - $htmlforlines .= '
'; - $htmlforlines .= '
'; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '
'; + else $htmlforlines .= ''; $htmlforlines .= $row['label']; - $htmlforlines .= '
'."\n"; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= ''."\n"; + else $htmlforlines .= ''."\n"; } $htmlforlines .= ''; $htmlforlines .= ''; @@ -912,11 +918,20 @@ if ($_SESSION["basiclayout"] == 1) $prods = $object->getObjectsInCateg("product"); $htmlforlines = ''; foreach ($prods as $row) { - $htmlforlines .= '
id.')">'; - $htmlforlines .= '
'; - $htmlforlines .= $row->label.''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency); - $htmlforlines .= '
'."\n"; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '
'; + $htmlforlines .= $row->label.''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency); + $htmlforlines .= ''."\n"; + } + else { + $htmlforlines .= ''; + $htmlforlines .= $row->label; + $htmlforlines .= '
'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
'; + $htmlforlines .= ''."\n"; + } } $htmlforlines .= ''; print $htmlforlines; @@ -993,7 +1008,6 @@ if ($placeid > 0) $htmlforlines .= '" id="'.$line->id.'">'; $htmlforlines .= ''; if ($_SESSION["basiclayout"] == 1) $htmlforlines .= ''.$line->qty." x "; - //if ($line->product_label) $htmlforlines.= ''.$line->product_label.''; if (isset($line->product_type)) { if (empty($line->product_type)) $htmlforlines .= img_object('', 'product').' ';