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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -82,11 +82,6 @@ frappe.query_reports["Stock Ledger"] = {
"label": __("Include UOM"),
"fieldtype": "Link",
"options": "UOM"
},
{
"fieldname": "show_cancelled_entries",
"label": __("Show Cancelled Entries"),
"fieldtype": "Check"
}
],
"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
WHERE
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}
{item_conditions_sql}
ORDER BY
@ -209,9 +209,6 @@ def get_sle_conditions(filters):
if filters.get("project"):
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 ""