This reverts commit 5b58e489a8d29ad7242d8b9bba0da292d85d19b6.
This commit is contained in:
parent
5b58e489a8
commit
cb48404bd2
@ -187,6 +187,9 @@ class AccountsController(TransactionBase):
|
||||
if stock_qty != len(get_serial_nos(item.get('serial_no'))):
|
||||
item.set(fieldname, value)
|
||||
|
||||
elif fieldname == "conversion_factor" and not item.get("conversion_factor"):
|
||||
item.set(fieldname, value)
|
||||
|
||||
if ret.get("pricing_rule"):
|
||||
# if user changed the discount percentage then set user's discount percentage ?
|
||||
item.set("discount_percentage", ret.get("discount_percentage"))
|
||||
|
@ -164,15 +164,6 @@ def get_basic_details(args, item):
|
||||
|
||||
warehouse = user_default_warehouse or item.default_warehouse or args.warehouse
|
||||
|
||||
#Set the UOM to the Default Sales UOM or Default Purchase UOM if configured in the Item Master
|
||||
if not args.uom:
|
||||
if args.get('doctype') in ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice']:
|
||||
args.uom = item.sales_uom if item.sales_uom else item.stock_uom
|
||||
elif args.get('doctype') in ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']:
|
||||
args.uom = item.purchase_uom if item.purchase_uom else item.stock_uom
|
||||
else:
|
||||
args.uom = item.stock_uom
|
||||
|
||||
out = frappe._dict({
|
||||
"item_code": item.name,
|
||||
"item_name": item.item_name,
|
||||
@ -187,7 +178,7 @@ def get_basic_details(args, item):
|
||||
"batch_no": None,
|
||||
"item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in
|
||||
item.get("taxes")))),
|
||||
"uom": args.uom,
|
||||
"uom": item.stock_uom,
|
||||
"min_order_qty": flt(item.min_order_qty) if args.doctype == "Material Request" else "",
|
||||
"qty": args.qty or 1.0,
|
||||
"stock_qty": args.qty or 1.0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user