Barcode added to Purchase Receipt
This commit is contained in:
parent
41413af42d
commit
b2f550ccb3
@ -81,7 +81,8 @@ erpnext.feature_setup.feature_dict = {
|
||||
'Item': {'fields': ['barcode']},
|
||||
'Delivery Note': {'items': ['barcode']},
|
||||
'Sales Invoice': {'items': ['barcode']},
|
||||
'Stock Entry': {'items': ['barcode']}
|
||||
'Stock Entry': {'items': ['barcode']},
|
||||
'Purchase Receipt': {'items': ['barcode']}
|
||||
},
|
||||
'fs_item_group_in_details': {
|
||||
'Delivery Note': {'items':['item_group']},
|
||||
|
@ -204,3 +204,18 @@ frappe.ui.form.on("Purchase Receipt", "is_subcontracted", function(frm) {
|
||||
}
|
||||
frm.toggle_reqd("supplier_warehouse", frm.doc.is_subcontracted==="Yes");
|
||||
});
|
||||
|
||||
cur_frm.cscript.barcode = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
if (d.barcode) {
|
||||
frappe.call({
|
||||
method: "erpnext.stock.get_item_details.get_item_code",
|
||||
args: {"barcode": d.barcode },
|
||||
callback: function(r) {
|
||||
if (!r.exe){
|
||||
frappe.model.set_value(cdt, cdn, "item_code", r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -4,6 +4,19 @@
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "barcode",
|
||||
"fieldtype": "Data",
|
||||
"label": "Barcode",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_2",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Link",
|
||||
@ -642,7 +655,7 @@
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"modified": "2015-06-02 14:19:13.528248",
|
||||
"modified": "2015-06-08 08:21:18.024324",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt Item",
|
||||
|
Loading…
x
Reference in New Issue
Block a user