Merge pull request #22208 from aliriocastro/fix-itemwise-rec-reord-level-report

fix: key name to get float precision was misspelled
This commit is contained in:
Deepesh Garg 2020-06-12 10:04:58 +05:30 committed by GitHub
commit d09aa53571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from frappe.utils import getdate, flt
def execute(filters=None): def execute(filters=None):
if not filters: filters = {} if not filters: filters = {}
float_preceision = frappe.db.get_default("float_preceision") float_precision = frappe.db.get_default("float_precision")
condition = get_condition(filters) condition = get_condition(filters)
@ -25,7 +25,7 @@ def execute(filters=None):
data = [] data = []
for item in items: for item in items:
total_outgoing = flt(consumed_item_map.get(item.name, 0)) + flt(delivered_item_map.get(item.name,0)) total_outgoing = flt(consumed_item_map.get(item.name, 0)) + flt(delivered_item_map.get(item.name,0))
avg_daily_outgoing = flt(total_outgoing / diff, float_preceision) avg_daily_outgoing = flt(total_outgoing / diff, float_precision)
reorder_level = (avg_daily_outgoing * flt(item.lead_time_days)) + flt(item.safety_stock) reorder_level = (avg_daily_outgoing * flt(item.lead_time_days)) + flt(item.safety_stock)
data.append([item.name, item.item_name, item.item_group, item.brand, item.description, data.append([item.name, item.item_name, item.item_group, item.brand, item.description,