fix: removed checkbox
This commit is contained in:
@@ -115,12 +115,6 @@ frappe.query_reports["Customer Ledger Summary"] = {
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "show_dr_cr",
|
||||
label: __("Closing Balance in Dr/Cr"),
|
||||
fieldtype: "Check",
|
||||
default: 0,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@@ -243,10 +243,7 @@ class PartyLedgerSummaryReport:
|
||||
}
|
||||
]
|
||||
|
||||
if self.filters.show_dr_cr:
|
||||
columns.append(
|
||||
{"label": _("Dr or Cr"), "fieldname": "dr_or_cr", "fieldtype": "Data", "width": 100}
|
||||
)
|
||||
columns.append({"label": _("Dr/Cr"), "fieldname": "dr_or_cr", "fieldtype": "Data", "width": 100})
|
||||
return columns
|
||||
|
||||
def get_data(self):
|
||||
@@ -305,13 +302,12 @@ class PartyLedgerSummaryReport:
|
||||
for account in self.party_adjustment_accounts:
|
||||
row["adj_" + scrub(account)] = adjustments.get(account, 0)
|
||||
|
||||
if self.filters.show_dr_cr:
|
||||
if self.filters.party_type == "Customer":
|
||||
balance = row.get("closing_balance", 0)
|
||||
row["dr_or_cr"] = "Dr" if balance > 0 else "Cr" if balance < 0 else ""
|
||||
else:
|
||||
balance = row.get("closing_balance", 0)
|
||||
row["dr_or_cr"] = "Cr" if balance > 0 else "Dr" if balance < 0 else ""
|
||||
if self.filters.party_type == "Customer":
|
||||
balance = row.get("closing_balance", 0)
|
||||
row["dr_or_cr"] = "Dr" if balance > 0 else "Cr" if balance < 0 else ""
|
||||
else:
|
||||
balance = row.get("closing_balance", 0)
|
||||
row["dr_or_cr"] = "Cr" if balance > 0 else "Dr" if balance < 0 else ""
|
||||
|
||||
out.append(row)
|
||||
|
||||
|
||||
@@ -96,12 +96,6 @@ frappe.query_reports["Supplier Ledger Summary"] = {
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "show_dr_cr",
|
||||
label: __("Closing Balance in Dr/Cr"),
|
||||
fieldtype: "Check",
|
||||
default: 0,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user