Sunday, June 2, 2024
1 change · 17.0
Resolved issues and error corrections
This fix corrects how the Intrastat report calculates merchandise values by excluding discounts and properly converting to company currency. Previously, the calculation method incorrectly reduced reported values when discounts were applied. The system now uses unit price, quantity, and currency rates to accurately reflect the true merchandise value for intrastat compliance.
Original PR description
[FIX] account_intrastat: exclude discount and set value to company currency issue: As the company currency is partially handled, we only have to handle the discount case. For now, it doesn't working for the discount case as we're computing the value in the intrastat report by doing this: - SIGN(account_move_line.quantity) * SIGN(account_move_line.price_unit) * ABS(account_move_line.balance) This solution doesn't take into account the case where we have a discount, it impacts the balance and so the value in the intrastat line. intrastat wants the value of the merchandise, and doesn't want the value reduced by discounts. solution: rely on price_unit, quantity and currency rate to build the report value Task-3477631