Login  Register

Users - Bug in CheckOutHelper.validatePaymentMethods?

Posted by Vinay Agarwal on Apr 16, 2006; 12:06am
URL: http://ofbiz.116.s1.nabble.com/Users-Bug-in-CheckOutHelper-validatePaymentMethods-tp138582.html

Hello,

I just updated to 7304 and I started getting a strange error during checkout (Not enough available on account #{billingAccountId}). The error is generated in CheckOutHelper.validatePaymentMethods as follows

 

        double billingAccountAmt = cart.getBillingAccountAmount();

        double availableAmount = this.availableAccountBalance(billingAccountId);

        if (billingAccountAmt > availableAmount) {

            Map messageMap = UtilMisc.toMap("billingAccountId", billingAccountId);

            errMsg = UtilProperties.getMessage(resource, "checkevents.not_enough_available_on_account", messageMap, (cart != null ? cart.getLocale() : Locale.getDefault()));

            return ServiceUtil.returnError(errMsg);

        }

 

The shopping cart amount is 72.92, billingAccountAmt is 1360.64, and availableAmount is 1360.639999999999. I can’t tell the purpose of these two supposedly identical values and why are they being compared. Although these lines of code hasn’t changed, but something has caused it to not function.

 

Thanks in advance,

Vinay Agarwal


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users