Add langs and print only no printed order lines

This commit is contained in:
jove@bisquerra.com 2020-04-08 20:02:54 +02:00
parent 9a6c89d03f
commit ea79c91482
3 changed files with 42 additions and 11 deletions

View File

@ -181,7 +181,7 @@ class dolReceiptPrinter extends Printer
'dol_value_month', 'dol_value_month',
'dol_value_day', 'dol_value_day',
'dol_value_day_letters', 'dol_value_day_letters',
'dol_print_payment', //'dol_print_payment',
'dol_print_logo', 'dol_print_logo',
'dol_print_logo_old', 'dol_print_logo_old',
'dol_value_object_id', 'dol_value_object_id',
@ -219,14 +219,14 @@ class dolReceiptPrinter extends Printer
'dol_value_vendor_mail', 'dol_value_vendor_mail',
'dol_value_customer_points', 'dol_value_customer_points',
'dol_value_object_points', 'dol_value_object_points',
'dol_print_if_customer', //'dol_print_if_customer',
'dol_print_if_vendor', //'dol_print_if_vendor',
'dol_print_if_happy_hour', //'dol_print_if_happy_hour',
'dol_print_if_num_object_unique', //'dol_print_if_num_object_unique',
'dol_print_if_customer_points', //'dol_print_if_customer_points',
'dol_print_if_object_points', //'dol_print_if_object_points',
'dol_print_if_customer_tax_number', //'dol_print_if_customer_tax_number',
'dol_print_if_customer_account_balance_positive', //'dol_print_if_customer_account_balance_positive',
); );
} }

View File

@ -63,3 +63,33 @@ DOL_VALUE_MONTH_LETTERS=Invoice month in letters
DOL_VALUE_MONTH=Invoice month DOL_VALUE_MONTH=Invoice month
DOL_VALUE_DAY=Invoice day DOL_VALUE_DAY=Invoice day
DOL_VALUE_DAY_LETTERS=Inovice day in letters 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

View File

@ -533,7 +533,7 @@ if ($action == "order" and $placeid != 0)
$order_receipt_printer1 .= '</td></tr>'; $order_receipt_printer1 .= '</td></tr>';
} }
} }
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 $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 $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) foreach ($invoice->lines as $line)
{ {
$count=0;
if ($line->special_code == "4") { if ($line->special_code == "4") {
continue; continue;
} }
@ -558,7 +559,7 @@ if ($action == "order" and $placeid != 0)
$order_receipt_printer2 .= '</td></tr>'; $order_receipt_printer2 .= '</td></tr>';
} }
} }
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 $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 $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
} }