You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2006/11/21 13:45:23 UTC

svn commit: r477655 - /incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java

Author: jleroux
Date: Tue Nov 21 04:45:22 2006
New Revision: 477655

URL: http://svn.apache.org/viewvc?view=rev&rev=477655
Log:
A patch from Iain Fogg : "POS receipt printing is slow" (https://issues.apache.org/jira/browse/OFBIZ-483)

I did not see a lot of changes on my Epson TM-T88III but it worked without problems.
So I presume it depends of the JPOS Printer (driver?).

Modified:
    incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java

Modified: incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java?view=diff&rev=477655&r1=477654&r2=477655
==============================================================================
--- incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java (original)
+++ incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java Tue Nov 21 04:45:22 2006
@@ -167,6 +167,11 @@
     }
 
     private void printReceipt(PosTransaction trans, String[] template, int type, Map payInfo) {
+        try {
+            ((POSPrinter) control).transactionPrint(POSPrinterConst.PTR_S_RECEIPT, POSPrinterConst.PTR_TP_TRANSACTION);
+        } catch (Exception e) {
+        }
+
         if (template != null) {
             for (int i = 0; i < template.length; i++) {
                 if (template[i] != null) {
@@ -187,6 +192,10 @@
             this.println();
             this.println();
             this.println(PAPER_CUT);
+        }
+        try {
+            ((POSPrinter) control).transactionPrint(POSPrinterConst.PTR_S_RECEIPT, POSPrinterConst.PTR_TP_NORMAL);
+        } catch (Exception e) {
         }
     }