Invoice pay wizard always books into current period
Scenario:
- Vanilla database with account_tax and account_de_skr03 installed
- Create a fiscalyear with Tax Cash Group 'Umsatzsteuer'
- Create an invoice with a product configured to use taxes with said tax group
- Post the invoice
- Pay the invoice partly at a date in the next month
- Open the tax code chart for the next month -> amount == 0
- Open the tax code chart for the current month -> amount == current paid amount
Table account_tax_line shows correct amounts for done and expected payments, but the period of done payments is not updated/inserted correctly to the period of the payment date, but always to the current period.
It turns out that payment_date is missing in the context which is used in _update_tax_cash_basis to find the correct period.
The attached patch solves the problem.
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
tax_cash_payment.patch | @mbehrle | 2021-10-13 10:22:36.935000 UTC | text/plain |