Merge pull request #5538 from rohitwaghchaure/time_sheet_wages
[Enhancement] Time log wages and multiple active salary structure
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py
index 0412624..8935689 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list.py
+++ b/erpnext/hr/doctype/holiday_list/holiday_list.py
@@ -34,7 +34,7 @@
throw(_("To Date cannot be before From Date"))
for day in self.get("holidays"):
- if not (self.from_date <= day.holiday_date <= self.to_date):
+ if not (getdate(self.from_date) <= getdate(day.holiday_date) <= getdate(self.to_date)):
frappe.throw(_("The holiday on {0} is not between From Date and To Date").format(formatdate(day.holiday_date)))
def get_weekly_off_date_list(self, start_date, end_date):
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index e3e47ae..1de376c 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -63,6 +63,7 @@
if roles.role == 'System Manager':
roles.role = 'Administrator'
setup_wizard.flags.ignore_permissions = 1
+ setup_wizard.flags.do_not_update_json = 1
setup_wizard.save()
def create_fiscal_year_and_company(args):
diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
index 409833a..f90fb49 100644
--- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
+++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
@@ -66,11 +66,12 @@
lft, rgt = frappe.db.get_value("Warehouse", filters.warehouse, ["lft", "rgt"])
conditions.append(" exists (select name from `tabWarehouse` wh \
- where wh.lft >= %s and wh.rgt <= %s and sle.warehouse = wh.name)"%(lft, rgt))
+ where wh.lft >= %s and wh.rgt <= %s and bin.warehouse = wh.name)"%(lft, rgt))
bin_list = frappe.db.sql("""select item_code, warehouse, actual_qty, planned_qty, indented_qty,
ordered_qty, reserved_qty, reserved_qty_for_production, projected_qty
- from tabBin where %s order by item_code, warehouse """% " and ".join(conditions), as_dict=1,debug=1)
+ from tabBin bin {conditions} order by item_code, warehouse
+ """.format(conditions=" where " + " and ".join(conditions) if conditions else ""), as_dict=1)
return bin_list