Merge branch 'staging-fixes' into loyalty-program-fix

This commit is contained in:
Sagar Vora 2019-01-07 15:32:40 +05:30 committed by GitHub
commit cad20abe83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,7 @@ def execute(filters=None):
account_details.setdefault(acc.name, acc) account_details.setdefault(acc.name, acc)
if filters.get('party'): if filters.get('party'):
parties = str(filters.get("party")).strip() parties = cstr(filters.get("party")).strip()
filters.party = [d.strip() for d in parties.split(',') if d] filters.party = [d.strip() for d in parties.split(',') if d]
validate_filters(filters, account_details) validate_filters(filters, account_details)
@ -60,11 +60,11 @@ def validate_filters(filters, account_details):
frappe.throw(_("From Date must be before To Date")) frappe.throw(_("From Date must be before To Date"))
if filters.get('project'): if filters.get('project'):
projects = str(filters.get("project")).strip() projects = cstr(filters.get("project")).strip()
filters.project = [d.strip() for d in projects.split(',') if d] filters.project = [d.strip() for d in projects.split(',') if d]
if filters.get('cost_center'): if filters.get('cost_center'):
cost_centers = str(filters.get("cost_center")).strip() cost_centers = cstr(filters.get("cost_center")).strip()
filters.cost_center = [d.strip() for d in cost_centers.split(',') if d] filters.cost_center = [d.strip() for d in cost_centers.split(',') if d]

View File

@ -65,8 +65,8 @@ def get_quantity_list(item):
if item: if item:
qty_list = frappe.db.sql("""select distinct qty from `tabSupplier Quotation Item` qty_list = frappe.db.sql("""select distinct qty from `tabSupplier Quotation Item`
where ifnull(item_code,'')=%s and docstatus < 2""", item, as_dict=1) where ifnull(item_code,'')=%s and docstatus < 2 order by qty""", item, as_dict=1)
qty_list.sort(reverse=False)
for qt in qty_list: for qt in qty_list:
col = frappe._dict({ col = frappe._dict({
"key": str(qt.qty), "key": str(qt.qty),

View File

@ -124,6 +124,7 @@ frappe.ui.form.on('Salary Structure', {
"label":__("Employee"), "label":__("Employee"),
"fieldname":"employee", "fieldname":"employee",
"fieldtype":"Select", "fieldtype":"Select",
"reqd": true,
options: employees options: employees
}, { }, {
fieldname:"fetch", fieldname:"fetch",