diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt index 09b41dfd526..36567e3743d 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-30 12:08:36', + 'creation': '2012-05-01 17:10:24', 'docstatus': 0, - 'modified': '2012-04-30 15:59:52', + 'modified': '2012-05-04 10:05:25', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -521,11 +521,11 @@ 'doctype': u'DocField', 'fieldname': u'pay_to_recd_from', 'fieldtype': u'Data', - 'hidden': 1, + 'hidden': 0, 'label': u'Pay To / Recd From', 'no_copy': 1, 'permlevel': 0, - 'print_hide': 1, + 'print_hide': 0, 'report_hide': 1 }, diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt index f66f877272d..5ec5552fe46 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-13 11:56:18', 'docstatus': 0, - 'modified': '2012-05-02 09:57:50', + 'modified': '2012-05-04 11:56:59', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -296,19 +296,6 @@ 'search_index': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'posting_time', - 'fieldtype': u'Time', - 'label': u'Posting Time', - 'no_copy': 1, - 'oldfieldname': u'posting_time', - 'oldfieldtype': u'Time', - 'permlevel': 0, - 'print_hide': 1 - }, - # DocField { 'colour': u'White:FFF', @@ -327,6 +314,18 @@ 'search_index': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'mode_of_payment', + 'fieldtype': u'Select', + 'label': u'Mode of Payment', + 'oldfieldname': u'mode_of_payment', + 'oldfieldtype': u'Select', + 'options': u'link:Mode of Payment', + 'permlevel': 0 + }, + # DocField { 'colour': u'White:FFF', @@ -1091,6 +1090,19 @@ 'print_hide': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'posting_time', + 'fieldtype': u'Time', + 'label': u'Posting Time', + 'no_copy': 1, + 'oldfieldname': u'posting_time', + 'oldfieldtype': u'Time', + 'permlevel': 0, + 'print_hide': 1 + }, + # DocField { 'allow_on_submit': 1, @@ -1106,18 +1118,6 @@ 'print_hide': 1 }, - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'mode_of_payment', - 'fieldtype': u'Select', - 'label': u'Mode of Payment', - 'oldfieldname': u'mode_of_payment', - 'oldfieldtype': u'Select', - 'options': u'link:Mode of Payment', - 'permlevel': 0 - }, - # DocField { 'doctype': u'DocField', diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js index dd3e75082bd..53de71cb212 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.js @@ -80,14 +80,8 @@ report.get_query = function() { add_col = ''; add_tables = ''; sp_cond = ''; - if(trans == 'Sales Invoice') trans = 'Sales Invoice'; - else if(trans == 'Purchase Invoice') trans = 'Purchase Invoice'; - trans_det = trans+' Detail' - - if(trans == 'Sales Invoice') trans_det = 'Sales Invoice Item'; - else if(trans == 'Purchase Invoice') trans_det = 'Purchase Invoice Item'; - else if(trans == 'Purchase Order') trans_det = 'Purchase Order Item'; + trans_det = trans+' Item' if(order_type != '') add_code += ' AND t1.order_type = '+order_type; diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py index 278cfd6c789..4a7d0939c67 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.py @@ -39,14 +39,8 @@ project = filter_values.get('project') # ********************************************* SET DEFAULTS ************************************************** # Details Table # -------------- -if trans == 'Sales Invoice': trans = 'Sales Invoice' -elif trans == 'Purchase Invoice': trans = 'Purchase Invoice' -trans_det = trans+' Detail' - -if trans == 'Sales Invoice': trans_det = 'Sales Invoice Item' -elif trans == 'Purchase Invoice': trans_det = 'Purchase Invoice Item' -elif trans == 'Purchase Order': trans_det = 'Purchase Order Item' +trans_det = trans+' Item' col_names, query_val = get_obj('Trend Analyzer Control').get_single_year_query_value(fiscal_year, period, trans, trans_det) query_val += 'SUM(t2.qty), SUM(t2.amount)' diff --git a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt index 93a60e05c28..a1cf3e4ae16 100644 --- a/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt +++ b/erpnext/accounts/search_criteria/trend_analyzer/trend_analyzer.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-03 12:49:53', + 'creation': '2012-04-23 12:46:00', 'docstatus': 0, - 'modified': '2012-04-03 12:49:53', + 'modified': '2012-05-04 12:49:43', 'modified_by': u'Administrator', 'owner': u'saumil@webnotestech.com' }, @@ -30,4 +30,4 @@ 'doctype': 'Search Criteria', 'name': u'trend_analyzer' } -] +] \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 51c123c9365..445e93b8831 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -183,7 +183,6 @@ class DocType(TransactionBase): self.validate_reference_value() self.validate_for_items() sales_com_obj.make_packing_list(self,'delivery_note_details') - get_obj('Stock Ledger').validate_serial_no(self, 'packing_details') sales_com_obj.validate_max_discount(self, 'delivery_note_details') #verify whether rate is not greater than max discount sales_com_obj.get_allocated_sum(self) # this is to verify that the allocated % of sales persons is 100% sales_com_obj.check_conversion_rate(self) @@ -325,6 +324,7 @@ class DocType(TransactionBase): # Check for Approving Authority get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self) sl_obj = get_obj("Stock Ledger") + sl_obj.validate_serial_no(self, 'packing_details') sl_obj.validate_serial_no_warehouse(self, 'packing_details') sl_obj.update_serial_record(self, 'packing_details', is_submit = 1, is_incoming = 0) get_obj("Sales Common").update_prevdoc_detail(1,self) diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.js b/erpnext/stock/doctype/sales_bom/sales_bom.js index f7f6e4d3a49..7d857a20637 100644 --- a/erpnext/stock/doctype/sales_bom/sales_bom.js +++ b/erpnext/stock/doctype/sales_bom/sales_bom.js @@ -22,7 +22,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { } cur_frm.cscript.refresh = function(doc, cdt, cdn) { - + if(!doc.__islocal) { + hide_field('new_item_code'); + } } /* Get Item Code */ diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.py b/erpnext/stock/doctype/sales_bom/sales_bom.py index f2921646dd5..7dea6922e12 100644 --- a/erpnext/stock/doctype/sales_bom/sales_bom.py +++ b/erpnext/stock/doctype/sales_bom/sales_bom.py @@ -38,8 +38,7 @@ class DocType: self.doc, self.doclist = d,dl def autoname(self): - self.doc.name = make_autoname(self.doc.new_item_code) - + self.doc.name = self.doc.new_item_code # Get Ref Rates # -------------- @@ -67,9 +66,9 @@ class DocType: msgprint("Sales Bom Item " + d.item_code +" cannot be child item.") raise Exception # Check if is_main_item is modified once saved - if not self.doc.fields.get('__islocal') and d.is_main_item == "Yes" and cstr(d.item_code) != cstr(self.doc.new_item_code)[:-3] : - msgprint("Modifying the main item is not allowed.") - raise Exception + #if not self.doc.fields.get('__islocal') and d.is_main_item == "Yes" and cstr(d.item_code) != cstr(self.doc.new_item_code)[:-3] : + # msgprint("Modifying the main item is not allowed.") + # raise Exception if len(is_main_item) > 1: msgprint('Main item cannot be more than one.') raise Exception , " Validation Error." diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.txt b/erpnext/stock/doctype/sales_bom/sales_bom.txt index dfc2a6547db..29fcd3142fb 100644 --- a/erpnext/stock/doctype/sales_bom/sales_bom.txt +++ b/erpnext/stock/doctype/sales_bom/sales_bom.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-26 13:04:56', + 'creation': '2012-04-30 12:08:49', 'docstatus': 0, - 'modified': '2012-04-27 11:00:18', + 'modified': '2012-05-04 09:53:08', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -15,6 +15,7 @@ '_last_update': u'1322549701', 'allow_trash': 1, 'colour': u'White:FFF', + 'description': u'Aggregate item and accessories to form a Sales Item. There is no inventory of the new item but of the sub-components.', 'doctype': 'DocType', 'document_type': u'Master', 'is_submittable': 1, @@ -143,6 +144,8 @@ # DocField { + 'colour': u'White:FFF', + 'description': u'Item code of the new aggregate item.', 'doctype': u'DocField', 'fieldname': u'new_item_code', 'fieldtype': u'Data', @@ -150,12 +153,12 @@ 'no_copy': 1, 'oldfieldname': u'new_item_code', 'oldfieldtype': u'Data', - 'permlevel': 1, 'reqd': 1 }, # DocField { + 'colour': u'White:FFF', 'doctype': u'DocField', 'fieldname': u'new_item_name', 'fieldtype': u'Data', @@ -221,7 +224,8 @@ 'oldfieldname': u'stock_uom', 'oldfieldtype': u'Link', 'options': u'UOM', - 'permlevel': 0 + 'permlevel': 0, + 'reqd': 1 }, # DocField @@ -280,17 +284,7 @@ # DocField { 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'find_sales_bom', - 'fieldtype': u'Button', - 'label': u'Find Sales BOM', - 'oldfieldtype': u'Button', - 'permlevel': 0, - 'trigger': u'Client' - }, - - # DocField - { + 'description': u'List items that form a package. One of the items has to be a "main item".', 'doctype': u'DocField', 'fieldname': u'item_section', 'fieldtype': u'Section Break', @@ -310,6 +304,19 @@ 'permlevel': 0 }, + # DocField + { + 'colour': u'White:FFF', + 'description': u'Add a few items and find if there are any Sales BOM created with the same combination to help you identify duplication.', + 'doctype': u'DocField', + 'fieldname': u'find_sales_bom', + 'fieldtype': u'Button', + 'label': u'Find Sales BOM', + 'oldfieldtype': u'Button', + 'permlevel': 0, + 'trigger': u'Client' + }, + # DocField { 'doctype': u'DocField', diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 86cb099f927..e82a0d94f5b 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -47,13 +47,13 @@ class DocType: return content - def convert_into_list(self, data): + def convert_into_list(self, data, submit = 1): """Convert csv data into list""" - count = 1 + count = 2 for s in data: if s[0].strip() != 'Item Code': # remove the labels # validate - if len(s) != 4: + if (submit and len(s) != 4) or (not submit and len(s) != 6): msgprint("Data entered at Row No " + cstr(count) + " in Attachment File is not in correct format.", raise_exception=1) self.validated = 0 self.validate_item(s[0], count) @@ -66,17 +66,16 @@ class DocType: raise Exception - def get_reconciliation_data(self,submit = 0): + def get_reconciliation_data(self,submit = 1): """Read and validate csv data""" import csv data = csv.reader(self.get_csv_file_data().splitlines()) - self.convert_into_list(data) + self.convert_into_list(data, submit) def validate_item(self, item, count): """ Validate item exists and non-serialized""" - det = sql("select item_code, has_serial_no from `tabItem` \ - where name = %s", cstr(item), as_dict = 1) + det = sql("select item_code, has_serial_no from `tabItem` where name = %s", cstr(item), as_dict = 1) if not det: msgprint("Item: " + cstr(item) + " mentioned at Row No. " + cstr(count) + "does not exist in the system") self.validated = 0 @@ -199,5 +198,5 @@ class DocType: def on_cancel(self): - self.validate() + self.get_reconciliation_data(submit = 0) self.do_stock_reco(is_submit = -1) diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js index b093faab5d7..24af3e95c71 100644 --- a/erpnext/website/js/topbar.js +++ b/erpnext/website/js/topbar.js @@ -40,7 +40,7 @@ erpnext.navbar.Navbar = Class.extend({ \ \ \ \ \ diff --git a/js/all-web.js b/js/all-web.js index f90f6148bc4..24ee8f4aaf9 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -879,7 +879,7 @@ wn.provide('erpnext.navbar');erpnext.navbar.Navbar=Class.extend({init:function() \ \ \ \ \