Author: jleroux
Date: Sun May 25 20:04:08 2014
New Revision: 1597464
URL:
http://svn.apache.org/r1597464Log:
2 patches from Deepak Dixit for "If customer pay higher than amount due, POS issues an error 'Problem with order change'."
https://issues.apache.org/jira/browse/OFBIZ-5611If customer pay higher than amount due, POS issues an error 'Problem with order change'.
Deepak:
This is due to changes done at r#1186102 (
http://ofbiz.markmail.org/message/orewmkxnalebolke?q=1186102)
Removed incorrect condition form createPaymentApplication service.
Also found type in PaymentEvents.java file (Xuilabels == > XuiLabels).
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=1597464&r1=1597463&r2=1597464&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Sun May 25 20:04:08 2014
@@ -219,15 +219,13 @@ under the License.
<field field="invoice" type="GenericValue"/>
</call-class-method>
- <if-empty field="paymentAppl.amountApplied">
- <if-compare-field field="notAppliedInvoice" operator="less-equals" to-field="notAppliedPayment">
+ <if-compare-field field="notAppliedInvoice" operator="less-equals" to-field="notAppliedPayment" type="BigDecimal">
<set field="paymentAppl.amountApplied" from-field="notAppliedInvoice"/>
<else>
<set field="paymentAppl.amountApplied" from-field="notAppliedPayment"/>
</else>
</if-compare-field>
- </if-empty>
-
+
<if-not-empty field="invoice.billingAccountId">
<set field="paymentAppl.billingAccountId" from-field="invoice.billingAccountId"/>
</if-not-empty>
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java?rev=1597464&r1=1597463&r2=1597464&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java Sun May 25 20:04:08 2014
@@ -356,7 +356,7 @@ public class PaymentEvents {
PosScreen newPos = pos.showPage("pospanel");
newPos.showDialog("dialog/error/noitems");
} else if (trans.getTotalDue().compareTo(BigDecimal.ZERO) > 0) {
- pos.showDialog("dialog/error/exception", UtilProperties.getMessage("Xuilabels", "NOT_ENOUGH_FUNDS", defaultLocale));
+ pos.showDialog("dialog/error/exception", UtilProperties.getMessage("XuiLabels", "NOT_ENOUGH_FUNDS", defaultLocale));
trans.clearPayment("CASH");
} else {
// manual locks (not secured; will be unlocked on clear)