Payments not being marked as completed due to currency calc

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
owain.jones@cmc.ca
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Fri Feb 05, 2010 3:02 pm

Payments not being marked as completed due to currency calc

Post by owain.jones@cmc.ca » Thu Mar 29, 2012 9:06 am

Hi,

One of our order administrators told me about a problem she was having where after putting in a PO payment against one of our products the payment itself was completed and matched the charges, but the payment status was not going to completed.

I looked at the database and the reason was that our store is in CAD and the product was USD and as a result of the calculations in the ac_Orders table the TotalCharges field was 3202.9328 and the TotalPayments was 3202.9300.

For some reason the "TotalCharges" and "TotalPayments" database columns are decimal(12,4) which allows the 4 decimal places causing the issue. I updated the database value directly to remove the extra decimal places, but how can we prevent this issue from reoccuring?

AbleCommerce 7.0.5 build 14053

Thanks,

Owain

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Payments not being marked as completed due to currency calc

Post by jmestep » Fri Mar 30, 2012 7:02 am

Do you have any custom code having to do with it? Normally Able uses a round function on their calculations.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

owain.jones@cmc.ca
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Fri Feb 05, 2010 3:02 pm

Re: Payments not being marked as completed due to currency calc

Post by owain.jones@cmc.ca » Thu Apr 26, 2012 11:51 am

Hi Judy,

We do not have any customizations and we are running the latest version. It seems that TotalPayments is always correct, but I have seen many orders where "TotalCharges" is not the same and is different by a fraction of a cent. I believe this is disrupting the order workflow.

Owain

Post Reply