Merge pull request #3435 from neilLasrado/barcode

Barcode added to Purchase Receipt
This commit is contained in:
Nabin Hait 2015-06-09 15:44:09 +05:30
commit bafc73568a
4 changed files with 25 additions and 11 deletions

View File

@ -105,6 +105,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}
},
barcode: function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.barcode=="" || d.barcode==null) {
// barcode cleared, remove item
d.item_code = "";
}
this.item_code(doc, cdt, cdn);
},
item_code: function(doc, cdt, cdn) {
var me = this;
var item = frappe.get_doc(cdt, cdn);

View File

@ -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']},

View File

@ -124,15 +124,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.apply_pricing_rule();
},
barcode: function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.barcode=="" || d.barcode==null) {
// barcode cleared, remove item
d.item_code = "";
}
this.item_code(doc, cdt, cdn);
},
selling_price_list: function() {
this.apply_price_list();
},

View File

@ -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",