Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Tax guessing
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Tax guessing

Tax guessing 11 years, 8 months ago #32629

Hi,
we hit an error in tax rating calc.

Note: We are using VM 1.1.9 and VMInvoice 2.0.14

E.g. we have a product A that costs 1.3euro + VAT (21%) so the tax amount is 0.273 .

If I save the invoice and then reopen the invoice, for this product the tax rate select field is 0% ( the first option element in the select).
This is because the system rounds some calc and does not recognise the tax value (0.2067... instead of 0.21).

So, two ways are open:
1. Round the tax rate and/or "guess" the right one.
I've seen that there is a function called guessTaxRate in class InvoiceHelper that you use only for VM2. For VM1 you assign tax rate directly. Can this approach be replicated also for VM1 ?

2. Round everything with the same precision - 5 decimal digits

Thanks

Sincerely,
Simone Marx.
The topic has been locked.

Re: Tax guessing 11 years, 8 months ago #32882

  • pama
  • OFFLINE
  • Posts: 489
Hello. Yes, you are right at both points.

1. We use this function also for VM1. Thing is, there is "tax rate tolerance" setting in Invoice Items Configuration, which is set defaultly to 0.2%. For you, I suggest to set it for example to 1%, because at small prices it can happen calculated tax rate misfits available tax rates (20,71% vs 21%).

2. Clearer way for you can be edit directly you VirtueMart database and alter table *_vm_order_item and set product_final_price type from decimal(12,2) to decimal(12,5) => this will store final price with higher precision, so should work also.
ARTIO Support Team
The topic has been locked.
  • Page:
  • 1
User Login Empty