Fixes
This commit is contained in:
parent
290ed09dc6
commit
5fe69fb556
@ -137,7 +137,12 @@ class LeaveApplication(Document):
|
|||||||
and (from_date between %(from_date)s and %(to_date)s
|
and (from_date between %(from_date)s and %(to_date)s
|
||||||
or to_date between %(from_date)s and %(to_date)s
|
or to_date between %(from_date)s and %(to_date)s
|
||||||
or %(from_date)s between from_date and to_date)
|
or %(from_date)s between from_date and to_date)
|
||||||
and name != %(name)s""", self.as_dict(), as_dict = 1):
|
and name != %(name)s""", {
|
||||||
|
"employee": self.employee,
|
||||||
|
"from_date": self.from_date,
|
||||||
|
"to_date": self.to_date,
|
||||||
|
"name": self.name
|
||||||
|
}, as_dict = 1):
|
||||||
|
|
||||||
frappe.msgprint(_("Employee {0} has already applied for {1} between {2} and {3}").format(self.employee,
|
frappe.msgprint(_("Employee {0} has already applied for {1} between {2} and {3}").format(self.employee,
|
||||||
cstr(d['leave_type']), formatdate(d['from_date']), formatdate(d['to_date'])))
|
cstr(d['leave_type']), formatdate(d['from_date']), formatdate(d['to_date'])))
|
||||||
|
@ -14,6 +14,9 @@ def execute():
|
|||||||
|
|
||||||
for d in frappe.db.sql("""select * from `tabCustomer Discount`
|
for d in frappe.db.sql("""select * from `tabCustomer Discount`
|
||||||
where ifnull(parent, '') != ''""", as_dict=1):
|
where ifnull(parent, '') != ''""", as_dict=1):
|
||||||
|
if not d.discount:
|
||||||
|
continue
|
||||||
|
|
||||||
frappe.get_doc({
|
frappe.get_doc({
|
||||||
"doctype": "Pricing Rule",
|
"doctype": "Pricing Rule",
|
||||||
"apply_on": "Item Group",
|
"apply_on": "Item Group",
|
||||||
|
@ -44,7 +44,7 @@ def get_child_groups(item_group_name):
|
|||||||
item_group = frappe.get_doc("Item Group", item_group_name)
|
item_group = frappe.get_doc("Item Group", item_group_name)
|
||||||
return frappe.db.sql("""select name
|
return frappe.db.sql("""select name
|
||||||
from `tabItem Group` where lft>=%(lft)s and rgt<=%(rgt)s
|
from `tabItem Group` where lft>=%(lft)s and rgt<=%(rgt)s
|
||||||
and show_in_website = 1""", item_group.as_dict())
|
and show_in_website = 1""", {"lft": item_group.lft, "rgt": item_group.rgt})
|
||||||
|
|
||||||
def get_item_for_list_in_html(context):
|
def get_item_for_list_in_html(context):
|
||||||
return frappe.get_template("templates/includes/product_in_grid.html").render(context)
|
return frappe.get_template("templates/includes/product_in_grid.html").render(context)
|
||||||
|
Loading…
Reference in New Issue
Block a user