diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index a27d81747d..d3a32e92c0 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -127,7 +127,7 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) { /*---------------------- Get rate if account_head has account_type as TAX or CHARGEABLE-------------------------------------*/ cur_frm.fields_dict['purchase_tax_details'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) { - return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND (tabAccount.account_type in ("Tax", "Chargeable", "Expense") or (tabAccount.is_pl_account = "Yes" and tabAccount.debit_or_credit = "Debit")) AND tabAccount.company = "' + doc.company + '" AND tabAccount.name LIKE "%s"' + return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND (tabAccount.account_type in ("Tax", "Chargeable", "Expense Account") or (tabAccount.is_pl_account = "Yes" and tabAccount.debit_or_credit = "Debit")) AND tabAccount.company = "' + doc.company + '" AND tabAccount.name LIKE "%s"' } diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 620d8dd5c0..7b62684db9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -211,6 +211,9 @@ class DocType(TransactionBase): ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0 return ret + def get_barcode_details(self, barcode): + return get_obj('Sales Common').get_barcode_details(barcode) + # Fetch ref rate from item master as per selected price list def get_adj_percent(self, arg=''): diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt index debf1719a3..88af72b279 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:35:48', + 'creation': '2012-04-13 11:56:18', 'docstatus': 0, - 'modified': '2012-03-27 14:35:48', + 'modified': '2012-06-07 19:05:06', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,7 @@ 'section_style': u'Tray', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 29 + 'version': 1 }, # These values are common for all DocField @@ -40,6 +40,16 @@ 'name': u'Sales Invoice Item' }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'barcode', + 'fieldtype': u'Data', + 'label': u'Barcode', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', @@ -431,4 +441,4 @@ 'print_hide': 1, 'report_hide': 1 } -] +] \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index 137779ed3a..bae6b74d27 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -140,7 +140,7 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) { /*---------------------- Get rate if account_head has account_type as TAX or CHARGEABLE-------------------------------------*/ cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) { - return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND tabAccount.account_type in ("Tax", "Chargeable", "Income") AND tabAccount.company = "'+doc.company+'" AND tabAccount.name LIKE "%s"' + return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND tabAccount.account_type in ("Tax", "Chargeable", "Income Account") AND tabAccount.company = "'+doc.company+'" AND tabAccount.name LIKE "%s"' } cur_frm.fields_dict['other_charges'].grid.get_field("cost_center_other_charges").get_query = function(doc) { diff --git a/erpnext/patches/june_2012/__init__.py b/erpnext/patches/june_2012/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/patches/june_2012/barcode_in_feature_setup.py b/erpnext/patches/june_2012/barcode_in_feature_setup.py new file mode 100644 index 0000000000..fae75bff7d --- /dev/null +++ b/erpnext/patches/june_2012/barcode_in_feature_setup.py @@ -0,0 +1,7 @@ +def execute(): + import webnotes + from webnotes.model.code import get_obj + fs = get_obj('Features Setup') + fs.doc.fs_item_barcode = 0 + fs.doc.save() + fs.validate() \ No newline at end of file diff --git a/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py b/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py new file mode 100644 index 0000000000..d3127170a4 --- /dev/null +++ b/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py @@ -0,0 +1,4 @@ +def execute(): + import webnotes + webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Order Item` t2 set t1.uom = t2.uom where ifnull(t1.po_detail, '') != '' and t1.po_detail = t2.name") + webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Receipt Item` t2 set t1.uom = t2.uom where ifnull(t1.pr_detail, '') != '' and t1.pr_detail = t2.name") \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index aba4ce539e..96bf161197 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -412,4 +412,14 @@ patch_list = [ 'patch_file': 'remove_communication_log', 'description': 'Remove Communication Log and replace it with Communication' }, + { + 'patch_module': 'patches.june_2012', + 'patch_file': 'barcode_in_feature_setup', + 'description': 'Track item by barcode' + }, + { + 'patch_module': 'patches.june_2012', + 'patch_file': 'copy_uom_for_pur_inv_item', + 'description': 'Copy uom for pur inv item from PO and PR item table' + }, ] \ No newline at end of file diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.txt b/erpnext/selling/doctype/quotation_item/quotation_item.txt index 5bb2121b02..d5ece1f602 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.txt +++ b/erpnext/selling/doctype/quotation_item/quotation_item.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-05-15 12:14:54', + 'creation': '2012-06-04 15:40:56', 'docstatus': 0, - 'modified': '2012-05-18 18:21:08', + 'modified': '2012-06-07 17:58:39', 'modified_by': u'Administrator', 'owner': u'Administrator' }, diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index 79f1714e05..5e67c93df8 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -265,6 +265,16 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) { } } +//Barcode +// +cur_frm.cscript.barcode = function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + var callback = function(r, rt) { + cur_frm.cscript.item_code(doc, cdt, cdn); + } + get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname, doc, cdt, cdn, 1, callback); +} + // *********************** QUANTITY *************************** cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.recalc(doc, 1); } diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py index 21f83b536f..62a6434fc1 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.py +++ b/erpnext/selling/doctype/sales_common/sales_common.py @@ -128,12 +128,13 @@ class DocType(TransactionBase): if not obj.doc.price_list_name: msgprint("Please Select Price List before selecting Items") raise Exception - item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1) + item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html, barcode from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1) tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , args['item_code']) t = {} for x in tax: t[x[0]] = flt(x[1]) ret = { 'description' : item and item[0]['description_html'] or item[0]['description'], + 'barcode' : item and item[0]['barcode'] or '', 'item_group' : item and item[0]['item_group'] or '', 'item_name' : item and item[0]['item_name'] or '', 'brand' : item and item[0]['brand'] or '', @@ -171,7 +172,6 @@ class DocType(TransactionBase): return ret - # ***************** Get Ref rate as entered in Item Master ******************** def get_ref_rate(self, item_code, price_list_name, price_list_currency, plc_conv_rate): @@ -179,6 +179,24 @@ class DocType(TransactionBase): base_ref_rate = ref_rate and flt(ref_rate[0][0]) * flt(plc_conv_rate) or 0 return base_ref_rate + def get_barcode_details(self, barcode): + item = webnotes.conn.sql("select name, end_of_life, is_sales_item, is_service_item \ + from `tabItem` where barcode = %s", barcode, as_dict=1) + ret = {} + if not item: + msgprint("""No item found for this barcode: %s. + May be barcode not updated in item master. Please check""" % barcode) + elif item[0]['end_of_life'] and getdate(cstr(item[0]['end_of_life'])) < nowdate(): + msgprint("Item: %s has been expired. Please check 'End of Life' field in item master" % item[0]['name']) + elif item[0]['is_sales_item'] == 'No' and item[0]['is_service_item'] == 'No': + msgprint("Item: %s is not a sales or service item" % item[0]['name']) + elif len(item) > 1: + msgprint("There are multiple item for this barcode. \nPlease select item code manually") + else: + ret = {'item_code': item and item[0]['name'] or ''} + + return ret + # ****** Re-cancellculates Basic Rate & amount based on Price List Selected ****** def get_adj_percent(self, obj): diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.txt b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt index 38cdd83541..1d2f358bac 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.txt +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:15', + 'creation': '2012-04-13 11:56:28', 'docstatus': 0, - 'modified': '2012-03-27 14:36:15', + 'modified': '2012-06-07 18:04:52', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,7 @@ 'section_style': u'Tray', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 54 + 'version': 1 }, # These values are common for all DocField @@ -68,7 +68,7 @@ 'permlevel': 0, 'print_hide': 1, 'reqd': 1, - 'width': u'150px' + 'width': u'150' }, # DocField diff --git a/erpnext/setup/doctype/features_setup/features_setup.txt b/erpnext/setup/doctype/features_setup/features_setup.txt index fdbf96dcfe..486e9d356d 100644 --- a/erpnext/setup/doctype/features_setup/features_setup.txt +++ b/erpnext/setup/doctype/features_setup/features_setup.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:21', + 'creation': '2012-04-13 11:56:31', 'docstatus': 0, - 'modified': '2012-03-27 14:36:21', + 'modified': '2012-06-07 18:41:50', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -22,7 +22,7 @@ 'name_case': u'Title Case', 'section_style': u'Simple', 'show_in_menu': 1, - 'version': 26 + 'version': 1 }, # These values are common for all DocField @@ -104,6 +104,15 @@ 'label': u'Brands' }, + # DocField + { + 'description': u'To track items using barcode. You will be able to enter items in Delivery Note and Sales Invoice by scanning barcode of item.', + 'doctype': u'DocField', + 'fieldname': u'fs_item_barcode', + 'fieldtype': u'Check', + 'label': u'Item Barcode' + }, + # DocField { 'doctype': u'DocField', diff --git a/erpnext/startup/js/feature_setup.js b/erpnext/startup/js/feature_setup.js index f7fdb26d50..af85ebdc63 100644 --- a/erpnext/startup/js/feature_setup.js +++ b/erpnext/startup/js/feature_setup.js @@ -93,6 +93,11 @@ pscript.feature_dict = { 'Stock Entry': {'mtn_details':['serial_no']}, 'Stock Ledger Entry': {'fields':['serial_no']} }, + 'fs_item_barcode': { + 'Item': {'fields': ['barcode']}, + 'Delivery Note': {'delivery_note_details': ['barcode']}, + 'Sales Invoice': {'entries': ['barcode']} + }, 'fs_item_group_in_details': { 'Delivery Note': {'delivery_note_details':['item_group']}, 'Opportunity': {'enquiry_details':['item_group']}, diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 61ebe3f4b7..9c640f4d3c 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -122,6 +122,9 @@ class DocType(TransactionBase): if not doc.fields.get(r): doc.fields[r] = ret[r] + def get_barcode_details(self, barcode): + return get_obj('Sales Common').get_barcode_details(barcode) + # *** Re-calculates Basic Rate & amount based on Price List Selected *** def get_adj_percent(self, arg=''): diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt index c1ea5d116c..5abb70d3d6 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:29', + 'creation': '2012-04-13 11:56:35', 'docstatus': 0, - 'modified': '2012-03-27 14:36:29', + 'modified': '2012-06-07 17:57:14', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -23,7 +23,7 @@ 'section_style': u'Tray', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 56 + 'version': 1 }, # These values are common for all DocField @@ -41,6 +41,16 @@ 'name': u'Delivery Note Item' }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'barcode', + 'fieldtype': u'Data', + 'label': u'Barcode', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'doctype': u'DocField', diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 776fc5170f..f0fb5e7ecc 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -127,6 +127,12 @@ class DocType: if bom and bom[0][0]: msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name))) raise Exception + + def validate_barcode(self): + if self.doc.barcode: + duplicate = sql("select name from tabItem where barcode = %s and name != %s", (self.doc.barcode, self.doc.name)) + if duplicate: + msgprint("Barcode: %s already used in item: %s" % (self.doc.barcode, cstr(duplicate[0][0])), raise_exception = 1) def validate(self): fl = {'is_manufactured_item' :'Is Manufactured Item', @@ -139,6 +145,7 @@ class DocType: self.check_ref_rate_detail() self.fill_customer_code() self.check_item_tax() + self.validate_barcode() if not self.doc.min_order_qty: self.doc.min_order_qty = 0 self.check_non_asset_warehouse() diff --git a/erpnext/stock/doctype/item/item.txt b/erpnext/stock/doctype/item/item.txt index d23e3ca99d..8a079b815d 100644 --- a/erpnext/stock/doctype/item/item.txt +++ b/erpnext/stock/doctype/item/item.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-30 18:33:53', 'docstatus': 0, - 'modified': '2012-05-31 11:18:10', + 'modified': '2012-06-07 16:16:24', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -235,6 +235,15 @@ 'reqd': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'barcode', + 'fieldtype': u'Data', + 'label': u'Barcode', + 'permlevel': 0 + }, + # DocField { 'doctype': u'DocField', diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt index b316bd870a..1f234374cb 100755 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-13 11:56:36', 'docstatus': 0, - 'modified': '2012-05-09 14:25:12', + 'modified': '2012-06-07 18:07:12', 'modified_by': u'Administrator', 'owner': u'Administrator' }, diff --git a/public/js/all-app.js b/public/js/all-app.js index ab63b0e359..742dca85f8 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -2326,7 +2326,7 @@ $.each(new_comments,function(i,v){var msg='New Message: '+(v[1].length<=100?v[1] /* * erpnext/startup/js/feature_setup.js */ -pscript.feature_dict={'fs_projects':{'BOM':{'fields':['project_name']},'Delivery Note':{'fields':['project_name']},'Purchase Invoice':{'entries':['project_name']},'Production Order':{'fields':['project_name']},'Purchase Order':{'po_details':['project_name']},'Purchase Receipt':{'purchase_receipt_details':['project_name']},'Sales Invoice':{'fields':['project_name']},'Sales Order':{'fields':['project_name']},'Stock Entry':{'fields':['project_name']},'Timesheet':{'timesheet_details':['project_name']}},'fs_packing_details':{},'fs_discounts':{'Delivery Note':{'delivery_note_details':['adj_rate']},'Quotation':{'quotation_details':['adj_rate']},'Sales Invoice':{'entries':['adj_rate']},'Sales Order':{'sales_order_details':['adj_rate','ref_rate']}},'fs_purchase_discounts':{'Purchase Order':{'po_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Receipt':{'purchase_receipt_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Invoice':{'entries':['purchase_ref_rate','discount_rate','import_ref_rate']}},'fs_brands':{'Delivery Note':{'delivery_note_details':['brand']},'Purchase Request':{'indent_details':['brand']},'Item':{'fields':['brand']},'Purchase Order':{'po_details':['brand']},'Purchase Invoice':{'entries':['brand']},'Quotation':{'quotation_details':['brand']},'Sales Invoice':{'entries':['brand']},'Sales BOM':{'fields':['new_item_brand']},'Sales Order':{'sales_order_details':['brand']},'Serial No':{'fields':['brand']}},'fs_after_sales_installations':{'Delivery Note':{'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}},'fs_item_batch_nos':{'Delivery Note':{'delivery_note_details':['batch_no']},'Item':{'fields':['has_batch_no']},'Purchase Receipt':{'purchase_receipt_details':['batch_no']},'Quality Inspection':{'fields':['batch_no']},'Sales and Pruchase Return Wizard':{'return_details':['batch_no']},'Sales Invoice':{'entries':['batch_no']},'Stock Entry':{'mtn_details':['batch_no']},'Stock Ledger Entry':{'fields':['batch_no']}},'fs_item_serial_nos':{'Customer Issue':{'fields':['serial_no']},'Delivery Note':{'delivery_note_details':['serial_no'],'packing_details':['serial_no']},'Installation Note':{'installed_item_details':['serial_no']},'Item':{'fields':['has_serial_no']},'Maintenance Schedule':{'item_maintenance_detail':['serial_no'],'maintenance_schedule_detail':['serial_no']},'Maintenance Visit':{'maintenance_visit_details':['serial_no']},'Purchase Receipt':{'purchase_receipt_details':['serial_no']},'Quality Inspection':{'fields':['item_serial_no']},'Sales and Pruchase Return Wizard':{'return_details':['serial_no']},'Sales Invoice':{'entries':['serial_no']},'Stock Entry':{'mtn_details':['serial_no']},'Stock Ledger Entry':{'fields':['serial_no']}},'fs_item_group_in_details':{'Delivery Note':{'delivery_note_details':['item_group']},'Opportunity':{'enquiry_details':['item_group']},'Purchase Request':{'indent_details':['item_group']},'Item':{'fields':['item_group']},'Global Defaults':{'fields':['default_item_group']},'Purchase Order':{'po_details':['item_group']},'Purchase Receipt':{'purchase_receipt_details':['item_group']},'Purchase Voucher':{'entries':['item_group']},'Quotation':{'quotation_details':['item_group']},'Sales Invoice':{'entries':['item_group']},'Sales BOM':{'fields':['serial_no']},'Sales Order':{'sales_order_details':['item_group']},'Serial No':{'fields':['item_group']},'Sales Partner':{'partner_target_details':['item_group']},'Sales Person':{'target_details':['item_group']},'Territory':{'target_details':['item_group']}},'fs_page_break':{'Delivery Note':{'delivery_note_details':['page_break'],'packing_details':['page_break']},'Purchase Request':{'indent_details':['page_break']},'Purchase Order':{'po_details':['page_break']},'Purchase Receipt':{'purchase_receipt_details':['page_break']},'Purchase Voucher':{'entries':['page_break']},'Quotation':{'quotation_details':['page_break']},'Sales Invoice':{'entries':['page_break']},'Sales Order':{'sales_order_details':['page_break']}},'fs_exports':{'Delivery Note':{'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},'POS Setting':{'fields':['conversion_rate','currency']},'Quotation':{'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},'Sales Invoice':{'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},'Item':{'ref_rate_details':['ref_currency']},'Sales BOM':{'fields':['currency']},'Sales Order':{'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}},'fs_imports':{'Purchase Invoice':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate','amount','rate']},'Purchase Order':{'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate','amount','purchase_rate']},'Purchase Receipt':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},'Supplier Quotation':{'fields':['conversion_rate','currency']}},'fs_item_advanced':{'Item':{'fields':['item_customer_details']}},'fs_sales_extras':{'Address':{'fields':['sales_partner']},'Contact':{'fields':['sales_partner']},'Customer':{'fields':['sales_team']},'Delivery Note':{'fields':['sales_team','Packing List']},'Item':{'fields':['item_customer_details']},'Sales Invoice':{'fields':['sales_team']},'Sales Order':{'fields':['sales_team','Packing List']}},'fs_more_info':{'Delivery Note':{'fields':['More Info']},'Opportunity':{'fields':['More Info']},'Purchase Request':{'fields':['More Info']},'Lead':{'fields':['More Info']},'Purchase Invoice':{'fields':['More Info']},'Purchase Order':{'fields':['More Info']},'Purchase Receipt':{'fields':['More Info']},'Quotation':{'fields':['More Info']},'Sales Invoice':{'fields':['More Info']},'Sales Order':{'fields':['More Info']},},'fs_quality':{'Item':{'fields':['Item Inspection Criteria','inspection_required']},'Purchase Receipt':{'purchase_receipt_details':['qa_no']}},'fs_manufacturing':{'Item':{'fields':['Manufacturing']}},'fs_pos':{'Sales Invoice':{'fields':['is_pos']}},'fs_recurring_invoice':{'Sales Invoice':{'fields':['Recurring Invoice']}}} +pscript.feature_dict={'fs_projects':{'BOM':{'fields':['project_name']},'Delivery Note':{'fields':['project_name']},'Purchase Invoice':{'entries':['project_name']},'Production Order':{'fields':['project_name']},'Purchase Order':{'po_details':['project_name']},'Purchase Receipt':{'purchase_receipt_details':['project_name']},'Sales Invoice':{'fields':['project_name']},'Sales Order':{'fields':['project_name']},'Stock Entry':{'fields':['project_name']},'Timesheet':{'timesheet_details':['project_name']}},'fs_packing_details':{},'fs_discounts':{'Delivery Note':{'delivery_note_details':['adj_rate']},'Quotation':{'quotation_details':['adj_rate']},'Sales Invoice':{'entries':['adj_rate']},'Sales Order':{'sales_order_details':['adj_rate','ref_rate']}},'fs_purchase_discounts':{'Purchase Order':{'po_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Receipt':{'purchase_receipt_details':['purchase_ref_rate','discount_rate','import_ref_rate']},'Purchase Invoice':{'entries':['purchase_ref_rate','discount_rate','import_ref_rate']}},'fs_brands':{'Delivery Note':{'delivery_note_details':['brand']},'Purchase Request':{'indent_details':['brand']},'Item':{'fields':['brand']},'Purchase Order':{'po_details':['brand']},'Purchase Invoice':{'entries':['brand']},'Quotation':{'quotation_details':['brand']},'Sales Invoice':{'entries':['brand']},'Sales BOM':{'fields':['new_item_brand']},'Sales Order':{'sales_order_details':['brand']},'Serial No':{'fields':['brand']}},'fs_after_sales_installations':{'Delivery Note':{'fields':['installation_status','per_installed'],'delivery_note_details':['installed_qty']}},'fs_item_batch_nos':{'Delivery Note':{'delivery_note_details':['batch_no']},'Item':{'fields':['has_batch_no']},'Purchase Receipt':{'purchase_receipt_details':['batch_no']},'Quality Inspection':{'fields':['batch_no']},'Sales and Pruchase Return Wizard':{'return_details':['batch_no']},'Sales Invoice':{'entries':['batch_no']},'Stock Entry':{'mtn_details':['batch_no']},'Stock Ledger Entry':{'fields':['batch_no']}},'fs_item_serial_nos':{'Customer Issue':{'fields':['serial_no']},'Delivery Note':{'delivery_note_details':['serial_no'],'packing_details':['serial_no']},'Installation Note':{'installed_item_details':['serial_no']},'Item':{'fields':['has_serial_no']},'Maintenance Schedule':{'item_maintenance_detail':['serial_no'],'maintenance_schedule_detail':['serial_no']},'Maintenance Visit':{'maintenance_visit_details':['serial_no']},'Purchase Receipt':{'purchase_receipt_details':['serial_no']},'Quality Inspection':{'fields':['item_serial_no']},'Sales and Pruchase Return Wizard':{'return_details':['serial_no']},'Sales Invoice':{'entries':['serial_no']},'Stock Entry':{'mtn_details':['serial_no']},'Stock Ledger Entry':{'fields':['serial_no']}},'fs_item_barcode':{'Item':{'fields':['barcode']},'Delivery Note':{'delivery_note_details':['barcode']},'Sales Invoice':{'entries':['barcode']}},'fs_item_group_in_details':{'Delivery Note':{'delivery_note_details':['item_group']},'Opportunity':{'enquiry_details':['item_group']},'Purchase Request':{'indent_details':['item_group']},'Item':{'fields':['item_group']},'Global Defaults':{'fields':['default_item_group']},'Purchase Order':{'po_details':['item_group']},'Purchase Receipt':{'purchase_receipt_details':['item_group']},'Purchase Voucher':{'entries':['item_group']},'Quotation':{'quotation_details':['item_group']},'Sales Invoice':{'entries':['item_group']},'Sales BOM':{'fields':['serial_no']},'Sales Order':{'sales_order_details':['item_group']},'Serial No':{'fields':['item_group']},'Sales Partner':{'partner_target_details':['item_group']},'Sales Person':{'target_details':['item_group']},'Territory':{'target_details':['item_group']}},'fs_page_break':{'Delivery Note':{'delivery_note_details':['page_break'],'packing_details':['page_break']},'Purchase Request':{'indent_details':['page_break']},'Purchase Order':{'po_details':['page_break']},'Purchase Receipt':{'purchase_receipt_details':['page_break']},'Purchase Voucher':{'entries':['page_break']},'Quotation':{'quotation_details':['page_break']},'Sales Invoice':{'entries':['page_break']},'Sales Order':{'sales_order_details':['page_break']}},'fs_exports':{'Delivery Note':{'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},'POS Setting':{'fields':['conversion_rate','currency']},'Quotation':{'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},'Sales Invoice':{'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},'Item':{'ref_rate_details':['ref_currency']},'Sales BOM':{'fields':['currency']},'Sales Order':{'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}},'fs_imports':{'Purchase Invoice':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate','amount','rate']},'Purchase Order':{'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate','amount','purchase_rate']},'Purchase Receipt':{'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},'Supplier Quotation':{'fields':['conversion_rate','currency']}},'fs_item_advanced':{'Item':{'fields':['item_customer_details']}},'fs_sales_extras':{'Address':{'fields':['sales_partner']},'Contact':{'fields':['sales_partner']},'Customer':{'fields':['sales_team']},'Delivery Note':{'fields':['sales_team','Packing List']},'Item':{'fields':['item_customer_details']},'Sales Invoice':{'fields':['sales_team']},'Sales Order':{'fields':['sales_team','Packing List']}},'fs_more_info':{'Delivery Note':{'fields':['More Info']},'Opportunity':{'fields':['More Info']},'Purchase Request':{'fields':['More Info']},'Lead':{'fields':['More Info']},'Purchase Invoice':{'fields':['More Info']},'Purchase Order':{'fields':['More Info']},'Purchase Receipt':{'fields':['More Info']},'Quotation':{'fields':['More Info']},'Sales Invoice':{'fields':['More Info']},'Sales Order':{'fields':['More Info']},},'fs_quality':{'Item':{'fields':['Item Inspection Criteria','inspection_required']},'Purchase Receipt':{'purchase_receipt_details':['qa_no']}},'fs_manufacturing':{'Item':{'fields':['Manufacturing']}},'fs_pos':{'Sales Invoice':{'fields':['is_pos']}},'fs_recurring_invoice':{'Sales Invoice':{'fields':['Recurring Invoice']}}} $(document).bind('form_refresh',function(){for(sys_feat in sys_defaults) {if(sys_defaults[sys_feat]=='0'&&(sys_feat in pscript.feature_dict)) {if(cur_frm.doc.doctype in pscript.feature_dict[sys_feat])