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/18 06:18:17 UTC

svn commit: r476442 - in /incubator/ofbiz/trunk/applications: accounting/data/ pos/config/ pos/data/ pos/entitydef/ pos/lib/ pos/screens/default/menu/ pos/src/org/ofbiz/pos/ pos/src/org/ofbiz/pos/component/ pos/src/org/ofbiz/pos/event/

Author: jleroux
Date: Fri Nov 17 21:18:16 2006
New Revision: 476442

URL: http://svn.apache.org/viewvc?view=rev&rev=476442
Log:
This is a first version for "POS Cash/Paid in and out of drawer" (https://issues.apache.org/jira/browse/OFBIZ-237)
It is designed as proposed by Ray but without a specialised dialog box for the comment wich is for the moment directly entered in "command line" as for the amount.

There are still some points to think about/enhance :
. Adding a specialised dialog box (with seed data and perhaps a mechanism to update these data)
. Manage links with X and Z reports 
	http://lists.ofbiz.org/pipermail/users/2004-October/005301.html
	https://issues.apache.org/jira/browse/OFBIZ-235
. Verify link with accounting (I added types in AccontingTypeData.xml, not sure yet of that point)

Modified:
    incubator/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
    incubator/ofbiz/trunk/applications/pos/config/XuiLabels.properties
    incubator/ofbiz/trunk/applications/pos/config/XuiLabels_fr.properties
    incubator/ofbiz/trunk/applications/pos/config/buttonevents.xml
    incubator/ofbiz/trunk/applications/pos/config/pos.properties
    incubator/ofbiz/trunk/applications/pos/config/pos_fr.properties
    incubator/ofbiz/trunk/applications/pos/data/PosTypeData.xml
    incubator/ofbiz/trunk/applications/pos/entitydef/entitygroup.xml
    incubator/ofbiz/trunk/applications/pos/entitydef/entitymodel.xml
    incubator/ofbiz/trunk/applications/pos/lib/   (props changed)
    incubator/ofbiz/trunk/applications/pos/screens/default/menu/mgrmain.xml
    incubator/ofbiz/trunk/applications/pos/screens/default/menu/posmain.xml
    incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/PosTransaction.java
    incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/component/Input.java
    incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/ManagerEvents.java
    incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/MenuEvents.java

Modified: incubator/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
+++ incubator/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Fri Nov 17 21:18:16 2006
@@ -416,6 +416,10 @@
     <PaymentType description="Customer Deposit" hasTable="N" parentTypeId="RECEIPT" paymentTypeId="CUSTOMER_DEPOSIT"/>
     <PaymentType description="Gift Certificate Deposit" hasTable="N"  parentTypeId="RECEIPT" paymentTypeId="GC_DEPOSIT"/>
 
+    <!-- payment types for POS PAID IN/OUT -->
+    <PaymentType description="POS Paid Out" hasTable="N" parentTypeId="DISBURSEMENT" paymentTypeId="POS_PAID_OUT"/>
+    <PaymentType description="POS Paid In" hasTable="N" parentTypeId="RECEIPT" paymentTypeId="POS_PAID_IN"/>    
+    
     <StatusType description="Budget" hasTable="N" parentTypeId="" statusTypeId="BUDGET_STATUS"/>
     <StatusType description="Invoice" hasTable="N" parentTypeId="" statusTypeId="INVOICE_STATUS"/>
     <StatusType description="Party Asset" hasTable="N" parentTypeId="" statusTypeId="PARTY_ASSET_STATUS"/>

Modified: incubator/ofbiz/trunk/applications/pos/config/XuiLabels.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/config/XuiLabels.properties?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/config/XuiLabels.properties (original)
+++ incubator/ofbiz/trunk/applications/pos/config/XuiLabels.properties Fri Nov 17 21:18:16 2006
@@ -51,6 +51,8 @@
 OK=OK
 OPEN=OPEN
 OPEN_DRAWER=OPEN DRAWER
+PAID_IN=PAID IN
+PAID_OUT=PAID OUT
 PAY=PAY
 PRINTER_NOT_READY=PRINTER NOT READY
 PROMO=PROMO

Modified: incubator/ofbiz/trunk/applications/pos/config/XuiLabels_fr.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/config/XuiLabels_fr.properties?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/config/XuiLabels_fr.properties (original)
+++ incubator/ofbiz/trunk/applications/pos/config/XuiLabels_fr.properties Fri Nov 17 21:18:16 2006
@@ -52,6 +52,8 @@
 OK=OK
 OPEN=Ouvrir
 OPEN_DRAWER=Ouvrir le tiroir
+PAID_IN=Retour en caisse
+PAID_OUT=Sortie de caisse
 PAY=Paiement
 PRINTER_NOT_READY=Imprimante de caisse non pr\u00EAte
 PROMO=Promos

Modified: incubator/ofbiz/trunk/applications/pos/config/buttonevents.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/config/buttonevents.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/config/buttonevents.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/config/buttonevents.xml Fri Nov 17 21:18:16 2006
@@ -105,11 +105,12 @@
     <event button-name="mgrPopDrwr" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="popDrawer" disable-lock="false"/>
     <event button-name="mgrPriceChg" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="modifyPrice" disable-lock="false"/>
     <event button-name="mgrVoidSale" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="voidOrder" disable-lock="false"/>
-    <event button-name="ngrReprintTx" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="reprintLastTx" disable-lock="false"/>
+    <event button-name="mgrReprintTx" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="reprintLastTx" disable-lock="false"/>
     <event button-name="mgrTotals" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="totalsReport" disable-lock="false"/>
     <event button-name="mgrCacheClear" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="clearCache" disable-lock="false"/>
     <event button-name="mgrResetXui" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="resetXui" disable-lock="false"/>
-    <event button-name="mgrShutDown" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="shutdown" disable-lock="false"/>
+    <event button-name="mgrPaidOut" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="paidOut" disable-lock="false"/>
+    <event button-name="mgrPaidIn" class-name="org.ofbiz.pos.event.ManagerEvents" method-name="paidIn" disable-lock="false"/>
 
     <!-- test events -->
     <event button-name="testAlert" class-name="org.ofbiz.pos.event.TestEvents" method-name="testAlert" disable-lock="false"/>

Modified: incubator/ofbiz/trunk/applications/pos/config/pos.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/config/pos.properties?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/config/pos.properties (original)
+++ incubator/ofbiz/trunk/applications/pos/config/pos.properties Fri Nov 17 21:18:16 2006
@@ -26,7 +26,6 @@
 CREDIT_CARD=CREDIT CARD
 CREDNO=Enter Card Number:
 CREDZP=Enter Billing ZipCode:
-SelectProductListDblClickTip=You may use a double click to select the current product
 DATE=DATE
 DRWR=DRAWER
 DateFormat=EEE MMM dd
@@ -37,6 +36,10 @@
 ENTCRC=Enter Credit Card Amount:
 ENTGFC=Enter Gift Card Amount:
 ENTOTH=Enter Other Payment Amount:
+ENT_COMM_IN=Enter reason of put in:
+ENT_COMM_OUT=Enter reason of this withdraw:
+ENT_IN=Enter amount to paid in:
+ENT_OUT=Enter amount to withdraw:
 GIFT_CARD=GIFT CARD
 GROSS_SALES=GROSS SALES
 Grand_Total=Grand Total
@@ -57,6 +60,7 @@
 SaveASale=Save current sale
 Saving=Saving sale...
 SelectAProduct=Select a product
+SelectProductListDblClickTip=You may use a double click to select the current product
 Shutting_down=Shutting down...
 TOTAL=TOTAL
 TOTALD=Total Due:

Modified: incubator/ofbiz/trunk/applications/pos/config/pos_fr.properties
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/config/pos_fr.properties?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/config/pos_fr.properties (original)
+++ incubator/ofbiz/trunk/applications/pos/config/pos_fr.properties Fri Nov 17 21:18:16 2006
@@ -26,7 +26,6 @@
 CREDIT_CARD=Carte(s) de cr\u00E9dit
 CREDNO=Entrez le n\u00B0 de la carte :
 CREDZP=Entrez le code postal de facturation :
-SelectProductListDblClickTip=Vous pouvez utiliser le double clic pour chosir un produit
 DATE=Date
 DRWR=Tiroir
 DateFormat=EE dd MMM
@@ -37,6 +36,10 @@
 ENTCRC=Entrez le montant en carte de cr\u00E9dit :
 ENTGFC=Entrez le montant en bon d'achat :
 ENTOTH=Entrez le mt en autre moyen de paiement :
+ENT_IN=Entrez le montant \u00E0 remettre en caisse :
+ENT_COMM_IN=Entrez la raison de cette entr\u00E9e :
+ENT_OUT=Entrez le montant \u00E0 retirer :
+ENT_COMM_OUT=Entrez la raison de ce retrait :
 GIFT_CARD=Bon(s) d'achat
 GROSS_SALES=Total
 Grand_Total=Total
@@ -57,6 +60,7 @@
 SaveASale=Sauver la vente en cours
 Saving=Enregistrement de la vente...
 SelectAProduct=S\u00E9lectionnez un produit
+SelectProductListDblClickTip=Vous pouvez utiliser le double clic pour chosir un produit
 Shutting_down=Arr\u00EAt en cours...
 TOTAL=Total
 TOTALD=Total d\u00FB :

Modified: incubator/ofbiz/trunk/applications/pos/data/PosTypeData.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/data/PosTypeData.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/data/PosTypeData.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/data/PosTypeData.xml Fri Nov 17 21:18:16 2006
@@ -21,5 +21,7 @@
     <StatusItem description="Sold" sequenceId="10" statusCode="SOLD" statusId="POSTX_SOLD" statusTypeId="POSTX_STATUS"/>
     <StatusItem description="Returned" sequenceId="15" statusCode="RETURNED" statusId="POSTX_RETURNED" statusTypeId="POSTX_STATUS"/>
     <StatusItem description="Voided" sequenceId="20" statusCode="VOIDED" statusId="POSTX_VOIDED" statusTypeId="POSTX_STATUS"/>
+    <StatusItem description="PaidIn" sequenceId="30" statusCode="PAID_IN" statusId="POSTX_PAID_IN" statusTypeId="POSTX_STATUS"/>
+    <StatusItem description="PaidOut" sequenceId="40" statusCode="PAID_OUT" statusId="POSTX_PAID_OUT" statusTypeId="POSTX_STATUS"/>
     <StatusItem description="Closed" sequenceId="50" statusCode="CLOSED" statusId="POSTX_CLOSED" statusTypeId="POSTX_STATUS"/>
 </entity-engine-xml>

Modified: incubator/ofbiz/trunk/applications/pos/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/entitydef/entitygroup.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/entitydef/entitygroup.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/entitydef/entitygroup.xml Fri Nov 17 21:18:16 2006
@@ -26,5 +26,6 @@
     <entity-group group="org.ofbiz" entity="PosTerminal" />
     <entity-group group="org.ofbiz" entity="PosTerminalLog" />
     <entity-group group="org.ofbiz" entity="PosTerminalState" />
+    <entity-group group="org.ofbiz" entity="PosTerminalInternTx" />
 
 </entitygroup>

Modified: incubator/ofbiz/trunk/applications/pos/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/entitydef/entitymodel.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/entitydef/entitymodel.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/entitydef/entitymodel.xml Fri Nov 17 21:18:16 2006
@@ -93,4 +93,15 @@
           <key-map field-name="posTerminalId"/>
       </relation>
     </entity>
+    <entity entity-name="PosTerminalInternTx"
+            package-name="org.ofbiz.pos.terminal"
+            title="Pos Terminal Internal Transaction">
+      <field name="posTerminalLogId" type="id-ne"></field>
+      <field name="paidAmount" type="currency-amount"></field>        
+      <field name="reasonComment" type="comment"/>
+      <prim-key field="posTerminalLogId"/>
+      <relation type="one" fk-name="POS_LOG_POS" rel-entity-name="PosTerminalLog">
+          <key-map field-name="posTerminalLogId"/>
+      </relation>
+    </entity>
 </entitymodel>

Propchange: incubator/ofbiz/trunk/applications/pos/lib/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 17 21:18:16 2006
@@ -0,0 +1,2 @@
+epsonJposService180.jar
+epsonJposServiceCommon.jar

Modified: incubator/ofbiz/trunk/applications/pos/screens/default/menu/mgrmain.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/screens/default/menu/mgrmain.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/screens/default/menu/mgrmain.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/screens/default/menu/mgrmain.xml Fri Nov 17 21:18:16 2006
@@ -16,7 +16,7 @@
 -->
 <XPage>
     <Components>
-        <!-- col 1 -->
+        <!-- line 1 -->
         <Button name="menuSku" x="0" y="0" w="100" h="60" style="posButton" content="SKU" alignment="Center"/>
         <Button name="menuMain" x="102" y="0" w="100" h="60" style="posButton" content="MAIN" alignment="Center"/>
         <Button name="menuMgr" x="204" y="0" w="100" h="60" style="posButton" content="MGR" alignment="Center"/>
@@ -24,23 +24,23 @@
         <Button name="" x="408" y="0" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="menuPay" x="510" y="0" w="100" h="60" style="posButton" content="PAY" alignment="Center"/>
 
-        <!-- col 2 -->
+        <!-- line 2 -->
         <Button name="mgrPriceChg" x="0" y="62" w="100" h="60" style="posButton" content="CHANGE_PRICE" alignment="Center"/>
-        <Button name="ngrReprintTx" x="102" y="62" w="100" h="60" style="posButton" content="REPRINT" alignment="Center"/>
+        <Button name="mgrReprintTx" x="102" y="62" w="100" h="60" style="posButton" content="REPRINT" alignment="Center"/>
         <Button name="" x="204" y="62" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="306" y="62" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="408" y="62" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="mgrOpenTerm" x="510" y="62" w="100" h="60" style="posButton" content="OPEN" alignment="Center"/>
 
-        <!-- col 3 -->
+        <!-- line 3 -->
         <Button name="" x="0" y="124" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="102" y="124" w="100" h="60" style="posButton" content="" alignment="Center"/>
-        <Button name="" x="204" y="124" w="100" h="60" style="posButton" content="" alignment="Center"/>
-        <Button name="" x="306" y="124" w="100" h="60" style="posButton" content="" alignment="Center"/>
+        <Button name="mgrPaidOut" x="204" y="124" w="100" h="60" style="posButton" content="PAID_OUT" alignment="Center"/>
+        <Button name="mgrPaidIn" x="306" y="124" w="100" h="60" style="posButton" content="PAID_IN" alignment="Center"/>
         <Button name="" x="408" y="124" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="mgrCloseTerm" x="510" y="124" w="100" h="60" style="posButton" content="CLOSE" alignment="Center"/>
 
-        <!-- col 4 -->
+        <!-- line 4 -->
         <Button name="" x="0" y="186" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="102" y="186" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="204" y="186" w="100" h="60" style="posButton" content="" alignment="Center"/>
@@ -48,7 +48,7 @@
         <Button name="" x="408" y="186" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="mgrVoidSale" x="510" y="186" w="100" h="60" style="posButton" content="VOID_SALE" alignment="Center"/>
 
-        <!-- col 5 -->
+        <!-- line 5 -->
         <Button name="mgrCacheClear" x="0" y="248" w="100" h="60" style="posButton" content="CLEAR_CACHE" alignment="Center"/>
         <Button name="mgrResetXui" x="102" y="248" w="100" h="60" style="posButton" content="RESET_XUI" alignment="Center"/>
         <Button name="" x="204" y="248" w="100" h="60" style="posButton" content="" alignment="Center"/>
@@ -56,7 +56,7 @@
         <Button name="" x="408" y="248" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="510" y="248" w="100" h="60" style="posButton" content="" alignment="Center"/>
 
-        <!-- col 6 -->
+        <!-- line 6 -->
         <Button name="mgrPopDrwr" x="0" y="310" w="100" h="60" style="posButton" content="OPEN_DRAWER" alignment="Center"/>
         <Button name="mgrTotals" x="102" y="310" w="100" h="60" style="posButton" content="TOTALS" alignment="Center"/>
         <Button name="" x="204" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>

Modified: incubator/ofbiz/trunk/applications/pos/screens/default/menu/posmain.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/screens/default/menu/posmain.xml?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/screens/default/menu/posmain.xml (original)
+++ incubator/ofbiz/trunk/applications/pos/screens/default/menu/posmain.xml Fri Nov 17 21:18:16 2006
@@ -16,7 +16,7 @@
 -->
 <XPage>
     <Components>
-        <!-- col 1 -->
+        <!-- line 1 -->
         <Button name="menuSku" x="0" y="0" w="100" h="60" style="posButton" content="SKU" alignment="Center"/>
         <Button name="menuMain" x="102" y="0" w="100" h="60" style="posButton" content="MAIN" alignment="Center"/>
         <Button name="menuMgr" x="204" y="0" w="100" h="60" style="posButton" content="MGR" alignment="Center"/>
@@ -24,7 +24,7 @@
         <Button name="" x="408" y="0" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="menuPay" x="510" y="0" w="100" h="60" style="posButton" content="PAY" alignment="Center"/>
 
-        <!-- col 2 -->
+        <!-- line 2 -->
         <Button name="SKU.GZ-1001" x="0" y="62" w="100" h="60" style="skuButtonGizmo" content="GIZMO 1" alignment="Center"/>
         <Button name="SKU.GZ-5005" x="102" y="62" w="100" h="60" style="skuButtonGizmoPurple" content="GZ PURPLE" alignment="Center"/>
         <Button name="SKU.GZ-2644" x="204" y="62" w="100" h="60" style="skuButtonGizmo" content="GZ-2644" alignment="Center"/>
@@ -32,7 +32,7 @@
         <Button name="SKU.GZ-7000" x="408" y="62" w="100" h="60" style="skuButtonGizmo" content="GZ-7000" alignment="Center"/>
         <Button name="SKU.WG-5569" x="510" y="62" w="100" h="60" style="skuButtonWidget" content="WIDGET 1" alignment="Center"/>
 
-        <!-- col 3 -->
+        <!-- line 3 -->
         <Button name="SKU.GC-001-C10" x="0" y="124" w="100" h="60" style="skuButtonGiftCard" content="GIFT CARD 1" alignment="Center"/>
         <Button name="SKU.GC-001-C100" x="102" y="124" w="100" h="60" style="skuButtonGiftCard" content="GC-C100" alignment="Center"/>
         <Button name="SKU.GC-001-C25" x="204" y="124" w="100" h="60" style="skuButtonGiftCard" content="GC-C25" alignment="Center"/>
@@ -40,7 +40,7 @@
         <Button name="SKU.GC-001-CO" x="408" y="124" w="100" h="60" style="skuButtonGiftCard" content="GC-CO" alignment="Center"/>
         <Button name="SKU.GZ-1000" x="510" y="124" w="100" h="60" style="skuButtonGizmo" content="GZ-1000" alignment="Center"/>
 
-        <!-- col 4 -->
+        <!-- line 4 -->
         <Button name="SKU.GC-001-H10" x="0" y="186" w="100" h="60" style="skuButtonGiftCard" content="GC-H10" alignment="Center"/>
         <Button name="SKU.GC-001-H100" x="102" y="186" w="100" h="60" style="skuButtonGiftCard" content="GC-H100" alignment="Center"/>
         <Button name="SKU.GC-001-H25" x="204" y="186" w="100" h="60" style="skuButtonGiftCard" content="GC-H125" alignment="Center"/>
@@ -48,7 +48,7 @@
         <Button name="SKU.GC-001-HO" x="408" y="186" w="100" h="60" style="skuButtonGiftCard" content="GC-HO" alignment="Center"/>
         <Button name="SKU.GZ-DIG" x="510" y="186" w="100" h="60" style="skuButtonGizmo" content="GZ-DIG" alignment="Center"/>
 
-        <!-- col 5 -->
+        <!-- line 5 -->
         <Button name="SKU.GZ-1004" x="0" y="248" w="100" h="60" style="skuButtonGizmo" content="GZ-1004" alignment="Center"/>
         <Button name="SKU.GZ-1005" x="102" y="248" w="100" h="60" style="skuButtonGizmo" content="GZ-1005" alignment="Center"/>
         <Button name="SKU.GZ-8544" x="204" y="248" w="100" h="60" style="skuButtonGizmo" content="GZ-8544" alignment="Center"/>
@@ -56,12 +56,14 @@
         <Button name="SKU.WG-1111" x="408" y="248" w="100" h="60" style="skuButtonWidget" content="WG-1111" alignment="Center"/>
         <Button name="" x="510" y="248" w="100" h="60" style="posButton" content="" alignment="Center"/>
 
-        <!-- col 6 -->
-        <Button name="testAlert" x="0" y="310" w="100" h="60" style="posButton" content="TEST ALERT" alignment="Center"/>
+        <!-- line 6 -->
+        <!--Button name="testAlert" x="0" y="310" w="100" h="60" style="posButton" content="TEST ALERT" alignment="Center"/-->
+        <Button name="" x="0" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="102" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="204" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="306" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
         <Button name="" x="408" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
-        <Button name="testMsr" x="510" y="310" w="100" h="60" style="posButton" content="TEST MSR" alignment="Center"/>
+        <Button name="" x="510" y="310" w="100" h="60" style="posButton" content="" alignment="Center"/>
+        <!--Button name="testMsr" x="510" y="310" w="100" h="60" style="posButton" content="TEST MSR" alignment="Center"/-->
     </Components>    
 </XPage>

Modified: incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/PosTransaction.java?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/PosTransaction.java Fri Nov 17 21:18:16 2006
@@ -1,12 +1,12 @@
 /*
  * Copyright 2001-2006 The Apache Software Foundation
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -158,6 +158,10 @@
         return this.facilityId;
     }
 
+    public String getTerminalLogId() {
+        return txLog.getString("posTerminalLogId");
+    }
+
     public boolean isOpen() {
         if (!this.isOpen) {
             GenericValue terminalState = this.getTerminalState();
@@ -193,7 +197,7 @@
     public double getTaxTotal() {
         return cart.getTotalSalesTax();
     }
-    
+
     public double getGrandTotal() {
         return UtilFormatOut.formatPriceNumber(cart.getGrandTotal()).doubleValue();
     }
@@ -232,7 +236,7 @@
     }
 
     public Map getPaymentInfo(int index) {
-        ShoppingCart.CartPaymentInfo inf = cart.getPaymentInfo(index);        
+        ShoppingCart.CartPaymentInfo inf = cart.getPaymentInfo(index);
         GenericValue infValue = inf.getValueObject(session.getDelegator());
         GenericValue paymentPref = null;
         try {
@@ -343,7 +347,7 @@
             return 0;
         }
     }
-        
+
     public void addItem(String productId, double quantity) throws CartItemModifyException, ItemNotFoundException {
         trace("add item", productId + "/" + quantity);
         try {
@@ -399,7 +403,7 @@
             if (itemAdj != null) {
                 item.removeAdjustment(itemAdj.intValue());
             }
-           	int idx = item.addAdjustment(adjustment);    
+               int idx = item.addAdjustment(adjustment);
             skuDiscounts.put(productId, new Integer(idx));
         } else {
             trace("add sale adjustment");
@@ -458,7 +462,7 @@
         cart.clear();
         currentTx = null;
     }
-        
+
     public void closeTx() {
         trace("transaction closed");
         txLog.set("statusId", "POSTX_CLOSED");
@@ -473,6 +477,18 @@
         currentTx = null;
     }
 
+    public void paidInOut(String type) {
+        trace("paid " + type);
+        txLog.set("statusId", "POSTX_PAID_" + type);
+        txLog.set("logEndDateTime", UtilDateTime.nowTimestamp());
+        try {
+            txLog.store();
+        } catch (GenericEntityException e) {
+            Debug.logError(e, "Unable to store TX log - not fatal", module);
+        }
+        currentTx = null;
+    }
+    
     public void calcTax() {
         try {
             ch.calcAndAddTax(this.getStoreOrgAddress());
@@ -600,7 +616,7 @@
         }
 
         // process the payment(s)
-        output.print(UtilProperties.getMessage("pos","Processing",defaultLocale));        
+        output.print(UtilProperties.getMessage("pos","Processing",defaultLocale));
         Map payRes = null;
         try {
             payRes = ch.processPayment(ProductStoreWorker.getProductStore(productStoreId, session.getDelegator()), session.getUserLogin(), true);
@@ -609,14 +625,14 @@
             throw e;
         }
 
-        if (payRes != null && ServiceUtil.isError(payRes)) {         
+        if (payRes != null && ServiceUtil.isError(payRes)) {
             throw new GeneralException(ServiceUtil.getErrorMessage(payRes));
         }
 
         // get the change due
         double change = (grandTotal - paymentAmt);
 
-        // notify the change due     
+        // notify the change due
         output.print(UtilProperties.getMessage("pos","CHANGE",defaultLocale) + " " + UtilFormatOut.formatPrice(this.getTotalDue() * -1));
 
         // threaded drawer/receipt printing
@@ -720,7 +736,7 @@
 
             XModel taxLine = Journal.appendNode(model, "tr", "", "");
             Journal.appendNode(taxLine, "td", "sku", "");
-            
+
             Journal.appendNode(taxLine, "td", "desc", UtilProperties.getMessage("pos","Sales_Tax",defaultLocale));
             Journal.appendNode(taxLine, "td", "qty", "-");
             Journal.appendNode(taxLine, "td", "price", UtilFormatOut.formatPrice(taxAmount));
@@ -872,44 +888,44 @@
         }
         return currentTx;
     }
-    
+
     public void loadSale(PosScreen pos) {
         List shoppingLists = createShoppingLists();
         if (!shoppingLists.isEmpty()) {
-        	Hashtable salesMap = createSalesMap(shoppingLists);
-	        if (!salesMap.isEmpty()) {
-		        LoadSale loadSale = new LoadSale(salesMap, this, pos);
-		        loadSale.openDlg();
-	        }
-	        else {
-		        pos.showDialog("dialog/error/nosales");
-	        }	        
+            Hashtable salesMap = createSalesMap(shoppingLists);
+            if (!salesMap.isEmpty()) {
+                LoadSale loadSale = new LoadSale(salesMap, this, pos);
+                loadSale.openDlg();
+            }
+            else {
+                pos.showDialog("dialog/error/nosales");
+            }
         } else {
-	        pos.showDialog("dialog/error/nosales");
-        }        
+            pos.showDialog("dialog/error/nosales");
+        }
     }
-    
+
     public List createShoppingLists() {
-	    List shoppingLists = null;
-	    GenericDelegator delegator = this.session.getDelegator();
-	    try {
-	    	shoppingLists = delegator.findAll("ShoppingList");
-	    } catch (GenericEntityException e) {
-	        Debug.logError(e, module);
-	        ServiceUtil.returnError("Error running initLowLevelCode: " + e.getMessage());            
-	    }
-	
-	    if (shoppingLists == null) {
-	    	Debug.log(UtilProperties.getMessage("EcommerceUiLabels","EcommerceNoShoppingListsCreate",locale), module);
-	    }
-	    return shoppingLists;
-    }    
+        List shoppingLists = null;
+        GenericDelegator delegator = this.session.getDelegator();
+        try {
+            shoppingLists = delegator.findAll("ShoppingList");
+        } catch (GenericEntityException e) {
+            Debug.logError(e, module);
+            ServiceUtil.returnError("Error running initLowLevelCode: " + e.getMessage());
+        }
+
+        if (shoppingLists == null) {
+            Debug.log(UtilProperties.getMessage("EcommerceUiLabels","EcommerceNoShoppingListsCreate",locale), module);
+        }
+        return shoppingLists;
+    }
 
     public Hashtable createSalesMap(List shoppingLists) {
         Hashtable salesMap = new Hashtable();
-        Iterator i = shoppingLists.iterator();        
+        Iterator i = shoppingLists.iterator();
         while (i.hasNext()){
-            GenericValue shoppingList = (GenericValue) i.next();            
+            GenericValue shoppingList = (GenericValue) i.next();
             List items = null;
             try {
                 items = shoppingList.getRelated("ShoppingListItem", UtilMisc.toList("shoppingListItemSeqId"));
@@ -924,27 +940,27 @@
         }
         return salesMap;
     }
-    
-    public boolean addListToCart(String  shoppingListId, PosScreen pos, boolean append) {        
-    	GenericDelegator delegator = session.getDelegator();
+
+    public boolean addListToCart(String  shoppingListId, PosScreen pos, boolean append) {
+        GenericDelegator delegator = session.getDelegator();
         LocalDispatcher dispatcher = session.getDispatcher();
         String includeChild = null; // Perhaps will be used later ...
             String prodCatalogId =  null;
 
             try {
-            	ShoppingListEvents.addListToCart(delegator, dispatcher, cart, prodCatalogId, shoppingListId, (includeChild != null), true, append);
+                ShoppingListEvents.addListToCart(delegator, dispatcher, cart, prodCatalogId, shoppingListId, (includeChild != null), true, append);
             } catch (IllegalArgumentException e) {
                 Debug.logError(e, module);
                 pos.showDialog("dialog/error/exception", e.getMessage());
                 return false;
-            }            
+            }
             return true;
-    }    
-    
+    }
+
     public boolean clearList(String shoppingListId, PosScreen pos) {
-    	GenericDelegator delegator = session.getDelegator();
-    	try {
-    	ShoppingListEvents.clearListInfo(delegator, shoppingListId);
+        GenericDelegator delegator = session.getDelegator();
+        try {
+        ShoppingListEvents.clearListInfo(delegator, shoppingListId);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             pos.showDialog("dialog/error/exception", e.getMessage());
@@ -952,23 +968,23 @@
         }
         return true;
     }
-        
+
 
     public void saveSale(PosScreen pos) {
         SaveSale SaveSale = new SaveSale(this, pos);
-        SaveSale.openDlg();          	    	
+        SaveSale.openDlg();
     }
     public void saveSale(String  shoppingListName, PosScreen pos) {
-    	if (cart.size() == 0 ) {
+        if (cart.size() == 0 ) {
             pos.showDialog("dialog/error/exception", UtilProperties.getMessage("OrderErrorUiLabels", "OrderUnableToCreateNewShoppingList",locale));
-            return;    		
-    	}
-    	GenericDelegator delegator = this.session.getDelegator();
-    	LocalDispatcher dispatcher = session.getDispatcher();
+            return;
+        }
+        GenericDelegator delegator = this.session.getDelegator();
+        LocalDispatcher dispatcher = session.getDispatcher();
         GenericValue userLogin = session.getUserLogin();
         Locale locale = defaultLocale;
         String shoppingListId = null;
-                
+
         if (!UtilValidate.isEmpty(shoppingListName)) {
             // create a new shopping list with partyId = user connected (POS clerk, etc.) and not buyer (_NA_ in POS)
             Map serviceCtx = UtilMisc.toMap("userLogin", session.getUserLogin(), "partyId", session.getUserPartyId(),
@@ -987,33 +1003,33 @@
 
             // check for errors
             if (ServiceUtil.isError(newListResult)) {
-            	String error = ServiceUtil.getErrorMessage(newListResult);
+                String error = ServiceUtil.getErrorMessage(newListResult);
                 Debug.logError(error, module);
                 pos.showDialog("dialog/error/exception", error);
                 return;
             }
-            
+
             // get the new list id
             if (newListResult != null) {
-            	shoppingListId = (String) newListResult.get("shoppingListId");
+                shoppingListId = (String) newListResult.get("shoppingListId");
             } else {
                 Debug.logError("Problem while creating new ShoppingList", module);
                 pos.showDialog("dialog/error/exception", UtilProperties.getMessage("OrderErrorUiLabels", "OrderUnableToCreateNewShoppingList",locale));
-                return;            	
+                return;
             }
         }
-        
-        String selectedCartItems[] = new String[cart.size()]; 
+
+        String selectedCartItems[] = new String[cart.size()];
         for(int i = 0; i < cart.size(); i++) {
-        	Integer integer = new Integer(i);
-        	selectedCartItems[i] = integer.toString();
+            Integer integer = new Integer(i);
+            selectedCartItems[i] = integer.toString();
         }
 
         try {
-        	ShoppingListEvents.addBulkFromCart(delegator, dispatcher, cart, userLogin, shoppingListId, selectedCartItems, true, true);
+            ShoppingListEvents.addBulkFromCart(delegator, dispatcher, cart, userLogin, shoppingListId, selectedCartItems, true, true);
         } catch (IllegalArgumentException e) {
             Debug.logError(e, "Problem while creating new ShoppingList", module);
             pos.showDialog("dialog/error/exception", UtilProperties.getMessage("OrderErrorUiLabels", "OrderUnableToCreateNewShoppingList",locale));
         }
-    }                   
+    }
 }

Modified: incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/component/Input.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/component/Input.java?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/component/Input.java (original)
+++ incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/component/Input.java Fri Nov 17 21:18:16 2006
@@ -34,7 +34,7 @@
     public static final String module = Input.class.getName();
     private static final String[] validFunc = { "LOGIN", "OPEN", "CLOSE", "UNLOCK", "MGRLOGIN", "PAID", "TOTAL",
                                                 "CREDIT", "GIFTCARD", "MSRINFO", "CHECK", "CHECKINFO", "REFNUM",
-                                                "QTY", "VOID", "SHIFT" };
+                                                "QTY", "VOID", "SHIFT", "PAID_IN" , "PAID_OUT" };
 
     protected Stack functionStack = new Stack();
     protected Component[] pageComs = null;

Modified: incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/ManagerEvents.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/ManagerEvents.java?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/ManagerEvents.java (original)
+++ incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/ManagerEvents.java Fri Nov 17 21:18:16 2006
@@ -1,12 +1,12 @@
 /*
  * Copyright 2001-2006 The Apache Software Foundation
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -106,13 +106,13 @@
         if (!trans.isOpen()) {
             if (input.isFunctionSet("OPEN")) {
                 String amountStr = input.value();
-                if (UtilValidate.isNotEmpty(amountStr)) 
+                if (UtilValidate.isNotEmpty(amountStr))
                 {
                     try {
                         double amt = Double.parseDouble(amountStr);
                         amt = amt / 100;
                         amountStr = UtilFormatOut.formatPrice(amt);
-                    } catch (NumberFormatException e) 
+                    } catch (NumberFormatException e)
                     {
                         Debug.logError(e, module);
                     }
@@ -122,14 +122,14 @@
                 state.set("openedDate", UtilDateTime.nowTimestamp());
                 state.set("openedByUserLoginId", pos.getSession().getUserId());
                 state.set("startingTxId", trans.getTransactionId());
-	            try
-	            {
-	                state.set("startingDrawerAmount", new Double(priceDecimalFormat.parse(amountStr).doubleValue()));
-	            }
-	            catch (ParseException pe)
-	            {
-	                Debug.logError(pe, module);
-	            }
+                try
+                {
+                    state.set("startingDrawerAmount", new Double(priceDecimalFormat.parse(amountStr).doubleValue()));
+                }
+                catch (ParseException pe)
+                {
+                    Debug.logError(pe, module);
+                }
                 try {
                     state.create();
                 } catch (GenericEntityException e) {
@@ -204,22 +204,17 @@
                     GenericValue state = trans.getTerminalState();
                     state.set("closedDate", UtilDateTime.nowTimestamp());
                     state.set("closedByUserLoginId", pos.getSession().getUserId());
-                    /*state.set("actualEndingCash", new Double(closeInfo[0]));
-                    state.set("actualEndingCheck", new Double(closeInfo[1]));
-                    state.set("actualEndingCc", new Double(closeInfo[2]));
-                    state.set("actualEndingGc", new Double(closeInfo[3]));
-                    state.set("actualEndingOther", new Double(closeInfo[4]));*/
                     try
                     {
-	                    state.set("actualEndingCash", new Double(priceDecimalFormat.parse(closeInfo[0]).doubleValue()));
-	                    state.set("actualEndingCheck", new Double(priceDecimalFormat.parse(closeInfo[1]).doubleValue()));
-	                    state.set("actualEndingCc", new Double(priceDecimalFormat.parse(closeInfo[2]).doubleValue()));
-	                    state.set("actualEndingGc", new Double(priceDecimalFormat.parse(closeInfo[3]).doubleValue()));
-	                    state.set("actualEndingOther", new Double(priceDecimalFormat.parse(closeInfo[4]).doubleValue()));
+                        state.set("actualEndingCash", new Double(priceDecimalFormat.parse(closeInfo[0]).doubleValue()));
+                        state.set("actualEndingCheck", new Double(priceDecimalFormat.parse(closeInfo[1]).doubleValue()));
+                        state.set("actualEndingCc", new Double(priceDecimalFormat.parse(closeInfo[2]).doubleValue()));
+                        state.set("actualEndingGc", new Double(priceDecimalFormat.parse(closeInfo[3]).doubleValue()));
+                        state.set("actualEndingOther", new Double(priceDecimalFormat.parse(closeInfo[4]).doubleValue()));
                     }
                     catch (ParseException pe)
                     {
-	                    Debug.logError(pe, module);
+                        Debug.logError(pe, module);
                     }
                     state.set("endingTxId", trans.getTransactionId());
                     Debug.log("Updated State - " + state, module);
@@ -233,7 +228,7 @@
 
                     // print the totals report
                     output.print(UtilProperties.getMessage("pos","WaitingFinalSales",Locale.getDefault()));
-                    pos.showDialog("dialog/error/terminalclosed");
+                    //pos.showDialog("dialog/error/terminalclosed"); JLR 14/11/06 : Pb with that don't know why, useless => commented out
                     printTotals(pos, state, true);
 
                     // lock the terminal for the moment
@@ -261,7 +256,7 @@
                     pos.getInput().setLock(false);
                     pos.getButtons().setLock(false);
                     pos.refresh(true);
-                    
+
             }
         } else {
             trans.popDrawer();
@@ -269,7 +264,6 @@
             input.setFunction("CLOSE");
             output.print(UtilProperties.getMessage("pos","ENTCAS",Locale.getDefault()));
         }
-
     }
 
     public static void voidOrder(PosScreen pos) {
@@ -316,7 +310,7 @@
                     LocalDispatcher dispatcher = session.getDispatcher();
                     Map returnResp = null;
                     try {
-                        returnResp = dispatcher.runSync("quickReturnOrder", UtilMisc.toMap("orderId", orderId, 
+                        returnResp = dispatcher.runSync("quickReturnOrder", UtilMisc.toMap("orderId", orderId,
                                                         "returnHeaderTypeId", "CUSTOMER_RETURN", "userLogin", session.getUserLogin()));
                     } catch (GenericServiceException e) {
                         Debug.logError(e, module);
@@ -403,6 +397,81 @@
         printTotals(pos, null, false);
     }
 
+    public static void paidOut(PosScreen pos) {
+        paidOutAndIn(pos, "OUT");        
+    }
+
+    public static void paidIn(PosScreen pos) {
+        paidOutAndIn(pos, "IN");        
+    }
+                    
+    public static void paidOutAndIn(PosScreen pos, String type) {
+        if (!mgrLoggedIn) {
+            pos.showDialog("dialog/error/mgrnotloggedin");
+            return;
+        }
+        
+        PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession());
+        if (!trans.isOpen()) {
+            pos.showDialog("dialog/error/terminalclosed");
+            return;
+        }
+        Output output = pos.getOutput();
+        Input input = pos.getInput(); 
+        if (input.isFunctionSet("PAID_" + type)) {
+            String[] func = input.getFunction("PAID_" + type);
+            String lastValue = input.value();
+            if (UtilValidate.isNotEmpty(lastValue)) {
+                String[] paidInfo = new String[0];
+                switch (func[1].split("\\|").length) {
+                    case 1:
+                        try {
+                            double dbl = Double.parseDouble(lastValue);
+                            dbl = dbl / 100;
+                            lastValue = UtilFormatOut.formatPrice(dbl);
+                        } catch (NumberFormatException e) {
+                            Debug.logError(e, module);
+                        }
+                        func[1] = func[1] + "|";
+                        func[1] = func[1] + lastValue;
+                        input.setFunction("PAID_" + type, func[1]);
+                        output.print(UtilProperties.getMessage("pos","ENT_COMM_" + type, Locale.getDefault()));
+                        break;                        
+                    case 2:
+                        func[1] = func[1] + "|";
+                        func[1] = func[1] + lastValue;
+                        paidInfo = func[1].split("\\|");            
+                        GenericValue internTx = pos.getSession().getDelegator().makeValue("PosTerminalInternTx", null);
+                        internTx.set("posTerminalLogId", trans.getTerminalLogId());                        
+                        try
+                        {
+                            internTx.set("paidAmount", new Double(priceDecimalFormat.parse(paidInfo[1]).doubleValue()));
+                        }
+                        catch (ParseException pe)
+                        {
+                            Debug.logError(pe, module);
+                        }
+                        internTx.set("reasonComment", paidInfo[2]);
+                        try {
+                            internTx.create();
+                        } catch (GenericEntityException e) {
+                            Debug.logError(e, module);
+                            pos.showDialog("dialog/error/exception", e.getMessage());
+                        }                        
+                        //save the TX Log 
+                        trans.paidInOut(type);               
+                        NavagationEvents.showPosScreen(pos);                        
+                        break;
+                }
+            }
+        } else {
+            trans.popDrawer();
+            input.clear();
+            input.setFunction("PAID_" + type);
+            output.print(UtilProperties.getMessage("pos","ENT_" + type, Locale.getDefault()));
+        }
+    }    
+    
     private static void printTotals(PosScreen pos, GenericValue state, boolean runBalance) {
         PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession());
         if (!trans.isOpen()) {
@@ -469,12 +538,12 @@
 
         Map reportMap = new HashMap();
         String reportTemplate = "totals.txt";
-        
-        // miscellaneous       
+
+        // miscellaneous
         reportMap.put("term", UtilFormatOut.padString(UtilProperties.getMessage("pos","term",Locale.getDefault()), 20, false, ' '));
         reportMap.put("draw", UtilFormatOut.padString(UtilProperties.getMessage("pos","draw",Locale.getDefault()), 20, false, ' '));
         reportMap.put("clerk", UtilFormatOut.padString(UtilProperties.getMessage("pos","clerk",Locale.getDefault()), 20, false, ' '));
-        reportMap.put("total_report", UtilFormatOut.padString(UtilProperties.getMessage("pos","total_report",Locale.getDefault()), 20, false, ' '));         
+        reportMap.put("total_report", UtilFormatOut.padString(UtilProperties.getMessage("pos","total_report",Locale.getDefault()), 20, false, ' '));
 
         // titles
         reportMap.put("cashTitle", UtilFormatOut.padString(UtilProperties.getMessage("pos","CASH",Locale.getDefault()), 20, false, ' '));

Modified: incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/MenuEvents.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/MenuEvents.java?view=diff&rev=476442&r1=476441&r2=476442
==============================================================================
--- incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/MenuEvents.java (original)
+++ incubator/ofbiz/trunk/applications/pos/src/org/ofbiz/pos/event/MenuEvents.java Fri Nov 17 21:18:16 2006
@@ -1,12 +1,12 @@
 /*
  * Copyright 2001-2006 The Apache Software Foundation
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -86,6 +86,10 @@
                 ManagerEvents.openTerminal(pos);
             } else if ("CLOSE".equals(lastFunc[0])) {
                 ManagerEvents.closeTerminal(pos);
+            } else if ("PAID_IN".equals(lastFunc[0])) {
+                ManagerEvents.paidOutAndIn(pos, "IN");
+            } else if ("PAID_OUT".equals(lastFunc[0])) {
+                ManagerEvents.paidOutAndIn(pos, "OUT");
             } else if ("VOID".equals(lastFunc[0])) {
                 ManagerEvents.voidOrder(pos);
             } else if ("REFNUM".equals(lastFunc[0])) {
@@ -151,7 +155,7 @@
                     ListIterator it = items.listIterator();
                     if (it.hasNext()) {
                         GenericValue product = (GenericValue) it.next();
-                        productId = product.getString("productId");                    
+                        productId = product.getString("productId");
                         Hashtable productsMap = new Hashtable();
                         productsMap.put(product.getString("productId"), product.get("internalName"));
                         while (it.hasNext()) {
@@ -164,7 +168,7 @@
                             SelectProduct SelectProduct = new SelectProduct(productsMap, trans, pos);
                             productId = SelectProduct.openDlg();
                         }
-                    }                    
+                    }
                 }
             } catch (GeneralException e) {
                 Debug.logError(e, module);