[OFBiz] SVN: r7207 - in trunk/applications/pos: config screens/default/includes src/org/ofbiz/pos/component src/org/ofbiz/pos/device/impl src/org/ofbiz/pos/event
les7arts@svn.ofbiz.org
les7arts at svn.ofbiz.org
Wed Apr 5 15:22:08 CDT 2006
Author: les7arts
Date: 2006-04-05 15:21:31 -0500 (Wed, 05 Apr 2006)
New Revision: 7207
Added:
trunk/applications/pos/config/XuiLabels_en.properties
Removed:
trunk/applications/pos/config/XuiLabels_en.properties
Modified:
trunk/applications/pos/config/XuiLabels_fr.properties
trunk/applications/pos/config/buttonevents.xml
trunk/applications/pos/config/jpos.xml
trunk/applications/pos/screens/default/includes/numeric.xml
trunk/applications/pos/src/org/ofbiz/pos/component/Input.java
trunk/applications/pos/src/org/ofbiz/pos/device/impl/Keyboard.java
trunk/applications/pos/src/org/ofbiz/pos/event/CharacterEvents.java
trunk/applications/pos/src/org/ofbiz/pos/event/NumericEvents.java
Log:
This is my first commit for the POS component. It resolves the Jira issue OFBIZ-619. Thanks to Ray Barlow.
It adds two more buttons to the standard pos screen, one being "DEL" and the other "-".
this also contains a new entry StarTSP600Cutter in the jpos.xml devices.
Jacques Le Roux
Deleted: trunk/applications/pos/config/XuiLabels_en.properties
===================================================================
--- trunk/applications/pos/config/XuiLabels_en.properties 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/config/XuiLabels_en.properties 2006-04-05 20:21:31 UTC (rev 7207)
@@ -1,66 +0,0 @@
-####
-# OFBiz XUI Properties file used for the XUI interface of the POS module (cf. XUI documentation)
-# This file has been created by "Les Arts" <www.les7arts.com> for i18n of OFBiz
-# If you see some error please contact traductOFBiz at les7arts.com
-#
-
-SKU = SKU
-MAIN = MAIN
-MGR = MGR
-PROMO = PROMO
-LANG = LANG
-PAY = PAY
-TEST_ALERT = TEST ALERT
-TEST_MSR = TEST MSR
-CASH = CASH
-CHECK = CHECK
-CREDIT = CREDIT
-GIFT_CERT = GIFT CERT
-CLEAR_ONE = CLEAR ONE
-CLEAR_ALL = CLEAR ALL
-SET_REF# = SET REF#
-FINISH = FINISH
-CHANGE_PRICE = CHANGE PRICE
-REPRINT = REPRINT
-OPEN = OPEN
-CLOSE = CLOSE
-VOID_SALE = VOID SALE
-CLEAR_CACHE = CLEAR CACHE
-RESET_XUI = RESET XUI
-OPEN_DRAWER = OPEN DRAWER
-TOTALS = TOTAL
-EXIT = EXIT
-CLR = CLR
-ENT = ENT
-SIGN_OUT = SIGN OUT
-LOCK = LOCK
-QTY = QTY
-MOD = MOD
-ITEM_DISC = ITEM DISC
-VOID_ITEM = VOID ITEM
-VOID_SALE = VOID SALE
-SALE_DISC = SALE DISC
-TRANS_SAVE = TRANS SAVE
-TRANS_RET = TRANS RET
-CLR_DISC = CLR DISC
-
-promo_page = This will be the promo page!
-
-product_not_found = PRODUCT NOT FOUND
-order_not_found = ORDER NOT FOUND
-problems_reading_card = PROBLEMS READING SWIPED CARD
-CASH_DRAWER_COMMUNICATION_ERROR= CASH DRAWER COMMUNICATION ERROR
-CASH_DRAWER_IS_OPEN = CASH DRAWER IS OPEN
-EXCEPTION = EXCEPTION
-RECEIPT_PRINTER_COMMUNICATION_ERROR = RECEIPT PRINTER COMMUNICATION ERROR
-INVALID_CARD_NUMBER = INVALID CARD NUMBER
-MANAGER_NOT_LOGGED_IN = MANAGER NOT LOGGED IN
-NO_ITEMS_SOLD = NO ITEMS SOLD
-NOT_ENOUGH_FUNDS = CUSTOMER DID NOT PROVIDE ENOUGH FUNDS TO COMPLETE THIS SALE
-FUNCTION_NOT_YET_SUPPORTED = FUNCTION NOT YET SUPPORTED
-PRINTER_NOT_READY = PRINTER NOT READY
-ITEM_MODIFICATION_ERROR = ITEM MODIFICATION ERROR
-SALE_VOIDED = SALE VOIDED
-TERMINAL_IS_CLOSED = TERMINAL IS CLOSED
-TEST_ALERT_BOX = TEST ALERT BOX - TESTING THE DIALOG IMPLEMENTATION
-UNKNOWN_CARD_TYPE = UNKNOWN CARD TYPE
\ No newline at end of file
Added: trunk/applications/pos/config/XuiLabels_en.properties
===================================================================
--- trunk/applications/pos/config/XuiLabels_en.properties 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/config/XuiLabels_en.properties 2006-04-05 20:21:31 UTC (rev 7207)
@@ -0,0 +1,67 @@
+####
+# OFBiz XUI Properties file used for the XUI interface of the POS module (cf. XUI documentation)
+# This file has been created by "Les Arts" <www.les7arts.com> for i18n of OFBiz
+# If you see some error please contact traductOFBiz at les7arts.com
+#
+
+SKU = SKU
+MAIN = MAIN
+MGR = MGR
+PROMO = PROMO
+LANG = LANG
+PAY = PAY
+TEST_ALERT = TEST ALERT
+TEST_MSR = TEST MSR
+CASH = CASH
+CHECK = CHECK
+CREDIT = CREDIT
+GIFT_CERT = GIFT CERT
+CLEAR_ONE = CLEAR ONE
+CLEAR_ALL = CLEAR ALL
+SET_REF# = SET REF#
+FINISH = FINISH
+CHANGE_PRICE = CHANGE PRICE
+REPRINT = REPRINT
+OPEN = OPEN
+CLOSE = CLOSE
+VOID_SALE = VOID SALE
+CLEAR_CACHE = CLEAR CACHE
+RESET_XUI = RESET XUI
+OPEN_DRAWER = OPEN DRAWER
+TOTALS = TOTAL
+EXIT = EXIT
+CLR = CLR
+ENT = ENT
+SIGN_OUT = SIGN OUT
+LOCK = LOCK
+QTY = QTY
+MOD = MOD
+ITEM_DISC = ITEM DISC
+VOID_ITEM = VOID ITEM
+VOID_SALE = VOID SALE
+SALE_DISC = SALE DISC
+TRANS_SAVE = TRANS SAVE
+TRANS_RET = TRANS RET
+CLR_DISC = CLR DISC
+DEL = DEL
+
+promo_page = This will be the promo page!
+
+product_not_found = PRODUCT NOT FOUND
+order_not_found = ORDER NOT FOUND
+problems_reading_card = PROBLEMS READING SWIPED CARD
+CASH_DRAWER_COMMUNICATION_ERROR= CASH DRAWER COMMUNICATION ERROR
+CASH_DRAWER_IS_OPEN = CASH DRAWER IS OPEN
+EXCEPTION = EXCEPTION
+RECEIPT_PRINTER_COMMUNICATION_ERROR = RECEIPT PRINTER COMMUNICATION ERROR
+INVALID_CARD_NUMBER = INVALID CARD NUMBER
+MANAGER_NOT_LOGGED_IN = MANAGER NOT LOGGED IN
+NO_ITEMS_SOLD = NO ITEMS SOLD
+NOT_ENOUGH_FUNDS = CUSTOMER DID NOT PROVIDE ENOUGH FUNDS TO COMPLETE THIS SALE
+FUNCTION_NOT_YET_SUPPORTED = FUNCTION NOT YET SUPPORTED
+PRINTER_NOT_READY = PRINTER NOT READY
+ITEM_MODIFICATION_ERROR = ITEM MODIFICATION ERROR
+SALE_VOIDED = SALE VOIDED
+TERMINAL_IS_CLOSED = TERMINAL IS CLOSED
+TEST_ALERT_BOX = TEST ALERT BOX - TESTING THE DIALOG IMPLEMENTATION
+UNKNOWN_CARD_TYPE = UNKNOWN CARD TYPE
\ No newline at end of file
Modified: trunk/applications/pos/config/XuiLabels_fr.properties
===================================================================
--- trunk/applications/pos/config/XuiLabels_fr.properties 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/config/XuiLabels_fr.properties 2006-04-05 20:21:31 UTC (rev 7207)
@@ -43,6 +43,7 @@
TRANS_SAVE =
TRANS_RET =
CLR_DISC = Annuler la remise
+DEL = Suppr.
promo_page = Ce sera la page des promotions...
Modified: trunk/applications/pos/config/buttonevents.xml
===================================================================
--- trunk/applications/pos/config/buttonevents.xml 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/config/buttonevents.xml 2006-04-05 20:21:31 UTC (rev 7207)
@@ -17,6 +17,7 @@
<event button-name="numZero" class-name="org.ofbiz.pos.event.NumericEvents" method-name="triggerZero" disable-lock="true"/>
<event button-name="numDZero" class-name="org.ofbiz.pos.event.NumericEvents" method-name="triggerDZero" disable-lock="true"/>
<event button-name="numPercent" class-name="org.ofbiz.pos.event.NumericEvents" method-name="triggerPercent" disable-lock="true"/>
+ <event button-name="numMinus" class-name="org.ofbiz.pos.event.NumericEvents" method-name="triggerMinus" disable-lock="true"/>
<!-- character events -->
<event button-name="charShift" class-name="org.ofbiz.pos.event.CharacterEvents" method-name="triggerShift" disable-lock="false"/>
@@ -47,6 +48,7 @@
<event button-name="charX" class-name="org.ofbiz.pos.event.CharacterEvents" method-name="triggerX" disable-lock="false"/>
<event button-name="charY" class-name="org.ofbiz.pos.event.CharacterEvents" method-name="triggerY" disable-lock="false"/>
<event button-name="charZ" class-name="org.ofbiz.pos.event.CharacterEvents" method-name="triggerZ" disable-lock="false"/>
+ <event button-name="charDel" class-name="org.ofbiz.pos.event.CharacterEvents" method-name="triggerDel" disable-lock="false"/>
<!-- base menu events -->
<event button-name="menuClear" class-name="org.ofbiz.pos.event.MenuEvents" method-name="triggerClear" disable-lock="true"/>
Modified: trunk/applications/pos/config/jpos.xml
===================================================================
--- trunk/applications/pos/config/jpos.xml 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/config/jpos.xml 2006-04-05 20:21:31 UTC (rev 7207)
@@ -120,7 +120,25 @@
<prop name="portSettings" type="String" value="9600,none,8,1,hdwr"/>
<prop name="statusTimeDelay" type="Long" value="500"/>
</JposEntry>
+ <JposEntry logicalName="StarTSP600Cutter">
+ <creation factoryClass="com.starmicronics.javapos.StarJposServiceInstanceFactory" serviceClass="com.starmicronics.javapos.StarJPOSPOSPrinter"/>
+ <vendor name="Star Micronics Co., Ltd." url="http://www.star-micronics.co.jp"/>
+ <jpos category="POSPrinter" version="1.4a"/>
+ <product description="Thermal receipt printer" name="TSP600" url="http://www.star-micronics.co.jp"/>
+ <!--Other non JavaPOS required property (mostly vendor properties and bus specific properties i.e. RS232 )-->
+ <prop name="portName" type="String" value="/dev/ttyS0"/>
+ <prop name="errorResponseTimeout" type="Long" value="5000"/>
+ <prop name="capLogoStore" type="Boolean" value="false"/>
+ <prop name="statusTimeout" type="Long" value="500"/>
+ <prop name="timeout" type="Long" value="10000"/>
+ <prop name="starModel" type="String" value="TSP600"/>
+ <prop name="capRecRaster" type="Boolean" value="true"/>
+ <prop name="deviceClassName" type="String" value="com.starmicronics.javapos.DeviceTSP643"/>
+ <prop name="portSettings" type="String" value="9600,none,8,1,hdwr"/>
+ <prop name="statusTimeDelay" type="Long" value="500"/>
+ </JposEntry>
+
<!-- Star TSP600 Connected CashDrawer (requires startjavapos.jar) -->
<JposEntry logicalName="StarTSP600CashDrawer">
<creation factoryClass="com.starmicronics.javapos.StarJposServiceInstanceFactory" serviceClass="com.starmicronics.javapos.StarJPOSCashDrawer"/>
Modified: trunk/applications/pos/screens/default/includes/numeric.xml
===================================================================
--- trunk/applications/pos/screens/default/includes/numeric.xml 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/screens/default/includes/numeric.xml 2006-04-05 20:21:31 UTC (rev 7207)
@@ -10,11 +10,12 @@
<Button name="numFour" x="0" y="69" w="75" h="68" style="numButton" content="4" alignment="Center"/>
<Button name="numFive" x="76" y="69" w="75" h="68" style="numButton" content="5" alignment="Center"/>
<Button name="numSix" x="152" y="69" w="75" h="68" style="numButton" content="6" alignment="Center"/>
- <Button name="menuEnter" x="228" y="69" w="75" h="206" style="posButton" content="ENT" alignment="Center"/>
+ <Button name="numMinus" x="228" y="69" w="75" h="68" style="numButton" content="-" alignment="Center"/>
<Button name="numOne" x="0" y="138" w="75" h="68" style="numButton" content="1" alignment="Center"/>
<Button name="numTwo" x="76" y="138" w="75" h="68" style="numButton" content="2" alignment="Center"/>
<Button name="numThree" x="152" y="138" w="75" h="68" style="numButton" content="3" alignment="Center"/>
- <Button name="menuClear" x="0" y="207" w="75" h="68" style="posButton" content="CLR" alignment="Center"/>
+ <Button name="menuEnter" x="228" y="138" w="75" h="137" style="posButton" content="ENT" alignment="Center"/>
+ <Button name="menuClear" x="0" y="207" w="75" h="68" style="posButton" content="CLR" alignment="Center"/>
<Button name="numZero" x="76" y="207" w="75" h="68" style="numButton" content="0" alignment="Center"/>
<Button name="numDZero" x="152" y="207" w="75" h="68" style="numButton" content="00" alignment="Center"/>
</Panel>
@@ -22,7 +23,7 @@
<!-- right side options -->
<Panel x="245" y="0" w="381" h="282" style="posButton">
<!--<Button x="0" y="0" w="75" h="68" style="posButton" content="" alignment="Center"/>-->
- <Button name="" x="76" y="0" w="95" h="68" style="posButton" content="" alignment="Center"/>
+ <Button name="charDel" x="76" y="0" w="95" h="68" style="posButton" content="DEL" alignment="Center"/>
<Button name="menuLogout" x="172" y="0" w="95" h="68" style="posButton" content="SIGN_OUT" alignment="Center"/>
<Button name="menuLock" x="268" y="0" w="95" h="68" style="posButton" content="LOCK" alignment="Center"/>
Modified: trunk/applications/pos/src/org/ofbiz/pos/component/Input.java
===================================================================
--- trunk/applications/pos/src/org/ofbiz/pos/component/Input.java 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/src/org/ofbiz/pos/component/Input.java 2006-04-05 20:21:31 UTC (rev 7207)
@@ -176,6 +176,12 @@
input.setText(this.input.getText() + str);
}
+ public void stripLastChar() {
+ if (this.value().length() > 0) {
+ this.input.setText(this.value().substring(0, this.value().length() - 1));
+ }
+ }
+
// KeyboardReceiver
public synchronized void receiveData(int[] codes, char[] chars) {
if (chars.length > 0 && checkChars(chars))
Modified: trunk/applications/pos/src/org/ofbiz/pos/device/impl/Keyboard.java
===================================================================
--- trunk/applications/pos/src/org/ofbiz/pos/device/impl/Keyboard.java 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/src/org/ofbiz/pos/device/impl/Keyboard.java 2006-04-05 20:21:31 UTC (rev 7207)
@@ -39,7 +39,7 @@
*
* This class will invoke button events based on a key press.
* The key -> code mapping is handled in the jpos.xml file.
- * The code -> button mapping is handled in the buttonconfig.xml file.
+ * The code -> button mapping is handled in the buttonevents.xml file.
* It is advised to map to key codes > 200.
*
* @author <a href="mailto:jaz at ofbiz.org">Andy Zeneski</a>
Modified: trunk/applications/pos/src/org/ofbiz/pos/event/CharacterEvents.java
===================================================================
--- trunk/applications/pos/src/org/ofbiz/pos/event/CharacterEvents.java 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/src/org/ofbiz/pos/event/CharacterEvents.java 2006-04-05 20:21:31 UTC (rev 7207)
@@ -47,6 +47,10 @@
// TODO refresh the button display
}
+ public static void triggerDel(PosScreen pos) {
+ pos.getInput().stripLastChar();
+ }
+
public static void triggerA(PosScreen pos) {
Input input = pos.getInput();
if (capsLockSet || input.isFunctionSet("SHIFT")) {
Modified: trunk/applications/pos/src/org/ofbiz/pos/event/NumericEvents.java
===================================================================
--- trunk/applications/pos/src/org/ofbiz/pos/event/NumericEvents.java 2006-04-05 17:41:18 UTC (rev 7206)
+++ trunk/applications/pos/src/org/ofbiz/pos/event/NumericEvents.java 2006-04-05 20:21:31 UTC (rev 7207)
@@ -84,6 +84,10 @@
public static void triggerPercent(PosScreen pos) {
pos.getInput().appendString("%");
}
+
+ public static void triggerMinus(PosScreen pos) {
+ pos.getInput().appendString("-");
+ }
}
More information about the Svn
mailing list