Deference between total order, and overview Tax Rules totals
-- Joomla version -- : 3.8.1
Hi,
Please can you take a look at this YouTube movie my client made to display the Coupon value problem?
The difference between this two values is exactly the coupon code value. How can we sorted this out?
Kind regards René
Please Log in or Create an account to join the conversation.
I supposing that you're referring to that thread :
www.hikashop.com/forum/install-update/89...ax-rates.html#280152
However, on that thread, you were saying that the issue was solved.
So is that a new issue ?
I've seen your youtube video but it doesn't have any information on how the coupon is configured or the details of the order with the coupon.
So I can't conclude on anything to help solve the issue.
Please Log in or Create an account to join the conversation.
Yes this is a new issue.
The coupon is set as follows
- I the time period as displayed in the video the coupon was used just 1 time.
- If you add the invoices together, you will get an amount x (here is the coupon value already)
- If you add the amount of VAT together, you will get the amount y (here the coupon value is not set)
The difference between these values is exactly the coupon discount. Since the coupons are virtual products, they should not be added to amount y.
A solution may be that this coupon code is not added to the VAT summary.
I hope it's so clearer
Regards René
Please Log in or Create an account to join the conversation.
So, in the rates listing, which is not correct ? The tax total amount or the untaxed total amount ? Or both ?
Please Log in or Create an account to join the conversation.
Tax total tax please.
regards.
Please Log in or Create an account to join the conversation.
Ok. Then try changing the line from the other thread to:
$tax_amount = $taxes_info->tax_amount + @$taxes_info->tax_amount_for_coupon;
Otherwise, please provide a concreate example so that we can have precise information, like a screenshot of the order details for the order creating the difference.
Please Log in or Create an account to join the conversation.
Unfortunately it doest doe anything for the tax amounts
I made several screenshot hopefully this give more clearance.
See the total value of the sales: € 2.377,33
If I add all amounts by VAT, I will deduct this amount: 2380,72
The difference between these amounts is exactly the coupon discount used in this period: 3,39
I made a widget with these settings: See the total value of the sales: € 2.377,33
Total tax overview: If I add all amounts by VAT, I will deduct this amount: 2380,72
Please Log in or Create an account to join the conversation.
Thanks, but that's not what I asked. What I need is a screenshot of the details of the order where you have that coupon. You can blur the user data. What I need to see is the product price, tax, the additional area prices, etc.
Please provide the information we ask so that we can move forward. It's the third time I'm asking for it. Is there a reason you don't want to provide that ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ok, that's great thanks.
Now, can you tell me if the "show taxed prices" setting is activated or not in your HikaShop configuration ?
And also, can you go in the menu System>Mass actions, create a new mass action on the "order" data with a filter on the "order column" order_id with the value 1616 and with an action "display the values" with the order_tax_info, order_discount_price and order_discount_tax columns check and click on the "process" button ?
That will give you a table with data directly from the database for that order.
That will help us better understand the situation if you can provide that data for that order.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ok, thanks !
You need to use that line of code:
$tax_amount = $taxes_info->tax_amount + $v->order_discount_price - $v->order_discount_tax;
And you also have to change the line:
$database->setQuery('SELECT order_tax_info, order_currency_id FROM '.hikashop_table('order').$filters);
to:
$database->setQuery('SELECT order_tax_info, order_currency_id, order_discount_price, order_discount_tax FROM '.hikashop_table('order').$filters);
in that same file.
That should normally work fine after that.
Please Log in or Create an account to join the conversation.
I have modified the code as suggested, but the difference remains.
The totals of VAT and amounts still differ from sales with the difference of the coupon amount.
In my opinion, only the coupon amount of the totals must be added to the VAT summary, then it is correct.
Kind regards René
Please Log in or Create an account to join the conversation.
Can you please clarify what you mean ?In my opinion, only the coupon amount of the totals must be added to the VAT summary, then it is correct.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
It should be true that total sales are equal to VAT + Total sales?
That is not the case, the difference is exactly the coupon value. The coupon will also be subject to VAT, so it must be added (in this case with the 6% VAT)
Vat rates
Admin total
Coupon tax
When I compare these values, difference is exactly the coupon value: (admin total) € 2.776,25 - (tax total) € 2779,64 = € 3,39
Kind regards René
Please Log in or Create an account to join the conversation.
But Nicolas proposed you a patch to add that coupon value to adjust the total :
You need to use that line of code:
$tax_amount = $taxes_info->tax_amount + $v->order_discount_price - $v->order_discount_tax;
You seems to have the solution :
So, can you explain me why that patch is not the right one ?In my opinion, only the coupon amount of the totals must be added to the VAT summary, then it is correct.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
No idea all I do is compare the total sales with the total in the VAT calculations. And then I see a difference. The difference appears to be the amount of the coupon value paid 1 times, but that number of value can also be coincidence. But in any case, the sum of the sums should not show a difference.
Regards René
Please Log in or Create an account to join the conversation.
I'm sorry but it's still not clear.
Do you mean that you've made the last changes I told you to do but you didn't see any difference in the calculations before/after the change ?
If so, I don't see how that's possible. And to look deeper into it, I guess we'll have to ask you a backend access and a FTP access to your website so that we can look at the data, check the changes and debug if necessary so that we can directly test the patch.
Could you provide these along with a link to this thread via our contact form ? www.hikashop.com/support/contact-us.html
If not, then it means that the patch is correct and we can close this thread. so I'm not sure why you're explaining again the situation since we already know the difference comes from the coupon value ?
Please Log in or Create an account to join the conversation.
Thanks for your patience and good care.
Please Log in or Create an account to join the conversation.