[OFBiz] SVN: r5439 - trunk/applications/accounting/src/org/ofbiz/accounting/payment

jaz at svn.ofbiz.org jaz at svn.ofbiz.org
Tue Aug 2 07:29:18 EDT 2005


Author: jaz
Date: 2005-08-02 06:29:13 -0500 (Tue, 02 Aug 2005)
New Revision: 5439

Modified:
   trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
Log:
fixed bug that didn't allow a user to use the entire amount of the GC '> rather than >='

Modified: trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
===================================================================
--- trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java	2005-08-02 08:53:26 UTC (rev 5438)
+++ trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java	2005-08-02 11:29:13 UTC (rev 5439)
@@ -217,6 +217,7 @@
         if (!validatePin(delegator, cardNumber, pinNumber)) {
             return ServiceUtil.returnError("PIN number is not valid!");
         }
+        Debug.log("Attempting to redeem GC for " + amount, module);
 
         // create the transaction
         double previousBalance = 0.00;
@@ -230,7 +231,7 @@
         double balance = 0.00;
         String refNum = null;
         Boolean procResult;
-        if (previousBalance > amount.doubleValue()) {
+        if (previousBalance >= amount.doubleValue()) {
             try {
                 refNum = GiftCertificateServices.createTransaction(delegator, dispatcher, userLogin, amount,
                         productStoreId, partyId, currencyUom, withdrawl, cardNumber);



More information about the Svn mailing list