-
tax_line_id
-
balance
-
amount_untaxed_signed
|
for move in self:
totals = {None: 0.0, 'vat': 0.0, 'withholding': 0.0, 'pension_fund': 0.0}
if move.is_invoice(True):
for line in [line for line in move.line_ids if line.tax_line_id]:
tax = line.tax_line_id
if tax.l10n_it_pension_fund_type:
totals['pension_fund'] -= line.balance
elif tax.l10n_it_withholding_type:
totals['withholding'] -= line.balance
else:
totals['vat'] -= line.balance
move.l10n_it_amount_vat_signed = totals['vat']
move.l10n_it_amount_withholding_signed = totals['withholding']
move.l10n_it_amount_pension_fund_signed = totals['pension_fund']
move.l10n_it_amount_before_withholding_signed = move.amount_untaxed_signed + totals['vat'] + totals['pension_fund']
|
|