-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tax.lib.php #32041
base: 17.0
Are you sure you want to change the base?
Update tax.lib.php #32041
Conversation
When expensereport for a month and for a tax rate contains more than 1 line (n lines), the tax report contains n identical lines and total are impacted with those n values.
What is the url or menu to use to reach the page with the screenshot ? |
Problem is not in that way... sorry ! If you have an expense report (for august a real one!) with 8 different lines (different kind of expenses) and 7 paiements. The 8 lines of expense have different tax rate : 3 for 20%, 2 for 10% and 3 for 5.5%. When we look at the tax report for august, then we have For the rate 20% we can see 7 identical lines for the 3 expenses realised at a rate of 20% The same for 10% 2 lines repeated 7 times each... And for 5.5% 3 lines repeated 7 times. And for each total corresponding to a rate, the result is bad. And of course total of total ! So with my proposal, same screnshots give And totals are good and my VAT declaration too ! |
I think the bug is nit in duplicate. |
On a specific rate we have the list of all lines (supplier invoices, expense report) which impact the total of VAT for that rate. |
When expensereport for a month and for a tax rate contains more than 1 line (n lines), the tax report contains n identical lines and total are impacted with those n values.
In this exemple ER2409-0045 contains 7 different payments (2 payments with 20% tva, 2 payments with 10% tva and 3 payments with 5.5% tva -> the picture).
The lines are copied 7 times for the same value in the report.
Add GROUP BY in SELECT sql request solve the problem.
Francis