Commit 8ba71199 authored by Jérome Perrin's avatar Jérome Perrin

Revert "erp5_core: fix FIFO stock value calculation on null total price"

This reverts commit d53e053d.
parent 4f23f3b1
......@@ -128,7 +128,7 @@ SELECT
GREATEST(0, quantity-@unbalanced_output)
) AS running_quantity,
(@running_total_asset_price:=@running_total_asset_price +
GREATEST(0, (quantity-@unbalanced_output) * IFNULL(total_price,0)/quantity)
GREATEST(0, (quantity-@unbalanced_output) * total_price/quantity)
) AS running_total_asset_price,
(@unbalanced_output:=GREATEST(0, @unbalanced_output-quantity)) as dummy,
<dtml-if "lowest_value_test">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment