Skip to content
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

VAT tax type upside-down #32801

Open
Iledher opened this issue Jan 26, 2025 · 1 comment
Open

VAT tax type upside-down #32801

Iledher opened this issue Jan 26, 2025 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@Iledher
Copy link

Iledher commented Jan 26, 2025

Bug

New field in VAT dictionnary "VAT accounts" -> Tax type ("all", "buy", "sell") seem to work upside-down. "Buy" codes are only usable in sells actions, and "sell" codes in buy actions.

Dolibarr Version

20.0.3

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

Create a new "VAT accounts" in the VAT dictionnary, with Tax type "Sell" :
Image

This new VAT code is now only display in Vendor Invoices lines and purchase orders lines.
Image

On the contrary, if the tax type is "Buy", the VAT code is only display in Sales Order and Customer Invoices.
Image

Attached files

No response

@Iledher Iledher added the Bug This is a bug (something does not work as expected) label Jan 26, 2025
@Daviid-P
Copy link
Contributor

Daviid-P commented Jan 27, 2025

Seems that way.

if (empty($cachevalue['type_vat']) || $cachevalue['type_vat'] != $type_vat) {

If we're trying to keep only the VAT qualified for $type_vat it probably should be $cachevalue['type_vat'] == $type_vat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants