Payments not being marked as completed due to currency calc
Posted: 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
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