diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index b1ab8bdc600..5ce63138e05 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -42,4 +42,5 @@ Place=Place TakeposConnectorNecesary='TakePOS Connector' required OrderPrinters=Order printers SearchProduct=Search product -AmountAtEndOfPeriod=Amount at end of period (day, month or year) \ No newline at end of file +Receipt=Receipt +AmountAtEndOfPeriod=Amount at end of period (day, month or year) diff --git a/htdocs/langs/es_ES/cashdesk.lang b/htdocs/langs/es_ES/cashdesk.lang index e4ef7fa3d37..4d6a8b90940 100644 --- a/htdocs/langs/es_ES/cashdesk.lang +++ b/htdocs/langs/es_ES/cashdesk.lang @@ -42,3 +42,4 @@ Place=Lugar TakeposConnectorNecesary='Conector TakePOS' requerido OrderPrinters=Impresoras de pedidos SearchProduct=Buscar producto +Receipt=Comprobante diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 7e3edff4ce6..ec8207d60b6 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -42,3 +42,4 @@ Place=Marché TakeposConnectorNecesary='Connecteur TakePOS' requis OrderPrinters=Commande imprimantes SearchProduct=Rechercher un produit +Receipt=Le reçu diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index a70980893b2..1701b82a770 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -208,69 +208,6 @@ if ($action == "order" and $placeid != 0) { $invoice->fetch($placeid); } -// temporary ticket feature - -if ($action == "temp" and $placeid != 0) { - include_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - - // issues with special characters with jPosBoxprinting ->javascript, stringCleanCharts() temporarily fix them until to find a more elegant solution. - - function stringCleanCharts($text) - { - $utf8 = array( - '/[áàâãªä]/u' => 'a', - '/[ÁÀÂÃÄ]/u' => 'A', - '/[ÍÌÎÏ]/u' => 'I', - '/[íìîï]/u' => 'i', - '/[éèêë]/u' => 'e', - '/[ÉÈÊË]/u' => 'E', - '/[óòôõºö]/u' => 'o', - '/[ÓÒÔÕÖ]/u' => 'O', - '/[úùûü]/u' => 'u', - '/[ÚÙÛÜ]/u' => 'U', - '/ç/' => 'c', - '/Ç/' => 'C', - '/ñ/' => 'n', - '/Ñ/' => 'N', - '/–/' => '-', - '/[’‘‹›‚\']/u' => ' ', - '/[“”«»„]/u' => ' ', - '/ /' => ' ', - ); - return preg_replace(array_keys($utf8), array_values($utf8), $text); - } - - $mysocname = stringCleanCharts($mysoc->name); - $mysocaddress = stringCleanCharts($mysoc->address); - $mysoctown = stringCleanCharts($mysoc->town); - $mysoczip = stringCleanCharts($mysoc->zip); - $mysocphone = stringCleanCharts($mysoc->phone); - $mysocurl = stringCleanCharts($mysoc->url); - $header_soc = '
' . $mysocname . '
' . $mysocaddress . '
' . $mysoczip . ' ' . $mysoctown . '

' . $langs->trans("Phone") . ': ' . $mysocphone . '
' . $mysocurl; - $header_ticket = '

' . $langs->trans("Temporary ticket") . '
' . $langs->trans("date") . ':
' . dol_print_date(dol_now(), 'dayhour') . '
' . $langs->trans('Place') . ' ' . $place . '


'; - $body_ticket = ''; - $footer_ticket = '

' . $langs->trans("Cashier") . ': ' . $user->firstname . '
' . $langs->trans("Thanks for your coming !") . '
'; - $ticket_printer1 = ""; - $catsprinter1 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_1); - foreach($invoice->lines as $line) - { - if ($line->special_code == "3") { continue; - } - $c = new Categorie($db); - $existing = $c->containing($line->fk_product, Categorie::TYPE_PRODUCT, 'id'); - $result = array_intersect($catsprinter1, $existing); - $count = count($result); - if ($count > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet set special_code='3' where rowid=$line->rowid"; - $db->query($sql); - $ticket_printer1.= ''; - $ticket_total = '
' . $langs->trans("Label") . '' . $langs->trans("Qty") . '' . $langs->trans("Price") . '' . $langs->trans("TotalTTC") . '
' . $line->product_label . '' . $line->qty . '' . $line->total_ttc / $line->qty . '' . $line->total_ttc . '
' . $langs->trans("TotalHT") . ': ' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '
' . $langs->trans("TotalVAT") . ': ' . price($invoice->total_tva, 1, '', 1, -1, -1, $conf->currency) . '
' . $langs->trans("TotalTTC") . ': ' . price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '
'; - } - } - - $invoice->fetch($placeid); -} - ?>