Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
I think most modules have a _CALC_TAX setting, and the use of "Standard" is pretty common. You could start with that.
Actually, I'm looking to use the calculate_deductions method, if it exists.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
Same problem occurs with Group Discounts. Run the order with no discount, add the customer to a discount group, edit the order - the total is wrong.
Group Discount include tax = false, include shipping = false, recalculate tax = standard.
Original Order:
Sub-Total $500
FL Tax 7% 35.00
Total $535.00
Add Group discount of 25%:
Sub-Total $500
Group Discount $125
FL Tax 7% 26.25
Total $392.50
should be $401.25.
Hmm, I ran this test on EO 4.3.1, ticking the "Reset totals" box and the calculation was correct. What version of EO are you testing with?
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
This is still a trick. As I said earlier, the TAX_CLASS variables were defined to support Credit Notes. You're overloading it to mean something else. This is not a good approach.
I've been Googling but have not found anywhere that Zen Cart "Credit Note" functionality is defined. Could/would you fill in the blanks?
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
Hmm, I ran this test on EO 4.3.1, ticking the "Reset totals" box and the calculation was correct. What version of EO are you testing with?
I was on 4.2.3. Upgraded to 4.3.1, you're right - Group Discounts worked; Quantity Discounts did not.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
I've been Googling but have not found anywhere that Zen Cart "Credit Note" functionality is defined. Could/would you fill in the blanks?
It's just a setting for tax recalc. I'm not positive it was ever fully implemented. You can see it in both ot_coupon.php and ot_group_pricing.php in includes/modules/order_total.
Re: Edit Orders v4.0 Support Thread
Cindy, I wonder if the way to go here is just add up the line items to get the total, rather than depending on the individual machinations of mods (which were designed to run on the catalog side) updating $order->info['total'].
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
Cindy, I wonder if the way to go here is just add up the line items to get the total, rather than depending on the individual machinations of mods (which were designed to run on the catalog side) updating $order->info['total'].
@swguy, I've also wondered why that path wasn't taken with the design ... although EO has been around (in various forms) since dinosaurs roamed the earth, so at this point it's not so much a design as a go-with-the-flow.
Re: Edit Orders v4.0 Support Thread
Cindy,
I hate to tell you, but I found another problem in Edit Orders 4.3.1. If you add a product to an order or change the quantity of an item in the order, the change is made even if there is insufficient stock in inventory. Might be nice to bring up a warning message if there is insufficient stock when adding a product or increasing the quantity of a product.
Dave :(
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
Dave224
Cindy,
I hate to tell you, but I found another problem in Edit Orders 4.3.1. If you add a product to an order or change the quantity of an item in the order, the change is made even if there is insufficient stock in inventory. Might be nice to bring up a warning message if there is insufficient stock when adding a product or increasing the quantity of a product.
Dave :(
Dave, thanks for the report. When I get back to my EO investigations, I've added that to the list!
Re: Edit Orders v4.0 Support Thread
Edit Orders 4.3.1 and my mods (Quantity Discounts, Better Together, et. al.):
This seems to work. In the function process() in the code file in includes/modules/order_total (e.g. includes/modules/order_total/ot_quantity_discount.php for Quantity Discounts)
Change
Code:
if ($this->calculate_tax != 'VAT') {
$order->info['total'] -= $od_amount[$key];
}
to
Code:
if (!IS_ADMIN_FLAG) {
if ($this->calculate_tax != 'VAT') {
$order->info['total'] -= $od_amount[$key];
}
}