Skip to content

Commit

Permalink
[FIX] account_ux: error al hacer un cobro con third party check
Browse files Browse the repository at this point in the history
Task: 35205
  • Loading branch information
pablohmontenegro committed Nov 29, 2023
1 parent 9681a92 commit d324e69
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions account_ux/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,21 @@ def _prepare_reconciliation_single_partial(self, debit_values, credit_values, sh
TODO escribir caso 2 (tanto apunte 1 como apunte 2 tienen moneda secundaria)
"""

.
def get_accounting_rate(vals):
if company_currency.is_zero(vals['balance']) or vals['currency'].is_zero(vals['amount_currency']):
return 0.0
else:
return abs(vals['amount_currency']) / abs(vals['balance'])

company_currency = debit_values['company'].currency_id
reconcile_on_company_currency = debit_values['company'].reconcile_on_company_currency and \
company_currency = debit_values['aml'].company_currency_id
reconcile_on_company_currency = debit_values['aml'].company_id.reconcile_on_company_currency and \
(debit_values['currency'] != company_currency or credit_values['currency'] != company_currency) and \
not debit_values['record'].account_id.currency_id
if reconcile_on_company_currency:
if debit_values['currency'] != debit_values['company'].currency_id:
if debit_values['currency'] != company_currency:
debit_values['original_currency'] = debit_values['currency']
debit_values['original_amount_residual_currency'] = debit_values['amount_residual_currency']
debit_values['currency'] = debit_values['company'].currency_id
debit_values['currency'] = company_currency
debit_values['amount_residual_currency'] = debit_values['amount_residual']
if credit_values['currency'] != credit_values['company'].currency_id:
credit_values['original_currency'] = credit_values['currency']
Expand Down

0 comments on commit d324e69

Please sign in to comment.