mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: linters erros on report sales payments summary (#30345)
* fix: wrong values for report and get change amout based on payment TYPE. * charcase for select field. * fix: linter check erros * fix: linters errors Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -200,9 +200,9 @@ def get_mode_of_payment_details(filters):
|
|||||||
invoice_list_names = ",".join('"' + invoice['name'] + '"' for invoice in invoice_list)
|
invoice_list_names = ",".join('"' + invoice['name'] + '"' for invoice in invoice_list)
|
||||||
if invoice_list:
|
if invoice_list:
|
||||||
inv_mop_detail = frappe.db.sql("""
|
inv_mop_detail = frappe.db.sql("""
|
||||||
select t.owner,
|
select t.owner,
|
||||||
t.posting_date,
|
t.posting_date,
|
||||||
t.mode_of_payment,
|
t.mode_of_payment,
|
||||||
sum(t.paid_amount) as paid_amount
|
sum(t.paid_amount) as paid_amount
|
||||||
from (
|
from (
|
||||||
select a.owner, a.posting_date,
|
select a.owner, a.posting_date,
|
||||||
@@ -230,7 +230,7 @@ def get_mode_of_payment_details(filters):
|
|||||||
and b.reference_type = "Sales Invoice"
|
and b.reference_type = "Sales Invoice"
|
||||||
and b.reference_name in ({invoice_list_names})
|
and b.reference_name in ({invoice_list_names})
|
||||||
group by a.owner, a.posting_date, mode_of_payment
|
group by a.owner, a.posting_date, mode_of_payment
|
||||||
) t
|
) t
|
||||||
group by t.owner, t.posting_date, t.mode_of_payment
|
group by t.owner, t.posting_date, t.mode_of_payment
|
||||||
""".format(invoice_list_names=invoice_list_names), as_dict=1)
|
""".format(invoice_list_names=invoice_list_names), as_dict=1)
|
||||||
|
|
||||||
@@ -252,4 +252,4 @@ def get_mode_of_payment_details(filters):
|
|||||||
for d in inv_mop_detail:
|
for d in inv_mop_detail:
|
||||||
mode_of_payment_details.setdefault(d["owner"]+cstr(d["posting_date"]), []).append((d.mode_of_payment,d.paid_amount))
|
mode_of_payment_details.setdefault(d["owner"]+cstr(d["posting_date"]), []).append((d.mode_of_payment,d.paid_amount))
|
||||||
|
|
||||||
return mode_of_payment_details
|
return mode_of_payment_details
|
||||||
|
|||||||
Reference in New Issue
Block a user