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 2009/04/22 12:43:48 UTC
svn commit: r767457 - in /ofbiz/branches/release09.04: ./
specialpurpose/webpos/script/org/ofbiz/webpos/event/
specialpurpose/webpos/servicedef/
specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/
Author: jleroux
Date: Wed Apr 22 10:43:48 2009
New Revision: 767457
URL: http://svn.apache.org/viewvc?rev=767457&view=rev
Log:
Applied fix from trunk for revision: 767279
Modified:
ofbiz/branches/release09.04/ (props changed)
ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml
ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml
ofbiz/branches/release09.04/specialpurpose/webpos/servicedef/services_manager.xml
ofbiz/branches/release09.04/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
Propchange: ofbiz/branches/release09.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 22 10:43:48 2009
@@ -1 +1 @@
-/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127
+/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279
Modified: ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml?rev=767457&r1=767456&r2=767457&view=diff
==============================================================================
--- ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml (original)
+++ ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml Wed Apr 22 10:43:48 2009
@@ -362,10 +362,10 @@
</call-class-method>
<if-compare field="isDouble" operator="equals" value="true">
<set from-field="parameters.sku" field="sku" type="String"/>
- <set from-field="parameters.price" field="price" type="Double"/>
+ <set from-field="parameters.price" field="price" type="BigDecimal"/>
<call-object-method obj-field="webPosTransaction" method-name="modifyPrice">
<field field="sku" type="String"/>
- <field field="price" type="double"/>
+ <field field="price" type="BigDecimal"/>
</call-object-method>
<check-errors/>
<call-object-method obj-field="webPosTransaction" method-name="calcTax"/>
Modified: ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml?rev=767457&r1=767456&r2=767457&view=diff
==============================================================================
--- ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml (original)
+++ ofbiz/branches/release09.04/specialpurpose/webpos/script/org/ofbiz/webpos/event/PaymentEvents.xml Wed Apr 22 10:43:48 2009
@@ -56,7 +56,7 @@
<set field="authCode" value=""/>
<call-object-method obj-field="webPosTransaction" method-name="addPayment">
<field field="paymentType" type="String"/>
- <field field="amount" type="double"/>
+ <field field="amount" type="BigDecimal"/>
<field field="refNum" type="String"/>
<field field="authCode" type="String"/>
</call-object-method>
@@ -329,7 +329,7 @@
<if-not-empty field="paymentId">
<call-object-method obj-field="webPosTransaction" method-name="addPayment">
<field field="paymentId" type="String"/>
- <field field="amount" type="double"/>
+ <field field="amount" type="BigDecimal"/>
</call-object-method>
<check-errors/>
<if-not-empty field="parameters.track2">
Modified: ofbiz/branches/release09.04/specialpurpose/webpos/servicedef/services_manager.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/specialpurpose/webpos/servicedef/services_manager.xml?rev=767457&r1=767456&r2=767457&view=diff
==============================================================================
--- ofbiz/branches/release09.04/specialpurpose/webpos/servicedef/services_manager.xml (original)
+++ ofbiz/branches/release09.04/specialpurpose/webpos/servicedef/services_manager.xml Wed Apr 22 10:43:48 2009
@@ -25,17 +25,17 @@
<service name="openTerminal" engine="simple" auth="false"
location="component://webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml" invoke="openTerminal">
<description>Open Terminal</description>
- <attribute name="startingDrawerAmount" type="Double" mode="IN" optional="false"/>
+ <attribute name="startingDrawerAmount" type="BigDecimal" mode="IN" optional="false"/>
</service>
<service name="closeTerminal" engine="simple" auth="false"
location="component://webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml" invoke="closeTerminal">
<description>Close Terminal</description>
- <attribute name="endingDrawerCashAmount" type="Double" mode="IN" optional="false"/>
- <attribute name="endingDrawerCheckAmount" type="Double" mode="IN" optional="false"/>
- <attribute name="endingDrawerCcAmount" type="Double" mode="IN" optional="false"/>
- <attribute name="endingDrawerGcAmount" type="Double" mode="IN" optional="false"/>
- <attribute name="endingDrawerOtherAmount" type="Double" mode="IN" optional="false"/>
+ <attribute name="endingDrawerCashAmount" type="BigDecimal" mode="IN" optional="false"/>
+ <attribute name="endingDrawerCheckAmount" type="BigDecimal" mode="IN" optional="false"/>
+ <attribute name="endingDrawerCcAmount" type="BigDecimal" mode="IN" optional="false"/>
+ <attribute name="endingDrawerGcAmount" type="BigDecimal" mode="IN" optional="false"/>
+ <attribute name="endingDrawerOtherAmount" type="BigDecimal" mode="IN" optional="false"/>
</service>
<service name="voidOrder" engine="simple" auth="false"
@@ -53,7 +53,7 @@
location="component://webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml" invoke="paidOutAndIn">
<description>Paid Out and In</description>
<attribute name="type" type="String" mode="IN" optional="false"/>
- <attribute name="amountInOut" type="Double" mode="IN" optional="false"/>
+ <attribute name="amountInOut" type="BigDecimal" mode="IN" optional="false"/>
<attribute name="reasonInOut" type="String" mode="IN" optional="false"/>
<attribute name="reasonCommentInOut" type="String" mode="IN" optional="false"/>
</service>
@@ -62,6 +62,6 @@
location="component://webpos/script/org/ofbiz/webpos/event/ManagerEvents.xml" invoke="modifyPrice">
<description>Modify Price</description>
<attribute name="sku" type="String" mode="IN" optional="false"/>
- <attribute name="price" type="Double" mode="IN" optional="false"/>
+ <attribute name="price" type="BigDecimal" mode="IN" optional="false"/>
</service>
</services>
\ No newline at end of file
Modified: ofbiz/branches/release09.04/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy?rev=767457&r1=767456&r2=767457&view=diff
==============================================================================
--- ofbiz/branches/release09.04/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy (original)
+++ ofbiz/branches/release09.04/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/MicroCart.groovy Wed Apr 22 10:43:48 2009
@@ -36,10 +36,10 @@
shoppingCart = null;
}
-context.cashAmount = 0;
-context.checkAmount = 0;
-context.giftAmount = 0;
-context.creditAmount = 0;
+context.cashAmount = BigDecimal.ZERO;
+context.checkAmount = BigDecimal.ZERO;
+context.giftAmount = BigDecimal.ZERO;
+context.creditAmount = BigDecimal.ZERO;
// Get the Cart and Prepare Size
if (shoppingCart) {
@@ -48,21 +48,21 @@
for (i = 0; i < payments; i++) {
paymentInfo = shoppingCart.getPaymentInfo(i);
if (paymentInfo.amount != null) {
- amount = paymentInfo.amount.doubleValue();
+ amount = paymentInfo.amount;
if (paymentInfo.paymentMethodTypeId != null) {
if ("CASH".equals(paymentInfo.paymentMethodTypeId)) {
- context.cashAmount = (context.cashAmount) ? context.cashAmount + amount : amount;
+ context.cashAmount = new BigDecimal((context.cashAmount).add(amount));
}
else if ("PERSONAL_CHECK".equals(paymentInfo.paymentMethodTypeId)) {
- context.checkAmount = (context.checkAmount) ? context.checkAmount + amount : amount;
+ context.checkAmount = new BigDecimal((context.checkAmount).add(amount));
requestParameters.refNumCheck = paymentInfo.refNum[0];
}
else if ("GIFT_CARD".equals(paymentInfo.paymentMethodTypeId)) {
- context.giftAmount = (context.giftAmount) ? context.giftAmount + amount : amount;
+ context.giftAmount = new BigDecimal((context.giftAmount).add(amount));
requestParameters.refNumGift = paymentInfo.refNum[0];
}
else if ("CREDIT_CARD".equals(paymentInfo.paymentMethodTypeId)) {
- context.creditAmount = (context.creditAmount) ? context.creditAmount + amount : amount;
+ context.creditAmount = new BigDecimal((context.creditAmount).add(amount));
requestParameters.refNumCredit = paymentInfo.refNum[0];
print("paymentInfo "+paymentInfo);
}