Page 1 of 1

Payments not being marked as completed due to currency calc

Posted: Thu Mar 29, 2012 9:06 am
by owain.jones@cmc.ca
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

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

Posted: Fri Mar 30, 2012 7:02 am
by jmestep
Do you have any custom code having to do with it? Normally Able uses a round function on their calculations.

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

Posted: Thu Apr 26, 2012 11:51 am
by owain.jones@cmc.ca
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