* Copyright (C) 2011 Laurent Destailleur * Copyright (C) 2012 Marcos García * Copyright (C) 2018 Andreu Bisquerra * Copyright (C) 2019 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/takepos/floors.php * \ingroup takepos * \brief Page to show a receipt. */ require '../main.inc.php'; // Load $user and permissions include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("main", "cashdesk", "companies")); $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant $facid = GETPOST('facid', 'int'); if (empty($user->rights->takepos->run)) { access_forbidden(); } /* * View */ top_httphead('text/html'); if ($place > 0) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); $obj = $db->fetch_object($resql); if ($obj) { $facid = $obj->rowid; } } $object = new Facture($db); $object->fetch($facid); // Call to external receipt modules if exist $hookmanager->initHooks(array('takeposfrontend'), $facid); $reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object); if (!empty($hookmanager->resPrint)) { print $hookmanager->resPrint; exit; } // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path. ?>
'.$mysoc->name.''; ?>

global->TAKEPOS_HEADER)) { $substitutionarray = getCommonSubstitutionArray($langs); if (!empty($conf->global->TAKEPOS_HEADER)) $newfreetext = make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray); echo $newfreetext; } ?>

trans('Date')." ".dol_print_date($object->date, 'day').'
'; if (!empty($conf->global->TAKEPOS_RECEIPT_NAME)) print $conf->global->TAKEPOS_RECEIPT_NAME." "; if ($object->statut == Facture::STATUS_DRAFT) print str_replace(")", "", str_replace("-", " ".$langs->trans('Place')." ", str_replace("(PROV-POS", $langs->trans("Terminal")." ", $object->ref))); else print $object->ref; if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { if ($object->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) { $soc = new Societe($db); if ($object->socid > 0) $soc->fetch($object->socid); else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); print "
".$langs->trans("Customer").': '.$soc->name; } } ?>


lines as $line) { ?>
trans("Label"); ?> trans("Qty"); ?> trans("Price"); ?> trans("TotalTTC"); ?>
product_label)) echo $line->product_label; else echo $line->description; ?> qty; ?> total_ttc / $line->qty, 'MT'), 1); ?> total_ttc, 1); ?>

global->TAKEPOS_TICKET_VAT_GROUPPED) { $vat_groups = array(); foreach ($object->lines as $line) { if (!array_key_exists($line->tva_tx, $vat_groups)) { $vat_groups[$line->tva_tx] = 0; } $vat_groups[$line->tva_tx] += $line->total_tva; } foreach ($vat_groups as $key => $val) { ?>
trans("TotalHT"); ?> total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>
trans("VAT").' '.vatrate($key, 1); ?> currency)."\n"; ?>
trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>
trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>



global->TAKEPOS_FOOTER)) { $substitutionarray = getCommonSubstitutionArray($langs); $newfreetext = make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); echo $newfreetext; } ?>