Skip to content

Instantly share code, notes, and snippets.

View itsyosefali's full-sized avatar
🥱
Focusing

Yosef Ali itsyosefali

🥱
Focusing
View GitHub Profile
@itsyosefali
itsyosefali / GlEntry.py
Last active January 8, 2023 11:58
تقرير حركة الخزينة
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"))
@itsyosefali
itsyosefali / Time.py
Last active January 8, 2023 12:08
فلتر حسب الوقت
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"))
@itsyosefali
itsyosefali / Daily Sales Summry.py
Last active January 8, 2023 12:08
تقرير المبيعات اليومي
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}"
@itsyosefali
itsyosefali / scriptreport.py
Last active January 8, 2023 12:09
تقرير لل سبونج شايب لي شركة الربيع
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}"
cd Desktop
#create file for the git.
mkdir <file name>
cd <file name>
# start git in the file
git init
@itsyosefali
itsyosefali / script.py
Created January 1, 2023 09:03
Sql Report
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}"""