What logic in AbleCommerce determines order is paid/unpaid?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
msalman
Ensign (ENS)
Ensign (ENS)
Posts: 14
Joined: Tue Jan 27, 2009 2:10 pm

What logic in AbleCommerce determines order is paid/unpaid?

Post by msalman » Mon Nov 30, 2009 11:05 am

I have a question about the RecalculatePaymentStatus function of the
Order class.
What logic in this function determines whether the order is fully or
partially paid?
We are facing a scenario where an order is fully paid but AbleCommerce
is considering it partially paid and we are seeing the following note in
the order HIstory and Noted tab
"The order has been partially paid, a balance of $0.00 remains."
We tried adding a $0.00 payment to these orders and aslo tried to
mnually set the paymentStatusId field in the ac_Orders table to 2 (i.e.
"paid') but AbleCommerce is changing the status back to 1 (i.e. "unpaid").
On troubleshooting we found that the function call
"_Order.RecalculatePaymentStatus()" in Admin\Orders\ViewOrder.aspx.cs is
changing the status to "unpaid" even though we set it to "paid". So far
this happened only with two Canadian orders.
We didn't have any issues before on Canadian Orders so we are not sure
where the problem is.

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

Re: What logic in AbleCommerce determines order is paid/unpaid?

Post by jmestep » Mon Nov 30, 2009 11:25 am

Can you look into the database to see if any of the order items are showing more than two digits of price? Like 10.375 or similar. That could be causing it.
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

msalman
Ensign (ENS)
Ensign (ENS)
Posts: 14
Joined: Tue Jan 27, 2009 2:10 pm

Re: What logic in AbleCommerce determines order is paid/unpaid?

Post by msalman » Mon Nov 30, 2009 12:09 pm

You are right. The tax line item in the ac_OrderItems table is showing a price of $16.264.
When I changed it to $16.26 in the database, the problem seemd to go away and the order status also changed to "paid".
This seems to be a bug in AbleCommerce.
For the timebeing I'll make a change in the API that calculates taxes for my website so that it only returns values upto two decimal places.
Thanks for your help. This problem was troubling us for the past many days.

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

Re: What logic in AbleCommerce determines order is paid/unpaid?

Post by jmestep » Mon Nov 30, 2009 3:30 pm

What build are you using? I think it was fixed in later builds.
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

Post Reply