This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sql_account_filter = "" | |
| if filters.get("account"): | |
| escaped_input = frappe.db.escape(filters.get("account")) | |
| sql_account_filter = f"AND `tabGL Entry`.account = {escaped_input}" | |
| sql_date_cond = "" | |
| if filters.get("date_from") and filters.get("date_to"): | |
| date_from = frappe.db.escape(filters.get("date_from")) | |
| date_to = frappe.db.escape(filters.get("date_to")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sql_date_cond = "" | |
| if filters.get("date_from") and filters.get("date_to"): | |
| date_from = frappe.db.escape(filters.get("date_from")) | |
| date_to = frappe.db.escape(filters.get("date_to")) | |
| sql_date_cond = f"""and posting_date between {date_from} and {date_to} """ | |
| elif filters.get("date_from"): | |
| date_from = frappe.db.escape(filters.get("date_from")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| branch="" | |
| if filters.get("branch"): | |
| escaped_input = frappe.db.escape(filters.get("branch")) | |
| branch = f" Where `tabSales Invoice`.branch = {escaped_input}" | |
| mode_of_payment="" | |
| if filters.get("mode_of_payment"): | |
| escaped_input = frappe.db.escape(filters.get("mode_of_payment")) | |
| mode_of_payment = f" AND `tabPayment Entry`.mode_of_payment = {escaped_input}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sql_item_code_cond_filter = "" | |
| if filters.get("item_code"): | |
| escaped_input = frappe.db.escape(filters.get("item_code")) | |
| sql_item_code_cond_filter = f"AND `tabStock Ledger Entry`.item_code = {escaped_input}" | |
| sql_sponge_shape="" | |
| if filters.get("sponge_shape"): | |
| escaped_input = frappe.db.escape(filters.get("sponge_shape")) | |
| sql_item_code_cond_filter = f"AND `tabStock Ledger Entry`.sponge_shape = {escaped_input}" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd Desktop | |
| #create file for the git. | |
| mkdir <file name> | |
| cd <file name> | |
| # start git in the file | |
| git init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sql_date_cond = "" | |
| if filters.get("date_from") and filters.get("date_to"): | |
| date_from = frappe.db.escape(filters.get("date_from")) | |
| date_to = frappe.db.escape(filters.get("date_to")) | |
| sql_date_cond = f"""and posting_date between {date_from} and {date_to} """ | |
| elif filters.get("date_from"): | |
| date_from = frappe.db.escape(filters.get("date_from")) | |
| sql_date_cond = f"""and posting_date >= {date_from}""" |
NewerOlder