VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Robert_ITMan on October 14, 2018, 15:47:48 PM

Title: Only VatTax (VAT tax per product) works when updating an order
Post by: Robert_ITMan on October 14, 2018, 15:47:48 PM
Only VatTax (VAT tax per product) works when updating an order – the other options TaxBill (Tax per order) and Tax (Tax per product) will not calculate the taxes when updating an order. Even with suggested work around to instead use VatTax ... that only works for new orders received. (more info see: http://forum.virtuemart.net/index.php?topic=136852.msg497109#msg497109)

I need a solution that works for the orders I have in the system now... and so will all the other VM users not using VatTax (VAT tax per product) who want to update an order.

Unfortunately this needs fixing in the VM core - and seeing as I'm the only one asking for it to be fixed it is not a priority and might not be fixed anytime soon ...

So if you ever want to update an order and realize the totals did not add up correctly then let us know by replying here.

FYI - Notice even when not selecting the calculate boxes the taxes still need to be updated manually in the database directly as they are zeroed out when saving order item changes... depending on which tax was used when the order was created need to either update (1) TaxBill (Tax per order): both #__virtuemart_orders and #__virtuemart_order_calc_rules or (2) Tax (Tax per product): both #__virtuemart_orders and #__virtuemart_order_items
Title: Re: Only VatTax (VAT tax per product) works when updating an order
Post by: AH on October 14, 2018, 17:46:32 PM
QuoteNotice even when not selecting the calculate boxes the taxes still need to be updated manually in the database directly as they are zeroed out when saving order item changes

You may wish to run this test again - when I uncheck the boxes the tax is not modified in any way.  It certainly is not zeroed out?
Title: Re: Only VatTax (VAT tax per product) works when updating an order
Post by: Robert_ITMan on October 14, 2018, 18:27:36 PM
Quote from: AH on October 14, 2018, 17:46:32 PM
You may wish to run this test again - when I uncheck the boxes the tax is not modified in any way.  It certainly is not zeroed out?

Yes, I have tested this - again it only works when original order was with VatTax (VAT tax per product)
Title: Re: Only VatTax (VAT tax per product) works when updating an order
Post by: AH on October 15, 2018, 11:21:14 AM
QuoteNotice even when not selecting the calculate boxes the taxes still need to be updated manually in the database directly as they are zeroed out when saving order item changes

I tested a new order with taxes set as tax per bill - when I uncheck all the check boxes including the total and not just the product - the tax per bill is not changed

The issue is now that you have a variety of orders saved in your order tables with varying calculation methods - so it is unlikely to work for back orders
Title: Re: Only VatTax (VAT tax per product) works when updating an order
Post by: Robert_ITMan on October 15, 2018, 14:34:47 PM
Quote from: AH on October 15, 2018, 11:21:14 AM
I tested a new order with taxes set as tax per bill - when I uncheck all the check boxes including the total and not just the product - the tax per bill is not changed
Lucky you - as I said this does not work for my sites - so there is something more at play here?
Quote from: AH on October 15, 2018, 11:21:14 AM
The issue is now that you have a variety of orders saved in your order tables with varying calculation methods - so it is unlikely to work for back orders
Yes - this is a problem, should not matter which tax method we choose it should work. I have now 3 types: