mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
fix: change sql function string to pypika
sql function string not supported anymore
This commit is contained in:
@@ -2232,6 +2232,8 @@ class AccountsController(TransactionBase):
|
|||||||
def set_advance_payment_status(self):
|
def set_advance_payment_status(self):
|
||||||
new_status = None
|
new_status = None
|
||||||
|
|
||||||
|
|
||||||
|
PaymentRequest = frappe.qb.DocType("Payment Request")
|
||||||
paid_amount = frappe.get_value(
|
paid_amount = frappe.get_value(
|
||||||
doctype="Payment Request",
|
doctype="Payment Request",
|
||||||
filters={
|
filters={
|
||||||
@@ -2239,7 +2241,7 @@ class AccountsController(TransactionBase):
|
|||||||
"reference_name": self.name,
|
"reference_name": self.name,
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
},
|
},
|
||||||
fieldname="sum(grand_total - outstanding_amount)",
|
fieldname=Sum(PaymentRequest.grand_total - PaymentRequest.outstanding_amount),
|
||||||
)
|
)
|
||||||
|
|
||||||
if not paid_amount:
|
if not paid_amount:
|
||||||
|
|||||||
Reference in New Issue
Block a user