From 2248429eda27289e0bdea5768132aa40d3e37e73 Mon Sep 17 00:00:00 2001 From: Gustavo Novaro Date: Sun, 8 Jan 2017 04:57:47 -0300 Subject: [PATCH] Improve cashdesk code style. Ticket now have ticket.css file --- htdocs/cashdesk/css/ticket.css | 61 ++++++++++++ htdocs/cashdesk/tpl/ticket.tpl.php | 146 ++++++++++------------------- 2 files changed, 111 insertions(+), 96 deletions(-) create mode 100644 htdocs/cashdesk/css/ticket.css diff --git a/htdocs/cashdesk/css/ticket.css b/htdocs/cashdesk/css/ticket.css new file mode 100644 index 00000000000..248e0f7b9b6 --- /dev/null +++ b/htdocs/cashdesk/css/ticket.css @@ -0,0 +1,61 @@ +/* + * TPV ticket.css + */ +body { + font-size: 1.5em; + position: relative; +} + +.entete { /* position: relative; */ + +} + +.address { /* float: left; */ + font-size: 12px; +} + +.date_heure { + position: absolute; + top: 0; + right: 0; + font-size: 16px; +} + +.infos { + position: relative; +} + +.liste_articles { + width: 100%; + border-bottom: 1px solid #000; + text-align: center; +} + +.liste_articles tr.titres th { + border-bottom: 1px solid #000; +} + +.liste_articles td.total { + text-align: right; +} + +.totaux { + margin-top: 20px; + width: 30%; + float: right; + text-align: right; +} + +.lien { + position: absolute; + top: 0; + left: 0; + display: none; +} + +@media print { + .lien { + display: none; + } +} + diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 9ea8cb70943..78ce86f45f7 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -28,130 +28,84 @@ $object->fetch($facid); ?> - -<?php echo $langs->trans('PrintTicket') ?> - - - + + <?php echo $langs->trans('PrintTicket') ?> +
- -
-

name; ?>
-
-

+ +
+

name; ?>
+
+

-

'; -print $object->ref; -?>

-
+

'; + print $object->ref; + ?>

+

+ - - - - - + + + + + + + + '."\n"); + ?> + + + + + + + + + ?> +
trans("Code"); ?>trans("Label"); ?>trans("Qty"); ?>trans("Discount").' (%)'; ?>trans("TotalHT"); ?>trans("Code"); ?>trans("Label"); ?>trans("Qty"); ?>trans("Discount").' (%)'; ?>trans("TotalHT"); ?>
'.$tab[$i]['ref'].''.$tab[$i]['label'].''.$tab[$i]['qte'].''.$tab[$i]['remise_percent'].''.price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency).'
currency);?>
-\n"; -echo '\n"; -echo '\n"; -?> + + + + + + + + + +
'.$langs->trans("TotalHT").''.price(price2num($obj_facturation->prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."
'.$langs->trans("TotalVAT").''.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."
'.$langs->trans("TotalTTC").''.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."
trans("TotalHT");?>prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?>
trans("TotalVAT").''.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?>
trans("TotalTTC").''.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?>
-trans("Close"); ?> - +trans("Close"); ?>