Wednesday, June 26, 2024
2 changes
Resolved issues and error corrections
This fix resolves issues where down payment invoices were not calculating taxes correctly when using AvaTax. Previously, down payments had no taxes applied, and when taxes were computed, they were based on the down payment product rather than the original sales order product, leading to incorrect tax amounts. The fix ensures down payments inherit the correct tax information from the original order and are excluded from automatic tax recalculation.
Original PR description
**Steps to reproduce:** - Install Accounting, Sales and account_avatax_sale - Configure AvaTax in Accounting settings - Create a product with an AvaTax Category (e.g. [D00000000] Digital goods) -…
**Steps to reproduce:** - Install Accounting, Sales and account_avatax_sale - Configure AvaTax in Accounting settings - Create a product with an AvaTax Category (e.g. [D00000000] Digital goods) - Create a SO: * Customer: [US customer] (e.g. Azure Interior) * Product: [the created product] * Unit Price: [any] (e.g. $ 200.00) * Fiscal Position (Other Info tab): Automatic Tax Mapping (AvaTax) - Confirm the SO => The taxes will be recomputed with AvaTax (e.g. $ 20.50) - Create a down payment from SO (via "Create Invoice" button): * Create Invoice: Down payment (percentage) * Down Payment Amount: 50% **Issues:** 1) There is no tax on the down payment 2) When confirming the down payment, AvaTax taxes are computed from the Down payment product. It should not because the Down payment product may have a different AvaTax category than the product on the SO, which may lead to different computed taxes. The taxes on the down payment should be the same than the ones on the SO. **Cause:** 1) In "sale_external_tax" module, the "tax_ids" field is removed when preparing the invoice line (in "_prepare_invoice_line" method). Even though "account_avatax_sale" module depends on "sale_external_tax", we want to keep "tax_ids" when using AvaTax. **Solution:** 1) Create a method checking if taxes should be removed in "sale_external_tax" and override it in "account_avatax_sale" module to keep them. 2) Exclude down payments from external taxes recomputation. opw-3971513
The organizational number format used in Swedish POS Blackbox serial communication was incorrect, preventing the device from communicating with the system. The format has been corrected from the display format (123456-4321) to the required serial communication format (1234564321) to restore proper Blackbox functionality.
Original PR description
The format for organisational number is wrong in the serial communication. This creates an error from the Blackbox. The format of an organistional number is "123456-4321" where the last number is a checksum. However, the format for the serial communication is a string of numbers in this format: "1234564321". This will stop the black box from communicating the the POS.