From ea79c914823e790e55afabc9313ad70ee24e86f6 Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Wed, 8 Apr 2020 20:02:54 +0200 Subject: [PATCH] Add langs and print only no printed order lines --- htdocs/core/class/dolreceiptprinter.class.php | 18 +++++------ htdocs/langs/en_US/receiptprinter.lang | 30 +++++++++++++++++++ htdocs/takepos/invoice.php | 5 ++-- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index e089a89190a..39adc7ace60 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -181,7 +181,7 @@ class dolReceiptPrinter extends Printer 'dol_value_month', 'dol_value_day', 'dol_value_day_letters', - 'dol_print_payment', + //'dol_print_payment', 'dol_print_logo', 'dol_print_logo_old', 'dol_value_object_id', @@ -219,14 +219,14 @@ class dolReceiptPrinter extends Printer 'dol_value_vendor_mail', 'dol_value_customer_points', 'dol_value_object_points', - 'dol_print_if_customer', - 'dol_print_if_vendor', - 'dol_print_if_happy_hour', - 'dol_print_if_num_object_unique', - 'dol_print_if_customer_points', - 'dol_print_if_object_points', - 'dol_print_if_customer_tax_number', - 'dol_print_if_customer_account_balance_positive', + //'dol_print_if_customer', + //'dol_print_if_vendor', + //'dol_print_if_happy_hour', + //'dol_print_if_num_object_unique', + //'dol_print_if_customer_points', + //'dol_print_if_object_points', + //'dol_print_if_customer_tax_number', + //'dol_print_if_customer_account_balance_positive', ); } diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang index b0b60c60840..5533de0c320 100644 --- a/htdocs/langs/en_US/receiptprinter.lang +++ b/htdocs/langs/en_US/receiptprinter.lang @@ -63,3 +63,33 @@ DOL_VALUE_MONTH_LETTERS=Invoice month in letters DOL_VALUE_MONTH=Invoice month DOL_VALUE_DAY=Invoice day DOL_VALUE_DAY_LETTERS=Inovice day in letters +DOL_LINE_FEED_REVERSE=Line feed reverse +DOL_VALUE_OBJECT_ID=Invoice ID +DOL_VALUE_OBJECT_REF=Invoice ref +DOL_PRINT_OBJECT_LINES=Invoice lines +DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name +DOL_VALUE_CUSTOMER_LASTNAME=Customer last name +DOL_VALUE_CUSTOMER_MAIL=Customer mail +DOL_VALUE_CUSTOMER_PHONE=Customer phone +DOL_VALUE_CUSTOMER_MOBILE=Customer mobile +DOL_VALUE_CUSTOMER_SKYPE=Customer Skype +DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance +DOL_VALUE_MYSOC_NAME=Your company name +DOL_VALUE_MYSOC_ADDRESS=Your company address +DOL_VALUE_MYSOC_ZIP=Your zip code +DOL_VALUE_MYSOC_TOWN=Your town +DOL_VALUE_MYSOC_COUNTRY=Your country +DOL_VALUE_MYSOC_IDPROF1=Your IDPROF1 +DOL_VALUE_MYSOC_IDPROF2=Your IDPROF2 +DOL_VALUE_MYSOC_IDPROF3=Your IDPROF3 +DOL_VALUE_MYSOC_IDPROF4=Your IDPROF4 +DOL_VALUE_MYSOC_IDPROF5=Your IDPROF5 +DOL_VALUE_MYSOC_IDPROF6=Your IDPROF6 +DOL_VALUE_MYSOC_TVA_INTRA=Intra-Community VAT ID +DOL_VALUE_MYSOC_CAPITAL=Capital +DOL_VALUE_VENDOR_LASTNAME=Vendor last name +DOL_VALUE_VENDOR_FIRSTNAME=Vendor first name +DOL_VALUE_VENDOR_MAIL=Vendor mail +DOL_VALUE_CUSTOMER_POINTS=Customer points +DOL_VALUE_OBJECT_POINTS=Object points \ No newline at end of file diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 6251b5b57b0..e79191393b7 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -533,7 +533,7 @@ if ($action == "order" and $placeid != 0) $order_receipt_printer1 .= ''; } } - if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { + if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $count > 0) { $invoice->fetch($placeid); //Reload object before send to printer $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 1 } @@ -543,6 +543,7 @@ if ($action == "order" and $placeid != 0) foreach ($invoice->lines as $line) { + $count=0; if ($line->special_code == "4") { continue; } @@ -558,7 +559,7 @@ if ($action == "order" and $placeid != 0) $order_receipt_printer2 .= ''; } } - if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { + if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" && $count > 0) { $invoice->fetch($placeid); //Reload object before send to printer $ret = $printer->sendToPrinter($invoice, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$_SESSION["takeposterminal"]}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]}); // PRINT TO PRINTER 2 }