Merge pull request #13691 from saurabh6790/supp_180417_1

[hotfix] multiple fixes
This commit is contained in:
Saurabh
2018-04-19 15:57:35 +05:30
committed by GitHub
3 changed files with 22 additions and 15 deletions

View File

@@ -29,7 +29,7 @@ def create_or_update_cheque_print_format(template_name):
cheque_print.html = """
<div style="position: relative; top:%(starting_position_from_top_edge)scm">
<div style="width:%(cheque_width)scm;height:%(cheque_height)scm;">
<span style="top: {{ %(acc_pay_dist_from_top_edge)s }}cm; left: {{ %(acc_pay_dist_from_left_edge)s }}cm;
<span style="top:%(acc_pay_dist_from_top_edge)scm; left:%(acc_pay_dist_from_left_edge)scm;
border-bottom: solid 1px;border-top:solid 1px; position: absolute;">
%(message_to_show)s
</span>

View File

@@ -201,6 +201,7 @@ def get_item_details(items, sle, filters):
if not items:
items = list(set([d.item_code for d in sle]))
if items:
for item in frappe.db.sql("""
select name, item_name, description, item_group, brand, stock_uom
from `tabItem`
@@ -215,6 +216,9 @@ def get_item_details(items, sle, filters):
return item_details
def get_item_reorder_details(items):
item_reorder_details = frappe._dict()
if items:
item_reorder_details = frappe.db.sql("""
select parent, warehouse, warehouse_reorder_qty, warehouse_reorder_level
from `tabItem Reorder`

View File

@@ -93,11 +93,14 @@ def get_item_details(items, sl_entries):
if not items:
items = list(set([d.item_code for d in sl_entries]))
if not items:
return item_details
for item in frappe.db.sql("""
select name, item_name, description, item_group, brand, stock_uom
from `tabItem`
where name in ({0})
""".format(', '.join(['"' + frappe.db.escape(i,percent=False) + '"' for i in items])), as_dict=1):
""".format(', '.join(['"' + frappe.db.escape(i,percent=False) + '"' for i in items])), as_dict=1, debug=1):
item_details.setdefault(item.name, item)
return item_details