fix: removed show cancelled entries checkbox from the stock ledger report (#24826)

This commit is contained in:
rohitwaghchaure
2021-03-10 13:46:42 +05:30
committed by GitHub
parent 77eaf2939a
commit a0e7787f7b
2 changed files with 1 additions and 9 deletions

View File

@@ -82,11 +82,6 @@ frappe.query_reports["Stock Ledger"] = {
"label": __("Include UOM"), "label": __("Include UOM"),
"fieldtype": "Link", "fieldtype": "Link",
"options": "UOM" "options": "UOM"
},
{
"fieldname": "show_cancelled_entries",
"label": __("Show Cancelled Entries"),
"fieldtype": "Check"
} }
], ],
"formatter": function (value, row, column, data, default_formatter) { "formatter": function (value, row, column, data, default_formatter) {

View File

@@ -138,7 +138,7 @@ def get_stock_ledger_entries(filters, items):
`tabStock Ledger Entry` sle `tabStock Ledger Entry` sle
WHERE WHERE
company = %(company)s company = %(company)s
AND posting_date BETWEEN %(from_date)s AND %(to_date)s AND is_cancelled = 0 AND posting_date BETWEEN %(from_date)s AND %(to_date)s
{sle_conditions} {sle_conditions}
{item_conditions_sql} {item_conditions_sql}
ORDER BY ORDER BY
@@ -209,9 +209,6 @@ def get_sle_conditions(filters):
if filters.get("project"): if filters.get("project"):
conditions.append("project=%(project)s") conditions.append("project=%(project)s")
if not filters.get("show_cancelled_entries"):
conditions.append("is_cancelled = 0")
return "and {}".format(" and ".join(conditions)) if conditions else "" return "and {}".format(" and ".join(conditions)) if conditions else ""