[FIX] Tax computation fixed on stock_picking_taxes module #1357
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In stock_picking_taxes module, when a tax has its attribute
price_include
set as True (Tax included in price),amount_untaxed
,amount_tax
andamount_total
fields are computed wrong.Example A (Right, same values on sale order and stock picking):
Data -> Tax = IVA 21% (
price_include
set as False), Price = 8.00€.Result -> Amount untaxed = 8.00€, Amount tax = 1.68€, Amount total = 9.68€.
Example B (Wrong, different values on order and stock picking):
Data -> Tax = IVA 21% (
price_include
set as True), Price = 8.00€.Result -> Amount untaxed = 8.00€, Amount tax = 1.68€, Amount total = 9.68€.
When result should be -> Amount untaxed = 6.61€, Amount tax = 1.39€, Amount total = 8.00€.
Attempt to correct that issue in this pull request.
En el módulo stock_picking_taxes, cuando a un impuesto se le pone el atributo
Impuestos incluidos en el precio
a Verdadero, los campos base imponible, impuestos y total se recalculan mal en los albaranes.Ejemplo A (Correcto, los valores son idénticos en pedido y en albarán):
Datos -> Impuesto = IVA 21% (
price_include
establecido a Falso), Precio = 8.00€.Resultado -> Base imponible = 8.00€, Impuestos = 1.68€, Total = 9.68€.
Example B (Mal, valores diferentes en pedido y en albarán):
Datos -> Impuesto = IVA 21% (
price_include
establecido a Verdadero), Precio = 8.00€.Resultado -> Base imponible = 8.00€, Impuestos = 1.68€, Total = 9.68€.
Cuando el resultado debería ser -> Base imponible = 6.61€, Impuestos = 1.39€, Total = 8.00€.
Este pull request intenta solucionar este problema.
¡Saludos!