Merge pull request #13691 from saurabh6790/supp_180417_1
[hotfix] multiple fixes
This commit is contained in:
commit
5b7503c074
@ -29,11 +29,11 @@ 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>
|
||||
<span style="top:%(date_dist_from_top_edge)s cm; left:%(date_dist_from_left_edge)scm;
|
||||
<span style="top:%(date_dist_from_top_edge)scm; left:%(date_dist_from_left_edge)scm;
|
||||
position: absolute;">
|
||||
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
|
||||
</span>
|
||||
|
@ -200,13 +200,14 @@ def get_item_details(items, sle, filters):
|
||||
item_details = {}
|
||||
if not items:
|
||||
items = list(set([d.item_code for d in sle]))
|
||||
|
||||
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):
|
||||
item_details.setdefault(item.name, item)
|
||||
|
||||
if items:
|
||||
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):
|
||||
item_details.setdefault(item.name, item)
|
||||
|
||||
if filters.get('show_variant_attributes', 0) == 1:
|
||||
variant_values = get_variant_values_for(item_details.keys())
|
||||
@ -215,11 +216,14 @@ def get_item_details(items, sle, filters):
|
||||
return item_details
|
||||
|
||||
def get_item_reorder_details(items):
|
||||
item_reorder_details = frappe.db.sql("""
|
||||
select parent, warehouse, warehouse_reorder_qty, warehouse_reorder_level
|
||||
from `tabItem Reorder`
|
||||
where parent in ({0})
|
||||
""".format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1)
|
||||
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`
|
||||
where parent in ({0})
|
||||
""".format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1)
|
||||
|
||||
return dict((d.parent + d.warehouse, d) for d in item_reorder_details)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user