Merge pull request #21181 from marination/purchase-receipt-scan-barcode
feat: Scan Barcode in Purchase Receipt
This commit is contained in:
commit
55ea142afd
@ -473,6 +473,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
item_code: item.item_code,
|
item_code: item.item_code,
|
||||||
barcode: item.barcode,
|
barcode: item.barcode,
|
||||||
serial_no: item.serial_no,
|
serial_no: item.serial_no,
|
||||||
|
batch_no: item.batch_no,
|
||||||
set_warehouse: me.frm.doc.set_warehouse,
|
set_warehouse: me.frm.doc.set_warehouse,
|
||||||
warehouse: item.warehouse,
|
warehouse: item.warehouse,
|
||||||
customer: me.frm.doc.customer || me.frm.doc.party_name,
|
customer: me.frm.doc.customer || me.frm.doc.party_name,
|
||||||
@ -637,6 +638,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
// Add the new list to the serial no. field in grid with each in new line
|
// Add the new list to the serial no. field in grid with each in new line
|
||||||
item.serial_no = valid_serial_nos.join('\n');
|
item.serial_no = valid_serial_nos.join('\n');
|
||||||
|
item.conversion_factor = item.conversion_factor || 1;
|
||||||
|
|
||||||
refresh_field("serial_no", item.name, item.parentfield);
|
refresh_field("serial_no", item.name, item.parentfield);
|
||||||
if(!doc.is_return && cint(user_defaults.set_qty_in_transactions_based_on_serial_no_input)) {
|
if(!doc.is_return && cint(user_defaults.set_qty_in_transactions_based_on_serial_no_input)) {
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
"is_subcontracted",
|
"is_subcontracted",
|
||||||
"supplier_warehouse",
|
"supplier_warehouse",
|
||||||
"items_section",
|
"items_section",
|
||||||
|
"scan_barcode",
|
||||||
"items",
|
"items",
|
||||||
"pricing_rule_details",
|
"pricing_rule_details",
|
||||||
"pricing_rules",
|
"pricing_rules",
|
||||||
@ -1070,13 +1071,18 @@
|
|||||||
"label": "Inter Company Reference",
|
"label": "Inter Company Reference",
|
||||||
"options": "Delivery Note",
|
"options": "Delivery Note",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "scan_barcode",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Scan Barcode"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-truck",
|
"icon": "fa fa-truck",
|
||||||
"idx": 261,
|
"idx": 261,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2019-12-30 19:12:49.709711",
|
"modified": "2020-04-06 16:31:37.444891",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Purchase Receipt",
|
"name": "Purchase Receipt",
|
||||||
|
@ -279,7 +279,7 @@ def get_basic_details(args, item, overwrite_warehouse=True):
|
|||||||
"cost_center": get_default_cost_center(args, item_defaults, item_group_defaults, brand_defaults),
|
"cost_center": get_default_cost_center(args, item_defaults, item_group_defaults, brand_defaults),
|
||||||
'has_serial_no': item.has_serial_no,
|
'has_serial_no': item.has_serial_no,
|
||||||
'has_batch_no': item.has_batch_no,
|
'has_batch_no': item.has_batch_no,
|
||||||
"batch_no": None,
|
"batch_no": args.get("batch_no"),
|
||||||
"uom": args.uom,
|
"uom": args.uom,
|
||||||
"min_order_qty": flt(item.min_order_qty) if args.doctype == "Material Request" else "",
|
"min_order_qty": flt(item.min_order_qty) if args.doctype == "Material Request" else "",
|
||||||
"qty": flt(args.qty) or 1.0,
|
"qty": flt(args.qty) or 1.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user