Merge pull request #2081 from anandpdoshi/anand-august-19
[fix] Error Reports
This commit is contained in:
commit
dd952146d1
@ -135,8 +135,10 @@ def get_pricing_rule_for_item(args):
|
||||
frappe.throw(_("Item Group not mentioned in item master for item {0}").format(args.item_code))
|
||||
|
||||
if args.customer and not (args.customer_group and args.territory):
|
||||
args.customer_group, args.territory = frappe.db.get_value("Customer", args.customer,
|
||||
["customer_group", "territory"])
|
||||
customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
|
||||
if customer:
|
||||
args.customer_group, args.territory = customer
|
||||
|
||||
elif args.supplier and not args.supplier_type:
|
||||
args.supplier_type = frappe.db.get_value("Supplier", args.supplier, "supplier_type")
|
||||
|
||||
|
@ -324,7 +324,7 @@ class ProductionPlanningTool(Document):
|
||||
total_qty = sum([flt(d[0]) for d in so_item_qty])
|
||||
if total_qty > item_projected_qty.get(item, 0):
|
||||
# shortage
|
||||
requested_qty = total_qty - item_projected_qty.get(item, 0)
|
||||
requested_qty = total_qty - flt(item_projected_qty.get(item))
|
||||
# consider minimum order qty
|
||||
requested_qty = requested_qty > flt(so_item_qty[0][3]) and \
|
||||
requested_qty or flt(so_item_qty[0][3])
|
||||
|
@ -96,7 +96,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
title: __("Get Items from BOM"),
|
||||
fields: [
|
||||
{"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"),
|
||||
options:"BOM"},
|
||||
options:"BOM", reqd: 1},
|
||||
{"fieldname":"fetch_exploded", "fieldtype":"Check",
|
||||
"label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1},
|
||||
{fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user