Skip to content

Commit acc1559

Browse files
jackjack82eLBati
authored andcommitted
[10.0] withholding.tax.move created at invoice payment shall have the date competence equal to payment date (and not invoice date), while date maturity shall be computed based from invoice payment date (#518)
1 parent 3a9eb66 commit acc1559

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

l10n_it_withholding_tax/models/account.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ def generate_wt_moves(self):
9696
p_date_maturity = False
9797
payment_lines = wt_st.withholding_tax_id.payment_term.compute(
9898
amount_wt,
99-
rec_line_statement.date or False)
99+
rec_line_payment.date or False)
100100
if payment_lines and payment_lines[0]:
101101
p_date_maturity = payment_lines[0][0][0]
102102
wt_move_vals = {
103103
'statement_id': wt_st.id,
104-
'date': rec_line_statement.date,
104+
'date': rec_line_payment.date,
105105
'partner_id': rec_line_statement.partner_id.id,
106106
'reconcile_partial_id': self.id,
107107
'payment_line_id': rec_line_payment.id,
108108
'credit_debit_line_id': rec_line_statement.id,
109109
'withholding_tax_id': wt_st.withholding_tax_id.id,
110110
'account_move_id': rec_line_payment.move_id.id or False,
111111
'date_maturity':
112-
p_date_maturity or rec_line_statement.date_maturity,
112+
p_date_maturity or rec_line_payment.date_maturity,
113113
'amount': amount_wt
114114
}
115115
wt_move_vals = self._prepare_wt_move(wt_move_vals)

0 commit comments

Comments
 (0)