Merge pull request #1880 from rmehta/fixes-july-2
formatting fix in support ticket autoreply
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index bfb500c..70fc272 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -183,8 +183,9 @@
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
// this will make outstanding amount 0
this.frm.set_value("write_off_amount",
- flt(this.frm.doc.grand_total - this.frm.doc.paid_amount),
- precision("write_off_amount"));
+ flt(this.frm.doc.grand_total - this.frm.doc.paid_amount,
+ precision("write_off_amount"))
+ );
}
this.calculate_outstanding_amount(false);
diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.py b/erpnext/hr/report/employee_birthday/employee_birthday.py
index 51a5051..9bf6106 100644
--- a/erpnext/hr/report/employee_birthday/employee_birthday.py
+++ b/erpnext/hr/report/employee_birthday/employee_birthday.py
@@ -7,32 +7,32 @@
def execute(filters=None):
if not filters: filters = {}
-
+
columns = get_columns()
data = get_employees(filters)
-
+
return columns, data
-
+
def get_columns():
return [
- "Employee:Link/Employee:120", "Date of Birth:Date:100", "Branch:Link/Branch:120",
- "Department:Link/Department:120", "Designation:Link/Designation:120", "Gender::60",
+ "Employee:Link/Employee:120", "Date of Birth:Date:100", "Branch:Link/Branch:120",
+ "Department:Link/Department:120", "Designation:Link/Designation:120", "Gender::60",
"Company:Link/Company:120"
]
-
+
def get_employees(filters):
conditions = get_conditions(filters)
- return frappe.db.sql("""select name, date_of_birth, branch, department, designation,
+ return frappe.db.sql("""select name, date_of_birth, branch, department, designation,
gender, company from tabEmployee where status = 'Active' %s""" % conditions, as_list=1)
-
+
def get_conditions(filters):
conditions = ""
if filters.get("month"):
- month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
+ month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
"Dec"].index(filters["month"]) + 1
conditions += " and month(date_of_birth) = '%s'" % month
-
+
if filters.get("company"): conditions += " and company = '%s'" % \
- filters["company"].repalce("'", "\'")
-
- return conditions
\ No newline at end of file
+ filters["company"].replace("'", "\\'")
+
+ return conditions