News:

Looking for documentation? Take a look on our wiki

Main Menu

Editing an order by admin adds tax to shipping

Started by Gingerweb, January 23, 2024, 17:17:38 PM

Previous topic - Next topic

Gingerweb

VirtueMart 4.2.4 10922
J4
PHP: 8.1.26

I make a test order in the VM shop for more than 1 item, then when it is confirmed i go to edit the order as admin (as though a customer had bought 2 items and only 1 is available) when i remove or change the number of items a VAT rule is applied to the shipping where there was no vat applied to it in the original order.

In the case shown on this video the shipping is £4.20 (no VAT rule applied) after editing the order the shipping has 84p (20%) shown as applied to the order

This is the process occurring as a screen recording showing this issue occur: https://support.gingerweb.co.uk/L1uygjAw

This is a live store but the owner is happy for me to make test purchases to try and solve why this is happening, if anyone has any suggestions to try and fix this please let me know.

Milbo

Thank you for your report. Indeed interesting problem. It should keep 0.0 and only if you empty the field it should be calculated. I take a look
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Maybe as workaround, what happens if you enter in the shipment VAT field 0.0001 ?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

No we have tried this, any amount that is entered into the field is replaced and overwritten so in our case it adds 80p to the invoice despite there being no vat on this shipping option.

Milbo

Check the order model in BE /administrator/components/com_virtuemart/models.

search around line 943 for
$calculate_billTaxAmount = vRequest::getInt('calculate_billTaxAmount',true);

and replace it with
$calculate_billTaxAmount = vRequest::getInt('calculate_billTaxAmount',0);

Then edit the order and disable the "calculate" checkbox near the payment tax.

Be aware that you have to calculate the shipment tax, payment tax and total tax on your own. Just enter your values. Usually the total tax is just the subtotal tax of the products in your case. So not to hard to calculate :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

Milbo
im really sorry i didnt see this update - Can you tell me if this fix has been applied to the 4.2.8 update?
While everything is working (apart from this issue) i hate updating !!!
thanks