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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

lektran
Author: lektran
Date: Wed Dec 19 21:27:41 2007
New Revision: 605810

URL: http://svn.apache.org/viewvc?rev=605810&view=rev
Log:
improvements to report printing

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

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java?rev=605810&r1=605809&r2=605810&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java Wed Dec 19 21:27:41 2007
@@ -109,7 +109,11 @@
         }
     }
 
-    public void printReport(PosTransaction trans, String resource, Map context) {
+    public synchronized void printReport(PosTransaction trans, String resource, Map context) {
+        try {
+            ((POSPrinter) control).transactionPrint(POSPrinterConst.PTR_S_RECEIPT, POSPrinterConst.PTR_TP_TRANSACTION);
+        } catch (Exception e) {
+        }
         Debug.log("Print Report Requested", module);
         String[] report = this.readReportTemplate(resource);
 
@@ -123,6 +127,10 @@
             this.println();
             this.println();
             this.println(PAPER_CUT);
+        }
+        try {
+            ((POSPrinter) control).transactionPrint(POSPrinterConst.PTR_S_RECEIPT, POSPrinterConst.PTR_TP_NORMAL);
+        } catch (Exception e) {
         }
     }