Skip to content

Commit

Permalink
[FIX] public_budget: Changes to crate payment with advance.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr committed Oct 31, 2022
1 parent 7abf849 commit d41b7f7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions public_budget/models/account_payment.py
Expand Up @@ -78,6 +78,20 @@ def _compute_destination_account_id(self):
return super(
AccountPayment, rec)._compute_destination_account_id()

def _seek_for_lines(self):
"""
Verificamos que si vienen con cuenta de adelanto la tome como ('receivable', 'payable')
"""
liquidity_lines, counterpart_lines, writeoff_lines = super()._seek_for_lines()
payment_group = self.payment_group_id
for line in self.move_id.line_ids:
if payment_group.transaction_with_advance_payment and \
payment_group.transaction_id.type_id.advance_account_id == line.account_id:
counterpart_lines += line
elif payment_group.advance_request_id and payment_group.advance_request_id.type_id.account_id == line.account_id:
counterpart_lines += line
return liquidity_lines, counterpart_lines, writeoff_lines

def change_withholding(self):
""" Arrojamos este error para recordarnos que este metodo se implementa
en realidad en public_budget_tax_settlement porque necesitamos del
Expand Down

0 comments on commit d41b7f7

Please sign in to comment.