fix: update advace paid in SO/PO in account currency
This commit is contained in:
parent
df096688f7
commit
bf76b85dfd
@ -1352,12 +1352,12 @@ class AccountsController(TransactionBase):
|
||||
party = self.customer if self.doctype == "Sales Order" else self.supplier
|
||||
advance = (
|
||||
frappe.qb.from_(ple)
|
||||
.select(ple.account_currency, Abs(Sum(ple.amount)).as_("amount"))
|
||||
.select(ple.account_currency, Abs(Sum(ple.amount_in_account_currency)).as_("amount"))
|
||||
.where(
|
||||
(ple.against_voucher_type == self.doctype)
|
||||
& (ple.against_voucher_no == self.name)
|
||||
& (ple.party == party)
|
||||
& (ple.delinked == 0)
|
||||
& (ple.docstatus == 1)
|
||||
& (ple.company == self.company)
|
||||
)
|
||||
.run(as_dict=True)
|
||||
|
Loading…
Reference in New Issue
Block a user