21 if (empty($langs) || !is_object($langs))
23 print "Error, template page can't be called as URL";
28 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
31 $langs->loadLangs(array(
"main",
"cashdesk"));
35 $facid =
GETPOST(
'facid',
'int');
37 $object->fetch($facid);
42 <title><?php echo $langs->trans(
'PrintTicket') ?></title>
43 <link rel=
"stylesheet" type=
"text/css" href=
"<?php echo DOL_URL_ROOT; ?>/cashdesk/css/ticket.css">
50 <?php
print '<img src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small).
'">'; ?>
53 <p
class=
"address"><?php echo $mysoc->name; ?><br>
57 <p
class=
"date_heure"><?php
68 <table
class=
"liste_articles">
71 <th><?php
print $langs->trans(
"Code"); ?></th>
72 <th><?php
print $langs->trans(
"Label"); ?></th>
73 <th><?php
print $langs->trans(
"Qty"); ?></th>
74 <th><?php
print $langs->trans(
"Discount").
' (%)'; ?></th>
75 <th><?php
print $langs->trans(
"TotalHT"); ?></th>
82 $tab = $_SESSION[
'poscart'];
84 $tab_size = count($tab);
85 for ($i = 0; $i < $tab_size; $i++)
87 $remise = $tab[$i][
'remise'];
90 <td><?php echo $tab[$i][
'ref']; ?></td>
91 <td><?php echo $tab[$i][
'label']; ?></td>
92 <td><?php echo $tab[$i][
'qte']; ?></td>
93 <td><?php echo $tab[$i][
'remise_percent']; ?></td>
94 <td
class=
"total"><?php echo
price(
price2num($tab[$i][
'total_ht'],
'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?></td>
102 <table
class=
"totaux">
104 <th
class=
"nowrap"><?php echo $langs->trans(
"TotalHT"); ?></th>
105 <td
class=
"nowrap"><?php echo
price(
price2num($obj_facturation->amountWithoutTax(),
'MT'),
'', $langs, 0, -1, -1, $conf->currency).
"\n"; ?></td>
108 <th
class=
"nowrap"><?php echo $langs->trans(
"TotalVAT").
'</th><td class="nowrap">'.
price(
price2num($obj_facturation->amountVat(),
'MT'),
'', $langs, 0, -1, -1, $conf->currency).
"\n"; ?></td>
111 <th
class=
"nowrap"><?php echo
''.$langs->trans(
"TotalTTC").
'</th><td class="nowrap">'.
price(
price2num($obj_facturation->amountWithTax(),
'MT'),
'', $langs, 0, -1, -1, $conf->currency).
"\n"; ?></td>
115 <script
type=
"text/javascript">
119 <a
class=
"lien" href=
"#" onclick=
"javascript: window.close(); return(false);"><?php echo $langs->trans(
"Close"); ?></a>
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs= '', $mode=0, $extralangcode= '')
Return a formated address (part address/zip/town/state) according to country rules.
dol_now($mode= 'auto')
Return date for now.
dol_nl2br($stringtoencode, $nl2brmode=0, $forxml=false)
Replace CRLF in string with a HTML BR tag.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Class to manage invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type