Merge pull request #2004 from anandpdoshi/anand-july-30
[fixes] Leave Application and Toggle Rounded Totals
This commit is contained in:
commit
b9fed3f046
@ -252,7 +252,7 @@ def get_events(start, end):
|
|||||||
if "Employee" in frappe.get_roles():
|
if "Employee" in frappe.get_roles():
|
||||||
add_department_leaves(events, start, end, employee, company)
|
add_department_leaves(events, start, end, employee, company)
|
||||||
|
|
||||||
add_leaves(events, start, end, employee, company, match_conditions)
|
add_leaves(events, start, end, match_conditions)
|
||||||
|
|
||||||
add_block_dates(events, start, end, employee, company)
|
add_block_dates(events, start, end, employee, company)
|
||||||
add_holidays(events, start, end, employee, company)
|
add_holidays(events, start, end, employee, company)
|
||||||
@ -270,9 +270,9 @@ def add_department_leaves(events, start, end, employee, company):
|
|||||||
and company=%s""", (department, company))
|
and company=%s""", (department, company))
|
||||||
|
|
||||||
match_conditions = "employee in (\"%s\")" % '", "'.join(department_employees)
|
match_conditions = "employee in (\"%s\")" % '", "'.join(department_employees)
|
||||||
add_leaves(events, start, end, employee, company, match_conditions=match_conditions)
|
add_leaves(events, start, end, match_conditions=match_conditions)
|
||||||
|
|
||||||
def add_leaves(events, start, end, employee, company, match_conditions=None):
|
def add_leaves(events, start, end, match_conditions=None):
|
||||||
query = """select name, from_date, to_date, employee_name, half_day,
|
query = """select name, from_date, to_date, employee_name, half_day,
|
||||||
status, employee, docstatus
|
status, employee, docstatus
|
||||||
from `tabLeave Application` where
|
from `tabLeave Application` where
|
||||||
|
@ -73,4 +73,4 @@ execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool") # 29-07
|
|||||||
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail") # 29-07-2014
|
execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail") # 29-07-2014
|
||||||
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
|
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
|
||||||
erpnext.patches.v4_2.delete_old_print_formats #2014-07-29
|
erpnext.patches.v4_2.delete_old_print_formats #2014-07-29
|
||||||
erpnext.patches.v4_2.toggle_rounded_total
|
erpnext.patches.v4_2.toggle_rounded_total #2014-07-30
|
||||||
|
@ -57,6 +57,8 @@ class GlobalDefaults(Document):
|
|||||||
|
|
||||||
# Make property setters to hide rounded total fields
|
# Make property setters to hide rounded total fields
|
||||||
for doctype in ("Quotation", "Sales Order", "Sales Invoice", "Delivery Note"):
|
for doctype in ("Quotation", "Sales Order", "Sales Invoice", "Delivery Note"):
|
||||||
for fieldname in ("rounded_total", "rounded_total_export"):
|
make_property_setter(doctype, "rounded_total", "hidden", self.disable_rounded_total, "Check")
|
||||||
make_property_setter(doctype, fieldname, "hidden", self.disable_rounded_total, "Check")
|
make_property_setter(doctype, "rounded_total", "print_hide", 1, "Check")
|
||||||
make_property_setter(doctype, fieldname, "print_hide", self.disable_rounded_total, "Check")
|
|
||||||
|
make_property_setter(doctype, "rounded_total_export", "hidden", self.disable_rounded_total, "Check")
|
||||||
|
make_property_setter(doctype, "rounded_total_export", "print_hide", self.disable_rounded_total, "Check")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user