diff --git a/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt b/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt index d12b2d21ed0..fca0efe3f47 100644 --- a/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt +++ b/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt @@ -1 +1 @@ -[{'modified_by': 'Administrator', 'name': 'Payable Voucher', 'parent': None, 'dt_label': 'Purchase Invoice', 'creation': '2010-06-10 10:44:55', 'modified': '2010-06-10 10:44:55', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Payable Voucher', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'Administrator', 'name': 'Purchase Invoice', 'parent': None, 'dt_label': 'Purchase Invoice', 'creation': '2010-06-10 10:44:55', 'modified': '2010-06-10 10:44:55', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Purchase Invoice', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt b/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt index 459e4b8f490..80aa5d1cb0e 100644 --- a/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt +++ b/erpnext/accounts/DocType Label/Receivable Voucher/Receivable Voucher.txt @@ -1 +1 @@ -[{'modified_by': 'Administrator', 'name': 'Receivable Voucher', 'parent': None, 'dt_label': 'Sales Invoice', 'creation': '2010-06-10 10:44:40', 'modified': '2010-06-10 10:44:40', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Receivable Voucher', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'Administrator', 'name': 'Sales Invoice', 'parent': None, 'dt_label': 'Sales Invoice', 'creation': '2010-06-10 10:44:40', 'modified': '2010-06-10 10:44:40', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Sales Invoice', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt similarity index 89% rename from erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt rename to erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt index 7a4544fff8c..d4b7b45c00f 100644 --- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Delivery Note-Sales Invoice/Delivery Note-Sales Invoice.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Delivery Note-Receivable Voucher +# DocType Mapper, Delivery Note-Sales Invoice [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': 'Table Mapper Detail', 'name': '__common__', - 'parent': 'Delivery Note-Receivable Voucher', + 'parent': 'Delivery Note-Sales Invoice', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': 'Field Mapper Detail', 'name': '__common__', - 'parent': 'Delivery Note-Receivable Voucher', + 'parent': 'Delivery Note-Sales Invoice', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -35,13 +35,13 @@ 'module': 'Accounts', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': 'Receivable Voucher' + 'to_doctype': 'Sales Invoice' }, - # DocType Mapper, Delivery Note-Receivable Voucher + # DocType Mapper, Delivery Note-Sales Invoice { 'doctype': u'DocType Mapper', - 'name': 'Delivery Note-Receivable Voucher' + 'name': 'Delivery Note-Sales Invoice' }, # Field Mapper Detail @@ -149,7 +149,7 @@ 'doctype': 'Table Mapper Detail', 'from_table': 'Delivery Note', 'match_id': 0, - 'to_table': 'Receivable Voucher', + 'to_table': 'Sales Invoice', 'validation_logic': 'docstatus=1' }, @@ -157,10 +157,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'delivery_note_details', - 'from_table': 'Delivery Note Detail', + 'from_table': 'Delivery Note Item', 'match_id': 1, 'to_field': 'entries', - 'to_table': 'RV Detail', + 'to_table': 'Sales Invoice Item', 'validation_logic': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' }, @@ -168,10 +168,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'other_charges', - 'from_table': 'RV Tax Detail', + 'from_table': 'Sales Taxes and Charges', 'match_id': 2, 'to_field': 'other_charges', - 'to_table': 'RV Tax Detail', + 'to_table': 'Sales Taxes and Charges', 'validation_logic': 'name is not null' }, diff --git a/erpnext/accounts/DocType Mapper/Project-Receivable Voucher/Project-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Project-Sales Invoice/Project-Sales Invoice.txt similarity index 80% rename from erpnext/accounts/DocType Mapper/Project-Receivable Voucher/Project-Receivable Voucher.txt rename to erpnext/accounts/DocType Mapper/Project-Sales Invoice/Project-Sales Invoice.txt index e88f45250fd..cdcd24df991 100644 --- a/erpnext/accounts/DocType Mapper/Project-Receivable Voucher/Project-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Project-Sales Invoice/Project-Sales Invoice.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Project-Receivable Voucher +# DocType Mapper, Project-Sales Invoice [ # These values are common in all dictionaries @@ -16,10 +16,10 @@ 'from_table': 'Project', 'match_id': 0, 'name': '__common__', - 'parent': 'Project-Receivable Voucher', + 'parent': 'Project-Sales Invoice', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper', - 'to_table': 'Receivable Voucher', + 'to_table': 'Sales Invoice', 'validation_logic': 'name is not null' }, @@ -31,7 +31,7 @@ 'map': 'Yes', 'match_id': 0, 'name': '__common__', - 'parent': 'Project-Receivable Voucher', + 'parent': 'Project-Sales Invoice', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper', 'to_field': 'customer' @@ -43,13 +43,13 @@ 'from_doctype': 'Project', 'module': 'Accounts', 'name': '__common__', - 'to_doctype': 'Receivable Voucher' + 'to_doctype': 'Sales Invoice' }, - # DocType Mapper, Project-Receivable Voucher + # DocType Mapper, Project-Sales Invoice { 'doctype': 'DocType Mapper', - 'name': 'Project-Receivable Voucher' + 'name': 'Project-Sales Invoice' }, # Field Mapper Detail diff --git a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Order-Purchase Invoice/Purchase Order-Purchase Invoice.txt similarity index 86% rename from erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt rename to erpnext/accounts/DocType Mapper/Purchase Order-Purchase Invoice/Purchase Order-Purchase Invoice.txt index 159b5bb3f7f..5949efe9e68 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Order-Payable Voucher/Purchase Order-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Order-Purchase Invoice/Purchase Order-Purchase Invoice.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Purchase Order-Payable Voucher +# DocType Mapper, Purchase Order-Purchase Invoice [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': u'Table Mapper Detail', 'name': '__common__', - 'parent': u'Purchase Order-Payable Voucher', + 'parent': u'Purchase Order-Purchase Invoice', 'parentfield': u'table_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': u'Field Mapper Detail', 'name': '__common__', - 'parent': u'Purchase Order-Payable Voucher', + 'parent': u'Purchase Order-Purchase Invoice', 'parentfield': u'field_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -35,13 +35,13 @@ 'module': u'Accounts', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': u'Payable Voucher' + 'to_doctype': u'Purchase Invoice' }, - # DocType Mapper, Purchase Order-Payable Voucher + # DocType Mapper, Purchase Order-Purchase Invoice { 'doctype': u'DocType Mapper', - 'name': u'Purchase Order-Payable Voucher' + 'name': u'Purchase Order-Purchase Invoice' }, # Field Mapper Detail @@ -130,7 +130,7 @@ 'doctype': u'Table Mapper Detail', 'from_table': u'Purchase Order', 'match_id': 0, - 'to_table': u'Payable Voucher', + 'to_table': u'Purchase Invoice', 'validation_logic': u'docstatus =1' }, @@ -138,10 +138,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'po_details', - 'from_table': u'PO Detail', + 'from_table': u'Purchase Order Item', 'match_id': 1, 'to_field': u'entries', - 'to_table': u'PV Detail', + 'to_table': u'Purchase Invoice Item', 'validation_logic': u'ifnull(billed_qty,0) < qty and docstatus = 1' }, @@ -149,10 +149,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'purchase_tax_details', - 'from_table': u'Purchase Tax Detail', + 'from_table': u'Purchase Taxes and Charges', 'match_id': 2, 'to_field': u'purchase_tax_details', - 'to_table': u'Purchase Tax Detail', + 'to_table': u'Purchase Taxes and Charges', 'validation_logic': u'docstatus =1' } ] \ No newline at end of file diff --git a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt b/erpnext/accounts/DocType Mapper/Purchase Receipt-Purchase Invoice/Purchase Receipt-Purchase Invoice.txt similarity index 87% rename from erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt rename to erpnext/accounts/DocType Mapper/Purchase Receipt-Purchase Invoice/Purchase Receipt-Purchase Invoice.txt index ffc748bd897..f620ec6d3ce 100644 --- a/erpnext/accounts/DocType Mapper/Purchase Receipt-Payable Voucher/Purchase Receipt-Payable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Purchase Receipt-Purchase Invoice/Purchase Receipt-Purchase Invoice.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Purchase Receipt-Payable Voucher +# DocType Mapper, Purchase Receipt-Purchase Invoice [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': u'Table Mapper Detail', 'name': '__common__', - 'parent': u'Purchase Receipt-Payable Voucher', + 'parent': u'Purchase Receipt-Purchase Invoice', 'parentfield': u'table_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': u'Field Mapper Detail', 'name': '__common__', - 'parent': u'Purchase Receipt-Payable Voucher', + 'parent': u'Purchase Receipt-Purchase Invoice', 'parentfield': u'field_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -35,13 +35,13 @@ 'module': u'Accounts', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': u'Payable Voucher' + 'to_doctype': u'Purchase Invoice' }, - # DocType Mapper, Purchase Receipt-Payable Voucher + # DocType Mapper, Purchase Receipt-Purchase Invoice { 'doctype': u'DocType Mapper', - 'name': u'Purchase Receipt-Payable Voucher' + 'name': u'Purchase Receipt-Purchase Invoice' }, # Field Mapper Detail @@ -156,10 +156,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'purchase_receipt_details', - 'from_table': u'Purchase Receipt Detail', + 'from_table': u'Purchase Receipt Item', 'match_id': 1, 'to_field': u'entries', - 'to_table': u'PV Detail', + 'to_table': u'Purchase Invoice Item', 'validation_logic': u'ifnull(billed_qty,0) < qty' }, @@ -168,7 +168,7 @@ 'doctype': u'Table Mapper Detail', 'from_table': u'Purchase Receipt', 'match_id': 0, - 'to_table': u'Payable Voucher', + 'to_table': u'Purchase Invoice', 'validation_logic': u'docstatus=1' }, @@ -176,10 +176,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'purchase_tax_details', - 'from_table': u'Purchase Tax Detail', + 'from_table': u'Purchase Taxes and Charges', 'match_id': 2, 'to_field': u'purchase_tax_details', - 'to_table': u'Purchase Tax Detail', + 'to_table': u'Purchase Taxes and Charges', 'validation_logic': u'docstatus=1' } ] \ No newline at end of file diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt similarity index 89% rename from erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt rename to erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt index d076d9f01d1..f31e5dabc39 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Sales Invoice/Sales Order-Sales Invoice.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Sales Order-Receivable Voucher +# DocType Mapper, Sales Order-Sales Invoice [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': u'Table Mapper Detail', 'name': '__common__', - 'parent': u'Sales Order-Receivable Voucher', + 'parent': u'Sales Order-Sales Invoice', 'parentfield': u'table_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': u'Field Mapper Detail', 'name': '__common__', - 'parent': u'Sales Order-Receivable Voucher', + 'parent': u'Sales Order-Sales Invoice', 'parentfield': u'field_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -35,13 +35,13 @@ 'module': u'Accounts', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': u'Receivable Voucher' + 'to_doctype': u'Sales Invoice' }, - # DocType Mapper, Sales Order-Receivable Voucher + # DocType Mapper, Sales Order-Sales Invoice { 'doctype': u'DocType Mapper', - 'name': u'Sales Order-Receivable Voucher' + 'name': u'Sales Order-Sales Invoice' }, # Field Mapper Detail @@ -151,7 +151,7 @@ 'doctype': u'Table Mapper Detail', 'from_table': u'Sales Order', 'match_id': 0, - 'to_table': u'Receivable Voucher', + 'to_table': u'Sales Invoice', 'validation_logic': u'docstatus=1' }, @@ -159,10 +159,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'sales_order_detail', - 'from_table': u'Sales Order Detail', + 'from_table': u'Sales Order Item', 'match_id': 1, 'to_field': u'entries', - 'to_table': u'RV Detail', + 'to_table': u'Sales Invoice Item', 'validation_logic': u'(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' }, @@ -170,10 +170,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'other_charges', - 'from_table': u'RV Tax Detail', + 'from_table': u'Sales Taxes and Charges', 'match_id': 2, 'to_field': u'other_charges', - 'to_table': u'RV Tax Detail', + 'to_table': u'Sales Taxes and Charges', 'validation_logic': u'name is not null' }, diff --git a/erpnext/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt b/erpnext/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt index fac38319799..19094776172 100644 --- a/erpnext/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt +++ b/erpnext/accounts/GL Mapper/Journal Voucher/Journal Voucher.txt @@ -1 +1 @@ -[{'doc_type': 'Journal Voucher', 'modified_by': 'nabin@webnotestech.com', 'name': 'Journal Voucher', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-04-30 17:56:41', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': "value:d.against_voucher or d.against_invoice or d.against_jv or ''", 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'debit', 'docstatus': 0, 'parent': 'Journal Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': 'is_advance', 'remarks': 'parent:remark', 'account': 'account', 'name': 'GLMDetail00001', 'idx': 1, 'against_voucher_type': "value:(d.against_voucher and 'Payable Voucher') or (d.against_invoice and 'Receivable Voucher') or (d.against_jv and 'Journal Voucher') or ''", 'modified': '2010-04-30 17:56:41', 'against': 'against_account', 'credit': 'credit', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-06-11 11:09:11', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': '', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Journal Voucher', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': '', 'remarks': 'remark', 'account': 'tax_code', 'name': 'GLMDetail00009', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-04-30 17:56:41', 'against': 'supplier_account', 'credit': 'ded_amount', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] +[{'doc_type': 'Journal Voucher', 'modified_by': 'nabin@webnotestech.com', 'name': 'Journal Voucher', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-04-30 17:56:41', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': "value:d.against_voucher or d.against_invoice or d.against_jv or ''", 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'debit', 'docstatus': 0, 'parent': 'Journal Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': 'is_advance', 'remarks': 'parent:remark', 'account': 'account', 'name': 'GLMDetail00001', 'idx': 1, 'against_voucher_type': "value:(d.against_voucher and 'Purchase Invoice') or (d.against_invoice and 'Sales Invoice') or (d.against_jv and 'Journal Voucher') or ''", 'modified': '2010-04-30 17:56:41', 'against': 'against_account', 'credit': 'credit', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-06-11 11:09:11', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': '', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Journal Voucher', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': '', 'remarks': 'remark', 'account': 'tax_code', 'name': 'GLMDetail00009', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-04-30 17:56:41', 'against': 'supplier_account', 'credit': 'ded_amount', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] diff --git a/erpnext/accounts/GL Mapper/Payable Voucher/Payable Voucher.txt b/erpnext/accounts/GL Mapper/Payable Voucher/Payable Voucher.txt index eeeea707954..7fcf1995790 100644 --- a/erpnext/accounts/GL Mapper/Payable Voucher/Payable Voucher.txt +++ b/erpnext/accounts/GL Mapper/Payable Voucher/Payable Voucher.txt @@ -1 +1 @@ -[{'doc_type': 'Payable Voucher', 'modified_by': 'nabin@webnotestech.com', 'name': 'Payable Voucher', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-05-26 16:48:58', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'amount', 'docstatus': 0, 'parent': 'Payable Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'expense_head', 'name': 'GLMDetail00002', 'idx': 1, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'parent:credit_to', 'credit': 'value:0', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': 'purchase_tax_details', 'transaction_date': 'parent:voucher_date', 'debit': "value:d.fields.get('category') != 'For Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", 'docstatus': 0, 'parent': 'Payable Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'account_head', 'name': 'GLMDetail00003', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'parent:credit_to', 'credit': "value:d.fields.get('category') != 'For Valuation' and d.fields.get('add_deduct_tax') == 'Deduct' and d.fields.get('tax_amount') or 0", 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Payable Voucher', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'tax_code', 'name': 'GLMDetail00004', 'idx': 3, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'credit_to', 'credit': 'ded_amount', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': 'name', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Payable Voucher', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'credit_to', 'name': 'GLMDetail00005', 'idx': 4, 'against_voucher_type': "value:'Payable Voucher'", 'modified': '2010-05-26 16:48:58', 'against': 'against_expense_account', 'credit': 'total_amount_to_pay', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] \ No newline at end of file +[{'doc_type': 'Purchase Invoice', 'modified_by': 'nabin@webnotestech.com', 'name': 'Purchase Invoice', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-05-26 16:48:58', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'amount', 'docstatus': 0, 'parent': 'Purchase Invoice', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'expense_head', 'name': 'GLMDetail00002', 'idx': 1, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'parent:credit_to', 'credit': 'value:0', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': 'purchase_tax_details', 'transaction_date': 'parent:voucher_date', 'debit': "value:d.fields.get('category') != 'For Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", 'docstatus': 0, 'parent': 'Purchase Invoice', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'account_head', 'name': 'GLMDetail00003', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'parent:credit_to', 'credit': "value:d.fields.get('category') != 'For Valuation' and d.fields.get('add_deduct_tax') == 'Deduct' and d.fields.get('tax_amount') or 0", 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': None, 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Purchase Invoice', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'tax_code', 'name': 'GLMDetail00004', 'idx': 3, 'against_voucher_type': None, 'modified': '2010-05-26 16:48:58', 'against': 'credit_to', 'credit': 'ded_amount', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'nabin@webnotestech.com', 'against_voucher': 'name', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Purchase Invoice', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'credit_to', 'name': 'GLMDetail00005', 'idx': 4, 'against_voucher_type': "value:'Purchase Invoice'", 'modified': '2010-05-26 16:48:58', 'against': 'against_expense_account', 'credit': 'total_amount_to_pay', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] \ No newline at end of file diff --git a/erpnext/accounts/GL Mapper/Receivable Voucher/Receivable Voucher.txt b/erpnext/accounts/GL Mapper/Receivable Voucher/Receivable Voucher.txt index 72d01750ca3..4a4df3c7e56 100644 --- a/erpnext/accounts/GL Mapper/Receivable Voucher/Receivable Voucher.txt +++ b/erpnext/accounts/GL Mapper/Receivable Voucher/Receivable Voucher.txt @@ -1 +1 @@ -[{'doc_type': 'Receivable Voucher', 'modified_by': 'Administrator', 'name': 'Receivable Voucher', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-05-17 08:59:14', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'Administrator', 'against_voucher': None, 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Receivable Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'income_account', 'name': 'GLMDetail00006', 'idx': 1, 'against_voucher_type': None, 'modified': '2010-05-17 08:59:14', 'against': 'parent:debit_to', 'credit': 'amount', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center_other_charges', 'voucher_no': 'parent:name', 'modified_by': 'Administrator', 'against_voucher': None, 'table_field': 'other_charges', 'transaction_date': 'parent:voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Receivable Voucher', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'account_head', 'name': 'GLMDetail00007', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-05-17 08:59:14', 'against': 'parent:debit_to', 'credit': 'tax_amount', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'Administrator', 'against_voucher': 'name', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'grand_total', 'docstatus': 0, 'parent': 'Receivable Voucher', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'debit_to', 'name': 'GLMDetail00008', 'idx': 3, 'against_voucher_type': "value:'Receivable Voucher'", 'modified': '2010-05-17 08:59:14', 'against': 'against_income_account', 'credit': 'value:0', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] \ No newline at end of file +[{'doc_type': 'Sales Invoice', 'modified_by': 'Administrator', 'name': 'Sales Invoice', 'parent': None, 'creation': '2009-03-12 12:09:24', 'modified': '2010-05-17 08:59:14', 'module': 'Accounts', 'doctype': 'GL Mapper', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'parentfield': None}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center', 'voucher_no': 'parent:name', 'modified_by': 'Administrator', 'against_voucher': None, 'table_field': 'entries', 'transaction_date': 'parent:voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Sales Invoice', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'income_account', 'name': 'GLMDetail00006', 'idx': 1, 'against_voucher_type': None, 'modified': '2010-05-17 08:59:14', 'against': 'parent:debit_to', 'credit': 'amount', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'parent:doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': 'cost_center_other_charges', 'voucher_no': 'parent:name', 'modified_by': 'Administrator', 'against_voucher': None, 'table_field': 'other_charges', 'transaction_date': 'parent:voucher_date', 'debit': 'value:0', 'docstatus': 0, 'parent': 'Sales Invoice', 'company': 'parent:company', 'aging_date': 'parent:aging_date', 'fiscal_year': 'parent:fiscal_year', 'is_advance': None, 'remarks': 'parent:remarks', 'account': 'account_head', 'name': 'GLMDetail00007', 'idx': 2, 'against_voucher_type': None, 'modified': '2010-05-17 08:59:14', 'against': 'parent:debit_to', 'credit': 'tax_amount', 'parenttype': 'GL Mapper', 'is_opening': 'parent:is_opening', 'posting_date': 'parent:posting_date', 'parentfield': 'fields'}, {'creation': '2009-03-12 12:09:24', 'voucher_type': 'doctype', 'doctype': 'GL Mapper Detail', 'owner': 'Administrator', 'cost_center': '', 'voucher_no': 'name', 'modified_by': 'Administrator', 'against_voucher': 'name', 'table_field': '', 'transaction_date': 'voucher_date', 'debit': 'grand_total', 'docstatus': 0, 'parent': 'Sales Invoice', 'company': 'company', 'aging_date': 'aging_date', 'fiscal_year': 'fiscal_year', 'is_advance': None, 'remarks': 'remarks', 'account': 'debit_to', 'name': 'GLMDetail00008', 'idx': 3, 'against_voucher_type': "value:'Sales Invoice'", 'modified': '2010-05-17 08:59:14', 'against': 'against_income_account', 'credit': 'value:0', 'parenttype': 'GL Mapper', 'is_opening': 'is_opening', 'posting_date': 'posting_date', 'parentfield': 'fields'}] \ No newline at end of file diff --git a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt index 8664b3882ba..82eeaf08247 100644 --- a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt +++ b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt @@ -12,9 +12,9 @@ # These values are common for all Print Format { - 'doc_type': u'Receivable Voucher', + 'doc_type': u'Sales Invoice', 'doctype': 'Print Format', - 'html': u'\n\n\n\n\n\n\n\n\n\n \n \n\n\n \n\n
NO: DATE:
M/s
\n\n
\n\n
\n\n

\n\n \n \n \n \n
For
 
Signatory
\n\n\n', + 'html': u'\n\n\n\n\n\n\n\n\n\n \n \n\n\n \n\n
NO: DATE:
M/s
\n\n
\n\n
\n\n

\n\n \n \n \n \n
For
 
Signatory
\n\n\n', 'module': u'Accounts', 'name': '__common__', 'standard': u'Yes' diff --git a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt index 510e92206f5..82386007971 100644 --- a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt +++ b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt @@ -12,9 +12,9 @@ # These values are common for all Print Format { - 'doc_type': u'Receivable Voucher', + 'doc_type': u'Sales Invoice', 'doctype': 'Print Format', - 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': u'Accounts', 'name': '__common__', 'standard': u'Yes' diff --git a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt index 3c44fc7eca6..7d58d657c9e 100644 --- a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt +++ b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt @@ -12,9 +12,9 @@ # These values are common for all Print Format { - 'doc_type': u'Receivable Voucher', + 'doc_type': u'Sales Invoice', 'doctype': 'Print Format', - 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice No.
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice No.
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': u'Accounts', 'name': '__common__', 'standard': u'Yes' diff --git a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt index b91f5cd9a6c..354e65f6a79 100644 --- a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt +++ b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt @@ -12,9 +12,9 @@ # These values are common for all Print Format { - 'doc_type': u'Receivable Voucher', + 'doc_type': u'Sales Invoice', 'doctype': 'Print Format', - 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': u'\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Invoice Date
Due Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': u'Accounts', 'name': '__common__', 'standard': u'Yes' diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py index 9df72409659..69340039575 100644 --- a/erpnext/accounts/__init__.py +++ b/erpnext/accounts/__init__.py @@ -72,9 +72,9 @@ def get_invoice_details(doc, children, fiscal_year): }, { ... }, ...] """ if doc.get('return_type')=='Sales Return': - obj = get_obj('Receivable Voucher', doc.get('sales_invoice_no'), with_children=1) + obj = get_obj('Sales Invoice', doc.get('sales_invoice_no'), with_children=1) else: - obj = get_obj('Payable Voucher', doc.get('purchase_invoice_no'), with_children=1) + obj = get_obj('Purchase Invoice', doc.get('purchase_invoice_no'), with_children=1) if not obj.doc.docstatus==1: return # Build invoice account jv detail record @@ -205,14 +205,14 @@ def get_delivery_note_details(doc, children, fiscal_year): dn_obj = get_obj('Delivery Note', doc['delivery_note_no'], with_children=1) - inv_list = get_inv_list('tabRV Detail', 'delivery_note', doc['delivery_note_no']) + inv_list = get_inv_list('tabSales Invoice Item', 'delivery_note', doc['delivery_note_no']) if inv_list: jv_details_list = get_jv_details_from_inv_list(doc, children, fiscal_year, inv_list, jv_details_list) if not (inv_list and jv_details_list): so_list = get_prev_doc_list(dn_obj, 'Sales Order') - inv_list = get_inv_list('tabRV Detail', 'sales_order', so_list) + inv_list = get_inv_list('tabSales Invoice Item', 'sales_order', so_list) if inv_list: jv_details_list = get_jv_details_from_inv_list(doc, children, fiscal_year, inv_list, jv_details_list) @@ -228,14 +228,14 @@ def get_purchase_receipt_details(doc, children, fiscal_year): pr_obj = get_obj('Purchase Receipt', doc['purchase_receipt_no'], with_children=1) - inv_list = get_inv_list('tabPV Detail', 'purchase_receipt', doc['purchase_receipt_no']) + inv_list = get_inv_list('tabPurchase Invoice Item', 'purchase_receipt', doc['purchase_receipt_no']) if inv_list: jv_details_list = get_jv_details_from_inv_list(doc, children, fiscal_year, inv_list, jv_details_list) if not (inv_list and jv_details_list): po_list = get_prev_doc_list(pr_obj, 'Purchase Order') - inv_list = get_inv_list('tabPV Detail', 'purchase_order', po_list) + inv_list = get_inv_list('tabPurchase Invoice Item', 'purchase_order', po_list) if inv_list: jv_details_list = get_jv_details_from_inv_list(doc, children, fiscal_year, inv_list, jv_details_list) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index e3c19776a79..f11ec0cf19a 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -223,7 +223,7 @@ class DocType: # ================================================================== def get_authorized_user(self): # Check logged-in user is authorized - if get_value('Manage Account', None, 'credit_controller') in webnotes.user.get_roles(): + if get_value('Global Defaults', None, 'credit_controller') in webnotes.user.get_roles(): return 1 # Check Credit limit for customer diff --git a/erpnext/accounts/doctype/c_form/c_form.js b/erpnext/accounts/doctype/c_form/c_form.js index 82adf2946dc..4fb32275e91 100644 --- a/erpnext/accounts/doctype/c_form/c_form.js +++ b/erpnext/accounts/doctype/c_form/c_form.js @@ -17,7 +17,7 @@ //c-form js file // ----------------------------- cur_frm.fields_dict.invoice_details.grid.get_field("invoice_no").get_query = function(doc) { - return 'SELECT `tabReceivable Voucher`.`name` FROM `tabReceivable Voucher` WHERE `tabReceivable Voucher`.`company` = "' +doc.company+'" AND `tabReceivable Voucher`.%(key)s LIKE "%s" AND `tabReceivable Voucher`.`customer` = "' + doc.customer + '" AND `tabReceivable Voucher`.`docstatus` = 1 and `tabReceivable Voucher`.`c_form_applicable` = "Yes" and ifnull(`tabReceivable Voucher`.c_form_no, "") = "" ORDER BY `tabReceivable Voucher`.`name` ASC LIMIT 50'; + return 'SELECT `tabSales Invoice`.`name` FROM `tabSales Invoice` WHERE `tabSales Invoice`.`company` = "' +doc.company+'" AND `tabSales Invoice`.%(key)s LIKE "%s" AND `tabSales Invoice`.`customer` = "' + doc.customer + '" AND `tabSales Invoice`.`docstatus` = 1 and `tabSales Invoice`.`c_form_applicable` = "Yes" and ifnull(`tabSales Invoice`.c_form_no, "") = "" ORDER BY `tabSales Invoice`.`name` ASC LIMIT 50'; } cur_frm.cscript.invoice_no = function(doc, cdt, cdn) { diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py index 367b27aca63..943cef291af 100644 --- a/erpnext/accounts/doctype/c_form/c_form.py +++ b/erpnext/accounts/doctype/c_form/c_form.py @@ -39,9 +39,9 @@ class DocType: if len(getlist(self.doclist, 'invoice_details')): inv = "'" + "', '".join([d.invoice_no for d in getlist(self.doclist, 'invoice_details')]) + "'" - sql("""update `tabReceivable Voucher` set c_form_no = '%s', modified ='%s' + sql("""update `tabSales Invoice` set c_form_no = '%s', modified ='%s' where name in (%s)"""%(self.doc.name, self.doc.modified, inv)) - sql("""update `tabReceivable Voucher` set c_form_no = '', modified = %s where name not + sql("""update `tabSales Invoice` set c_form_no = '', modified = %s where name not in (%s) and ifnull(c_form_no, '') = %s""", (self.doc.modified, self.doc.name, inv)) else: msgprint("Please enter atleast 1 invoice in the table below", raise_exception=1) @@ -51,7 +51,7 @@ class DocType: """ Pull details from invoices for referrence """ inv = sql("""select posting_date, territory, net_total, grand_total from - `tabReceivable Voucher` where name = %s""", invoice_no) + `tabSales Invoice` where name = %s""", invoice_no) ret = { 'invoice_date' : inv and getdate(inv[0][0]).strftime('%Y-%m-%d') or '', 'territory' : inv and inv[0][1] or '', @@ -67,7 +67,7 @@ class DocType: for d in getlist(self.doclist, 'invoice_details'): inv = sql("""select c_form_applicable, c_form_no from - `tabReceivable Voucher` where name = %s""", invoice_no) + `tabSales Invoice` where name = %s""", invoice_no) if not inv: msgprint("Invoice: %s is not exists in the system, please check." % d.invoice_no, raise_exception=1) elif inv[0][0] != 'Yes': diff --git a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt index db53ef7b5fd..367d8c12c06 100644 --- a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt +++ b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.txt @@ -43,7 +43,7 @@ 'fieldname': u'invoice_no', 'fieldtype': u'Link', 'label': u'Invoice No', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 0, 'width': u'160px' }, diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index 84a1c05ff56..f894fae68a5 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -178,8 +178,8 @@ class DocType: # ==================================================================================== def clear_outstanding(self): # clear o/s of current year - sql("update `tabPayable Voucher` set outstanding_amount = 0 where fiscal_year=%s and company=%s", (self.doc.name, self.doc.company)) - sql("update `tabReceivable Voucher` set outstanding_amount = 0 where fiscal_year=%s and company=%s", (self.doc.name, self.doc.company)) + sql("update `tabPurchase Invoice` set outstanding_amount = 0 where fiscal_year=%s and company=%s", (self.doc.name, self.doc.company)) + sql("update `tabSales Invoice` set outstanding_amount = 0 where fiscal_year=%s and company=%s", (self.doc.name, self.doc.company)) # Update Voucher Outstanding def update_voucher_outstanding(self): @@ -190,7 +190,7 @@ class DocType: # get voucher balance bal = sql("select sum(debit)-sum(credit) from `tabGL Entry` where against_voucher=%s and against_voucher_type=%s and ifnull(is_cancelled, 'No') = 'No'", (d[0], d[1])) bal = bal and flt(bal[0][0]) or 0.0 - if d[1] == 'Payable Voucher': + if d[1] == 'Purchase Invoice': bal = -bal # set voucher balance sql("update `tab%s` set outstanding_amount=%s where name='%s'"% (d[1], bal, d[0])) diff --git a/erpnext/accounts/doctype/form_16a/form_16a.txt b/erpnext/accounts/doctype/form_16a/form_16a.txt index 62e239cf709..41a8a04cf38 100644 --- a/erpnext/accounts/doctype/form_16a/form_16a.txt +++ b/erpnext/accounts/doctype/form_16a/form_16a.txt @@ -279,7 +279,7 @@ 'doctype': u'DocField', 'fieldname': u'return_details', 'fieldtype': u'Section Break', - 'label': u'Return Details', + 'label': u'Sales and Purchase Return Items', 'oldfieldtype': u'Section Break', 'permlevel': 0 }, diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py index fa984412582..2ff5a1fa43e 100644 --- a/erpnext/accounts/doctype/gl_control/gl_control.py +++ b/erpnext/accounts/doctype/gl_control/gl_control.py @@ -297,7 +297,7 @@ class DocType: add.remarks = d[1] add.advance_amount = flt(d[2]) add.allocate_amount = 0 - if table_name == 'Advance Allocation Detail': + if table_name == 'Purchase Invoice Advance': add.tds_amount = flt(d[4]) # Clear rows which is not adjusted @@ -319,7 +319,7 @@ class DocType: get_obj(dt='GL Control').make_gl_entries(jv_obj.doc, jv_obj.doclist, cancel =1, adv_adj =1) # update ref in JV Detail - webnotes.conn.sql("update `tabJournal Voucher Detail` set %s = '%s' where name = '%s'" % (doctype=='Payable Voucher' and 'against_voucher' or 'against_invoice', cstr(against_document_no), d.jv_detail_no)) + webnotes.conn.sql("update `tabJournal Voucher Detail` set %s = '%s' where name = '%s'" % (doctype=='Purchase Invoice' and 'against_voucher' or 'against_invoice', cstr(against_document_no), d.jv_detail_no)) # re-submit JV jv_obj = get_obj('Journal Voucher', d.journal_voucher, with_children =1) @@ -351,7 +351,7 @@ class DocType: balance = flt(advance) - flt(allocate) # update old entry - webnotes.conn.sql("update `tabJournal Voucher Detail` set %s = '%s', %s = '%s' where name = '%s'" % (dr_or_cr, flt(allocate), doctype == "Payable Voucher" and 'against_voucher' or 'against_invoice',cstr(against_document_no), jv_detail_no)) + webnotes.conn.sql("update `tabJournal Voucher Detail` set %s = '%s', %s = '%s' where name = '%s'" % (dr_or_cr, flt(allocate), doctype == "Purchase Invoice" and 'against_voucher' or 'against_invoice',cstr(against_document_no), jv_detail_no)) # new entry with balance amount add = addchild(jv_obj.doc, 'entries', 'Journal Voucher Detail', 1, jv_obj.doclist) @@ -390,8 +390,8 @@ class DocType: against_fld = { 'Journal Voucher' : 'against_jv', - 'Receivable Voucher' : 'against_invoice', - 'Payable Voucher' : 'against_voucher' + 'Sales Invoice' : 'against_invoice', + 'Purchase Invoice' : 'against_voucher' } d['against_fld'] = against_fld[d['against_voucher_type']] @@ -462,7 +462,7 @@ class DocType: # Get Balance from GL Entries bal = webnotes.conn.sql("select sum(debit)-sum(credit) from `tabGL Entry` where against_voucher=%s and against_voucher_type=%s", (voucher_obj.doc.name , voucher_obj.doc.doctype)) bal = bal and flt(bal[0][0]) or 0.0 - if cstr(voucher_obj.doc.doctype) == 'Payable Voucher': + if cstr(voucher_obj.doc.doctype) == 'Purchase Invoice': bal = -bal # Check outstanding Amount @@ -520,11 +520,11 @@ def manage_recurring_invoices(): Create recurring invoices on specific date by copying the original one and notify the concerned people """ - rv = webnotes.conn.sql("""select name, recurring_id from `tabReceivable Voucher` where ifnull(convert_into_recurring_invoice, 0) = 1 + rv = webnotes.conn.sql("""select name, recurring_id from `tabSales Invoice` where ifnull(convert_into_recurring_invoice, 0) = 1 and next_date = %s and next_date <= end_date and docstatus=1 order by next_date desc""", nowdate()) for d in rv: - if not webnotes.conn.sql("""select name from `tabReceivable Voucher` where posting_date = %s and recurring_id = %s and docstatus=1""", (nowdate(), d[1])): - prev_rv = get_obj('Receivable Voucher', d[0], with_children=1) + if not webnotes.conn.sql("""select name from `tabSales Invoice` where posting_date = %s and recurring_id = %s and docstatus=1""", (nowdate(), d[1])): + prev_rv = get_obj('Sales Invoice', d[0], with_children=1) new_rv = create_new_invoice(prev_rv) send_notification(new_rv) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 49b0593cd60..11ab2c22277 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -114,9 +114,9 @@ class DocType: #---------------------------------------------------------------------------------------------- def check_freezing_date(self, adv_adj): if not adv_adj: - acc_frozen_upto = get_value('Manage Account', None, 'acc_frozen_upto') + acc_frozen_upto = get_value('Global Defaults', None, 'acc_frozen_upto') if acc_frozen_upto: - bde_auth_role = get_value( 'Manage Account', None,'bde_auth_role') + bde_auth_role = get_value( 'Global Defaults', None,'bde_auth_role') if getdate(self.doc.posting_date) <= getdate(acc_frozen_upto) and not bde_auth_role in webnotes.user.get_roles(): msgprint("You are not authorized to do/modify back dated accounting entries before %s." % getdate(acc_frozen_upto).strftime('%d-%m-%Y'), raise_exception=1) @@ -234,12 +234,12 @@ class DocType: bal = flt(sql("select sum(debit)-sum(credit) from `tabGL Entry` where against_voucher=%s and against_voucher_type=%s and ifnull(is_cancelled,'No') = 'No'", (self.doc.against_voucher, self.doc.against_voucher_type))[0][0] or 0.0) tds = 0 - if self.doc.against_voucher_type=='Payable Voucher': + if self.doc.against_voucher_type=='Purchase Invoice': # amount to debit bal = -bal # Check if tds applicable - tds = sql("select total_tds_on_voucher from `tabPayable Voucher` where name = '%s'" % self.doc.against_voucher) + tds = sql("select total_tds_on_voucher from `tabPurchase Invoice` where name = '%s'" % self.doc.against_voucher) tds = tds and flt(tds[0][0]) or 0 # Validation : Outstanding can not be negative @@ -257,7 +257,7 @@ class DocType: #check for user role Freezed master_type=sql("select master_type, master_name from `tabAccount` where name='%s' " %self.doc.account) tot_outstanding = 0 #needed when there is no GL Entry in the system for that acc head - if (self.doc.voucher_type=='Journal Voucher' or self.doc.voucher_type=='Receivable Voucher') and (master_type and master_type[0][0]=='Customer' and master_type[0][1]): + if (self.doc.voucher_type=='Journal Voucher' or self.doc.voucher_type=='Sales Invoice') and (master_type and master_type[0][0]=='Customer' and master_type[0][1]): dbcr = sql("select sum(debit),sum(credit) from `tabGL Entry` where account = '%s' and is_cancelled='No'" % self.doc.account) if dbcr: tot_outstanding = flt(dbcr[0][0])-flt(dbcr[0][1])+flt(self.doc.debit)-flt(self.doc.credit) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.txt b/erpnext/accounts/doctype/gl_entry/gl_entry.txt index 76d7fdbb85b..0888a9508c3 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.txt +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.txt @@ -207,7 +207,7 @@ 'label': u'Voucher Type', 'oldfieldname': u'voucher_type', 'oldfieldtype': u'Select', - 'options': u'Journal Voucher\nReceivable Voucher\nPayable Voucher', + 'options': u'Journal Voucher\nSales Invoice\nPurchase Invoice', 'search_index': 0 }, diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js index 771f026efe4..ca3205c76ff 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js @@ -69,12 +69,12 @@ cur_frm.fields_dict["entries"].grid.get_field("cost_center").get_query = functio // --------------------------------- cur_frm.fields_dict['entries'].grid.get_field('against_voucher').get_query = function(doc) { var d = locals[this.doctype][this.docname]; - return "SELECT `tabPayable Voucher`.name, `tabPayable Voucher`.credit_to, `tabPayable Voucher`.outstanding_amount,`tabPayable Voucher`.bill_no, `tabPayable Voucher`.bill_date FROM `tabPayable Voucher` WHERE `tabPayable Voucher`.credit_to='"+d.account+"' AND `tabPayable Voucher`.outstanding_amount > 0 AND `tabPayable Voucher`.docstatus = 1 AND `tabPayable Voucher`.%(key)s LIKE '%s' ORDER BY `tabPayable Voucher`.name DESC LIMIT 200"; + return "SELECT `tabPurchase Invoice`.name, `tabPurchase Invoice`.credit_to, `tabPurchase Invoice`.outstanding_amount,`tabPurchase Invoice`.bill_no, `tabPurchase Invoice`.bill_date FROM `tabPurchase Invoice` WHERE `tabPurchase Invoice`.credit_to='"+d.account+"' AND `tabPurchase Invoice`.outstanding_amount > 0 AND `tabPurchase Invoice`.docstatus = 1 AND `tabPurchase Invoice`.%(key)s LIKE '%s' ORDER BY `tabPurchase Invoice`.name DESC LIMIT 200"; } cur_frm.fields_dict['entries'].grid.get_field('against_invoice').get_query = function(doc) { var d = locals[this.doctype][this.docname]; - return "SELECT `tabReceivable Voucher`.name, `tabReceivable Voucher`.debit_to, `tabReceivable Voucher`.outstanding_amount FROM `tabReceivable Voucher` WHERE `tabReceivable Voucher`.debit_to='"+d.account+"' AND `tabReceivable Voucher`.outstanding_amount > 0 AND `tabReceivable Voucher`.docstatus = 1 AND `tabReceivable Voucher`.%(key)s LIKE '%s' ORDER BY `tabReceivable Voucher`.name DESC LIMIT 200"; + return "SELECT `tabSales Invoice`.name, `tabSales Invoice`.debit_to, `tabSales Invoice`.outstanding_amount FROM `tabSales Invoice` WHERE `tabSales Invoice`.debit_to='"+d.account+"' AND `tabSales Invoice`.outstanding_amount > 0 AND `tabSales Invoice`.docstatus = 1 AND `tabSales Invoice`.%(key)s LIKE '%s' ORDER BY `tabSales Invoice`.name DESC LIMIT 200"; } // TDS Account Head @@ -92,13 +92,13 @@ cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){ } } -// Get Outstanding of Payable & Receivable Voucher +// Get Outstanding of Payable & Sales Invoice // ----------------------------------------------- cur_frm.cscript.against_voucher = function(doc,cdt,cdn) { var d = locals[cdt][cdn]; if (d.against_voucher && !flt(d.debit)) { - args = {'doctype': 'Payable Voucher', 'docname': d.against_voucher } + args = {'doctype': 'Purchase Invoice', 'docname': d.against_voucher } get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); }); } } @@ -106,7 +106,7 @@ cur_frm.cscript.against_voucher = function(doc,cdt,cdn) { cur_frm.cscript.against_invoice = function(doc,cdt,cdn) { var d = locals[cdt][cdn]; if (d.against_invoice && !flt(d.credit)) { - args = {'doctype': 'Receivable Voucher', 'docname': d.against_invoice } + args = {'doctype': 'Sales Invoice', 'docname': d.against_invoice } get_server_fields('get_outstanding',docstring(args),'entries',doc,cdt,cdn,1,function(r,rt) { cur_frm.cscript.update_totals(doc); }); } } @@ -164,7 +164,7 @@ cur_frm.cscript['Get TDS'] = function(doc, dt, dn) { }); } -// ***************** Get Print Heading based on Receivable Voucher ***************** +// ***************** Get Print Heading based on Sales Invoice ***************** cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn) { return 'SELECT `tabPrint Heading`.name FROM `tabPrint Heading` WHERE `tabPrint Heading`.docstatus !=2 AND `tabPrint Heading`.name LIKE "%s" ORDER BY `tabPrint Heading`.name ASC LIMIT 50'; } diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py index a5b2abf3e6f..02f48416616 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py @@ -53,9 +53,9 @@ class DocType: def get_outstanding(self, args): args = eval(args) o_s = sql("select outstanding_amount from `tab%s` where name = '%s'" % (args['doctype'],args['docname'])) - if args['doctype'] == 'Payable Voucher': + if args['doctype'] == 'Purchase Invoice': return {'debit': o_s and flt(o_s[0][0]) or 0} - if args['doctype'] == 'Receivable Voucher': + if args['doctype'] == 'Sales Invoice': return {'credit': o_s and flt(o_s[0][0]) or 0} #-------------------------------------------------------------------------------------------------------- @@ -72,11 +72,11 @@ class DocType: for d in getlist(self.doclist, 'entries'): if d.against_invoice and d.credit: - currency = sql("select currency from `tabReceivable Voucher` where name = '%s'" % d.against_invoice) + currency = sql("select currency from `tabSales Invoice` where name = '%s'" % d.against_invoice) currency = currency and currency[0][0] or '' r.append('%s %s against Invoice: %s' % (cstr(currency), fmt_money(flt(d.credit)), d.against_invoice)) if d.against_voucher and d.debit: - bill_no = sql("select bill_no, bill_date, currency from `tabPayable Voucher` where name=%s", d.against_voucher) + bill_no = sql("select bill_no, bill_date, currency from `tabPurchase Invoice` where name=%s", d.against_voucher) if bill_no and bill_no[0][0] and bill_no[0][0].lower().strip() not in ['na', 'not applicable', 'none']: bill_no = bill_no and bill_no[0] r.append('%s %s against Bill %s dated %s' % (bill_no[2] and cstr(bill_no[2]) or '', fmt_money(flt(d.debit)), bill_no[0], bill_no[1] and formatdate(bill_no[1].strftime('%Y-%m-%d')) or '')) @@ -97,7 +97,7 @@ class DocType: self.is_approving_authority = 0 # Fetch credit controller role - approving_authority = sql("select value from `tabSingles` where field='credit_controller' and doctype='Manage Account'") + approving_authority = sql("select value from `tabSingles` where field='credit_controller' and doctype='Global Defaults'") approving_authority = approving_authority and approving_authority[0][0] or '' # Check logged-in user is authorized @@ -155,13 +155,13 @@ class DocType: def check_account_against_entries(self): for d in getlist(self.doclist,'entries'): if d.against_invoice: - acc=sql("select debit_to from `tabReceivable Voucher` where name='%s'"%d.against_invoice) + acc=sql("select debit_to from `tabSales Invoice` where name='%s'"%d.against_invoice) if acc and acc[0][0] != d.account: msgprint("Debit account is not matching with receivable voucher") raise Exception if d.against_voucher: - acc=sql("select credit_to from `tabPayable Voucher` where name='%s'"%d.against_voucher) + acc=sql("select credit_to from `tabPurchase Invoice` where name='%s'"%d.against_voucher) if acc and acc[0][0] != d.account: msgprint("Credit account is not matching with payable voucher") raise Exception @@ -369,9 +369,9 @@ class DocType: def get_values(self): cond = (flt(self.doc.write_off_amount) > 0) and ' and outstanding_amount <= '+self.doc.write_off_amount or '' if self.doc.write_off_based_on == 'Accounts Receivable': - return sql("select name, debit_to, outstanding_amount from `tabReceivable Voucher` where docstatus = 1 and company = '%s' and outstanding_amount > 0 %s" % (self.doc.company, cond)) + return sql("select name, debit_to, outstanding_amount from `tabSales Invoice` where docstatus = 1 and company = '%s' and outstanding_amount > 0 %s" % (self.doc.company, cond)) elif self.doc.write_off_based_on == 'Accounts Payable': - return sql("select name, credit_to, outstanding_amount from `tabPayable Voucher` where docstatus = 1 and company = '%s' and outstanding_amount > 0 %s" % (self.doc.company, cond)) + return sql("select name, credit_to, outstanding_amount from `tabPurchase Invoice` where docstatus = 1 and company = '%s' and outstanding_amount > 0 %s" % (self.doc.company, cond)) # ------------------------- diff --git a/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt b/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt index 8360d131ab1..c7b6d1a4ca0 100644 --- a/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt +++ b/erpnext/accounts/doctype/journal_voucher_detail/journal_voucher_detail.txt @@ -118,7 +118,7 @@ 'no_copy': 1, 'oldfieldname': u'against_voucher', 'oldfieldtype': u'Link', - 'options': u'Payable Voucher', + 'options': u'Purchase Invoice', 'permlevel': 0, 'search_index': 1, 'trigger': u'Client' @@ -134,7 +134,7 @@ 'no_copy': 1, 'oldfieldname': u'against_invoice', 'oldfieldtype': u'Link', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 0, 'search_index': 1, 'trigger': u'Client' diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js index 145352886f3..c728003b560 100644 --- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js +++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js @@ -90,5 +90,5 @@ cur_frm.add_fetch('invoice','grand_total','invoice_amount'); cur_frm.fields_dict.invoice.get_query=function(doc){ - return "SELECT tv.name FROM `tabReceivable Voucher` tv WHERE debit_to='"+doc.account+"' and tv.%(key)s like '%s' ORDER BY tv.name LIMIT 50" + return "SELECT tv.name FROM `tabSales Invoice` tv WHERE debit_to='"+doc.account+"' and tv.%(key)s like '%s' ORDER BY tv.name LIMIT 50" } diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.txt b/erpnext/accounts/doctype/lease_agreement/lease_agreement.txt index e2d06cc92f9..c4f3e12cb66 100644 --- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.txt +++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.txt @@ -188,7 +188,7 @@ 'fieldname': u'invoice', 'fieldtype': u'Link', 'label': u'Invoice', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 0, 'reqd': 1, 'trigger': u'Client' diff --git a/erpnext/accounts/doctype/advance_adjustment_detail/__init__.py b/erpnext/accounts/doctype/multi_ledger_report/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from erpnext/accounts/doctype/advance_adjustment_detail/__init__.py rename to erpnext/accounts/doctype/multi_ledger_report/__init__.py diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js b/erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.js similarity index 100% rename from erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js rename to erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.js diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py b/erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.py similarity index 100% rename from erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py rename to erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.py diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.txt b/erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.txt similarity index 88% rename from erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.txt rename to erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.txt index 1f83e96a681..0ef7a5d33f8 100755 --- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.txt +++ b/erpnext/accounts/doctype/multi_ledger_report/multi_ledger_report.txt @@ -1,4 +1,4 @@ -# DocType, Ledger Balance Export +# DocType, Multi Ledger Report [ # These values are common in all dictionaries @@ -32,7 +32,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Ledger Balance Export', + 'parent': u'Multi Ledger Report', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -43,7 +43,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Ledger Balance Export', + 'parent': u'Multi Ledger Report', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -51,10 +51,10 @@ 'write': 1 }, - # DocType, Ledger Balance Export + # DocType, Multi Ledger Report { 'doctype': 'DocType', - 'name': u'Ledger Balance Export' + 'name': u'Multi Ledger Report' }, # DocPerm @@ -108,8 +108,8 @@ 'doctype': u'DocField', 'fieldname': u'ledger_details', 'fieldtype': u'Table', - 'label': u'Ledger Details', - 'options': u'Ledger Detail' + 'label': u'Multi Ledger Report Details', + 'options': u'Multi Ledger Report Detail' }, # DocField diff --git a/erpnext/accounts/doctype/advance_allocation_detail/__init__.py b/erpnext/accounts/doctype/multi_ledger_report_detail/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from erpnext/accounts/doctype/advance_allocation_detail/__init__.py rename to erpnext/accounts/doctype/multi_ledger_report_detail/__init__.py diff --git a/erpnext/accounts/doctype/ledger_detail/ledger_detail.txt b/erpnext/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt similarity index 83% rename from erpnext/accounts/doctype/ledger_detail/ledger_detail.txt rename to erpnext/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt index 0d76a9d141c..20d618b34d2 100755 --- a/erpnext/accounts/doctype/ledger_detail/ledger_detail.txt +++ b/erpnext/accounts/doctype/multi_ledger_report_detail/multi_ledger_report_detail.txt @@ -1,4 +1,4 @@ -# DocType, Ledger Detail +# DocType, Multi Ledger Report Detail [ # These values are common in all dictionaries @@ -30,7 +30,7 @@ 'label': u'Account', 'name': '__common__', 'options': u'Account', - 'parent': u'Ledger Detail', + 'parent': u'Multi Ledger Report Detail', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0, @@ -38,10 +38,10 @@ 'width': u'300px' }, - # DocType, Ledger Detail + # DocType, Multi Ledger Report Detail { 'doctype': 'DocType', - 'name': u'Ledger Detail' + 'name': u'Multi Ledger Report Detail' }, # DocField diff --git a/erpnext/accounts/doctype/internal_reconciliation/__init__.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/__init__.py similarity index 100% rename from erpnext/accounts/doctype/internal_reconciliation/__init__.py rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool/__init__.py diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js similarity index 100% rename from erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py similarity index 97% rename from erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py index 0ab0e050230..848cc765eb4 100644 --- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py @@ -39,8 +39,8 @@ class DocType: self.doclist = doclist self.acc_type = self.doc.account and sql("select debit_or_credit from `tabAccount` where name = %s", self.doc.account)[0][0].lower() or '' self.dt = { - 'Sales Invoice': 'Receivable Voucher', - 'Purchase Invoice': 'Payable Voucher', + 'Sales Invoice': 'Sales Invoice', + 'Purchase Invoice': 'Purchase Invoice', 'Journal Voucher': 'Journal Voucher' } @@ -105,7 +105,7 @@ class DocType: #-------------------------------------------------- def create_payment_table(self, gle): for d in gle: - ch = addchild(self.doc, 'ir_payment_details', 'IR Payment Detail', 1, self.doclist) + ch = addchild(self.doc, 'ir_payment_details', 'Payment to Invoice Matching Tool Detail', 1, self.doclist) ch.voucher_no = d.get('voucher_no') ch.posting_date = d.get('posting_date') ch.amt_due = self.acc_type == 'debit' and flt(d.get('amt_due')) or -1*flt(d.get('amt_due')) diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.txt b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt similarity index 94% rename from erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.txt rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt index 0e5bb4da5dc..5a95ba8bb52 100644 --- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.txt +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt @@ -1,4 +1,4 @@ -# DocType, Internal Reconciliation +# DocType, Payment to Invoice Matching Tool [ # These values are common in all dictionaries @@ -29,7 +29,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Internal Reconciliation', + 'parent': u'Payment to Invoice Matching Tool', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -38,16 +38,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Internal Reconciliation', + 'parent': u'Payment to Invoice Matching Tool', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Internal Reconciliation + # DocType, Payment to Invoice Matching Tool { 'doctype': 'DocType', - 'name': u'Internal Reconciliation' + 'name': u'Payment to Invoice Matching Tool' }, # DocPerm @@ -246,7 +246,7 @@ 'fieldname': u'ir_payment_details', 'fieldtype': u'Table', 'label': u'Payment Entries', - 'options': u'IR Payment Detail', + 'options': u'Payment to Invoice Matching Tool Detail', 'permlevel': 0 }, diff --git a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/test_ir.py similarity index 83% rename from erpnext/accounts/doctype/internal_reconciliation/test_ir.py rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool/test_ir.py index c5aa935e5ff..d990b188522 100644 --- a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/test_ir.py @@ -40,14 +40,14 @@ class TestInternalReco(unittest.TestCase): ir[0].save() for t in ir[1:]: t.save(1) - sql("update `tabIR Payment Detail` set voucher_no = '%s', voucher_detail_no = '%s' where parent = 'Internal Reconciliation'" % (jv1[0].name, jv1[1].name)) + sql("update `tabPayment to Invoice Matching Tool Detail` set voucher_no = '%s', voucher_detail_no = '%s' where parent = 'Payment to Invoice Matching Tool'" % (jv1[0].name, jv1[1].name)) sql("update `tabGL Entry` set voucher_no = %s, against_voucher = %s where voucher_no = 'rv1'", (rv1.name, rv1.name)) - sql("update `tabSingles` set value = %s where doctype = 'Internal Reconciliation' and field = 'voucher_no'", rv1.name) + sql("update `tabSingles` set value = %s where doctype = 'Payment to Invoice Matching Tool' and field = 'voucher_no'", rv1.name) - self.ir = get_obj('Internal Reconciliation', with_children=1) + self.ir = get_obj('Payment to Invoice Matching Tool', with_children=1) self.ir.reconcile() #=========================== @@ -73,7 +73,7 @@ class TestInternalReco(unittest.TestCase): """ Check whether Outstanding amount has been properly updated in RV """ - amt = sql("select outstanding_amount from `tabReceivable Voucher` where name = '%s'" % rv1.name)[0][0] + amt = sql("select outstanding_amount from `tabSales Invoice` where name = '%s'" % rv1.name)[0][0] self.assertTrue(amt == 0) #============================ @@ -86,7 +86,7 @@ class TestInternalReco(unittest.TestCase): # test data #--------------- rv1 = Document(fielddata={ - 'doctype':'Receivable Voucher', + 'doctype':'Sales Invoice', 'docstatus':1, 'debit_to':'cust1 - c1', 'grand_total': 100, @@ -126,17 +126,17 @@ jv1 = [Document(fielddata={ })] ir = [Document(fielddata = { - 'doctype':'Internal Reconciliation', - 'name' : 'Internal Reconciliation', + 'doctype':'Payment to Invoice Matching Tool', + 'name' : 'Payment to Invoice Matching Tool', 'account':'cust1 - c1', 'voucher_type' : 'Sales Invoice', 'voucher_no': 'rv1' }), Document(fielddata = { - 'parenttype':'Internal Reconciliation', + 'parenttype':'Payment to Invoice Matching Tool', 'parentfield':'ir_payment_details', - 'doctype':'IR Payment Detail', - 'parent': 'Internal Reconciliation', + 'doctype':'Payment to Invoice Matching Tool Detail', + 'parent': 'Payment to Invoice Matching Tool', 'voucher_no': 'jv1', 'name' : '123112', 'voucher_detail_no' : 'jvd1', @@ -178,8 +178,8 @@ rv_gle = Document(fielddata={ 'company' : 'comp1', 'voucher_no': 'rv1', 'against_voucher': 'rv1', - 'against_voucher_type': 'Receivable Voucher', - 'voucher_type' : 'Receivable Voucher', + 'against_voucher_type': 'Sales Invoice', + 'voucher_type' : 'Sales Invoice', 'debit': 100, 'credit': 0 }) diff --git a/erpnext/accounts/doctype/ir_payment_detail/__init__.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/__init__.py similarity index 100% rename from erpnext/accounts/doctype/ir_payment_detail/__init__.py rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/__init__.py diff --git a/erpnext/accounts/doctype/ir_payment_detail/ir_payment_detail.txt b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt similarity index 91% rename from erpnext/accounts/doctype/ir_payment_detail/ir_payment_detail.txt rename to erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt index 9c2e426a0ab..5291057e726 100644 --- a/erpnext/accounts/doctype/ir_payment_detail/ir_payment_detail.txt +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/payment_to_invoice_matching_tool_detail.txt @@ -1,4 +1,4 @@ -# DocType, IR Payment Detail +# DocType, Payment to Invoice Matching Tool Detail [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'IR Payment Detail', + 'parent': u'Payment to Invoice Matching Tool Detail', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, IR Payment Detail + # DocType, Payment to Invoice Matching Tool Detail { 'doctype': 'DocType', - 'name': u'IR Payment Detail' + 'name': u'Payment to Invoice Matching Tool Detail' }, # DocField diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.py b/erpnext/accounts/doctype/pos_setting/pos_setting.py index 45caca5aedf..43742ac840d 100755 --- a/erpnext/accounts/doctype/pos_setting/pos_setting.py +++ b/erpnext/accounts/doctype/pos_setting/pos_setting.py @@ -39,7 +39,7 @@ class DocType: #--------------------get naming series from sales invoice----------------- def get_series(self): - res = sql("select options from `tabDocField` where parent='Receivable Voucher' and fieldname = 'naming_series'") + res = sql("select options from `tabDocField` where parent='Sales Invoice' and fieldname = 'naming_series'") return res and cstr(res[0][0]) or '' def validate(self): diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.txt b/erpnext/accounts/doctype/pos_setting/pos_setting.txt index 2931617586b..5167842023e 100755 --- a/erpnext/accounts/doctype/pos_setting/pos_setting.txt +++ b/erpnext/accounts/doctype/pos_setting/pos_setting.txt @@ -243,7 +243,7 @@ 'label': u'Charge', 'oldfieldname': u'charge', 'oldfieldtype': u'Link', - 'options': u'Other Charges' + 'options': u'Sales Taxes and Charges Master' }, # DocField @@ -266,7 +266,7 @@ 'label': u'Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term' + 'options': u'Terms and Conditions' }, # DocField diff --git a/erpnext/accounts/doctype/ledger_balance_export/__init__.py b/erpnext/accounts/doctype/purchase_invoice/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from erpnext/accounts/doctype/ledger_balance_export/__init__.py rename to erpnext/accounts/doctype/purchase_invoice/__init__.py diff --git a/erpnext/accounts/doctype/payable_voucher/listview.js b/erpnext/accounts/doctype/purchase_invoice/listview.js similarity index 69% rename from erpnext/accounts/doctype/payable_voucher/listview.js rename to erpnext/accounts/doctype/purchase_invoice/listview.js index 6dc8f99b937..da8d2ac341e 100644 --- a/erpnext/accounts/doctype/payable_voucher/listview.js +++ b/erpnext/accounts/doctype/purchase_invoice/listview.js @@ -1,13 +1,13 @@ // render -wn.doclistviews['Payable Voucher'] = wn.views.ListView.extend({ +wn.doclistviews['Purchase Invoice'] = wn.views.ListView.extend({ init: function(d) { this._super(d); this.fields = this.fields.concat([ - '`tabPayable Voucher`.supplier_name', - '`tabPayable Voucher`.currency', - 'IFNULL(`tabPayable Voucher`.grand_total_import, 0) as grand_total_import', - 'IFNULL(`tabPayable Voucher`.grand_total, 0) as grand_total', - 'IFNULL(`tabPayable Voucher`.outstanding_amount, 0) as outstanding_amount', + '`tabPurchase Invoice`.supplier_name', + '`tabPurchase Invoice`.currency', + 'IFNULL(`tabPurchase Invoice`.grand_total_import, 0) as grand_total_import', + 'IFNULL(`tabPurchase Invoice`.grand_total, 0) as grand_total', + 'IFNULL(`tabPurchase Invoice`.outstanding_amount, 0) as outstanding_amount', ]); this.stats = this.stats.concat(['company']); }, diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js similarity index 95% rename from erpnext/accounts/doctype/payable_voucher/payable_voucher.js rename to erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 057abca2cb0..f3b3d8a0284 100644 --- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "PV Detail"; +cur_frm.cscript.tname = "Purchase Invoice Item"; cur_frm.cscript.fname = "entries"; cur_frm.cscript.other_fname = "purchase_tax_details"; wn.require('erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js'); @@ -86,7 +86,7 @@ cur_frm.cscript.supplier = function(doc,dt,dn) { var callback2 = function(r,rt){ var doc = locals[cur_frm.doctype][cur_frm.docname]; - var el = getchildren('PV Detail',doc.name,'entries'); + var el = getchildren('Purchase Invoice Item',doc.name,'entries'); for(var i in el){ if(el[i].item_code && (!el[i].expense_head || !el[i].cost_center)){ args = { @@ -139,7 +139,7 @@ cur_frm.cscript.credit_to = function(doc,dt,dn) { //---------------------------------------------- cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){ - cl = getchildren('PV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); + cl = getchildren('Purchase Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype); acc = ''; cc = ''; @@ -177,7 +177,7 @@ cur_frm.cscript['Get Items'] = function(doc, dt, dn) { $c_obj(make_doclist(dt,dn),'pull_details','',callback); } -// ========== PV Details Table ============ +// ========== Purchase Invoice Items Table ============ // Item Code // ---------- @@ -192,7 +192,7 @@ cur_frm.cscript.item_code = function(doc,cdt,cdn){ // -------------------------- cur_frm.cscript.rate = function(doc,dt,dn) { //This is done as Purchase tax detail and PV detail both contain the same fieldname 'rate' - if(dt != 'Purchase Tax Detail') cur_frm.cscript.calc_amount(doc, 2); + if(dt != 'Purchase Taxes and Charges') cur_frm.cscript.calc_amount(doc, 2); } // Amount @@ -218,7 +218,7 @@ cur_frm.cscript.allocated_amount = function(doc,cdt,cdn){ refresh_field('tds_allocated', d.name, 'advance_allocation_details'); } tot_tds=0 - el = getchildren('Advance Allocation Detail',doc.name,'advance_allocation_details') + el = getchildren('Purchase Invoice Advance',doc.name,'advance_allocation_details') for(var i in el){ tot_tds += el[i].tds_allocated } @@ -290,7 +290,7 @@ cur_frm.fields_dict['select_print_heading'].get_query = function(doc, cdt, cdn) } -// ================== PV Details Table =================== +// ================== Purchase Invoice Items Table =================== // Expense Head // ------------- cur_frm.fields_dict['entries'].grid.get_field("expense_head").get_query = function(doc) { @@ -299,7 +299,7 @@ cur_frm.fields_dict['entries'].grid.get_field("expense_head").get_query = functi cur_frm.cscript.expense_head = function(doc, cdt, cdn){ var d = locals[cdt][cdn]; if(d.idx == 1 && d.expense_head){ - var cl = getchildren('PV Detail', doc.name, 'entries', doc.doctype); + var cl = getchildren('Purchase Invoice Item', doc.name, 'entries', doc.doctype); for(var i = 0; i < cl.length; i++){ if(!cl[i].expense_head) cl[i].expense_head = d.expense_head; } @@ -317,7 +317,7 @@ cur_frm.fields_dict['entries'].grid.get_field("cost_center").get_query = functio cur_frm.cscript.cost_center = function(doc, cdt, cdn){ var d = locals[cdt][cdn]; if(d.idx == 1 && d.cost_center){ - var cl = getchildren('PV Detail', doc.name, 'entries', doc.doctype); + var cl = getchildren('Purchase Invoice Item', doc.name, 'entries', doc.doctype); for(var i = 0; i < cl.length; i++){ if(!cl[i].cost_center) cl[i].cost_center = d.cost_center; } @@ -341,7 +341,7 @@ cur_frm.cscript.tax_code = function(doc, dt, dn) { // ------------------ var calc_total_advance = function(doc,cdt,cdn) { var doc = locals[doc.doctype][doc.name]; - var el = getchildren('Advance Allocation Detail',doc.name,'advance_allocation_details') + var el = getchildren('Purchase Invoice Advance',doc.name,'advance_allocation_details') var tot_tds=0; var total_advance = 0; for(var i in el) { diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py similarity index 93% rename from erpnext/accounts/doctype/payable_voucher/payable_voucher.py rename to erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index d9305835366..54078d91370 100644 --- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -37,7 +37,7 @@ from utilities.transaction_base import TransactionBase class DocType(TransactionBase): def __init__(self,d,dl): self.doc, self.doclist = d, dl - self.tname = 'PV Detail' + self.tname = 'Purchase Invoice Item' self.fname = 'entries' # Autoname @@ -95,11 +95,11 @@ class DocType(TransactionBase): def pull_details(self): if self.doc.purchase_receipt_main: self.validate_duplicate_docname('purchase_receipt') - self.doclist = get_obj('DocType Mapper', 'Purchase Receipt-Payable Voucher').dt_map('Purchase Receipt', 'Payable Voucher', self.doc.purchase_receipt_main, self.doc, self.doclist, "[['Purchase Receipt', 'Payable Voucher'], ['Purchase Receipt Detail', 'PV Detail'], ['Purchase Tax Detail','Purchase Tax Detail']]") + self.doclist = get_obj('DocType Mapper', 'Purchase Receipt-Purchase Invoice').dt_map('Purchase Receipt', 'Purchase Invoice', self.doc.purchase_receipt_main, self.doc, self.doclist, "[['Purchase Receipt', 'Purchase Invoice'], ['Purchase Receipt Item', 'Purchase Invoice Item'], ['Purchase Taxes and Charges','Purchase Taxes and Charges']]") elif self.doc.purchase_order_main: self.validate_duplicate_docname('purchase_order') - self.doclist = get_obj('DocType Mapper', 'Purchase Order-Payable Voucher').dt_map('Purchase Order', 'Payable Voucher', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Payable Voucher'],['PO Detail', 'PV Detail'], ['Purchase Tax Detail','Purchase Tax Detail']]") + self.doclist = get_obj('DocType Mapper', 'Purchase Order-Purchase Invoice').dt_map('Purchase Order', 'Purchase Invoice', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Purchase Invoice'],['Purchase Order Item', 'Purchase Invoice Item'], ['Purchase Taxes and Charges','Purchase Taxes and Charges']]") ret = self.get_credit_to() @@ -153,7 +153,7 @@ class DocType(TransactionBase): # Advance Allocation # ------------------- def get_advances(self): - get_obj('GL Control').get_advances( self, self.doc.credit_to, 'Advance Allocation Detail','advance_allocation_details','debit') + get_obj('GL Control').get_advances( self, self.doc.credit_to, 'Purchase Invoice Advance','advance_allocation_details','debit') # ============= OTHER CHARGES ==================== @@ -226,7 +226,7 @@ class DocType(TransactionBase): # --------------------------------------------------------------------- def validate_bill_no(self): if self.doc.bill_no and self.doc.bill_no.lower().strip() not in ['na', 'not applicable', 'none']: - b_no = sql("select bill_no, name, ifnull(is_opening,'') from `tabPayable Voucher` where bill_no = '%s' and credit_to = '%s' and docstatus = 1 and name != '%s' " % (self.doc.bill_no, self.doc.credit_to, self.doc.name)) + b_no = sql("select bill_no, name, ifnull(is_opening,'') from `tabPurchase Invoice` where bill_no = '%s' and credit_to = '%s' and docstatus = 1 and name != '%s' " % (self.doc.bill_no, self.doc.credit_to, self.doc.name)) if b_no and cstr(b_no[0][2]) == cstr(self.doc.is_opening): msgprint("Please check you have already booked expense against Bill No. %s in Purchase Invoice %s" % (cstr(b_no[0][0]), cstr(b_no[0][1]))) raise Exception , "Validation Error" @@ -250,7 +250,7 @@ class DocType(TransactionBase): # Clear Advances # --------------- def clear_advances(self): - get_obj('GL Control').clear_advances( self, 'Advance Allocation Detail','advance_allocation_details') + get_obj('GL Control').clear_advances( self, 'Purchase Invoice Advance','advance_allocation_details') # 1. Credit To Account Exists @@ -313,7 +313,7 @@ class DocType(TransactionBase): # Validate values with reference document #---------------------------------------- def validate_reference_value(self): - get_obj('DocType Mapper', 'Purchase Order-Payable Voucher', with_children = 1).validate_reference_value(self, self.doc.name) + get_obj('DocType Mapper', 'Purchase Order-Purchase Invoice', with_children = 1).validate_reference_value(self, self.doc.name) # Validate PO and PR @@ -329,7 +329,7 @@ class DocType(TransactionBase): msgprint("Purchase Order: " + cstr(d.purchase_order) + " currency : " + cstr(currency) + " does not match with currency of current document.") raise Exception # import_rate - rate = flt(sql('select import_rate from `tabPO Detail` where item_code=%s and parent=%s and name = %s', (d.item_code, d.purchase_order, d.po_detail))[0][0]) + rate = flt(sql('select import_rate from `tabPurchase Order Item` where item_code=%s and parent=%s and name = %s', (d.item_code, d.purchase_order, d.po_detail))[0][0]) if abs(rate - flt(d.import_rate)) > 1: msgprint("Import Rate for %s in the Purchase Order is %s. Rate must be same as Purchase Order Rate" % (d.item_code,rate)) raise Exception @@ -399,7 +399,7 @@ class DocType(TransactionBase): #check in manage account if purchase order required or not. # ==================================================================================== def po_required(self): - res = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'po_required'") + res = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'po_required'") if res and res[0][0] == 'Yes': for d in getlist(self.doclist,'entries'): if not d.purchase_order: @@ -409,7 +409,7 @@ class DocType(TransactionBase): #check in manage account if purchase receipt required or not. # ==================================================================================== def pr_required(self): - res = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'pr_required'") + res = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'pr_required'") if res and res[0][0] == 'Yes': for d in getlist(self.doclist,'entries'): if not d.purchase_receipt: @@ -494,7 +494,7 @@ class DocType(TransactionBase): args = { 'voucher_no' : d.journal_voucher, 'voucher_detail_no' : d.jv_detail_no, - 'against_voucher_type' : 'Payable Voucher', + 'against_voucher_type' : 'Purchase Invoice', 'against_voucher' : self.doc.name, 'account' : self.doc.credit_to, 'is_advance' : 'Yes', diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt similarity index 97% rename from erpnext/accounts/doctype/payable_voucher/payable_voucher.txt rename to erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt index d264b0d93b2..08efc810790 100755 --- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -1,4 +1,4 @@ -# DocType, Payable Voucher +# DocType, Purchase Invoice [ # These values are common in all dictionaries @@ -32,7 +32,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Payable Voucher', + 'parent': u'Purchase Invoice', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -41,16 +41,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Payable Voucher', + 'parent': u'Purchase Invoice', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Payable Voucher + # DocType, Purchase Invoice { 'doctype': 'DocType', - 'name': u'Payable Voucher' + 'name': u'Purchase Invoice' }, # DocPerm @@ -194,7 +194,7 @@ 'no_copy': 1, 'oldfieldname': u'amended_from', 'oldfieldtype': u'Link', - 'options': u'Payable Voucher', + 'options': u'Purchase Invoice', 'permlevel': 1, 'print_hide': 1 }, @@ -491,7 +491,7 @@ 'label': u'Entries', 'oldfieldname': u'entries', 'oldfieldtype': u'Table', - 'options': u'PV Detail', + 'options': u'Purchase Invoice Item', 'permlevel': 0 }, @@ -536,10 +536,10 @@ 'doctype': u'DocField', 'fieldname': u'purchase_other_charges', 'fieldtype': u'Link', - 'label': u'Purchase Other Charges', + 'label': u'Purchase Taxes and Charges Master', 'oldfieldname': u'purchase_other_charges', 'oldfieldtype': u'Link', - 'options': u'Purchase Other Charges', + 'options': u'Purchase Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -561,10 +561,10 @@ 'doctype': u'DocField', 'fieldname': u'purchase_tax_details', 'fieldtype': u'Table', - 'label': u'Purchase Tax Details', + 'label': u'Purchase Taxes and Chargess', 'oldfieldname': u'purchase_tax_details', 'oldfieldtype': u'Table', - 'options': u'Purchase Tax Detail', + 'options': u'Purchase Taxes and Charges', 'permlevel': 0 }, @@ -773,11 +773,11 @@ 'doctype': u'DocField', 'fieldname': u'advance_allocation_details', 'fieldtype': u'Table', - 'label': u'Advance Allocation Details', + 'label': u'Purchase Invoice Advances', 'no_copy': 1, 'oldfieldname': u'advance_allocation_details', 'oldfieldtype': u'Table', - 'options': u'Advance Allocation Detail', + 'options': u'Purchase Invoice Advance', 'permlevel': 0, 'print_hide': 1 }, diff --git a/erpnext/accounts/doctype/ledger_detail/__init__.py b/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from erpnext/accounts/doctype/ledger_detail/__init__.py rename to erpnext/accounts/doctype/purchase_invoice_advance/__init__.py diff --git a/erpnext/accounts/doctype/advance_allocation_detail/advance_allocation_detail.txt b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt similarity index 94% rename from erpnext/accounts/doctype/advance_allocation_detail/advance_allocation_detail.txt rename to erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt index 5cc99d22e33..586ae1c0086 100644 --- a/erpnext/accounts/doctype/advance_allocation_detail/advance_allocation_detail.txt +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.txt @@ -1,4 +1,4 @@ -# DocType, Advance Allocation Detail +# DocType, Purchase Invoice Advance [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Advance Allocation Detail', + 'parent': u'Purchase Invoice Advance', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Advance Allocation Detail + # DocType, Purchase Invoice Advance { 'doctype': 'DocType', - 'name': u'Advance Allocation Detail' + 'name': u'Purchase Invoice Advance' }, # DocField diff --git a/erpnext/accounts/doctype/payable_voucher/__init__.py b/erpnext/accounts/doctype/purchase_invoice_item/__init__.py similarity index 100% rename from erpnext/accounts/doctype/payable_voucher/__init__.py rename to erpnext/accounts/doctype/purchase_invoice_item/__init__.py diff --git a/erpnext/accounts/doctype/pv_detail/pv_detail.txt b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt similarity index 97% rename from erpnext/accounts/doctype/pv_detail/pv_detail.txt rename to erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt index 77b8218d4bf..213f350b470 100755 --- a/erpnext/accounts/doctype/pv_detail/pv_detail.txt +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt @@ -1,4 +1,4 @@ -# DocType, PV Detail +# DocType, Purchase Invoice Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PV Detail', + 'parent': u'Purchase Invoice Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, PV Detail + # DocType, Purchase Invoice Item { 'doctype': 'DocType', - 'name': u'PV Detail' + 'name': u'Purchase Invoice Item' }, # DocField @@ -280,7 +280,7 @@ 'fieldtype': u'Data', 'hidden': 1, 'in_filter': 1, - 'label': u'PO Detail', + 'label': u'Purchase Order Item', 'oldfieldname': u'po_detail', 'oldfieldtype': u'Data', 'permlevel': 1, diff --git a/erpnext/accounts/doctype/purchase_tax_detail/__init__.py b/erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py similarity index 100% rename from erpnext/accounts/doctype/purchase_tax_detail/__init__.py rename to erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py diff --git a/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt similarity index 96% rename from erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt rename to erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt index d4cd669e3b2..74fd69740c2 100644 --- a/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.txt @@ -1,4 +1,4 @@ -# DocType, Purchase Tax Detail +# DocType, Purchase Taxes and Charges [ # These values are common in all dictionaries @@ -31,15 +31,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Purchase Tax Detail', + 'parent': u'Purchase Taxes and Charges', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Purchase Tax Detail + # DocType, Purchase Taxes and Charges { 'doctype': 'DocType', - 'name': u'Purchase Tax Detail' + 'name': u'Purchase Taxes and Charges' }, # DocField diff --git a/erpnext/accounts/doctype/pv_detail/__init__.py b/erpnext/accounts/doctype/sales_invoice/__init__.py similarity index 100% rename from erpnext/accounts/doctype/pv_detail/__init__.py rename to erpnext/accounts/doctype/sales_invoice/__init__.py diff --git a/erpnext/accounts/doctype/receivable_voucher/listview.js b/erpnext/accounts/doctype/sales_invoice/listview.js similarity index 68% rename from erpnext/accounts/doctype/receivable_voucher/listview.js rename to erpnext/accounts/doctype/sales_invoice/listview.js index ebedd516b69..f3548f0d4b8 100644 --- a/erpnext/accounts/doctype/receivable_voucher/listview.js +++ b/erpnext/accounts/doctype/sales_invoice/listview.js @@ -1,13 +1,13 @@ // render -wn.doclistviews['Receivable Voucher'] = wn.views.ListView.extend({ +wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({ init: function(d) { this._super(d) this.fields = this.fields.concat([ - "`tabReceivable Voucher`.customer_name", - "ifnull(`tabReceivable Voucher`.outstanding_amount,0) as outstanding_amount", - "ifnull(`tabReceivable Voucher`.grand_total,0) as grand_total", - "`tabReceivable Voucher`.currency", - "ifnull(`tabReceivable Voucher`.grand_total_export,0) as grand_total_export" + "`tabSales Invoice`.customer_name", + "ifnull(`tabSales Invoice`.outstanding_amount,0) as outstanding_amount", + "ifnull(`tabSales Invoice`.grand_total,0) as grand_total", + "`tabSales Invoice`.currency", + "ifnull(`tabSales Invoice`.grand_total_export,0) as grand_total_export" ]); this.stats = this.stats.concat(['company']); diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js similarity index 96% rename from erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js rename to erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 6db3b52475a..7201f3dd178 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "RV Detail"; +cur_frm.cscript.tname = "Sales Invoice Item"; cur_frm.cscript.fname = "entries"; cur_frm.cscript.other_fname = "other_charges"; cur_frm.cscript.sales_team_fname = "sales_team"; @@ -250,7 +250,7 @@ cur_frm.cscript.project_name = function(doc,cdt,cdn){ //---------------------------------------------- cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){ - cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); + cl = getchildren('Sales Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype); acc = ''; cc = ''; @@ -303,7 +303,7 @@ cur_frm.cscript['Make Delivery Note'] = function() { 'from_doctype':doc.doctype, 'to_doctype':'Delivery Note', 'from_docname':doc.name, - 'from_to_list':"[['Receivable Voucher','Delivery Note'],['RV Detail','Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]" + 'from_to_list':"[['Sales Invoice','Delivery Note'],['Sales Invoice Item','Delivery Note Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]" }, function(r,rt) { loaddoc('Delivery Note', n); } @@ -405,7 +405,7 @@ cur_frm.fields_dict.delivery_note_main.get_query = function(doc) { cur_frm.cscript.income_account = function(doc, cdt, cdn){ var d = locals[cdt][cdn]; if(d.income_account){ - var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); + var cl = getchildren('Sales Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype); for(var i = 0; i < cl.length; i++){ if(!cl[i].income_account) cl[i].income_account = d.income_account; } @@ -417,7 +417,7 @@ cur_frm.cscript.income_account = function(doc, cdt, cdn){ cur_frm.cscript.cost_center = function(doc, cdt, cdn){ var d = locals[cdt][cdn]; if(d.cost_center){ - var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); + var cl = getchildren('Sales Invoice Item', doc.name, cur_frm.cscript.fname, doc.doctype); for(var i = 0; i < cl.length; i++){ if(!cl[i].cost_center) cl[i].cost_center = d.cost_center; } @@ -431,7 +431,7 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn){ // -------------------- cur_frm.cscript.calc_adjustment_amount = function(doc,cdt,cdn) { var doc = locals[doc.doctype][doc.name]; - var el = getchildren('Advance Adjustment Detail',doc.name,'advance_adjustment_details'); + var el = getchildren('Sales Invoice Advance',doc.name,'advance_adjustment_details'); var total_adjustment_amt = 0 for(var i in el) { total_adjustment_amt += flt(el[i].allocated_amount) @@ -490,7 +490,7 @@ cur_frm.cscript.convert_into_recurring_invoice = function(doc) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) { var args = { type: 'Sales Invoice', - doctype: 'Receivable Voucher' + doctype: 'Sales Invoice' } cur_frm.cscript.notify(doc, args); } diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py similarity index 95% rename from erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py rename to erpnext/accounts/doctype/sales_invoice/sales_invoice.py index b0d1e53d990..848e120b6d1 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -36,7 +36,7 @@ class DocType(TransactionBase): def __init__(self,d,dl): self.doc, self.doclist = d, dl self.log = [] - self.tname = 'RV Detail' + self.tname = 'Sales Invoice Item' self.fname = 'entries' @@ -136,13 +136,13 @@ class DocType(TransactionBase): if self.doc.delivery_note_main: self.validate_prev_docname('delivery note') self.doc.clear_table(self.doclist,'other_charges') - self.doclist = get_obj('DocType Mapper', 'Delivery Note-Receivable Voucher').dt_map('Delivery Note', 'Receivable Voucher', self.doc.delivery_note_main, self.doc, self.doclist, "[['Delivery Note', 'Receivable Voucher'],['Delivery Note Detail', 'RV Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]") + self.doclist = get_obj('DocType Mapper', 'Delivery Note-Sales Invoice').dt_map('Delivery Note', 'Sales Invoice', self.doc.delivery_note_main, self.doc, self.doclist, "[['Delivery Note', 'Sales Invoice'],['Delivery Note Item', 'Sales Invoice Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]") self.get_income_account('entries') # Sales Order elif self.doc.sales_order_main: self.validate_prev_docname('sales order') self.doc.clear_table(self.doclist,'other_charges') - get_obj('DocType Mapper', 'Sales Order-Receivable Voucher').dt_map('Sales Order', 'Receivable Voucher', self.doc.sales_order_main, self.doc, self.doclist, "[['Sales Order', 'Receivable Voucher'],['Sales Order Detail', 'RV Detail'],['RV Tax Detail','RV Tax Detail'], ['Sales Team', 'Sales Team']]") + get_obj('DocType Mapper', 'Sales Order-Sales Invoice').dt_map('Sales Order', 'Sales Invoice', self.doc.sales_order_main, self.doc, self.doclist, "[['Sales Order', 'Sales Invoice'],['Sales Order Item', 'Sales Invoice Item'],['Sales Taxes and Charges','Sales Taxes and Charges'], ['Sales Team', 'Sales Team']]") self.get_income_account('entries') ret = self.get_debit_to() @@ -239,14 +239,14 @@ class DocType(TransactionBase): # Get Advances # ------------- def get_advances(self): - get_obj('GL Control').get_advances(self, self.doc.debit_to, 'Advance Adjustment Detail', 'advance_adjustment_details', 'credit') + get_obj('GL Control').get_advances(self, self.doc.debit_to, 'Sales Invoice Advance', 'advance_adjustment_details', 'credit') #pull project customer #------------------------- def pull_project_customer(self): res = webnotes.conn.sql("select customer from `tabProject` where name = '%s'"%self.doc.project_name) if res: - get_obj('DocType Mapper', 'Project-Receivable Voucher').dt_map('Project', 'Receivable Voucher', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Receivable Voucher']]") + get_obj('DocType Mapper', 'Project-Sales Invoice').dt_map('Project', 'Sales Invoice', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Sales Invoice']]") # ********************************** Server Utility Functions ****************************** @@ -283,7 +283,7 @@ class DocType(TransactionBase): args = { 'voucher_no' : d.journal_voucher, 'voucher_detail_no' : d.jv_detail_no, - 'against_voucher_type' : 'Receivable Voucher', + 'against_voucher_type' : 'Sales Invoice', 'against_voucher' : self.doc.name, 'account' : self.doc.debit_to, 'is_advance' : 'Yes', @@ -368,7 +368,7 @@ class DocType(TransactionBase): # Clear Advances # -------------- def clear_advances(self): - get_obj('GL Control').clear_advances(self, 'Advance Adjustment Detail','advance_adjustment_details') + get_obj('GL Control').clear_advances(self, 'Sales Invoice Advance','advance_adjustment_details') # set aging date @@ -397,7 +397,7 @@ class DocType(TransactionBase): def so_dn_required(self): dict = {'Sales Order':'so_required','Delivery Note':'dn_required'} for i in dict: - res = webnotes.conn.sql("select value from `tabSingles` where doctype = 'Manage Account' and field = '%s'"%dict[i]) + res = webnotes.conn.sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = '%s'"%dict[i]) if res and res[0][0] == 'Yes': for d in getlist(self.doclist,'entries'): if not d.fields[i.lower().replace(' ','_')]: @@ -536,7 +536,7 @@ class DocType(TransactionBase): 'transaction_date' : getdate(self.doc.modified).strftime('%Y-%m-%d'), 'posting_date' : self.doc.posting_date, 'posting_time' : self.doc.posting_time, - 'voucher_type' : 'Receivable Voucher', + 'voucher_type' : 'Sales Invoice', 'voucher_no' : cstr(self.doc.name), 'voucher_detail_no' : cstr(d.name), 'actual_qty' : qty, @@ -697,7 +697,7 @@ class DocType(TransactionBase): if not self.doc.recurring_id: webnotes.conn.set(self.doc, 'recurring_id', make_autoname('RECINV/.#####')) elif self.doc.recurring_id: - webnotes.conn.sql("""update `tabReceivable Voucher` set convert_into_recurring_invoice = 0 where recurring_id = %s""", self.doc.recurring_id) + webnotes.conn.sql("""update `tabSales Invoice` set convert_into_recurring_invoice = 0 where recurring_id = %s""", self.doc.recurring_id) def set_next_date(self): """ Set next date on which auto invoice will be created""" diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt similarity index 98% rename from erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt rename to erpnext/accounts/doctype/sales_invoice/sales_invoice.txt index 330ce97f51c..01d502eea8c 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt @@ -1,4 +1,4 @@ -# DocType, Receivable Voucher +# DocType, Sales Invoice [ # These values are common in all dictionaries @@ -33,7 +33,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Receivable Voucher', + 'parent': u'Sales Invoice', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -42,16 +42,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Receivable Voucher', + 'parent': u'Sales Invoice', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Receivable Voucher + # DocType, Sales Invoice { 'doctype': 'DocType', - 'name': u'Receivable Voucher' + 'name': u'Sales Invoice' }, # DocPerm @@ -370,7 +370,7 @@ 'no_copy': 1, 'oldfieldname': u'amended_from', 'oldfieldtype': u'Link', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 }, @@ -566,7 +566,7 @@ 'label': u'Entries', 'oldfieldname': u'entries', 'oldfieldtype': u'Table', - 'options': u'RV Detail', + 'options': u'Sales Invoice Item', 'permlevel': 0 }, @@ -709,7 +709,7 @@ 'label': u'Charge', 'oldfieldname': u'charge', 'oldfieldtype': u'Link', - 'options': u'Other Charges', + 'options': u'Sales Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -736,7 +736,7 @@ 'label': u'Taxes1', 'oldfieldname': u'other_charges', 'oldfieldtype': u'Table', - 'options': u'RV Tax Detail', + 'options': u'Sales Taxes and Charges', 'permlevel': 0 }, @@ -960,7 +960,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1 }, @@ -997,7 +997,7 @@ 'doctype': u'DocField', 'fieldname': u'terms', 'fieldtype': u'Text Editor', - 'label': u'Term Details', + 'label': u'Terms and Conditions Details', 'oldfieldname': u'terms', 'oldfieldtype': u'Text Editor', 'permlevel': 0 @@ -1262,10 +1262,10 @@ 'doctype': u'DocField', 'fieldname': u'advance_adjustment_details', 'fieldtype': u'Table', - 'label': u'Advance Adjustment Detail', + 'label': u'Sales Invoice Advance', 'oldfieldname': u'advance_adjustment_details', 'oldfieldtype': u'Table', - 'options': u'Advance Adjustment Detail', + 'options': u'Sales Invoice Advance', 'permlevel': 0, 'print_hide': 1 }, diff --git a/erpnext/accounts/doctype/receivable_voucher/__init__.py b/erpnext/accounts/doctype/sales_invoice_advance/__init__.py similarity index 100% rename from erpnext/accounts/doctype/receivable_voucher/__init__.py rename to erpnext/accounts/doctype/sales_invoice_advance/__init__.py diff --git a/erpnext/accounts/doctype/advance_adjustment_detail/advance_adjustment_detail.txt b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt similarity index 92% rename from erpnext/accounts/doctype/advance_adjustment_detail/advance_adjustment_detail.txt rename to erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt index 794470b0951..5725246d9af 100644 --- a/erpnext/accounts/doctype/advance_adjustment_detail/advance_adjustment_detail.txt +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.txt @@ -1,4 +1,4 @@ -# DocType, Advance Adjustment Detail +# DocType, Sales Invoice Advance [ # These values are common in all dictionaries @@ -28,15 +28,15 @@ 'doctype': u'DocField', 'name': '__common__', 'no_copy': 1, - 'parent': u'Advance Adjustment Detail', + 'parent': u'Sales Invoice Advance', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Advance Adjustment Detail + # DocType, Sales Invoice Advance { 'doctype': 'DocType', - 'name': u'Advance Adjustment Detail' + 'name': u'Sales Invoice Advance' }, # DocField diff --git a/erpnext/accounts/doctype/rv_detail/__init__.py b/erpnext/accounts/doctype/sales_invoice_item/__init__.py similarity index 100% rename from erpnext/accounts/doctype/rv_detail/__init__.py rename to erpnext/accounts/doctype/sales_invoice_item/__init__.py diff --git a/erpnext/accounts/doctype/rv_detail/rv_detail.txt b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt similarity index 98% rename from erpnext/accounts/doctype/rv_detail/rv_detail.txt rename to erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt index aa4c8e516e4..acb1d95e2eb 100644 --- a/erpnext/accounts/doctype/rv_detail/rv_detail.txt +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt @@ -1,4 +1,4 @@ -# DocType, RV Detail +# DocType, Sales Invoice Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'RV Detail', + 'parent': u'Sales Invoice Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, RV Detail + # DocType, Sales Invoice Item { 'doctype': 'DocType', - 'name': u'RV Detail' + 'name': u'Sales Invoice Item' }, # DocField diff --git a/erpnext/accounts/doctype/rv_tax_detail/__init__.py b/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py similarity index 100% rename from erpnext/accounts/doctype/rv_tax_detail/__init__.py rename to erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py diff --git a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt similarity index 96% rename from erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt rename to erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt index 6dbdc400d7d..b8c8a5ee034 100644 --- a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.txt @@ -1,4 +1,4 @@ -# DocType, RV Tax Detail +# DocType, Sales Taxes and Charges [ # These values are common in all dictionaries @@ -30,15 +30,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'RV Tax Detail', + 'parent': u'Sales Taxes and Charges', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, RV Tax Detail + # DocType, Sales Taxes and Charges { 'doctype': 'DocType', - 'name': u'RV Tax Detail' + 'name': u'Sales Taxes and Charges' }, # DocField diff --git a/erpnext/accounts/doctype/tds_control/tds_control.js b/erpnext/accounts/doctype/tds_control/tds_control.js index fae4dd9c745..89f1301c429 100644 --- a/erpnext/accounts/doctype/tds_control/tds_control.js +++ b/erpnext/accounts/doctype/tds_control/tds_control.js @@ -25,14 +25,14 @@ class DocType: # voucher in which tds was applicable for 1st time def validate_first_entry(self,obj): - if obj.doc.doctype == 'Payable Voucher': + if obj.doc.doctype == 'Purchase Invoice': supp_acc = obj.doc.credit_to elif obj.doc.doctype == 'Journal Voucher': supp_acc = obj.doc.supplier_account if obj.doc.ded_amount: # first pv - first_pv = sql("select posting_date from `tabPayable Voucher` where credit_to = '%s' and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) + first_pv = sql("select posting_date from `tabPurchase Invoice` where credit_to = '%s' and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) first_pv_date = first_pv and first_pv[0][0] or '' # first jv first_jv = sql("select posting_date from `tabJournal Voucher` where supplier_account = '%s'and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) @@ -58,7 +58,7 @@ class DocType: self.validate_first_entry(obj) # get current amount and supplier head - if obj.doc.doctype == 'Payable Voucher': + if obj.doc.doctype == 'Purchase Invoice': supplier_account = obj.doc.credit_to total_amount=flt(obj.doc.grand_total) for d in getlist(obj.doclist,'advance_allocation_details'): @@ -71,7 +71,7 @@ class DocType: if obj.doc.tds_category: # get total billed total_billed = 0 - pv = sql("select sum(ifnull(grand_total,0)), sum(ifnull(ded_amount,0)) from `tabPayable Voucher` where tds_category = %s and credit_to = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) + pv = sql("select sum(ifnull(grand_total,0)), sum(ifnull(ded_amount,0)) from `tabPurchase Invoice` where tds_category = %s and credit_to = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) jv = sql("select sum(ifnull(total_debit,0)), sum(ifnull(ded_amount,0)) from `tabJournal Voucher` where tds_category = %s and supplier_account = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) tds_in_pv = pv and pv[0][1] or 0 tds_in_jv = jv and jv[0][1] or 0 diff --git a/erpnext/accounts/doctype/tds_control/tds_control.py b/erpnext/accounts/doctype/tds_control/tds_control.py index be1945de73d..ccbee7c353d 100644 --- a/erpnext/accounts/doctype/tds_control/tds_control.py +++ b/erpnext/accounts/doctype/tds_control/tds_control.py @@ -44,14 +44,14 @@ class DocType: # voucher in which tds was applicable for 1st time def validate_first_entry(self,obj): - if obj.doc.doctype == 'Payable Voucher': + if obj.doc.doctype == 'Purchase Invoice': supp_acc = obj.doc.credit_to elif obj.doc.doctype == 'Journal Voucher': supp_acc = obj.doc.supplier_account if obj.doc.ded_amount: # first pv - first_pv = sql("select posting_date from `tabPayable Voucher` where credit_to = '%s' and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) + first_pv = sql("select posting_date from `tabPurchase Invoice` where credit_to = '%s' and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) first_pv_date = first_pv and first_pv[0][0] or '' # first jv first_jv = sql("select posting_date from `tabJournal Voucher` where supplier_account = '%s'and docstatus = 1 and tds_category = '%s' and fiscal_year = '%s' and tds_applicable = 'Yes' and (ded_amount != 0 or ded_amount is not null) order by posting_date asc limit 1"%(supp_acc, obj.doc.tds_category, obj.doc.fiscal_year)) @@ -77,7 +77,7 @@ class DocType: self.validate_first_entry(obj) # get current amount and supplier head - if obj.doc.doctype == 'Payable Voucher': + if obj.doc.doctype == 'Purchase Invoice': supplier_account = obj.doc.credit_to total_amount=flt(obj.doc.grand_total) for d in getlist(obj.doclist,'advance_allocation_details'): @@ -90,7 +90,7 @@ class DocType: if obj.doc.tds_category: # get total billed total_billed = 0 - pv = sql("select sum(ifnull(grand_total,0)), sum(ifnull(ded_amount,0)) from `tabPayable Voucher` where tds_category = %s and credit_to = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) + pv = sql("select sum(ifnull(grand_total,0)), sum(ifnull(ded_amount,0)) from `tabPurchase Invoice` where tds_category = %s and credit_to = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) jv = sql("select sum(ifnull(total_debit,0)), sum(ifnull(ded_amount,0)) from `tabJournal Voucher` where tds_category = %s and supplier_account = %s and fiscal_year = %s and docstatus = 1 and name != %s and is_opening != 'Yes'", (obj.doc.tds_category, supplier_account, obj.doc.fiscal_year, obj.doc.name)) tds_in_pv = pv and pv[0][1] or 0 tds_in_jv = jv and jv[0][1] or 0 diff --git a/erpnext/accounts/doctype/tds_payment/tds_payment.py b/erpnext/accounts/doctype/tds_payment/tds_payment.py index cf974265384..0885c3f7a53 100644 --- a/erpnext/accounts/doctype/tds_payment/tds_payment.py +++ b/erpnext/accounts/doctype/tds_payment/tds_payment.py @@ -77,7 +77,7 @@ class DocType: msgprint("Please enter from date and to date") else: idx = 1 - pv_det= sql("Select name,credit_to,grand_total,posting_date, ded_amount from `tabPayable Voucher` where tds_category='%s' And posting_date>= '%s' And posting_date <='%s' and docstatus=1 and ded_amount > 0 Order By posting_date"%(self.doc.tds_category,self.doc.from_date,self.doc.to_date)) + pv_det= sql("Select name,credit_to,grand_total,posting_date, ded_amount from `tabPurchase Invoice` where tds_category='%s' And posting_date>= '%s' And posting_date <='%s' and docstatus=1 and ded_amount > 0 Order By posting_date"%(self.doc.tds_category,self.doc.from_date,self.doc.to_date)) if pv_det: idx = self.make_tds_table(pv_det, idx) diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js index f4da7e8135c..1f1953798d5 100644 --- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js @@ -22,7 +22,7 @@ report.customize_filters = function() { this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0; - this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Payable Voucher', report_default:'Aging Date'}); + this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Purchase Invoice', report_default:'Aging Date'}); this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:30}); this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:45}); this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:60}); diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py index cbb622fcf15..2ace21cb0aa 100644 --- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py +++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py @@ -89,11 +89,11 @@ for each in sql("select t2.name, t1.supplier_type from tabSupplier t1, tabAccoun # get due_date, bill_no, bill_date from PV pv_dict = {} -for t in sql("select name, due_date, bill_no, bill_date from `tabPayable Voucher` group by name"): +for t in sql("select name, due_date, bill_no, bill_date from `tabPurchase Invoice` group by name"): pv_dict[t[0]] = [cstr(t[1]), t[2], cstr(t[3])] # pv outside this period -pv_outside_period = [d[0] for d in sql("select distinct name from `tabPayable Voucher` where (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (from_date, to_date))] +pv_outside_period = [d[0] for d in sql("select distinct name from `tabPurchase Invoice` where (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (from_date, to_date))] out = [] @@ -106,17 +106,17 @@ for r in res: # supplier type r.append(supp_type_dict.get(r[col_idx['Account']], '')) - if r[col_idx['Voucher Type']] == 'Payable Voucher': + if r[col_idx['Voucher Type']] == 'Purchase Invoice': r += pv_dict.get(r[col_idx['Voucher No']], ['', '', '']) else: r += ['', '', ''] - # if entry against Payable Voucher - if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Payable Voucher': + # if entry against Purchase Invoice + if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Purchase Invoice': cond = " and ifnull(against_voucher, '') = '%s'" % r[col_idx['Against Voucher']] # if entry against JV & and not adjusted within period - elif r[col_idx['Against Voucher Type']] == 'Payable Voucher' and r[col_idx['Against Voucher']] in pv_outside_period: + elif r[col_idx['Against Voucher Type']] == 'Purchase Invoice' and r[col_idx['Against Voucher']] in pv_outside_period: booking_amt = 0 cond = " and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'" % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']]) @@ -132,7 +132,7 @@ for r in res: total_outstanding_amt += flt(outstanding_amt) # add to total booking amount - if outstanding_amt and r[col_idx['Voucher Type']] == 'Payable Voucher' and r[col_idx['Against Voucher']]: + if outstanding_amt and r[col_idx['Voucher Type']] == 'Purchase Invoice' and r[col_idx['Against Voucher']]: total_booking_amt += flt(booking_amt) r += [booking_amt, outstanding_amt] diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.txt b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.txt index 08c8bc30d08..8d701ec1741 100644 --- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.txt +++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.txt @@ -16,7 +16,7 @@ 'criteria_name': 'Accounts Payable', 'doc_type': 'GL Entry', 'doctype': 'Search Criteria', - 'filters': "{'GL Entry\x01Is Cancelled':'','GL Entry\x01Fiscal Year':'','GL Entry\x01Company':'','Payable Voucher\x01Aging Based On':'Posting Date','GL Entry\x01Range 1':'30','GL Entry\x01Range 2':'45','GL Entry\x01Range 3':'60','GL Entry\x01Range 4':'90'}", + 'filters': "{'GL Entry\x01Is Cancelled':'','GL Entry\x01Fiscal Year':'','GL Entry\x01Company':'','Purchase Invoice\x01Aging Based On':'Posting Date','GL Entry\x01Range 1':'30','GL Entry\x01Range 2':'45','GL Entry\x01Range 3':'60','GL Entry\x01Range 4':'90'}", 'module': 'Accounts', 'name': '__common__', 'sort_by': '`tabGL Entry`.`name`', diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js index efc2ec3289b..60df6c800b9 100644 --- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js @@ -22,7 +22,7 @@ report.customize_filters = function() { this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0; - this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Receivable Voucher', report_default:'Aging Date'}); + this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Sales Invoice', report_default:'Aging Date'}); this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry'}); this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry'}); this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'}); diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py index 5a5f4b4ea00..6cd71fe6520 100644 --- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py @@ -84,10 +84,10 @@ for r in res: r.append(terr and terr[0][0] or '') outstanding_amt, opening_amt, cond, due_date = 0,0, '', '' - # if entry against Receivable Voucher - if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Receivable Voucher': + # if entry against Sales Invoice + if r[col_idx['Against Voucher']] and r[col_idx['Voucher Type']] == 'Sales Invoice': # get due date - due_date = sql("select due_date from `tabReceivable Voucher` where name = '%s'" % r[col_idx['Against Voucher']]) + due_date = sql("select due_date from `tabSales Invoice` where name = '%s'" % r[col_idx['Against Voucher']]) due_date = due_date and cstr(due_date[0][0]) or '' # get booking amt @@ -97,7 +97,7 @@ for r in res: cond = "and against_voucher = '%s' and against_voucher is not null" % r[col_idx['Against Voucher']] # if entry against JV & and not adjusted within period - elif r[col_idx['Against Voucher Type']] == 'Receivable Voucher' and sql("select name from `tabReceivable Voucher` where name = '%s' and (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (r[col_idx['Against Voucher']], from_date, to_date)): + elif r[col_idx['Against Voucher Type']] == 'Sales Invoice' and sql("select name from `tabSales Invoice` where name = '%s' and (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (r[col_idx['Against Voucher']], from_date, to_date)): cond = " and voucher_no = '%s' and ifnull(against_voucher, '') = '%s'" % (r[col_idx['Voucher No']], r[col_idx['Against Voucher']]) # if entry against JV and unadjusted elif not r[col_idx['Against Voucher']]: @@ -108,7 +108,7 @@ for r in res: # add to total outstanding total_outstanding_amt += flt(outstanding_amt) # add to total booking amount - if outstanding_amt and r[col_idx['Voucher Type']] == 'Receivable Voucher' and r[col_idx['Against Voucher']]: + if outstanding_amt and r[col_idx['Voucher Type']] == 'Sales Invoice' and r[col_idx['Against Voucher']]: total_opening_amt += flt(opening_amt) r += [due_date, opening_amt, outstanding_amt] diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js index eb246305e77..272327bc6d2 100644 --- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js +++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js @@ -16,8 +16,8 @@ report.customize_filters = function() { this.hide_all_filters(); - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0; - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Sales Partner'].df.in_first_page = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.in_first_page = 1; } diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt index 34f1f97c82d..1b60cef9cad 100644 --- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt +++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.txt @@ -12,15 +12,15 @@ # These values are common for all Search Criteria { - 'add_col': "SUM(`tabReceivable Voucher`.`total_commission`) AS 'Total Commission'\nSUM(`tabReceivable Voucher`.`net_total`) AS 'Net Total'\n((SUM(`tabReceivable Voucher`.`total_commission`) / SUM(`tabReceivable Voucher`.`net_total`)) * 100) AS 'Average Commission Rate'", - 'add_cond': '`tabReceivable Voucher`.`net_total` > 0\n`tabReceivable Voucher`.`total_commission` > 0', - 'columns': 'Receivable Voucher\x01Business Associate', + 'add_col': "SUM(`tabSales Invoice`.`total_commission`) AS 'Total Commission'\nSUM(`tabSales Invoice`.`net_total`) AS 'Net Total'\n((SUM(`tabSales Invoice`.`total_commission`) / SUM(`tabSales Invoice`.`net_total`)) * 100) AS 'Average Commission Rate'", + 'add_cond': '`tabSales Invoice`.`net_total` > 0\n`tabSales Invoice`.`total_commission` > 0', + 'columns': 'Sales Invoice\x01Business Associate', 'criteria_name': 'Business Associate Commission Report', 'description': 'Track total commission given to your Business Associate', - 'doc_type': 'Receivable Voucher', + 'doc_type': 'Sales Invoice', 'doctype': 'Search Criteria', - 'filters': "{'Receivable Voucher\x01Submitted':1}", - 'group_by': '`tabReceivable Voucher`.sales_partner', + 'filters': "{'Sales Invoice\x01Submitted':1}", + 'group_by': '`tabSales Invoice`.sales_partner', 'module': 'Accounts', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.txt b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.txt index b80e23974bc..806738c0ce8 100644 --- a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.txt +++ b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.txt @@ -16,7 +16,7 @@ 'dis_filters': 'fiscal_year', 'doc_type': 'Journal Voucher Detail', 'doctype': 'Search Criteria', - 'filters': "{'Journal Voucher\x01Submitted':1,'Journal Voucher\x01Voucher Type':'','Journal Voucher\x01Is Opening':'','Journal Voucher\x01Fiscal Year':'','Journal Voucher\x01Company':'','Journal Voucher\x01TDS Applicable':'','Journal Voucher\x01TDS Category':'','Receivable Voucher\x01Aging Based On':'','Payable Voucher\x01Aging Based On':'Transaction Date','Journal Voucher Detail\x01Report Type':'CENVAT CREDIT ACCOUNT - INPUTS (R.G.23 A - PART II)'}", + 'filters': "{'Journal Voucher\x01Submitted':1,'Journal Voucher\x01Voucher Type':'','Journal Voucher\x01Is Opening':'','Journal Voucher\x01Fiscal Year':'','Journal Voucher\x01Company':'','Journal Voucher\x01TDS Applicable':'','Journal Voucher\x01TDS Category':'','Sales Invoice\x01Aging Based On':'','Purchase Invoice\x01Aging Based On':'Transaction Date','Journal Voucher Detail\x01Report Type':'CENVAT CREDIT ACCOUNT - INPUTS (R.G.23 A - PART II)'}", 'module': 'Accounts', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.js b/erpnext/accounts/search_criteria/collection_report/collection_report.js index 411c4aa0e2a..dfa58a66d3c 100644 --- a/erpnext/accounts/search_criteria/collection_report/collection_report.js +++ b/erpnext/accounts/search_criteria/collection_report/collection_report.js @@ -28,7 +28,7 @@ report.customize_filters = function() { this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'}); this.add_filter({fieldname:'range_4', label:'Range 4', fieldtype:'Data', ignore : 1, parent:'GL Entry'}); - this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date',ignore : 1, parent:'Receivable Voucher', 'report_default': 'Aging Date'}); + this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date',ignore : 1, parent:'Sales Invoice', 'report_default': 'Aging Date'}); this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1; this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1; this.filter_fields_dict['Journal Voucher Detail'+FILTER_SEP +'Account'].df.in_first_page = 1; diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.py b/erpnext/accounts/search_criteria/collection_report/collection_report.py index c0f6e6144c1..f08fe5c6fd9 100644 --- a/erpnext/accounts/search_criteria/collection_report/collection_report.py +++ b/erpnext/accounts/search_criteria/collection_report/collection_report.py @@ -66,7 +66,7 @@ for r in row_list: for r in res: if r[col_idx['Against Receivable']]: - dt=sql("select date(modified), Aging_date from `tabReceivable Voucher` where name='%s'"%r[col_idx['Against Receivable']]) + dt=sql("select date(modified), Aging_date from `tabSales Invoice` where name='%s'"%r[col_idx['Against Receivable']]) r.append('') r.append(dt and cstr(dt[0][0]) or '') r.append(dt and cstr(dt[0][1]) or '') diff --git a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js index ecd50572bce..02703575f2a 100644 --- a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js +++ b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js @@ -18,16 +18,16 @@ report.customize_filters = function() { this.hide_all_filters(); filter_list = ['From Voucher Date', 'To Voucher Date', 'Credit To', 'Is Opening', 'From Posting Date', 'To Posting Date'] for(var i=0;i='].df.filter_hide = 1; - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Grand Total <='].df.filter_hide = 1; - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 1; - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Sales Partner'].df.filter_hide = 1; - this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Is Opening'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date()); + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'ID'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Owner'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Saved'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Submitted'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Cancelled'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Grand Total >='].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Grand Total <='].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Sales Partner'].df.filter_hide = 1; + this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'Is Opening'].df.filter_hide = 1; } diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.py b/erpnext/accounts/search_criteria/sales_register/sales_register.py index 8bb6903e75f..9fdfb009619 100644 --- a/erpnext/accounts/search_criteria/sales_register/sales_register.py +++ b/erpnext/accounts/search_criteria/sales_register/sales_register.py @@ -17,14 +17,14 @@ # add additional columns cl = [c[0] for c in sql("""select distinct account_head - from `tabRV Tax Detail` - where parenttype='Receivable Voucher' + from `tabSales Taxes and Charges` + where parenttype='Sales Invoice' and docstatus=1 order by account_head asc""")] income_acc = [c[0] for c in sql("""select distinct income_account - from `tabRV Detail` - where parenttype='Receivable Voucher' + from `tabSales Invoice Item` + where parenttype='Sales Invoice' and docstatus=1 order by income_account asc""")] @@ -53,9 +53,9 @@ for r in res: #Get amounts for income account income_acc_list = sql("""select income_account, sum(amount) - from `tabRV Detail` + from `tabSales Invoice Item` where parent = %s - and parenttype='Receivable Voucher' + and parenttype='Sales Invoice' group by income_account""", (r[col_idx['ID']],)) #convert the result to dictionary for easy retrieval @@ -78,9 +78,9 @@ for r in res: #Get tax for account heads acc_head_tax = sql("""select account_head, tax_amount - from `tabRV Tax Detail` + from `tabSales Taxes and Charges` where parent = '%s' - and parenttype = 'Receivable Voucher'""" %(r[col_idx['ID']],)) + and parenttype = 'Sales Invoice'""" %(r[col_idx['ID']],)) #Convert the result to dictionary for easy retrieval acc_head_tax_dict = {} diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.txt b/erpnext/accounts/search_criteria/sales_register/sales_register.txt index c780fbd799d..fcdaf379046 100644 --- a/erpnext/accounts/search_criteria/sales_register/sales_register.txt +++ b/erpnext/accounts/search_criteria/sales_register/sales_register.txt @@ -13,14 +13,14 @@ # These values are common for all Search Criteria { 'add_col': "`tabAccount`.`parent_account` AS 'Parent Account'\n`tabCustomer`.`territory` AS 'Territory'\n`tabCustomer`.`customer_details` AS 'Customer Details'", - 'add_cond': "ifnull(`tabReceivable Voucher`.`is_opening`, 'No') = 'No'\n`tabAccount`.name =`tabReceivable Voucher`.debit_to\n`tabCustomer`.`name` = `tabAccount`.`master_name`", + 'add_cond': "ifnull(`tabSales Invoice`.`is_opening`, 'No') = 'No'\n`tabAccount`.name =`tabSales Invoice`.debit_to\n`tabCustomer`.`name` = `tabAccount`.`master_name`", 'add_tab': '`tabAccount`\n`tabCustomer`', - 'columns': 'Receivable Voucher\x01ID,Receivable Voucher\x01Posting Date,Receivable Voucher\x01Debit To', + 'columns': 'Sales Invoice\x01ID,Sales Invoice\x01Posting Date,Sales Invoice\x01Debit To', 'criteria_name': 'Sales Register', 'dis_filters': 'fiscal_year', - 'doc_type': 'Receivable Voucher', + 'doc_type': 'Sales Invoice', 'doctype': 'Search Criteria', - 'filters': "{'Receivable Voucher\x01Submitted':1,'Receivable Voucher\x01Is Opening':''}", + 'filters': "{'Sales Invoice\x01Submitted':1,'Sales Invoice\x01Is Opening':''}", 'module': 'Accounts', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js index 41ead1cf7a8..94896306586 100644 --- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js +++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js @@ -18,13 +18,13 @@ report.customize_filters = function() { this.hide_all_filters(); //Add filter - this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice', report_default:'Sales Invoice', ignore : 1,parent:'RV Tax Detail', single_select :1, in_first_page:1}); + this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice', report_default:'Sales Invoice', ignore : 1,parent:'Sales Taxes and Charges', single_select :1, in_first_page:1}); - this.add_filter({fieldname:'posting_date', label:'Date', fieldtype:'Date', options:'', ignore : 1,parent:'RV Tax Detail', in_first_page:1}); + this.add_filter({fieldname:'posting_date', label:'Date', fieldtype:'Date', options:'', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1}); - this.add_filter({fieldname:'voucher_id', label:'Voucher Id', fieldtype:'Data', options:'', ignore : 1,parent:'RV Tax Detail', in_first_page:1}); + this.add_filter({fieldname:'voucher_id', label:'Voucher Id', fieldtype:'Data', options:'', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1}); - this.add_filter({fieldname:'tax_account', label:'Tax Account', fieldtype:'Link', options:'Account', ignore : 1,parent:'RV Tax Detail', in_first_page:1}); + this.add_filter({fieldname:'tax_account', label:'Tax Account', fieldtype:'Link', options:'Account', ignore : 1,parent:'Sales Taxes and Charges', in_first_page:1}); } @@ -36,15 +36,15 @@ this.mytabs.items['Select Columns'].hide(); // Get query //-------------------------------------- report.get_query = function() { - based_on = this.get_filter('RV Tax Detail', 'Based On').get_value(); - from_date = this.get_filter('RV Tax Detail', 'From Date').get_value(); - to_date = this.get_filter('RV Tax Detail', 'To Date').get_value(); - vid = this.get_filter('RV Tax Detail', 'Voucher Id').get_value(); - acc = this.get_filter('RV Tax Detail', 'Tax Account').get_value(); + based_on = this.get_filter('Sales Taxes and Charges', 'Based On').get_value(); + from_date = this.get_filter('Sales Taxes and Charges', 'From Date').get_value(); + to_date = this.get_filter('Sales Taxes and Charges', 'To Date').get_value(); + vid = this.get_filter('Sales Taxes and Charges', 'Voucher Id').get_value(); + acc = this.get_filter('Sales Taxes and Charges', 'Tax Account').get_value(); date_fld = 'transaction_date'; if(based_on == 'Sales Invoice') { - based_on = 'Receivable Voucher'; + based_on = 'Sales Invoice'; date_fld = 'voucher_date'; } @@ -55,7 +55,7 @@ report.get_query = function() { if (acc) sp_cond += repl(' AND t2.account_head = "%(acc)s"', {acc:acc}); return repl('SELECT t1.`name`, t1.`%(dt)s`, t1.`customer_name`, t1.net_total, t2.account_head, t2.description, t2.rate, t2.tax_amount \ - FROM `tab%(parent)s` t1, `tabRV Tax Detail` t2 \ + FROM `tab%(parent)s` t1, `tabSales Taxes and Charges` t2 \ WHERE t1.docstatus=1 AND t2.`parenttype` = "%(parent)s" \ AND t2.`parent` = t1.`name` \ %(cond)s ORDER BY t1.`name` DESC, t1.%(dt)s DESC', {parent:based_on, cond:sp_cond, dt:date_fld}); diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py index 4dbfb5256b9..43dd9543474 100644 --- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py +++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py @@ -15,7 +15,7 @@ # along with this program. If not, see . if filter_values.get('based_on') == 'Sales Invoice': - based_on_dt = 'Receivable Voucher' + based_on_dt = 'Sales Invoice' else: based_on_dt = filter_values.get('based_on') diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt index c152c7905f4..3d1ed07c448 100644 --- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt +++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.txt @@ -12,16 +12,16 @@ # These values are common for all Search Criteria { - 'columns': 'RV Tax Detail\x01Type,RV Tax Detail\x01Account Head,RV Tax Detail\x01Cost Center,RV Tax Detail\x01Description,RV Tax Detail\x01Rate,RV Tax Detail\x01Amount*,RV Tax Detail\x01Total*', + 'columns': 'Sales Taxes and Charges\x01Type,Sales Taxes and Charges\x01Account Head,Sales Taxes and Charges\x01Cost Center,Sales Taxes and Charges\x01Description,Sales Taxes and Charges\x01Rate,Sales Taxes and Charges\x01Amount*,Sales Taxes and Charges\x01Total*', 'criteria_name': 'Voucher wise tax details', - 'doc_type': 'RV Tax Detail', + 'doc_type': 'Sales Taxes and Charges', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Fiscal Year':''}", 'module': 'Accounts', 'name': '__common__', 'page_len': 50, 'parent_doc_type': 'Delivery Note', - 'sort_by': '`tabRV Tax Detail`.`parent`', + 'sort_by': '`tabSales Taxes and Charges`.`parent`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/analysis/doctype/mis_control/mis_control.py b/erpnext/analysis/doctype/mis_control/mis_control.py index b2c85f89cb4..9f8dfa4161d 100644 --- a/erpnext/analysis/doctype/mis_control/mis_control.py +++ b/erpnext/analysis/doctype/mis_control/mis_control.py @@ -96,10 +96,10 @@ class DocType: ret = {} st,group = [],[] if module == 'Sales': - st = ['Quotation','Sales Order','Delivery Note','Receivable Voucher'] + st = ['Quotation','Sales Order','Delivery Note','Sales Invoice'] group = ['Item','Item Group','Customer','Customer Group','Cost Center'] elif module == 'Purchase': - st = ['Purchase Order','Purchase Receipt','Payable Voucher'] + st = ['Purchase Order','Purchase Receipt','Purchase Invoice'] group = ['Item','Item Group','Supplier','Supplier Type'] ret['stmt_type'] = st diff --git a/erpnext/analysis/doctype/ta_control/__init__.py b/erpnext/analysis/doctype/trend_analyzer_control/__init__.py similarity index 100% rename from erpnext/analysis/doctype/ta_control/__init__.py rename to erpnext/analysis/doctype/trend_analyzer_control/__init__.py diff --git a/erpnext/analysis/doctype/ta_control/ta_control.py b/erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.py similarity index 98% rename from erpnext/analysis/doctype/ta_control/ta_control.py rename to erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.py index f06394c679a..25c4492f587 100755 --- a/erpnext/analysis/doctype/ta_control/ta_control.py +++ b/erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.py @@ -42,7 +42,7 @@ class DocType: def define_globals(self, trans, fiscal_year): self.month_name = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] - if trans == 'Purchase Receipt' or trans == 'Delivery Note' or trans == 'Payable Voucher' or trans == 'Receivable Voucher': + if trans == 'Purchase Receipt' or trans == 'Delivery Note' or trans == 'Purchase Invoice' or trans == 'Sales Invoice': self.trans_date = 'posting_date' else: self.trans_date = 'transaction_date' diff --git a/erpnext/analysis/doctype/ta_control/ta_control.txt b/erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.txt similarity index 83% rename from erpnext/analysis/doctype/ta_control/ta_control.txt rename to erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.txt index f3cbebc8e73..1d76b06a83f 100755 --- a/erpnext/analysis/doctype/ta_control/ta_control.txt +++ b/erpnext/analysis/doctype/trend_analyzer_control/trend_analyzer_control.txt @@ -1,4 +1,4 @@ -# DocType, TA Control +# DocType, Trend Analyzer Control [ # These values are common in all dictionaries @@ -24,9 +24,9 @@ 'version': 11 }, - # DocType, TA Control + # DocType, Trend Analyzer Control { 'doctype': 'DocType', - 'name': u'TA Control' + 'name': u'Trend Analyzer Control' } ] \ No newline at end of file diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js index a25215cea47..dd3e75082bd 100644 --- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js +++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js @@ -80,14 +80,14 @@ report.get_query = function() { add_col = ''; add_tables = ''; sp_cond = ''; - if(trans == 'Sales Invoice') trans = 'Receivable Voucher'; - else if(trans == 'Purchase Invoice') trans = 'Payable Voucher'; + if(trans == 'Sales Invoice') trans = 'Sales Invoice'; + else if(trans == 'Purchase Invoice') trans = 'Purchase Invoice'; trans_det = trans+' Detail' - if(trans == 'Receivable Voucher') trans_det = 'RV Detail'; - else if(trans == 'Payable Voucher') trans_det = 'PV Detail'; - else if(trans == 'Purchase Order') trans_det = 'PO 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'; if(order_type != '') add_code += ' AND t1.order_type = '+order_type; @@ -117,7 +117,7 @@ report.get_query = function() { if(supp_type) add_cond += ' AND t1.supplier_type = "'+supp_type+'"'; break; case 'Project' : pro = this.get_filter('Profile', 'Project').get_value(); - if (inList(['Purchase Order', 'Purchase Receipt', 'Payable Voucher'], trans)) { + if (inList(['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'], trans)) { col = 'DISTINCT t2.project_name'; if(pro) add_cond += ' AND t2.project_name = "'+pro+'"'; } else { diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py index 21982048944..278cfd6c789 100644 --- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py +++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py @@ -39,16 +39,16 @@ project = filter_values.get('project') # ********************************************* SET DEFAULTS ************************************************** # Details Table # -------------- -if trans == 'Sales Invoice': trans = 'Receivable Voucher' -elif trans == 'Purchase Invoice': trans = 'Payable Voucher' +if trans == 'Sales Invoice': trans = 'Sales Invoice' +elif trans == 'Purchase Invoice': trans = 'Purchase Invoice' trans_det = trans+' Detail' -if trans == 'Receivable Voucher': trans_det = 'RV Detail' -elif trans == 'Payable Voucher': trans_det = 'PV Detail' -elif trans == 'Purchase Order': trans_det = 'PO 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' -col_names, query_val = get_obj('TA Control').get_single_year_query_value(fiscal_year, period, trans, trans_det) +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)' col_names.append('Total (Qty)') @@ -134,7 +134,7 @@ if supplier_type or based_on == 'Supplier Type': # Project if project or based_on == 'Project': - if trans in ['Purchase Order', 'Purchase Receipt', 'Payable Voucher']: + if trans in ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']: add_cond += ' AND t2.project_name = "%s"' % (based_on != 'Project' and project or '%(value)s') else: add_cond += ' AND t1.project_name = "%s"' % (based_on != 'Project' and project or '%(value)s') diff --git a/erpnext/buying/DocType Label/Indent/Indent.txt b/erpnext/buying/DocType Label/Indent/Indent.txt index 4ff47249943..ec6d001f551 100644 --- a/erpnext/buying/DocType Label/Indent/Indent.txt +++ b/erpnext/buying/DocType Label/Indent/Indent.txt @@ -1,4 +1,4 @@ -# DocType Label, Indent +# DocType Label, Purchase Request [ # These values are common in all dictionaries @@ -13,14 +13,14 @@ # These values are common for all DocType Label { 'doctype': 'DocType Label', - 'dt': 'Indent', + 'dt': 'Purchase Request', 'dt_label': 'Purchase Requisition', 'name': '__common__' }, - # DocType Label, Indent + # DocType Label, Purchase Request { 'doctype': 'DocType Label', - 'name': 'Indent' + 'name': 'Purchase Request' } ] \ No newline at end of file diff --git a/erpnext/buying/DocType Mapper/Indent-Purchase Order/Indent-Purchase Order.txt b/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt similarity index 87% rename from erpnext/buying/DocType Mapper/Indent-Purchase Order/Indent-Purchase Order.txt rename to erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt index fa9ab061b8e..beb92821e6d 100644 --- a/erpnext/buying/DocType Mapper/Indent-Purchase Order/Indent-Purchase Order.txt +++ b/erpnext/buying/DocType Mapper/Purchase Request-Purchase Order/Purchase Request-Purchase Order.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Indent-Purchase Order +# DocType Mapper, Purchase Request-Purchase Order [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': u'Table Mapper Detail', 'name': '__common__', - 'parent': u'Indent-Purchase Order', + 'parent': u'Purchase Request-Purchase Order', 'parentfield': u'table_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -24,7 +24,7 @@ 'doctype': u'Field Mapper Detail', 'map': u'Yes', 'name': '__common__', - 'parent': u'Indent-Purchase Order', + 'parent': u'Purchase Request-Purchase Order', 'parentfield': u'field_mapper_details', 'parenttype': u'DocType Mapper' }, @@ -32,17 +32,17 @@ # These values are common for all DocType Mapper { 'doctype': u'DocType Mapper', - 'from_doctype': u'Indent', + 'from_doctype': u'Purchase Request', 'module': u'Buying', 'name': '__common__', 'ref_doc_submitted': 1, 'to_doctype': u'Purchase Order' }, - # DocType Mapper, Indent-Purchase Order + # DocType Mapper, Purchase Request-Purchase Order { 'doctype': u'DocType Mapper', - 'name': u'Indent-Purchase Order' + 'name': u'Purchase Request-Purchase Order' }, # Field Mapper Detail @@ -121,7 +121,7 @@ # Table Mapper Detail { 'doctype': u'Table Mapper Detail', - 'from_table': u'Indent', + 'from_table': u'Purchase Request', 'match_id': 0, 'reference_key': u'prevdoc_docname', 'to_table': u'Purchase Order', @@ -132,11 +132,11 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'indent_details', - 'from_table': u'Indent Detail', + 'from_table': u'Purchase Request Item', 'match_id': 1, 'reference_doctype_key': u'prevdoc_doctype', 'to_field': u'po_details', - 'to_table': u'PO Detail', + 'to_table': u'Purchase Order Item', 'validation_logic': u'qty > ifnull(ordered_qty,0) and docstatus =1' } ] \ No newline at end of file diff --git a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt b/erpnext/buying/DocType Mapper/Sales Order-Purchase Request/Sales Order-Purchase Request.txt similarity index 85% rename from erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt rename to erpnext/buying/DocType Mapper/Sales Order-Purchase Request/Sales Order-Purchase Request.txt index b4dafc9a2f7..26e45462f5b 100755 --- a/erpnext/buying/DocType Mapper/Sales Order-Indent/Sales Order-Indent.txt +++ b/erpnext/buying/DocType Mapper/Sales Order-Purchase Request/Sales Order-Purchase Request.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Sales Order-Indent +# DocType Mapper, Sales Order-Purchase Request [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': 'Table Mapper Detail', 'name': '__common__', - 'parent': 'Sales Order-Indent', + 'parent': 'Sales Order-Purchase Request', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': 'Field Mapper Detail', 'name': '__common__', - 'parent': 'Sales Order-Indent', + 'parent': 'Sales Order-Purchase Request', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -35,13 +35,13 @@ 'module': 'Buying', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': 'Indent' + 'to_doctype': 'Purchase Request' }, - # DocType Mapper, Sales Order-Indent + # DocType Mapper, Sales Order-Purchase Request { 'doctype': 'DocType Mapper', - 'name': 'Sales Order-Indent' + 'name': 'Sales Order-Purchase Request' }, # Field Mapper Detail @@ -95,12 +95,12 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'sales_order_details', - 'from_table': 'Sales Order Detail', + 'from_table': 'Sales Order Item', 'match_id': 1, 'reference_doctype_key': 'prevdoc_doctype', 'reference_key': 'prevdoc_detail_docname', 'to_field': 'indent_details', - 'to_table': 'Indent Detail', + 'to_table': 'Purchase Request Item', 'validation_logic': 'docstatus=1' }, @@ -110,7 +110,7 @@ 'from_table': 'Sales Order', 'match_id': 0, 'reference_key': 'prevdoc_docname', - 'to_table': 'Indent', + 'to_table': 'Purchase Request', 'validation_logic': 'docstatus = 1' } ] \ No newline at end of file diff --git a/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt b/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt index 604d2d81788..fd074e3f093 100644 --- a/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt +++ b/erpnext/buying/Print Format/Purchase Order Classic/Purchase Order Classic.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Purchase Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Buying', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt b/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt index f5cafe43351..90a135e5bbd 100644 --- a/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt +++ b/erpnext/buying/Print Format/Purchase Order Modern/Purchase Order Modern.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Purchase Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order No.
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order No.
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Buying', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt b/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt index 70d6961f4d7..7b0510de33f 100644 --- a/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt +++ b/erpnext/buying/Print Format/Purchase Order Spartan/Purchase Order Spartan.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Purchase Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Purchase Order Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Buying', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index 462a9eeedd2..22640ba7062 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -79,7 +79,7 @@ var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) { for (d in par_cols_import) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_import[d]+' (' + doc.currency + ')'; cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')'; - if (doc.doctype == 'Payable Voucher') { + if (doc.doctype == 'Purchase Invoice') { cur_frm.fields_dict['total_tds_on_voucher'].label_area.innerHTML = 'Total TDS On Voucher (' + base_curr + ')'; cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')'; cur_frm.fields_dict['tds_amount_on_advance'].label_area.innerHTML = 'TDS Amount On Advance (' + base_curr + ')'; @@ -103,12 +103,12 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { for (f in item_cols_base) { cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide); } - if (doc.doctype == 'Payable Voucher') { + if (doc.doctype == 'Purchase Invoice') { $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')'); cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide); // advance table flds adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'} - for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')'); + for (d in adv_cols) $('[data-grid-fieldname="Purchase Invoice Advance-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')'); } else { $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')'); @@ -117,7 +117,7 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { //tax table flds tax_cols = {'tax_amount': 'Amount', 'total': 'Aggregate Total'}; - for (d in tax_cols) $('[data-grid-fieldname="Purchase Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')'); + for (d in tax_cols) $('[data-grid-fieldname="Purchase Taxes and Charges-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')'); } // Change label dynamically based on currency @@ -282,7 +282,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) { cur_frm.cscript.calc_amount(doc, 1); // calculate advances if pv - if(doc.doctype == 'Payable Voucher') calc_total_advance(doc, cdt, cdn); + if(doc.doctype == 'Purchase Invoice') calc_total_advance(doc, cdt, cdn); } // **************** RE-CALCULATE VALUES *************************** @@ -294,7 +294,7 @@ cur_frm.cscript['Re-Calculate Values'] = function(doc, cdt, cdn) { cur_frm.cscript['Calculate Tax'] = function(doc, cdt, cdn) { var other_fname = cur_frm.cscript.other_fname; - var cl = getchildren('Purchase Tax Detail', doc.name, other_fname, doc.doctype); + var cl = getchildren('Purchase Taxes and Charges', doc.name, other_fname, doc.doctype); for(var i = 0; i 0) { - var cl = getchildren('Purchase Tax Detail', doc.name, other_fname,doc.doctype); + var cl = getchildren('Purchase Taxes and Charges', doc.name, other_fname,doc.doctype); for(var i = 0; i now())" % cstr(d.item_code) , as_dict = 1) ltd = item and cint(item[0]['lead_time_days']) or 0 if ltd and obj.doc.transaction_date: - if d.fields.has_key('lead_time_date') or obj.doc.doctype == 'Indent': + if d.fields.has_key('lead_time_date') or obj.doc.doctype == 'Purchase Request': d.lead_time_date = cstr(add_days( obj.doc.transaction_date, cint(ltd))) if not d.fields.has_key('prevdoc_docname') or (d.fields.has_key('prevdoc_docname') and not d.prevdoc_docname): d.schedule_date = cstr( add_days( obj.doc.transaction_date, cint(ltd))) @@ -108,7 +108,7 @@ class DocType(TransactionBase): # Get TERMS AND CONDITIONS # ======================================================================================= def get_tc_details(self,obj): - r = sql("select terms from `tabTerm` where name = %s", obj.doc.tc_name) + r = sql("select terms from `tabTerms and Conditions` where name = %s", obj.doc.tc_name) if r: obj.doc.terms = r[0][0] # Get Item Details @@ -141,7 +141,7 @@ class DocType(TransactionBase): } # get min_order_qty from item - if obj.doc.doctype == 'Indent': + if obj.doc.doctype == 'Purchase Request': ret['min_order_qty'] = item and flt(item[0]['min_order_qty']) or 0 # get projected qty from bin @@ -221,7 +221,7 @@ class DocType(TransactionBase): bin = sql("select projected_qty from `tabBin` where item_code = %s and warehouse = %s", (d.item_code, d.warehouse), as_dict = 1) f_lst ={'projected_qty': bin and flt(bin[0]['projected_qty']) or 0, 'ordered_qty': 0, 'received_qty' : 0, 'billed_qty': 0} - if d.doctype == 'Purchase Receipt Detail': + if d.doctype == 'Purchase Receipt Item': f_lst.pop('received_qty') for x in f_lst : if d.fields.has_key(x): @@ -261,7 +261,7 @@ class DocType(TransactionBase): raise Exception # Check if UOM has been modified. - if not cstr(data[0]['uom']) == cstr(d.uom) and not cstr(d.prevdoc_doctype) == 'Indent': + if not cstr(data[0]['uom']) == cstr(d.uom) and not cstr(d.prevdoc_doctype) == 'Purchase Request': msgprint("Please check UOM %s of Item %s which is not present in %s %s ." % (d.uom, d.item_code, d.prevdoc_doctype, d.prevdoc_docname)) raise Exception @@ -379,11 +379,11 @@ class DocType(TransactionBase): def get_qty(self,curr_doctype,ref_tab_fname,ref_tab_dn,ref_doc_tname, transaction, curr_parent_name): # Get total Quantities of current doctype (eg. PR) except for qty of this transaction #------------------------------ - # please check as UOM changes from Indent - Purchase Order ,so doing following else uom should be same . + # please check as UOM changes from Purchase Request - Purchase Order ,so doing following else uom should be same . # i.e. in PO uom is NOS then in PR uom should be NOS - # but if in Indent uom KG it can change in PO + # but if in Purchase Request uom KG it can change in PO - get_qty = (transaction == 'Indent - Purchase Order') and 'qty * conversion_factor' or 'qty' + get_qty = (transaction == 'Purchase Request - Purchase Order') and 'qty * conversion_factor' or 'qty' qty = sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1 and parent != '%s'"% ( get_qty, curr_doctype, ref_tab_fname, ref_tab_dn, curr_parent_name)) qty = qty and flt(qty[0][0]) or 0 @@ -403,10 +403,10 @@ class DocType(TransactionBase): qty, max_qty, max_qty_plus_tol = flt(curr_ref_qty.split('~~~')[0]), flt(curr_ref_qty.split('~~~')[1]), flt(curr_ref_qty.split('~~~')[1]) # Qty above Tolerance should be allowed only once. - # But there is special case for Transaction 'Indent-Purhcase Order' that there should be no restriction - # One can create any no. of PO against same Indent!!! + # But there is special case for Transaction 'Purchase Request-Purhcase Order' that there should be no restriction + # One can create any no. of PO against same Purchase Request!!! if qty >= max_qty and is_submit and flt(curr_qty) > 0: - reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Payable Voucher') and 'Billed' + reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Purchase Invoice') and 'Billed' msgprint("Error: Item Code : '%s' of '%s' is already %s." %(item_code,ref_dn,reason)) raise Exception @@ -414,7 +414,7 @@ class DocType(TransactionBase): tolerance = flt(get_value('Item',item_code,'tolerance') or 0) if not(tolerance): - tolerance = flt(get_value('Manage Account',None,'tolerance') or 0) + tolerance = flt(get_value('Global Defaults',None,'tolerance') or 0) if is_submit: qty = qty + flt(curr_qty) @@ -425,7 +425,7 @@ class DocType(TransactionBase): max_qty_plus_tol = max_qty * (1 + (flt(tolerance)/ 100)) if max_qty_plus_tol < qty: - reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Payable Voucher') and 'Billed' + reason = (curr_parent_doctype == 'Purchase Order') and 'Ordered' or (curr_parent_doctype == 'Purchase Receipt') and 'Received' or (curr_parent_doctype == 'Purchase Invoice') and 'Billed' msgprint("error:Already %s Qty for %s is %s and maximum allowed Qty is %s" % (cstr(reason), item_code, cstr(flt(qty) - flt(curr_qty)) , cstr(max_qty_plus_tol))) raise Exception @@ -451,12 +451,12 @@ class DocType(TransactionBase): if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname: transaction = cstr(d.prevdoc_doctype) + ' - ' + cstr(obj.doc.doctype) - curr_qty = (transaction == 'Indent - Purchase Order') and flt(d.qty) * flt(d.conversion_factor) or flt(d.qty) + curr_qty = (transaction == 'Purchase Request - Purchase Order') and flt(d.qty) * flt(d.conversion_factor) or flt(d.qty) self.update_ref_doctype_dict( flt(curr_qty), d.doctype, d.prevdoc_docname, d.prevdoc_doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, transaction, d.item_code, is_submit, obj.doc.doctype, obj.doc.name) # for payable voucher if d.fields.has_key('purchase_order') and d.purchase_order: - curr_qty = sql("select sum(qty) from `tabPV Detail` where po_detail = '%s' and parent = '%s'" % (cstr(d.po_detail), cstr(obj.doc.name))) + curr_qty = sql("select sum(qty) from `tabPurchase Invoice Item` where po_detail = '%s' and parent = '%s'" % (cstr(d.po_detail), cstr(obj.doc.name))) curr_qty = curr_qty and flt(curr_qty[0][0]) or 0 self.update_ref_doctype_dict( curr_qty, d.doctype, d.purchase_order, 'Purchase Order', 'po_detail', d.po_detail, 'Purchase Order - ' + cstr(obj.doc.doctype), d.item_code, is_submit, obj.doc.doctype, obj.doc.name) @@ -487,9 +487,9 @@ class DocType(TransactionBase): def update_last_purchase_rate(self, obj, is_submit): for d in getlist(obj.doclist,obj.fname): # get last purchase rate from Purchase Order - po_lpr = sql ("select t2.purchase_rate/t2.conversion_factor as rate, t1.transaction_date as date from `tabPurchase Order` t1, `tabPO Detail` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t1.name != '%s' order by t1.transaction_date DESC limit 1"% (d.item_code, obj.doc.name), as_dict = 1 ) + po_lpr = sql ("select t2.purchase_rate/t2.conversion_factor as rate, t1.transaction_date as date from `tabPurchase Order` t1, `tabPurchase Order Item` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t1.name != '%s' order by t1.transaction_date DESC limit 1"% (d.item_code, obj.doc.name), as_dict = 1 ) # get last purchase rate from purchase receipt - pr_lpr = sql ("select t2.purchase_rate/t2.conversion_factor as rate, t1.posting_date as date, t1.posting_time from `tabPurchase Receipt` t1, `tabPurchase Receipt Detail` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t1.name != '%s' order by t1.posting_date DESC, t1.posting_time DESC limit 1"% (d.item_code, obj.doc.name), as_dict = 1 ) + pr_lpr = sql ("select t2.purchase_rate/t2.conversion_factor as rate, t1.posting_date as date, t1.posting_time from `tabPurchase Receipt` t1, `tabPurchase Receipt Item` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t1.name != '%s' order by t1.posting_date DESC, t1.posting_time DESC limit 1"% (d.item_code, obj.doc.name), as_dict = 1 ) # compare dates of Po & Pr date_diff1 = sql("select DATEDIFF('%s', '%s')" % ( po_lpr and po_lpr[0]['date'] or '0000-00-00', pr_lpr and pr_lpr[0]['date'] or '0000-00-00')) @@ -520,9 +520,9 @@ class DocType(TransactionBase): def get_purchase_tax_details(self,obj): self.doc.clear_table(obj.doclist,'purchase_tax_details') idx = 0 - other_charge = sql("select category, add_deduct_tax, charge_type,row_id,description,account_head,rate,tax_amount from `tabPurchase Tax Detail` where parent = '%s' order by idx" %(obj.doc.purchase_other_charges), as_dict = 1) + other_charge = sql("select category, add_deduct_tax, charge_type,row_id,description,account_head,rate,tax_amount from `tabPurchase Taxes and Charges` where parent = '%s' order by idx" %(obj.doc.purchase_other_charges), as_dict = 1) for other in other_charge: - d = addchild(obj.doc, 'purchase_tax_details', 'Purchase Tax Detail', 1, obj.doclist) + d = addchild(obj.doc, 'purchase_tax_details', 'Purchase Taxes and Charges', 1, obj.doclist) d.category = other['category'] d.add_deduct_tax = other['add_deduct_tax'] d.charge_type = other['charge_type'] @@ -570,7 +570,7 @@ class DocType(TransactionBase): #================================================================================= def get_next_dt_detail_qty(self, next_dt_detail, name, curr_dt, f): - get_qty = (curr_dt == 'Indent') and 'qty * conversion_factor' or 'qty' + get_qty = (curr_dt == 'Purchase Request') and 'qty * conversion_factor' or 'qty' qty = sql("select sum(%s) from `tab%s` where %s = '%s' and docstatus = 1"% (get_qty, next_dt_detail, (f == 'billed_qty') and (curr_dt == 'Purchase Order' and 'po_detail' or 'pr_detail') or 'prevdoc_detail_docname', name)) return qty and flt(qty[0][0]) or 0 diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 3588a525c35..ce84e2a5b95 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "PO Detail"; +cur_frm.cscript.tname = "Purchase Order Item"; cur_frm.cscript.fname = "po_details"; cur_frm.cscript.other_fname = "purchase_tax_details"; @@ -60,7 +60,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn); if(doc.docstatus == 1 && doc.status != 'Stopped'){ - var ch = getchildren('PO Detail',doc.name,'po_details'); + var ch = getchildren('Purchase Order Item',doc.name,'po_details'); var allow_billing = 0; var allow_receipt = 0; cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); @@ -141,10 +141,10 @@ cur_frm.fields_dict['po_details'].grid.get_field('project_name').get_query = fun return 'SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50'; } -//==================== Indent No Get Query ======================================================= -//===== Only those Indents status != 'Completed' and docstatus = 1 i.e. submitted================= +//==================== Purchase Request No Get Query ======================================================= +//===== Only those Purchase Requests status != 'Completed' and docstatus = 1 i.e. submitted================= cur_frm.fields_dict['indent_no'].get_query = function(doc) { - return 'SELECT DISTINCT `tabIndent`.`name` FROM `tabIndent` WHERE `tabIndent`.company = "' + doc.company + '" and `tabIndent`.`docstatus` = 1 and `tabIndent`.`status` != "Stopped" and ifnull(`tabIndent`.`per_ordered`,0) < 100 and `tabIndent`.%(key)s LIKE "%s" ORDER BY `tabIndent`.`name` DESC LIMIT 50'; + return 'SELECT DISTINCT `tabPurchase Request`.`name` FROM `tabPurchase Request` WHERE `tabPurchase Request`.company = "' + doc.company + '" and `tabPurchase Request`.`docstatus` = 1 and `tabPurchase Request`.`status` != "Stopped" and ifnull(`tabPurchase Request`.`per_ordered`,0) < 100 and `tabPurchase Request`.%(key)s LIKE "%s" ORDER BY `tabPurchase Request`.`name` DESC LIMIT 50'; } /* @@ -178,7 +178,7 @@ cur_frm.cscript['Make Purchase Receipt'] = function() { 'from_doctype': cur_frm.doc.doctype, 'to_doctype':'Purchase Receipt', 'from_docname':cur_frm.doc.name, - 'from_to_list':"[['Purchase Order','Purchase Receipt'],['PO Detail','Purchase Receipt Detail'],['Purchase Tax Detail','Purchase Tax Detail']]" + 'from_to_list':"[['Purchase Order','Purchase Receipt'],['Purchase Order Item','Purchase Receipt Item'],['Purchase Taxes and Charges','Purchase Taxes and Charges']]" }, function(r,rt) { loaddoc('Purchase Receipt', n); } @@ -187,15 +187,15 @@ cur_frm.cscript['Make Purchase Receipt'] = function() { //========================== Make Purchase Invoice ===================================================== cur_frm.cscript['Make Purchase Invoice'] = function() { - n = createLocal('Payable Voucher'); + n = createLocal('Purchase Invoice'); $c('dt_map', args={ - 'docs':compress_doclist([locals['Payable Voucher'][n]]), + 'docs':compress_doclist([locals['Purchase Invoice'][n]]), 'from_doctype':cur_frm.doc.doctype, - 'to_doctype':'Payable Voucher', + 'to_doctype':'Purchase Invoice', 'from_docname': cur_frm.doc.name, - 'from_to_list':"[['Purchase Order','Payable Voucher'],['PO Detail','PV Detail'],['Purchase Tax Detail','Purchase Tax Detail']]" + 'from_to_list':"[['Purchase Order','Purchase Invoice'],['Purchase Order Item','Purchase Invoice Item'],['Purchase Taxes and Charges','Purchase Taxes and Charges']]" }, function(r,rt) { - loaddoc('Payable Voucher', n); + loaddoc('Purchase Invoice', n); } ); } @@ -245,7 +245,7 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){ out =''; - var cl = getchildren('PO Detail',doc.name,'po_details'); + var cl = getchildren('Purchase Order Item',doc.name,'po_details'); // outer table var out='
'; @@ -257,7 +257,7 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){ if(cl.length){ prevdoc_list = new Array(); for(var i=0;i flt(d.received_qty) and flt( flt(flt(d.qty) - flt(d.received_qty)) * flt(d.conversion_factor))or 0 - # No updates in Indent on Stop / Unstop - if cstr(d.prevdoc_doctype) == 'Indent' and not is_stopped: + # No updates in Purchase Request on Stop / Unstop + if cstr(d.prevdoc_doctype) == 'Purchase Request' and not is_stopped: # get qty and pending_qty of prevdoc - curr_ref_qty = pc_obj.get_qty( d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, 'Indent Detail', 'Indent - Purchase Order', self.doc.name) + curr_ref_qty = pc_obj.get_qty( d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, 'Purchase Request Item', 'Purchase Request - Purchase Order', self.doc.name) max_qty, qty, curr_qty = flt(curr_ref_qty.split('~~~')[1]), flt(curr_ref_qty.split('~~~')[0]), 0 if flt(qty) + flt(po_qty) > flt(max_qty): curr_qty = flt(max_qty) - flt(qty) - # special case as there is no restriction for Indent - Purchase Order + # special case as there is no restriction for Purchase Request - Purchase Order curr_qty = (curr_qty > 0) and curr_qty or 0 else: curr_qty = flt(po_qty) ind_qty = -flt(curr_qty) - #==> Update Bin's Indent Qty by +- ind_qty and Ordered Qty by +- qty + #==> Update Bin's Purchase Request Qty by +- ind_qty and Ordered Qty by +- qty get_obj('Warehouse', d.warehouse).update_bin(0, 0, (is_submit and 1 or -1) * flt(po_qty), (is_submit and 1 or -1) * flt(ind_qty), 0, d.item_code, self.doc.transaction_date) def check_modified_date(self): @@ -252,12 +252,12 @@ class DocType(TransactionBase): self.check_for_stopped_status(pc_obj) # 2.Check if Purchase Receipt has been submitted against current Purchase Order - pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Receipt', docname = self.doc.name, detail_doctype = 'Purchase Receipt Detail') + pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Receipt', docname = self.doc.name, detail_doctype = 'Purchase Receipt Item') - # 3.Check if Payable Voucher has been submitted against current Purchase Order - #pc_obj.check_docstatus(check = 'Next', doctype = 'Payable Voucher', docname = self.doc.name, detail_doctype = 'PV Detail') + # 3.Check if Purchase Invoice has been submitted against current Purchase Order + #pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Invoice', docname = self.doc.name, detail_doctype = 'Purchase Invoice Item') - submitted = sql("select t1.name from `tabPayable Voucher` t1,`tabPV Detail` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name) + submitted = sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_order = '%s' and t1.docstatus = 1" % self.doc.name) if submitted: msgprint("Purchase Invoice : " + cstr(submitted[0][0]) + " has already been submitted !") raise Exception @@ -265,7 +265,7 @@ class DocType(TransactionBase): # 4.Set Status as Cancelled set(self.doc,'status','Cancelled') - # 5.Update Indents Pending Qty and accordingly it's Status + # 5.Update Purchase Requests Pending Qty and accordingly it's Status pc_obj.update_prevdoc_detail(self,is_submit = 0) # 6.Update Bin @@ -294,12 +294,12 @@ class DocType(TransactionBase): self.add_bom(d) self.delete_irrelevant_raw_material() - #---------------calculate amt in PO Raw Material Detail------------- + #---------------calculate amt in Purchase Order Item Supplied------------- self.calculate_amount(d) def add_bom(self, d): #----- fetching default bom from Bill of Materials instead of Item Master -- - bom_det = sql("select t1.item, t2.item_code, t2.qty_consumed_per_unit, t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.parent from `tabBill Of Materials` t1, `tabBOM Material` t2 where t2.parent = t1.name and t1.item = '%s' and ifnull(t1.is_default,0) = 1 and t1.docstatus = 1" % d.item_code) + bom_det = sql("select t1.item, t2.item_code, t2.qty_consumed_per_unit, t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.parent from `tabBOM` t1, `tabBOM Item` t2 where t2.parent = t1.name and t1.item = '%s' and ifnull(t1.is_default,0) = 1 and t1.docstatus = 1" % d.item_code) if not bom_det: msgprint("No default BOM exists for item: %s" % d.item_code) @@ -308,9 +308,9 @@ class DocType(TransactionBase): #-------------- add child function-------------------- chgd_rqd_qty = [] for i in bom_det: - if i and not sql("select name from `tabPO Raw Material Detail` where reference_name = '%s' and bom_detail_no = '%s' and parent = '%s' " %(d.name, i[6], self.doc.name)): + if i and not sql("select name from `tabPurchase Order Item Supplied` where reference_name = '%s' and bom_detail_no = '%s' and parent = '%s' " %(d.name, i[6], self.doc.name)): - rm_child = addchild(self.doc, 'po_raw_material_details', 'PO Raw Material Detail', 1, self.doclist) + rm_child = addchild(self.doc, 'po_raw_material_details', 'Purchase Order Item Supplied', 1, self.doclist) rm_child.reference_name = d.name rm_child.bom_detail_no = i and i[6] or '' @@ -340,7 +340,7 @@ class DocType(TransactionBase): #-------------------------------------------------------------- def delete_irrelevant_raw_material(self): for d in getlist(self.doclist,'po_raw_material_details'): - if not sql("select name from `tabPO Detail` where name = '%s' and parent = '%s'and item_code = '%s'" % (d.reference_name, self.doc.name, d.main_item_code)): + if not sql("select name from `tabPurchase Order Item` where name = '%s' and parent = '%s'and item_code = '%s'" % (d.reference_name, self.doc.name, d.main_item_code)): d.parent = 'old_par:'+self.doc.name d.save() diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt index 188a2e2e025..957b2194e17 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.txt +++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt @@ -451,7 +451,7 @@ 'no_copy': 1, 'oldfieldname': u'indent_no', 'oldfieldtype': u'Link', - 'options': u'Indent', + 'options': u'Purchase Request', 'permlevel': 0, 'print_hide': 1 }, @@ -482,11 +482,11 @@ 'doctype': u'DocField', 'fieldname': u'po_details', 'fieldtype': u'Table', - 'label': u'PO Details', + 'label': u'Purchase Order Items', 'no_copy': 0, 'oldfieldname': u'po_details', 'oldfieldtype': u'Table', - 'options': u'PO Detail', + 'options': u'Purchase Order Item', 'permlevel': 0 }, @@ -550,7 +550,7 @@ 'no_copy': 1, 'oldfieldname': u'purchase_other_charges', 'oldfieldtype': u'Link', - 'options': u'Purchase Other Charges', + 'options': u'Purchase Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -576,7 +576,7 @@ 'no_copy': 0, 'oldfieldname': u'purchase_tax_details', 'oldfieldtype': u'Table', - 'options': u'Purchase Tax Detail', + 'options': u'Purchase Taxes and Charges', 'permlevel': 0 }, @@ -803,7 +803,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1 }, @@ -1033,11 +1033,11 @@ 'doctype': u'DocField', 'fieldname': u'po_raw_material_details', 'fieldtype': u'Table', - 'label': u'PO Raw Material Details', + 'label': u'Purchase Order Item Supplieds', 'no_copy': 0, 'oldfieldname': u'po_raw_material_details', 'oldfieldtype': u'Table', - 'options': u'PO Raw Material Detail', + 'options': u'Purchase Order Item Supplied', 'permlevel': 1, 'print_hide': 1 }, diff --git a/erpnext/buying/doctype/indent/__init__.py b/erpnext/buying/doctype/purchase_order_item/__init__.py similarity index 100% rename from erpnext/buying/doctype/indent/__init__.py rename to erpnext/buying/doctype/purchase_order_item/__init__.py diff --git a/erpnext/buying/doctype/po_detail/po_detail.txt b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt similarity index 98% rename from erpnext/buying/doctype/po_detail/po_detail.txt rename to erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt index f8f32f97cdf..aa90921fb9f 100755 --- a/erpnext/buying/doctype/po_detail/po_detail.txt +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.txt @@ -1,4 +1,4 @@ -# DocType, PO Detail +# DocType, Purchase Order Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PO Detail', + 'parent': u'Purchase Order Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, PO Detail + # DocType, Purchase Order Item { 'doctype': 'DocType', - 'name': u'PO Detail' + 'name': u'Purchase Order Item' }, # DocField @@ -308,7 +308,7 @@ 'no_copy': 0, 'oldfieldname': u'prevdoc_docname', 'oldfieldtype': u'Link', - 'options': u'Indent', + 'options': u'Purchase Request', 'permlevel': 1, 'print_hide': 1, 'search_index': 1, diff --git a/erpnext/buying/doctype/indent_detail/__init__.py b/erpnext/buying/doctype/purchase_order_item_supplied/__init__.py similarity index 100% rename from erpnext/buying/doctype/indent_detail/__init__.py rename to erpnext/buying/doctype/purchase_order_item_supplied/__init__.py diff --git a/erpnext/buying/doctype/po_raw_material_detail/po_raw_material_detail.txt b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt similarity index 94% rename from erpnext/buying/doctype/po_raw_material_detail/po_raw_material_detail.txt rename to erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt index f166a39d5d9..eb529c41344 100644 --- a/erpnext/buying/doctype/po_raw_material_detail/po_raw_material_detail.txt +++ b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.txt @@ -1,4 +1,4 @@ -# DocType, PO Raw Material Detail +# DocType, Purchase Order Item Supplied [ # These values are common in all dictionaries @@ -28,15 +28,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PO Raw Material Detail', + 'parent': u'Purchase Order Item Supplied', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, PO Raw Material Detail + # DocType, Purchase Order Item Supplied { 'doctype': 'DocType', - 'name': u'PO Raw Material Detail' + 'name': u'Purchase Order Item Supplied' }, # DocField diff --git a/erpnext/buying/doctype/po_detail/__init__.py b/erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py similarity index 100% rename from erpnext/buying/doctype/po_detail/__init__.py rename to erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py diff --git a/erpnext/buying/doctype/pr_raw_material_detail/pr_raw_material_detail.txt b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt similarity index 94% rename from erpnext/buying/doctype/pr_raw_material_detail/pr_raw_material_detail.txt rename to erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt index 47dc7aef36a..602bb259b44 100644 --- a/erpnext/buying/doctype/pr_raw_material_detail/pr_raw_material_detail.txt +++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.txt @@ -1,4 +1,4 @@ -# DocType, PR Raw Material Detail +# DocType, Purchase Receipt Item Supplied [ # These values are common in all dictionaries @@ -28,15 +28,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PR Raw Material Detail', + 'parent': u'Purchase Receipt Item Supplied', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, PR Raw Material Detail + # DocType, Purchase Receipt Item Supplied { 'doctype': 'DocType', - 'name': u'PR Raw Material Detail' + 'name': u'Purchase Receipt Item Supplied' }, # DocField diff --git a/erpnext/buying/doctype/po_raw_material_detail/__init__.py b/erpnext/buying/doctype/purchase_request/__init__.py similarity index 100% rename from erpnext/buying/doctype/po_raw_material_detail/__init__.py rename to erpnext/buying/doctype/purchase_request/__init__.py diff --git a/erpnext/buying/doctype/indent/listview.js b/erpnext/buying/doctype/purchase_request/listview.js similarity index 80% rename from erpnext/buying/doctype/indent/listview.js rename to erpnext/buying/doctype/purchase_request/listview.js index df78ea9bb7d..5e35bf103ca 100644 --- a/erpnext/buying/doctype/indent/listview.js +++ b/erpnext/buying/doctype/purchase_request/listview.js @@ -1,11 +1,11 @@ // render -wn.doclistviews['Indent'] = wn.views.ListView.extend({ +wn.doclistviews['Purchase Request'] = wn.views.ListView.extend({ init: function(d) { this._super(d) this.fields = this.fields.concat([ - "`tabIndent`.status", - "IFNULL(`tabIndent`.per_ordered, 0) as per_ordered", - "`tabIndent`.remark", + "`tabPurchase Request`.status", + "IFNULL(`tabPurchase Request`.per_ordered, 0) as per_ordered", + "`tabPurchase Request`.remark", ]); this.stats = this.stats.concat(['status', 'company']); }, diff --git a/erpnext/buying/doctype/indent/indent.js b/erpnext/buying/doctype/purchase_request/purchase_request.js similarity index 92% rename from erpnext/buying/doctype/indent/indent.js rename to erpnext/buying/doctype/purchase_request/purchase_request.js index 1940e5a6069..e3855739dac 100644 --- a/erpnext/buying/doctype/indent/indent.js +++ b/erpnext/buying/doctype/purchase_request/purchase_request.js @@ -14,12 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "Indent Detail"; +cur_frm.cscript.tname = "Purchase Request Item"; cur_frm.cscript.fname = "indent_details"; wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js'); wn.require('erpnext/utilities/doctype/sms_control/sms_control.js'); -cur_frm.cscript.indent_doctype_label = get_doctype_label('Indent'); +cur_frm.cscript.indent_doctype_label = get_doctype_label('Purchase Request'); //========================== On Load ================================================= cur_frm.cscript.onload = function(doc, cdt, cdn) { @@ -38,7 +38,7 @@ cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) { } cur_frm.cscript.get_item_defaults = function(doc) { - var ch = getchildren( 'Indent Detail', doc.name, 'indent_details'); + var ch = getchildren( 'Purchase Request Item', doc.name, 'indent_details'); if (flt(ch.length) > 0){ $c_obj(make_doclist(doc.doctype, doc.name), 'get_item_defaults', '', function(r, rt) {refresh_field('indent_details'); }); } @@ -54,7 +54,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); if(doc.docstatus == 1 && doc.status != 'Stopped'){ - var ch = getchildren('Indent Detail',doc.name,'indent_details'); + var ch = getchildren('Purchase Request Item',doc.name,'indent_details'); var is_closed = 1; for(var i in ch){ if(flt(ch[i].qty) > flt(ch[i].ordered_qty)) is_closed = 0; @@ -105,7 +105,7 @@ cur_frm.cscript['Make Purchase Order'] = function() { 'from_doctype':doc.doctype, 'to_doctype':'Purchase Order', 'from_docname':doc.name, - 'from_to_list':"[['Indent','Purchase Order'],['Indent Detail','PO Detail']]" + 'from_to_list':"[['Purchase Request','Purchase Order'],['Purchase Request Item','Purchase Order Item']]" }, function(r,rt) { loaddoc('Purchase Order', n); } diff --git a/erpnext/buying/doctype/indent/indent.py b/erpnext/buying/doctype/purchase_request/purchase_request.py similarity index 89% rename from erpnext/buying/doctype/indent/indent.py rename to erpnext/buying/doctype/purchase_request/purchase_request.py index c601c91a5c5..a25426cf5bd 100644 --- a/erpnext/buying/doctype/indent/indent.py +++ b/erpnext/buying/doctype/purchase_request/purchase_request.py @@ -38,7 +38,7 @@ class DocType: self.doc = doc self.doclist = doclist self.defaults = get_defaults() - self.tname = 'Indent Detail' + self.tname = 'Purchase Request Item' self.fname = 'indent_details' # Autoname @@ -50,12 +50,12 @@ class DocType: def get_default_schedule_date(self): get_obj(dt = 'Purchase Common').get_default_schedule_date(self) - # Pull Sales Order Details + # Pull Sales Order Items # ------------------------- def pull_so_details(self): self.check_if_already_pulled() if self.doc.sales_order_no: - get_obj('DocType Mapper', 'Sales Order-Indent', with_children=1).dt_map('Sales Order', 'Indent', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Indent'],['Sales Order Detail', 'Indent Detail']]") + get_obj('DocType Mapper', 'Sales Order-Purchase Request', with_children=1).dt_map('Sales Order', 'Purchase Request', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Purchase Request'],['Sales Order Item', 'Purchase Request Item']]") self.get_item_defaults() else: msgprint("Please select Sales Order whose details need to pull") @@ -88,10 +88,10 @@ class DocType: for so_no in so_items.keys(): for item in so_items[so_no].keys(): - already_indented = sql("select sum(qty) from `tabIndent Detail` where item_code = '%s' and sales_order_no = '%s' and docstatus = 1 and parent != '%s'" % (item, so_no, self.doc.name)) + already_indented = sql("select sum(qty) from `tabPurchase Request Item` where item_code = '%s' and sales_order_no = '%s' and docstatus = 1 and parent != '%s'" % (item, so_no, self.doc.name)) already_indented = already_indented and flt(already_indented[0][0]) or 0 - actual_so_qty = sql("select sum(qty) from `tabSales Order Detail` where parent = '%s' and item_code = '%s' and docstatus = 1 group by parent" % (so_no, item)) + actual_so_qty = sql("select sum(qty) from `tabSales Order Item` where parent = '%s' and item_code = '%s' and docstatus = 1 group by parent" % (so_no, item)) actual_so_qty = actual_so_qty and flt(actual_so_qty[0][0]) or 0 if flt(so_items[so_no][item]) + already_indented > actual_so_qty: @@ -101,7 +101,7 @@ class DocType: # Validate fiscal year # ---------------------------- def validate_fiscal_year(self): - get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.transaction_date,'Indent Date') + get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.transaction_date,'Purchase Request Date') # get item details # --------------------------------- @@ -138,7 +138,7 @@ class DocType: #:::::::: validate schedule date v/s indent date :::::::::::: for d in getlist(self.doclist, 'indent_details'): if d.schedule_date < self.doc.transaction_date: - msgprint("Expected Schedule Date cannot be before Indent Date") + msgprint("Expected Schedule Date cannot be before Purchase Request Date") raise Exception # Validate @@ -191,7 +191,7 @@ class DocType: self.update_bin(is_submit = 1, is_stopped = 0) def check_modified_date(self): - mod_db = sql("select modified from `tabIndent` where name = '%s'" % self.doc.name) + mod_db = sql("select modified from `tabPurchase Request` where name = '%s'" % self.doc.name) date_diff = sql("select TIMEDIFF('%s', '%s')" % ( mod_db[0][0],cstr(self.doc.modified))) if date_diff and date_diff[0][0]: @@ -221,7 +221,7 @@ class DocType: pc_obj.check_for_stopped_status( self.doc.doctype, self.doc.name) # Step 3:=> Check if Purchase Order has been submitted against current Indent - pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Order', docname = self.doc.name, detail_doctype = 'PO Detail') + pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Order', docname = self.doc.name, detail_doctype = 'Purchase Order Item') # Step 4:=> Update Bin self.update_bin(is_submit = 0, is_stopped = (cstr(self.doc.status) == 'Stopped') and 1 or 0) diff --git a/erpnext/buying/doctype/indent/indent.txt b/erpnext/buying/doctype/purchase_request/purchase_request.txt similarity index 97% rename from erpnext/buying/doctype/indent/indent.txt rename to erpnext/buying/doctype/purchase_request/purchase_request.txt index 6df66642874..b17d88419f6 100644 --- a/erpnext/buying/doctype/indent/indent.txt +++ b/erpnext/buying/doctype/purchase_request/purchase_request.txt @@ -1,4 +1,4 @@ -# DocType, Indent +# DocType, Purchase Request [ # These values are common in all dictionaries @@ -33,7 +33,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Indent', + 'parent': u'Purchase Request', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -42,16 +42,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Indent', + 'parent': u'Purchase Request', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Indent + # DocType, Purchase Request { 'doctype': 'DocType', - 'name': u'Indent' + 'name': u'Purchase Request' }, # DocPerm @@ -279,7 +279,7 @@ 'doctype': u'DocField', 'fieldname': u'pull_sales_order_details', 'fieldtype': u'Button', - 'label': u'Pull Sales Order Details', + 'label': u'Pull Sales Order Items', 'options': u'pull_so_details', 'permlevel': 0 }, @@ -295,7 +295,7 @@ 'no_copy': 0, 'oldfieldname': u'indent_details', 'oldfieldtype': u'Table', - 'options': u'Indent Detail', + 'options': u'Purchase Request Item', 'permlevel': 0 }, @@ -465,7 +465,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 diff --git a/erpnext/buying/doctype/pr_raw_material_detail/__init__.py b/erpnext/buying/doctype/purchase_request_item/__init__.py similarity index 100% rename from erpnext/buying/doctype/pr_raw_material_detail/__init__.py rename to erpnext/buying/doctype/purchase_request_item/__init__.py diff --git a/erpnext/buying/doctype/indent_detail/indent_detail.txt b/erpnext/buying/doctype/purchase_request_item/purchase_request_item.txt similarity index 97% rename from erpnext/buying/doctype/indent_detail/indent_detail.txt rename to erpnext/buying/doctype/purchase_request_item/purchase_request_item.txt index 3727be9fb37..76139dcd593 100644 --- a/erpnext/buying/doctype/indent_detail/indent_detail.txt +++ b/erpnext/buying/doctype/purchase_request_item/purchase_request_item.txt @@ -1,4 +1,4 @@ -# DocType, Indent Detail +# DocType, Purchase Request Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Indent Detail', + 'parent': u'Purchase Request Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Indent Detail + # DocType, Purchase Request Item { 'doctype': 'DocType', - 'name': u'Indent Detail' + 'name': u'Purchase Request Item' }, # DocField diff --git a/erpnext/buying/doctype/purchase_other_charges/__init__.py b/erpnext/buying/doctype/purchase_taxes_and_charges_master/__init__.py similarity index 100% rename from erpnext/buying/doctype/purchase_other_charges/__init__.py rename to erpnext/buying/doctype/purchase_taxes_and_charges_master/__init__.py diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js b/erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js similarity index 98% rename from erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js rename to erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index f0b4ae2101a..ae4eb43a53d 100644 --- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js +++ b/erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -41,7 +41,7 @@ cur_frm.pformat.purchase_tax_details= function(doc){ return new_val; } - var cl = getchildren('Purchase Tax Detail',doc.name,'purchase_tax_details'); + var cl = getchildren('Purchase Taxes and Charges',doc.name,'purchase_tax_details'); // outer table var out='
'; diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py b/erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py similarity index 100% rename from erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py rename to erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt b/erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt similarity index 88% rename from erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt rename to erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt index ce3fb8e7e40..408881ab87a 100644 --- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.txt +++ b/erpnext/buying/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.txt @@ -1,4 +1,4 @@ -# DocType, Purchase Other Charges +# DocType, Purchase Taxes and Charges Master [ # These values are common in all dictionaries @@ -31,7 +31,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Purchase Other Charges', + 'parent': u'Purchase Taxes and Charges Master', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -41,16 +41,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Purchase Other Charges', + 'parent': u'Purchase Taxes and Charges Master', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Purchase Other Charges + # DocType, Purchase Taxes and Charges Master { 'doctype': 'DocType', - 'name': u'Purchase Other Charges' + 'name': u'Purchase Taxes and Charges Master' }, # DocPerm @@ -125,6 +125,6 @@ 'label': u'Purchase Tax Details', 'oldfieldname': u'purchase_tax_details', 'oldfieldtype': u'Table', - 'options': u'Purchase Tax Detail' + 'options': u'Purchase Taxes and Charges' } ] \ No newline at end of file diff --git a/erpnext/buying/doctype/qa_inspection_report/__init__.py b/erpnext/buying/doctype/quality_inspection/__init__.py similarity index 100% rename from erpnext/buying/doctype/qa_inspection_report/__init__.py rename to erpnext/buying/doctype/quality_inspection/__init__.py diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js b/erpnext/buying/doctype/quality_inspection/quality_inspection.js similarity index 89% rename from erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js rename to erpnext/buying/doctype/quality_inspection/quality_inspection.js index 6591a707ba9..2dbb2854fdd 100644 --- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js +++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.js @@ -44,9 +44,9 @@ cur_frm.cscript.refresh = cur_frm.cscript.inspection_type; // item code based on GRN/DN cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) { if (doc.purchase_receipt_no) - return 'SELECT item_code, item_name, description FROM `tabPurchase Receipt Detail` WHERE parent = "'+ doc.purchase_receipt_no +'" and docstatus != 2 AND item_code LIKE "%s" ORDER BY item_code ASC LIMIT 50'; + return 'SELECT item_code, item_name, description FROM `tabPurchase Receipt Item` WHERE parent = "'+ doc.purchase_receipt_no +'" and docstatus != 2 AND item_code LIKE "%s" ORDER BY item_code ASC LIMIT 50'; else if (doc.delivery_note_no) - return 'SELECT item_code, item_name, description FROM `tabDelivery Note Detail` WHERE parent = "'+ doc.delivery_note_no +'" and docstatus != 2 AND item_code LIKE "%s" ORDER BY item_code ASC LIMIT 50'; + return 'SELECT item_code, item_name, description FROM `tabDelivery Note Item` WHERE parent = "'+ doc.delivery_note_no +'" and docstatus != 2 AND item_code LIKE "%s" ORDER BY item_code ASC LIMIT 50'; else return 'SELECT name, item_name, description FROM tabItem WHERE docstatus != 2 AND %(key)s LIKE "%s" ORDER BY name ASC LIMIT 50'; } diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py b/erpnext/buying/doctype/quality_inspection/quality_inspection.py similarity index 82% rename from erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py rename to erpnext/buying/doctype/quality_inspection/quality_inspection.py index d95ab7a16a8..e0eee1c0e3a 100644 --- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py +++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.py @@ -46,18 +46,18 @@ class DocType: def get_item_specification_details(self): self.doc.clear_table(self.doclist, 'qa_specification_details') - specification = sql("select specification, value from `tabItem Specification Detail` where parent = '%s' order by idx" % (self.doc.item_code)) + specification = sql("select specification, value from `tabItem Quality Inspection Parameter` where parent = '%s' order by idx" % (self.doc.item_code)) for d in specification: - child = addchild(self.doc, 'qa_specification_details', 'QA Specification Detail', 1, self.doclist) + child = addchild(self.doc, 'qa_specification_details', 'Quality Inspection Reading', 1, self.doclist) child.specification = d[0] child.value = d[1] child.status = 'Accepted' def on_submit(self): if self.doc.purchase_receipt_no: - sql("update `tabPurchase Receipt Detail` set qa_no = '%s' where parent = '%s' and item_code = '%s'" % (self.doc.name, self.doc.purchase_receipt_no, self.doc.item_code)) + sql("update `tabPurchase Receipt Item` set qa_no = '%s' where parent = '%s' and item_code = '%s'" % (self.doc.name, self.doc.purchase_receipt_no, self.doc.item_code)) def on_cancel(self): if self.doc.purchase_receipt_no: - sql("update `tabPurchase Receipt Detail` set qa_no = '' where parent = '%s' and item_code = '%s'" % (self.doc.purchase_receipt_no, self.doc.item_code)) + sql("update `tabPurchase Receipt Item` set qa_no = '' where parent = '%s' and item_code = '%s'" % (self.doc.purchase_receipt_no, self.doc.item_code)) diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.txt b/erpnext/buying/doctype/quality_inspection/quality_inspection.txt similarity index 96% rename from erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.txt rename to erpnext/buying/doctype/quality_inspection/quality_inspection.txt index 54af464fc35..afbd73737b0 100644 --- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.txt +++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.txt @@ -1,4 +1,4 @@ -# DocType, QA Inspection Report +# DocType, Quality Inspection [ # These values are common in all dictionaries @@ -32,7 +32,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'QA Inspection Report', + 'parent': u'Quality Inspection', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -41,17 +41,17 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'QA Inspection Report', + 'parent': u'Quality Inspection', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1, 'role': u'Quality Manager' }, - # DocType, QA Inspection Report + # DocType, Quality Inspection { 'doctype': 'DocType', - 'name': u'QA Inspection Report' + 'name': u'Quality Inspection' }, # DocPerm @@ -337,10 +337,10 @@ 'doctype': u'DocField', 'fieldname': u'qa_specification_details', 'fieldtype': u'Table', - 'label': u'QA Specification Details', + 'label': u'Quality Inspection Readings', 'oldfieldname': u'qa_specification_details', 'oldfieldtype': u'Table', - 'options': u'QA Specification Detail', + 'options': u'Quality Inspection Reading', 'permlevel': 0 } ] \ No newline at end of file diff --git a/erpnext/buying/doctype/qa_specification_detail/__init__.py b/erpnext/buying/doctype/quality_inspection_reading/__init__.py similarity index 100% rename from erpnext/buying/doctype/qa_specification_detail/__init__.py rename to erpnext/buying/doctype/quality_inspection_reading/__init__.py diff --git a/erpnext/buying/doctype/qa_specification_detail/qa_specification_detail.txt b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt similarity index 95% rename from erpnext/buying/doctype/qa_specification_detail/qa_specification_detail.txt rename to erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt index d3a9b5a13fa..b356dd93468 100644 --- a/erpnext/buying/doctype/qa_specification_detail/qa_specification_detail.txt +++ b/erpnext/buying/doctype/quality_inspection_reading/quality_inspection_reading.txt @@ -1,4 +1,4 @@ -# DocType, QA Specification Detail +# DocType, Quality Inspection Reading [ # These values are common in all dictionaries @@ -28,16 +28,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'QA Specification Detail', + 'parent': u'Quality Inspection Reading', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, QA Specification Detail + # DocType, Quality Inspection Reading { 'doctype': 'DocType', - 'name': u'QA Specification Detail' + 'name': u'Quality Inspection Reading' }, # DocField diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js index ebf359362a0..8291ed530d6 100644 --- a/erpnext/buying/doctype/supplier/supplier.js +++ b/erpnext/buying/doctype/supplier/supplier.js @@ -146,10 +146,10 @@ cur_frm.cscript.make_pi_list = function(parent,doc){ lst.colwidths = ['5%','20%','20%','20%','15%','20%']; lst.colnames = ['Sr.','Id','Posting Date','Credit To','Bill Date','Grand Total']; lst.coltypes = ['Data','Link','Data','Data','Currency','Currency']; - lst.coloptions = ['','Payable Voucher','','','','']; + lst.coloptions = ['','Purchase Invoice','','','','']; - var q = repl("select name, posting_date, credit_to, bill_date, grand_total from `tabPayable Voucher` where supplier='%(sup)s' order by posting_date desc", {'sup':doc.name}); - var q_max = repl("select count(name) from `tabPayable Voucher` where supplier='%(sup)s'", {'sup':doc.name}); + var q = repl("select name, posting_date, credit_to, bill_date, grand_total from `tabPurchase Invoice` where supplier='%(sup)s' order by posting_date desc", {'sup':doc.name}); + var q_max = repl("select count(name) from `tabPurchase Invoice` where supplier='%(sup)s'", {'sup':doc.name}); - cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Purchase Invoice','Payable Voucher'); + cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Purchase Invoice','Purchase Invoice'); } diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index 4bc04bb89b8..18d167a29ae 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -171,7 +171,7 @@ class DocType: ('Supplier', 'name'), ('Address', 'supplier'), ('Contact', 'supplier'), - ('Payable Voucher', 'supplier'), + ('Purchase Invoice', 'supplier'), ('Purchase Order', 'supplier'), ('Purchase Receipt', 'supplier'), ('Serial No', 'supplier')] diff --git a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt index 16280603038..3c3fb907683 100644 --- a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt +++ b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Purchase Order\x01ID,Purchase Order\x01PO Date,Purchase Order\x01Grand Total,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Quantity,PO Detail\x01Stock UOM,PO Detail\x01Purchase Rate,PO Detail\x01Amount,PO Detail\x01Warehouse', + 'columns': 'Purchase Order\x01ID,Purchase Order\x01PO Date,Purchase Order\x01Grand Total,Purchase Order Item\x01Item Code,Purchase Order Item\x01Item Name,Purchase Order Item\x01Quantity,Purchase Order Item\x01Stock UOM,Purchase Order Item\x01Purchase Rate,Purchase Order Item\x01Amount,Purchase Order Item\x01Warehouse', 'criteria_name': 'Itemwise Purchase Details', - 'doc_type': 'PO Detail', + 'doc_type': 'Purchase Order Item', 'doctype': 'Search Criteria', 'filters': "{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Company Name':''}", 'module': 'Buying', diff --git a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.txt b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.txt index cacbb7806ef..c0de7192d4a 100644 --- a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.txt +++ b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Purchase Receipt\x01ID,Purchase Receipt\x01Posting Date,Purchase Receipt Detail\x01Item Code,Purchase Receipt Detail\x01Item Name,Purchase Receipt Detail\x01Accepted Quantity,Purchase Receipt Detail\x01Rejected Quantity,Purchase Receipt Detail\x01Accepted Warehouse,Purchase Receipt Detail\x01Rejected Warehouse,Purchase Receipt Detail\x01Amount', + 'columns': 'Purchase Receipt\x01ID,Purchase Receipt\x01Posting Date,Purchase Receipt Item\x01Item Code,Purchase Receipt Item\x01Item Name,Purchase Receipt Item\x01Accepted Quantity,Purchase Receipt Item\x01Rejected Quantity,Purchase Receipt Item\x01Accepted Warehouse,Purchase Receipt Item\x01Rejected Warehouse,Purchase Receipt Item\x01Amount', 'criteria_name': 'Itemwise Receipt Details', - 'doc_type': 'Purchase Receipt Detail', + 'doc_type': 'Purchase Receipt Item', 'doctype': 'Search Criteria', 'filters': "{'Purchase Receipt\x01Saved':1,'Purchase Receipt\x01Submitted':1,'Purchase Receipt\x01Status':'','Purchase Receipt\x01Fiscal Year':''}", 'module': 'Buying', diff --git a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt index be0beb3aecd..53a40ee2100 100644 --- a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt +++ b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.txt @@ -12,12 +12,12 @@ # These values are common for all Search Criteria { - 'add_col': '(CASE WHEN (`tabPO Detail`.qty- ifnull(`tabPO Detail`.billed_qty, 0) > 0 ) THEN (`tabPO Detail`.qty-ifnull(`tabPO Detail`.billed_qty, 0) ) ELSE 0 END) AS "Pending To Bill"', - 'add_cond': '(`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) > 0 or `tabPO Detail`.qty - ifnull(`tabPO Detail`.billed_qty, 0) > 0)\n`tabPurchase Order`.status != "Stopped"', - 'columns': 'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,PO Detail\x01Indent No,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Description,PO Detail\x01Quantity,PO Detail\x01UOM,PO Detail\x01Received Qty', + 'add_col': '(CASE WHEN (`tabPurchase Order Item`.qty- ifnull(`tabPurchase Order Item`.billed_qty, 0) > 0 ) THEN (`tabPurchase Order Item`.qty-ifnull(`tabPurchase Order Item`.billed_qty, 0) ) ELSE 0 END) AS "Pending To Bill"', + 'add_cond': '(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) > 0 or `tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.billed_qty, 0) > 0)\n`tabPurchase Order`.status != "Stopped"', + 'columns': 'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,Purchase Order Item\x01Purchase Request No,Purchase Order Item\x01Item Code,Purchase Order Item\x01Item Name,Purchase Order Item\x01Description,Purchase Order Item\x01Quantity,Purchase Order Item\x01UOM,Purchase Order Item\x01Received Qty', 'criteria_name': 'Pending PO Items To Bill', 'description': 'Pending PO Items To Bill', - 'doc_type': 'PO Detail', + 'doc_type': 'Purchase Order Item', 'doctype': 'Search Criteria', 'filters': "{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Fiscal Year':''}", 'module': 'Buying', diff --git a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt index b629547052b..5016623f463 100644 --- a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt +++ b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.txt @@ -12,12 +12,12 @@ # These values are common for all Search Criteria { - 'add_col': u'`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) AS "Pending Quantity To Receive"\n(`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0)) * `tabPO Detail`.purchase_rate AS "Pending Amount To Receive"', - 'add_cond': u'`tabPO Detail`.qty - ifnull(`tabPO Detail`.received_qty, 0) > 0 \n`tabPurchase Order`.status != "Stopped"', - 'columns': u'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,PO Detail\x01Indent No,PO Detail\x01Item Code,PO Detail\x01Item Name,PO Detail\x01Description,PO Detail\x01Quantity,PO Detail\x01UOM,PO Detail\x01Received Qty', + 'add_col': u'`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) AS "Pending Quantity To Receive"\n(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) * `tabPurchase Order Item`.purchase_rate AS "Pending Amount To Receive"', + 'add_cond': u'`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0) > 0 \n`tabPurchase Order`.status != "Stopped"', + 'columns': u'Purchase Order\x01ID,Purchase Order\x01Supplier,Purchase Order\x01Supplier Name,Purchase Order\x01Status,Purchase Order\x01PO Date,Purchase Order\x01Fiscal Year,Purchase Order Item\x01Purchase Request No,Purchase Order Item\x01Item Code,Purchase Order Item\x01Item Name,Purchase Order Item\x01Description,Purchase Order Item\x01Quantity,Purchase Order Item\x01UOM,Purchase Order Item\x01Received Qty', 'criteria_name': u'Pending PO Items To Receive', 'description': u'Pending PO Items To Receive', - 'doc_type': u'PO Detail', + 'doc_type': u'Purchase Order Item', 'doctype': 'Search Criteria', 'filters': u"{'Purchase Order\x01Saved':1,'Purchase Order\x01Submitted':1,'Purchase Order\x01Status':'','Purchase Order\x01Fiscal Year':''}", 'module': u'Buying', diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js index ab469cd76bc..a08b9211067 100644 --- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js +++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js @@ -19,18 +19,18 @@ report.customize_filters = function() { this.hide_all_filters(); - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Credit To'].df.filter_hide = 0; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Company'].df.filter_hide = 0; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Credit To'].df.filter_hide = 0; this.add_filter({fieldname:'pr_posting_date', label:'PR Posting Date', fieldtype:'Date', ignore : 1, parent:'Purchase Receipt'}); - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Credit To'].df.in_first_page = 0; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Credit To'].df.in_first_page = 0; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1; this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df.ignore = 1; @@ -39,9 +39,9 @@ report.customize_filters = function() { this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From PR Posting Date'].df['report_default'] = sys_defaults.year_start_date; this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To PR Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date()); - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date; - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date()); - this.filter_fields_dict['Payable Voucher'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date; + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date()); + this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company; } diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt index 028d9d5241e..d30c3d1d8a2 100644 --- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt +++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.txt @@ -13,20 +13,20 @@ # These values are common for all Search Criteria { 'add_col': "`tabPurchase Receipt`.`posting_date` AS 'PR Posting Date'", - 'add_cond': "`tabPV Detail`.`purchase_receipt` = `tabPurchase Receipt`.`name`\n`tabPurchase Receipt`.`posting_date` >= '%(pr_posting_date)s'\n`tabPurchase Receipt`.`posting_date` <= '%(pr_posting_date1)s'\n`tabPurchase Receipt`.`posting_date` > `tabPayable Voucher`.`posting_date`", + 'add_cond': "`tabPurchase Invoice Item`.`purchase_receipt` = `tabPurchase Receipt`.`name`\n`tabPurchase Receipt`.`posting_date` >= '%(pr_posting_date)s'\n`tabPurchase Receipt`.`posting_date` <= '%(pr_posting_date1)s'\n`tabPurchase Receipt`.`posting_date` > `tabPurchase Invoice`.`posting_date`", 'add_tab': '`tabPurchase Receipt`', - 'columns': 'Payable Voucher\x01ID,Payable Voucher\x01Voucher Date,Payable Voucher\x01Posting Date,Payable Voucher\x01Credit To,PV Detail\x01Rate,PV Detail\x01Qty,PV Detail\x01Amount,PV Detail\x01Pur Order,PV Detail\x01Pur Receipt', + 'columns': 'Purchase Invoice\x01ID,Purchase Invoice\x01Voucher Date,Purchase Invoice\x01Posting Date,Purchase Invoice\x01Credit To,Purchase Invoice Item\x01Rate,Purchase Invoice Item\x01Qty,Purchase Invoice Item\x01Amount,Purchase Invoice Item\x01Pur Order,Purchase Invoice Item\x01Pur Receipt', 'criteria_name': 'Purchase in Transit', 'description': 'List of PR whose posting date is after PV posting date', 'dis_filters': '`tabPurchase Receipt`.`pr_posting_date`', - 'doc_type': 'PV Detail', + 'doc_type': 'Purchase Invoice Item', 'doctype': 'Search Criteria', - 'filters': "{'Payable Voucher\x01Submitted':1,'Payable Voucher\x01From Posting Date\x01lower':'2009-04-01','Payable Voucher\x01To Posting Date\x01upper':'2010-01-11','Payable Voucher\x01Is Opening':'','Payable Voucher\x01Fiscal Year':'','Payable Voucher\x01Company':'','Purchase Receipt\x01From PR Posting Date\x01lower':'2009-04-01','Purchase Receipt\x01To PR Posting Date\x01upper':'2010-01-11'}", + 'filters': "{'Purchase Invoice\x01Submitted':1,'Purchase Invoice\x01From Posting Date\x01lower':'2009-04-01','Purchase Invoice\x01To Posting Date\x01upper':'2010-01-11','Purchase Invoice\x01Is Opening':'','Purchase Invoice\x01Fiscal Year':'','Purchase Invoice\x01Company':'','Purchase Receipt\x01From PR Posting Date\x01lower':'2009-04-01','Purchase Receipt\x01To PR Posting Date\x01upper':'2010-01-11'}", 'module': 'Buying', 'name': '__common__', 'page_len': 50, - 'parent_doc_type': 'Payable Voucher', - 'sort_by': '`tabPayable Voucher`.`name`', + 'parent_doc_type': 'Purchase Invoice', + 'sort_by': '`tabPurchase Invoice`.`name`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/home/__init__.py b/erpnext/home/__init__.py index 8118ea692c1..97106bdb753 100644 --- a/erpnext/home/__init__.py +++ b/erpnext/home/__init__.py @@ -36,11 +36,11 @@ feed_dict = { # Accounts 'Journal Voucher': ['[%(voucher_type)s] %(name)s', '#4169E1'], - 'Payable Voucher': ['To %(supplier_name)s for %(currency)s %(grand_total_import)s', '#4169E1'], - 'Receivable Voucher':['To %(customer_name)s for %(currency)s %(grand_total_export)s', '#4169E1'], + 'Purchase Invoice': ['To %(supplier_name)s for %(currency)s %(grand_total_import)s', '#4169E1'], + 'Sales Invoice':['To %(customer_name)s for %(currency)s %(grand_total_export)s', '#4169E1'], # HR - 'Expense Voucher': ['[%(approval_status)s] %(name)s by %(employee_name)s', '#4169E1'], + 'Expense Claim': ['[%(approval_status)s] %(name)s by %(employee_name)s', '#4169E1'], 'Salary Slip': ['%(employee_name)s for %(month)s %(fiscal_year)s', '#4169E1'], 'Leave Transaction':['%(leave_type)s for %(employee)s', '#4169E1'], diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py index c88cf9e44db..142dcc2a8b8 100644 --- a/erpnext/home/doctype/home_control/home_control.py +++ b/erpnext/home/doctype/home_control/home_control.py @@ -141,8 +141,8 @@ class DocType: # get dashboard counts # -------------------- def get_wip_counts(self): - #dtl = ['Lead', 'Enquiries', 'Sales Order', 'Invoices', 'Indent', 'Purchase Order', 'Bills', 'Tasks', 'Delivery Note', 'Maintenance'] - can_read_dt = ['Lead', 'Enquiry', 'Sales Order', 'Receivable Voucher', 'Indent', 'Purchase Order', 'Payable Voucher', 'Delivery Note', 'Task', 'Serial No'] + #dtl = ['Lead', 'Enquiries', 'Sales Order', 'Invoices', 'Purchase Request', 'Purchase Order', 'Bills', 'Tasks', 'Delivery Note', 'Maintenance'] + can_read_dt = ['Lead', 'Opportunity', 'Sales Order', 'Sales Invoice', 'Purchase Request', 'Purchase Order', 'Purchase Invoice', 'Delivery Note', 'Task', 'Serial No'] dt = {} for d in can_read_dt: args = {} @@ -151,10 +151,10 @@ class DocType: if d=='Lead': args = {'To follow up':sql("select count(name) from tabLead where status!='Converted' and status!='Lead Lost' and status!='Not Interested'")} - # if Enquiry - elif d=='Enquiry': - args['Quotations to be sent'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabEnquiry`t2 where t1.enq_no!=t2.name and t2.docstatus=1") - args['To follow up'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabEnquiry`t2 where t1.enq_no=t2.name and t2.docstatus=1 and t1.docstatus=1") + # if Opportunity + elif d=='Opportunity': + args['Quotations to be sent'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabOpportunity`t2 where t1.enq_no!=t2.name and t2.docstatus=1") + args['To follow up'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabOpportunity`t2 where t1.enq_no=t2.name and t2.docstatus=1 and t1.docstatus=1") # if Sales Order elif d=='Sales Order': @@ -163,16 +163,16 @@ class DocType: args['Overdue'] = sql("select count(name) from `tabSales Order` where ifnull(per_delivered,0)<100 and delivery_datenow() and outstanding_amount!=0") - args['Overdue'] = sql("select count(name) from `tabReceivable Voucher` where docstatus=1 and due_datenow() and outstanding_amount!=0") + args['Overdue'] = sql("select count(name) from `tabSales Invoice` where docstatus=1 and due_datenow() \n`tabReceivable Voucher`.outstanding_amount!=0\n`tabReceivable Voucher`.docstatus=1', - 'columns': 'Receivable Voucher\x01ID,Receivable Voucher\x01Owner,Receivable Voucher\x01Debit To,Receivable Voucher\x01Voucher Date,Receivable Voucher\x01Due Date,Receivable Voucher\x01Outstanding Amount', + 'add_cond': '`tabSales Invoice`.due_date>now() \n`tabSales Invoice`.outstanding_amount!=0\n`tabSales Invoice`.docstatus=1', + 'columns': 'Sales Invoice\x01ID,Sales Invoice\x01Owner,Sales Invoice\x01Debit To,Sales Invoice\x01Voucher Date,Sales Invoice\x01Due Date,Sales Invoice\x01Outstanding Amount', 'criteria_name': 'Invoices-To receive payment', - 'doc_type': 'Receivable Voucher', + 'doc_type': 'Sales Invoice', 'doctype': 'Search Criteria', - 'filters': "{'Receivable Voucher\x01Submitted':1,'Receivable Voucher\x01Is Opening':'','Receivable Voucher\x01Fiscal Year':''}", + 'filters': "{'Sales Invoice\x01Submitted':1,'Sales Invoice\x01Is Opening':'','Sales Invoice\x01Fiscal Year':''}", 'module': 'Home', 'name': '__common__', 'page_len': 50, - 'sort_by': '`tabReceivable Voucher`.`name`', + 'sort_by': '`tabSales Invoice`.`name`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/home/search_criteria/task_open/task_open.txt b/erpnext/home/search_criteria/task_open/task_open.txt index 4d1998c3f1c..1d10853d1ae 100644 --- a/erpnext/home/search_criteria/task_open/task_open.txt +++ b/erpnext/home/search_criteria/task_open/task_open.txt @@ -12,16 +12,16 @@ # These values are common for all Search Criteria { - 'add_cond': "`tabTicket`.status='Open'", - 'columns': 'Ticket\x01ID,Ticket\x01Subject,Ticket\x01Priority,Ticket\x01Raised By,Ticket\x01Allocated To', + 'add_cond': "`tabTask`.status='Open'", + 'columns': 'Task\x01ID,Task\x01Subject,Task\x01Priority,Task\x01Raised By,Task\x01Allocated To', 'criteria_name': 'Task-Open', - 'doc_type': 'Ticket', + 'doc_type': 'Task', 'doctype': 'Search Criteria', - 'filters': "{'Ticket\x01Priority':''}", + 'filters': "{'Task\x01Priority':''}", 'module': 'Home', 'name': '__common__', 'page_len': 50, - 'sort_by': '`tabTicket`.`name`', + 'sort_by': '`tabTask`.`name`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/hr/DocType Mapper/KRA Template-Appraisal/KRA Template-Appraisal.txt b/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt similarity index 73% rename from erpnext/hr/DocType Mapper/KRA Template-Appraisal/KRA Template-Appraisal.txt rename to erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt index aed40029e23..23f1a02ee3a 100644 --- a/erpnext/hr/DocType Mapper/KRA Template-Appraisal/KRA Template-Appraisal.txt +++ b/erpnext/hr/DocType Mapper/Appraisal Template-Appraisal/Appraisal Template-Appraisal.txt @@ -1,4 +1,4 @@ -# DocType Mapper, KRA Template-Appraisal +# DocType Mapper, Appraisal Template-Appraisal [ # These values are common in all dictionaries @@ -14,30 +14,30 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'kra_sheet', - 'from_table': 'KRA Sheet', + 'from_table': 'Appraisal Template Goal', 'match_id': 0, 'name': '__common__', - 'parent': 'KRA Template-Appraisal', + 'parent': 'Appraisal Template-Appraisal', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper', 'to_field': 'appraisal_details', - 'to_table': 'Appraisal Detail', + 'to_table': 'Appraisal Goal', 'validation_logic': 'name is not Null' }, # These values are common for all DocType Mapper { 'doctype': 'DocType Mapper', - 'from_doctype': 'KRA Template', + 'from_doctype': 'Appraisal Template', 'module': 'HR', 'name': '__common__', 'to_doctype': 'Appraisal' }, - # DocType Mapper, KRA Template-Appraisal + # DocType Mapper, Appraisal Template-Appraisal { 'doctype': 'DocType Mapper', - 'name': 'KRA Template-Appraisal' + 'name': 'Appraisal Template-Appraisal' }, # Table Mapper Detail diff --git a/erpnext/hr/DocType Mapper/Salary Structure-Salary Slip/Salary Structure-Salary Slip.txt b/erpnext/hr/DocType Mapper/Salary Structure-Salary Slip/Salary Structure-Salary Slip.txt index 0a365d10aa6..855c649a607 100644 --- a/erpnext/hr/DocType Mapper/Salary Structure-Salary Slip/Salary Structure-Salary Slip.txt +++ b/erpnext/hr/DocType Mapper/Salary Structure-Salary Slip/Salary Structure-Salary Slip.txt @@ -113,19 +113,19 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'earning_details', - 'from_table': 'Earning Detail', + 'from_table': 'Salary Structure Earning', 'match_id': 1, 'to_field': 'earning_details', - 'to_table': 'SS Earning Detail' + 'to_table': 'Salary Slip Earning' }, # Table Mapper Detail { 'doctype': 'Table Mapper Detail', 'from_field': 'deduction_details', - 'from_table': 'Deduction Detail', + 'from_table': 'Salary Structure Deduction', 'match_id': 2, 'to_field': 'deduction_details', - 'to_table': 'SS Deduction Detail' + 'to_table': 'Salary Slip Deduction' } ] \ No newline at end of file diff --git a/erpnext/hr/Expense Type/Calls/Calls.txt b/erpnext/hr/Expense Type/Calls/Calls.txt index 2cd19e1d76c..5cf53d6b21b 100644 --- a/erpnext/hr/Expense Type/Calls/Calls.txt +++ b/erpnext/hr/Expense Type/Calls/Calls.txt @@ -1 +1 @@ -[{'modified_by': 'harshada@webnotestech.com', 'name': 'Calls', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:38', 'modified': '2010-08-23 18:26:38', 'module': 'Payroll', 'doctype': 'Expense Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Calls', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'harshada@webnotestech.com', 'name': 'Calls', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:38', 'modified': '2010-08-23 18:26:38', 'module': 'Payroll', 'doctype': 'Expense Claim Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Calls', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/hr/Expense Type/Food/Food.txt b/erpnext/hr/Expense Type/Food/Food.txt index d0266ad4f88..c09f21f7ee4 100644 --- a/erpnext/hr/Expense Type/Food/Food.txt +++ b/erpnext/hr/Expense Type/Food/Food.txt @@ -1 +1 @@ -[{'modified_by': 'harshada@webnotestech.com', 'name': 'Food', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:30', 'modified': '2010-08-23 18:26:30', 'module': 'Payroll', 'doctype': 'Expense Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Food', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'harshada@webnotestech.com', 'name': 'Food', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:30', 'modified': '2010-08-23 18:26:30', 'module': 'Payroll', 'doctype': 'Expense Claim Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Food', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/hr/Expense Type/Medical/Medical.txt b/erpnext/hr/Expense Type/Medical/Medical.txt index 4e848629fcd..754af611f8f 100644 --- a/erpnext/hr/Expense Type/Medical/Medical.txt +++ b/erpnext/hr/Expense Type/Medical/Medical.txt @@ -1 +1 @@ -[{'modified_by': 'harshada@webnotestech.com', 'name': 'Medical', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:49', 'modified': '2010-08-23 18:26:49', 'module': 'Payroll', 'doctype': 'Expense Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Medical', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'harshada@webnotestech.com', 'name': 'Medical', 'parent': None, 'description': None, 'creation': '2010-08-23 18:26:49', 'modified': '2010-08-23 18:26:49', 'module': 'Payroll', 'doctype': 'Expense Claim Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Medical', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/hr/Expense Type/Others/Others.txt b/erpnext/hr/Expense Type/Others/Others.txt index 13a6af3dab1..509d6528cfa 100644 --- a/erpnext/hr/Expense Type/Others/Others.txt +++ b/erpnext/hr/Expense Type/Others/Others.txt @@ -1 +1 @@ -[{'modified_by': 'harshada@webnotestech.com', 'name': 'Others', 'parent': None, 'description': None, 'creation': '2010-09-20 12:16:45', 'modified': '2010-09-20 12:16:45', 'module': 'Payroll', 'doctype': 'Expense Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Others', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'harshada@webnotestech.com', 'name': 'Others', 'parent': None, 'description': None, 'creation': '2010-09-20 12:16:45', 'modified': '2010-09-20 12:16:45', 'module': 'Payroll', 'doctype': 'Expense Claim Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Others', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/hr/Expense Type/Travel/Travel.txt b/erpnext/hr/Expense Type/Travel/Travel.txt index 966c2eab0c3..c21e4b63fba 100644 --- a/erpnext/hr/Expense Type/Travel/Travel.txt +++ b/erpnext/hr/Expense Type/Travel/Travel.txt @@ -1 +1 @@ -[{'modified_by': 'harshada@webnotestech.com', 'name': 'Travel', 'parent': None, 'description': None, 'creation': '2010-09-20 12:16:45', 'modified': '2010-09-20 12:16:45', 'module': 'Payroll', 'doctype': 'Expense Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Travel', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'harshada@webnotestech.com', 'name': 'Travel', 'parent': None, 'description': None, 'creation': '2010-09-20 12:16:45', 'modified': '2010-09-20 12:16:45', 'module': 'Payroll', 'doctype': 'Expense Claim Type', 'idx': None, 'parenttype': None, 'owner': 'harshada@webnotestech.com', 'docstatus': 0, 'expense_type': 'Travel', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/hr/Module Def/HR/HR.txt b/erpnext/hr/Module Def/HR/HR.txt index 212d689e4ef..623bdc5233a 100644 --- a/erpnext/hr/Module Def/HR/HR.txt +++ b/erpnext/hr/Module Def/HR/HR.txt @@ -114,8 +114,8 @@ # Module Def Item { 'description': 'Submit Employees Expenses', - 'display_name': 'Expense Voucher', - 'doc_name': 'Expense Voucher', + 'display_name': 'Expense Claim', + 'doc_name': 'Expense Claim', 'doc_type': 'Forms', 'doctype': 'Module Def Item', 'fields': 'status\nemployee\nemployee_name\nposting_date\ntotal_claimed_amount\ntotal_sanctioned_amount\nexp_approver', @@ -286,8 +286,8 @@ # Module Def Item { - 'display_name': 'Pending Expense Vouchers', - 'doc_name': 'Expense Voucher', + 'display_name': 'Pending Expense Claims', + 'doc_name': 'Expense Claim', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 25 @@ -295,8 +295,8 @@ # Module Def Item { - 'display_name': 'Expense Vouchers', - 'doc_name': 'Expense Voucher', + 'display_name': 'Expense Claims', + 'doc_name': 'Expense Claim', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 26 diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js index 0483c38e36d..70b00a250b5 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.js +++ b/erpnext/hr/doctype/appraisal/appraisal.js @@ -39,9 +39,9 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ cur_frm.cscript.refresh_appraisal_details = function(doc, cdt, cdn){ - var val = getchildren('Appraisal Detail', doc.name, 'appraisal_details', doc.doctype); + var val = getchildren('Appraisal Goal', doc.name, 'appraisal_details', doc.doctype); for(var i = 0; i getdate(self.doc.end_date): diff --git a/erpnext/hr/doctype/appraisal/appraisal.txt b/erpnext/hr/doctype/appraisal/appraisal.txt index 4f71ba965bc..bfba9fca199 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.txt +++ b/erpnext/hr/doctype/appraisal/appraisal.txt @@ -312,10 +312,10 @@ 'doctype': u'DocField', 'fieldname': u'kra_template', 'fieldtype': u'Link', - 'label': u'KRA Template', + 'label': u'Appraisal Template', 'oldfieldname': u'kra_template', 'oldfieldtype': u'Link', - 'options': u'KRA Template', + 'options': u'Appraisal Template', 'permlevel': 0 }, @@ -351,10 +351,10 @@ 'doctype': u'DocField', 'fieldname': u'appraisal_details', 'fieldtype': u'Table', - 'label': u'Appraisal Details', + 'label': u'Appraisal Goals', 'oldfieldname': u'appraisal_details', 'oldfieldtype': u'Table', - 'options': u'Appraisal Detail', + 'options': u'Appraisal Goal', 'permlevel': 0 }, diff --git a/erpnext/hr/doctype/appraisal_detail/__init__.py b/erpnext/hr/doctype/appraisal_goal/__init__.py similarity index 100% rename from erpnext/hr/doctype/appraisal_detail/__init__.py rename to erpnext/hr/doctype/appraisal_goal/__init__.py diff --git a/erpnext/hr/doctype/appraisal_detail/appraisal_detail.txt b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt similarity index 94% rename from erpnext/hr/doctype/appraisal_detail/appraisal_detail.txt rename to erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt index f715f07ee1e..fab4e84e9bf 100644 --- a/erpnext/hr/doctype/appraisal_detail/appraisal_detail.txt +++ b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.txt @@ -1,4 +1,4 @@ -# DocType, Appraisal Detail +# DocType, Appraisal Goal [ # These values are common in all dictionaries @@ -28,15 +28,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Appraisal Detail', + 'parent': u'Appraisal Goal', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Appraisal Detail + # DocType, Appraisal Goal { 'doctype': 'DocType', - 'name': u'Appraisal Detail' + 'name': u'Appraisal Goal' }, # DocField diff --git a/erpnext/hr/doctype/deduction_detail/__init__.py b/erpnext/hr/doctype/appraisal_template/__init__.py similarity index 100% rename from erpnext/hr/doctype/deduction_detail/__init__.py rename to erpnext/hr/doctype/appraisal_template/__init__.py diff --git a/erpnext/hr/doctype/earning_detail/__init__.py b/erpnext/hr/doctype/appraisal_template/appraisal_template.js similarity index 100% rename from erpnext/hr/doctype/earning_detail/__init__.py rename to erpnext/hr/doctype/appraisal_template/appraisal_template.js diff --git a/erpnext/hr/doctype/kra_template/kra_template.txt b/erpnext/hr/doctype/appraisal_template/appraisal_template.txt similarity index 88% rename from erpnext/hr/doctype/kra_template/kra_template.txt rename to erpnext/hr/doctype/appraisal_template/appraisal_template.txt index f93a400140f..62a0d5b4ad4 100644 --- a/erpnext/hr/doctype/kra_template/kra_template.txt +++ b/erpnext/hr/doctype/appraisal_template/appraisal_template.txt @@ -1,4 +1,4 @@ -# DocType, KRA Template +# DocType, Appraisal Template [ # These values are common in all dictionaries @@ -27,7 +27,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'KRA Template', + 'parent': u'Appraisal Template', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -38,7 +38,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'KRA Template', + 'parent': u'Appraisal Template', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -46,10 +46,10 @@ 'write': 1 }, - # DocType, KRA Template + # DocType, Appraisal Template { 'doctype': 'DocType', - 'name': u'KRA Template' + 'name': u'Appraisal Template' }, # DocPerm @@ -103,9 +103,9 @@ 'doctype': u'DocField', 'fieldname': u'kra_sheet', 'fieldtype': u'Table', - 'label': u'KRA Sheet', + 'label': u'Appraisal Template Goal', 'oldfieldname': u'kra_sheet', 'oldfieldtype': u'Table', - 'options': u'KRA Sheet' + 'options': u'Appraisal Template Goal' } ] \ No newline at end of file diff --git a/erpnext/hr/doctype/educational_qualifications_detail/__init__.py b/erpnext/hr/doctype/appraisal_template_goal/__init__.py similarity index 100% rename from erpnext/hr/doctype/educational_qualifications_detail/__init__.py rename to erpnext/hr/doctype/appraisal_template_goal/__init__.py diff --git a/erpnext/hr/doctype/kra_sheet/kra_sheet.txt b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt similarity index 88% rename from erpnext/hr/doctype/kra_sheet/kra_sheet.txt rename to erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt index 6d11d5d3ebc..c3e95e551c2 100644 --- a/erpnext/hr/doctype/kra_sheet/kra_sheet.txt +++ b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.txt @@ -1,4 +1,4 @@ -# DocType, KRA Sheet +# DocType, Appraisal Template Goal [ # These values are common in all dictionaries @@ -27,17 +27,17 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'KRA Sheet', + 'parent': u'Appraisal Template Goal', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0, 'reqd': 1 }, - # DocType, KRA Sheet + # DocType, Appraisal Template Goal { 'doctype': 'DocType', - 'name': u'KRA Sheet' + 'name': u'Appraisal Template Goal' }, # DocField diff --git a/erpnext/hr/doctype/attendance/attendance.txt b/erpnext/hr/doctype/attendance/attendance.txt index ea57b75ed76..04df67d9661 100644 --- a/erpnext/hr/doctype/attendance/attendance.txt +++ b/erpnext/hr/doctype/attendance/attendance.txt @@ -234,7 +234,7 @@ 'fieldtype': u'Link', 'label': u'Amended From', 'no_copy': 1, - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 } diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 2cf46a60bda..06833bfb507 100644 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -39,7 +39,7 @@ class DocType: # Autoname #======================================================================================================== def autoname(self): - ret = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'emp_created_by'") + ret = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'emp_created_by'") if not ret: msgprint("To Save Employee, please go to Setup -->Global Defaults. Click on HR and select 'Employee Records to be created by'.") raise Exception @@ -113,7 +113,7 @@ class DocType: # Validate name #======================================================================================================== def validate_name(self): - ret = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'emp_created_by'") + ret = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'emp_created_by'") if not ret: msgprint("To Save Employee, please go to Setup -->Global Defaults. Click on HR and select 'Employee Records to be created by'.") diff --git a/erpnext/hr/doctype/employee/employee.txt b/erpnext/hr/doctype/employee/employee.txt index 3f330de2e3c..6442080d230 100644 --- a/erpnext/hr/doctype/employee/employee.txt +++ b/erpnext/hr/doctype/employee/employee.txt @@ -857,7 +857,7 @@ 'fieldname': u'educational_qualification_details', 'fieldtype': u'Table', 'label': u'Educational Qualification Details', - 'options': u'Educational Qualifications Detail', + 'options': u'Employee Education', 'permlevel': 0 }, @@ -885,8 +885,8 @@ 'doctype': u'DocField', 'fieldname': u'previous_experience_details', 'fieldtype': u'Table', - 'label': u'Previous Experience Details', - 'options': u'Previous Experience Detail', + 'label': u'Employee External Work Historys', + 'options': u'Employee External Work History', 'permlevel': 0 }, @@ -905,8 +905,8 @@ 'doctype': u'DocField', 'fieldname': u'experience_in_company_details', 'fieldtype': u'Table', - 'label': u'Experience In Company Details', - 'options': u'Experience In Company Detail', + 'label': u'Employee Internal Work Historys', + 'options': u'Employee Internal Work History', 'permlevel': 0 }, diff --git a/erpnext/hr/doctype/expense_type/__init__.py b/erpnext/hr/doctype/employee_education/__init__.py similarity index 100% rename from erpnext/hr/doctype/expense_type/__init__.py rename to erpnext/hr/doctype/employee_education/__init__.py diff --git a/erpnext/hr/doctype/educational_qualifications_detail/educational_qualifications_detail.txt b/erpnext/hr/doctype/employee_education/employee_education.txt similarity index 91% rename from erpnext/hr/doctype/educational_qualifications_detail/educational_qualifications_detail.txt rename to erpnext/hr/doctype/employee_education/employee_education.txt index df48fc341b0..b920fd6cb28 100644 --- a/erpnext/hr/doctype/educational_qualifications_detail/educational_qualifications_detail.txt +++ b/erpnext/hr/doctype/employee_education/employee_education.txt @@ -1,4 +1,4 @@ -# DocType, Educational Qualifications Detail +# DocType, Employee Education [ # These values are common in all dictionaries @@ -27,16 +27,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Educational Qualifications Detail', + 'parent': u'Employee Education', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Educational Qualifications Detail + # DocType, Employee Education { 'doctype': 'DocType', - 'name': u'Educational Qualifications Detail' + 'name': u'Employee Education' }, # DocField diff --git a/erpnext/hr/doctype/expense_voucher/__init__.py b/erpnext/hr/doctype/employee_external_work_history/__init__.py similarity index 100% rename from erpnext/hr/doctype/expense_voucher/__init__.py rename to erpnext/hr/doctype/employee_external_work_history/__init__.py diff --git a/erpnext/hr/doctype/previous_experience_detail/previous_experience_detail.txt b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt similarity index 90% rename from erpnext/hr/doctype/previous_experience_detail/previous_experience_detail.txt rename to erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt index f571a6a10d7..167675af632 100644 --- a/erpnext/hr/doctype/previous_experience_detail/previous_experience_detail.txt +++ b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.txt @@ -1,4 +1,4 @@ -# DocType, Previous Experience Detail +# DocType, Employee External Work History [ # These values are common in all dictionaries @@ -27,7 +27,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Previous Experience Detail', + 'parent': u'Employee External Work History', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -38,7 +38,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Previous Experience Detail', + 'parent': u'Employee External Work History', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -47,10 +47,10 @@ 'write': 1 }, - # DocType, Previous Experience Detail + # DocType, Employee External Work History { 'doctype': 'DocType', - 'name': u'Previous Experience Detail' + 'name': u'Employee External Work History' }, # DocPerm diff --git a/erpnext/hr/doctype/expense_voucher_detail/__init__.py b/erpnext/hr/doctype/employee_internal_work_history/__init__.py similarity index 100% rename from erpnext/hr/doctype/expense_voucher_detail/__init__.py rename to erpnext/hr/doctype/employee_internal_work_history/__init__.py diff --git a/erpnext/hr/doctype/experience_in_company_detail/experience_in_company_detail.txt b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt similarity index 91% rename from erpnext/hr/doctype/experience_in_company_detail/experience_in_company_detail.txt rename to erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt index da66f24fd6b..3dcc1ff5b54 100644 --- a/erpnext/hr/doctype/experience_in_company_detail/experience_in_company_detail.txt +++ b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.txt @@ -1,4 +1,4 @@ -# DocType, Experience In Company Detail +# DocType, Employee Internal Work History [ # These values are common in all dictionaries @@ -26,16 +26,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Experience In Company Detail', + 'parent': u'Employee Internal Work History', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Experience In Company Detail + # DocType, Employee Internal Work History { 'doctype': 'DocType', - 'name': u'Experience In Company Detail' + 'name': u'Employee Internal Work History' }, # DocField diff --git a/erpnext/hr/doctype/experience_in_company_detail/__init__.py b/erpnext/hr/doctype/employee_training/__init__.py similarity index 100% rename from erpnext/hr/doctype/experience_in_company_detail/__init__.py rename to erpnext/hr/doctype/employee_training/__init__.py diff --git a/erpnext/hr/doctype/professional_training_details/professional_training_details.txt b/erpnext/hr/doctype/employee_training/employee_training.txt similarity index 90% rename from erpnext/hr/doctype/professional_training_details/professional_training_details.txt rename to erpnext/hr/doctype/employee_training/employee_training.txt index fca84f7a0ac..c75183670fa 100644 --- a/erpnext/hr/doctype/professional_training_details/professional_training_details.txt +++ b/erpnext/hr/doctype/employee_training/employee_training.txt @@ -1,4 +1,4 @@ -# DocType, Professional Training Details +# DocType, Employee Training [ # These values are common in all dictionaries @@ -27,16 +27,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Professional Training Details', + 'parent': u'Employee Training', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Professional Training Details + # DocType, Employee Training { 'doctype': 'DocType', - 'name': u'Professional Training Details' + 'name': u'Employee Training' }, # DocField diff --git a/erpnext/hr/doctype/holiday_list_detail/__init__.py b/erpnext/hr/doctype/expense_claim/__init__.py similarity index 100% rename from erpnext/hr/doctype/holiday_list_detail/__init__.py rename to erpnext/hr/doctype/expense_claim/__init__.py diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.js b/erpnext/hr/doctype/expense_claim/expense_claim.js similarity index 93% rename from erpnext/hr/doctype/expense_voucher/expense_voucher.js rename to erpnext/hr/doctype/expense_claim/expense_claim.js index 2363dbd696a..f9ce8bdfdb3 100644 --- a/erpnext/hr/doctype/expense_voucher/expense_voucher.js +++ b/erpnext/hr/doctype/expense_claim/expense_claim.js @@ -23,7 +23,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){ if (doc.__islocal) { if(doc.amended_from) set_multiple(cdt,cdn,{approval_status:'Draft'}); - var val = getchildren('Expense Voucher Detail', doc.name, 'expense_voucher_details', doc.doctype); + var val = getchildren('Expense Claim Detail', doc.name, 'expense_voucher_details', doc.doctype); for(var i = 0; i 0: if self.doc.approval_status == 'Draft': - msgprint("Sanctioned amount can be added by Approver person only for submitted Expense Voucher") + msgprint("Sanctioned amount can be added by Approver person only for submitted Expense Claim") raise Exception elif self.doc.approval_status == 'Submitted' and session['user'] != self.doc.exp_approver: msgprint("Sanctioned amount can be added only by expense voucher Approver") @@ -138,7 +138,7 @@ class DocType: raise Exception if not self.doc.exp_approver: - msgprint("Please select Expense Voucher approver") + msgprint("Please select Expense Claim approver") raise Exception def validate_approver(self): diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.txt b/erpnext/hr/doctype/expense_claim/expense_claim.txt similarity index 97% rename from erpnext/hr/doctype/expense_voucher/expense_voucher.txt rename to erpnext/hr/doctype/expense_claim/expense_claim.txt index ac2a90bcdc3..34ed31c8520 100644 --- a/erpnext/hr/doctype/expense_voucher/expense_voucher.txt +++ b/erpnext/hr/doctype/expense_claim/expense_claim.txt @@ -1,4 +1,4 @@ -# DocType, Expense Voucher +# DocType, Expense Claim [ # These values are common in all dictionaries @@ -33,7 +33,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Expense Voucher', + 'parent': u'Expense Claim', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -42,16 +42,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Expense Voucher', + 'parent': u'Expense Claim', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Expense Voucher + # DocType, Expense Claim { 'doctype': 'DocType', - 'name': u'Expense Voucher' + 'name': u'Expense Claim' }, # DocPerm @@ -368,10 +368,10 @@ 'doctype': u'DocField', 'fieldname': u'expense_voucher_details', 'fieldtype': u'Table', - 'label': u'Expense Voucher Details', + 'label': u'Expense Claim Details', 'oldfieldname': u'expense_voucher_details', 'oldfieldtype': u'Table', - 'options': u'Expense Voucher Detail', + 'options': u'Expense Claim Detail', 'permlevel': 0 }, diff --git a/erpnext/hr/doctype/kra_sheet/__init__.py b/erpnext/hr/doctype/expense_claim_detail/__init__.py similarity index 100% rename from erpnext/hr/doctype/kra_sheet/__init__.py rename to erpnext/hr/doctype/expense_claim_detail/__init__.py diff --git a/erpnext/hr/doctype/expense_voucher_detail/expense_voucher_detail.txt b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt similarity index 90% rename from erpnext/hr/doctype/expense_voucher_detail/expense_voucher_detail.txt rename to erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt index 2ad3a985f78..a11ce5c25d6 100644 --- a/erpnext/hr/doctype/expense_voucher_detail/expense_voucher_detail.txt +++ b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.txt @@ -1,4 +1,4 @@ -# DocType, Expense Voucher Detail +# DocType, Expense Claim Detail [ # These values are common in all dictionaries @@ -26,16 +26,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Expense Voucher Detail', + 'parent': u'Expense Claim Detail', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Expense Voucher Detail + # DocType, Expense Claim Detail { 'doctype': 'DocType', - 'name': u'Expense Voucher Detail' + 'name': u'Expense Claim Detail' }, # DocField @@ -55,10 +55,10 @@ 'doctype': u'DocField', 'fieldname': u'expense_type', 'fieldtype': u'Link', - 'label': u'Expense Type', + 'label': u'Expense Claim Type', 'oldfieldname': u'expense_type', 'oldfieldtype': u'Link', - 'options': u'Expense Type', + 'options': u'Expense Claim Type', 'reqd': 1, 'width': u'150px' }, diff --git a/erpnext/hr/doctype/kra_template/__init__.py b/erpnext/hr/doctype/expense_claim_type/__init__.py similarity index 100% rename from erpnext/hr/doctype/kra_template/__init__.py rename to erpnext/hr/doctype/expense_claim_type/__init__.py diff --git a/erpnext/hr/doctype/expense_type/expense_type.js b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.js similarity index 100% rename from erpnext/hr/doctype/expense_type/expense_type.js rename to erpnext/hr/doctype/expense_claim_type/expense_claim_type.js diff --git a/erpnext/hr/doctype/expense_type/expense_type.txt b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt similarity index 88% rename from erpnext/hr/doctype/expense_type/expense_type.txt rename to erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt index e3661618357..a5c09c87cdc 100644 --- a/erpnext/hr/doctype/expense_type/expense_type.txt +++ b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.txt @@ -1,4 +1,4 @@ -# DocType, Expense Type +# DocType, Expense Claim Type [ # These values are common in all dictionaries @@ -27,7 +27,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Expense Type', + 'parent': u'Expense Claim Type', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -38,7 +38,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Expense Type', + 'parent': u'Expense Claim Type', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -46,10 +46,10 @@ 'write': 1 }, - # DocType, Expense Type + # DocType, Expense Claim Type { 'doctype': 'DocType', - 'name': u'Expense Type' + 'name': u'Expense Claim Type' }, # DocPerm @@ -76,7 +76,7 @@ 'fieldname': u'expense_type', 'fieldtype': u'Data', 'in_filter': 0, - 'label': u'Expense Type', + 'label': u'Expense Claim Type', 'oldfieldname': u'expense_type', 'oldfieldtype': u'Data', 'reqd': 1, diff --git a/erpnext/hr/doctype/previous_experience_detail/__init__.py b/erpnext/hr/doctype/holiday/__init__.py similarity index 100% rename from erpnext/hr/doctype/previous_experience_detail/__init__.py rename to erpnext/hr/doctype/holiday/__init__.py diff --git a/erpnext/hr/doctype/holiday_list_detail/holiday_list_detail.txt b/erpnext/hr/doctype/holiday/holiday.txt similarity index 88% rename from erpnext/hr/doctype/holiday_list_detail/holiday_list_detail.txt rename to erpnext/hr/doctype/holiday/holiday.txt index 238ad75d259..bfcc7b3312f 100644 --- a/erpnext/hr/doctype/holiday_list_detail/holiday_list_detail.txt +++ b/erpnext/hr/doctype/holiday/holiday.txt @@ -1,4 +1,4 @@ -# DocType, Holiday List Detail +# DocType, Holiday [ # These values are common in all dictionaries @@ -28,16 +28,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Holiday List Detail', + 'parent': u'Holiday', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Holiday List Detail + # DocType, Holiday { 'doctype': 'DocType', - 'name': u'Holiday List Detail' + 'name': u'Holiday' }, # DocField diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py index 2f73159be1a..dd31559fdab 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list.py @@ -105,7 +105,7 @@ class DocType: yr_start_date, yr_end_date = self.get_fy_start_end_dates() date_list = self.get_weekly_off_date_list(yr_start_date, yr_end_date) for d in date_list: - ch = addchild(self.doc, 'holiday_list_details', 'Holiday List Detail', 1, self.doclist) + ch = addchild(self.doc, 'holiday_list_details', 'Holiday', 1, self.doclist) ch.description = self.doc.weekly_off ch.holiday_date = d diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.txt b/erpnext/hr/doctype/holiday_list/holiday_list.txt index c8026c66cc6..ce0e49f1ab5 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.txt +++ b/erpnext/hr/doctype/holiday_list/holiday_list.txt @@ -133,10 +133,10 @@ 'doctype': u'DocField', 'fieldname': u'holiday_list_details', 'fieldtype': u'Table', - 'label': u'Holiday List Details', + 'label': u'Holidays', 'oldfieldname': u'holiday_list_details', 'oldfieldtype': u'Table', - 'options': u'Holiday List Detail', + 'options': u'Holiday', 'permlevel': 0, 'reqd': 0 }, diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.py b/erpnext/hr/doctype/it_checklist/it_checklist.py index 4ddfc0a2628..7b7ce5ce266 100644 --- a/erpnext/hr/doctype/it_checklist/it_checklist.py +++ b/erpnext/hr/doctype/it_checklist/it_checklist.py @@ -87,11 +87,11 @@ class DocType: if ret_name: for b in ret_name: #get earning amount of basic - ret_basic = sql("select e_amount from `tabSS Earning Detail` where parent = '%s' and e_type = 'Basic'"%(b[0])) + ret_basic = sql("select e_amount from `tabSalary Slip Earning` where parent = '%s' and e_type = 'Basic'"%(b[0])) sum_basic += ret_basic[0][0] or 0 #get deduction amount of Provident Fund - ret_pf = sql("select d_amount from `tabSS Deduction Detail` where parent = '%s' and d_type = 'Provident Fund'"%(b[0])) + ret_pf = sql("select d_amount from `tabSalary Slip Deduction` where parent = '%s' and d_type = 'Provident Fund'"%(b[0])) sum_pf += ret_pf[0][0] or 0 @@ -103,7 +103,7 @@ class DocType: self.doc.basic = self.doc.gross_income = 0 #query return list of earning types and resp. modified amount - ret = convert_to_lists(sql("select e.e_type, e.modified_value from `tabEarning Detail` e , `tabSalary Structure` s where s.is_active = 'Yes' and s.employee='%s' and e.parent = s.name" %(self.doc.employee))) + ret = convert_to_lists(sql("select e.e_type, e.modified_value from `tabSalary Structure Earning` e , `tabSalary Structure` s where s.is_active = 'Yes' and s.employee='%s' and e.parent = s.name" %(self.doc.employee))) hra_count=1 if ret: count = 0.0 @@ -132,7 +132,7 @@ class DocType: self.doc.pf = 0.0 #query returns amount - ret_ded = sql("select d.d_modified_amt from `tabDeduction Detail` d , `tabSalary Structure` s where s.is_active = 'Yes' and s.employee='%s' and d.parent = s.name and d.d_type = 'Provident Fund'" %(self.doc.employee)) + ret_ded = sql("select d.d_modified_amt from `tabSalary Structure Deduction` d , `tabSalary Structure` s where s.is_active = 'Yes' and s.employee='%s' and d.parent = s.name and d.d_type = 'Provident Fund'" %(self.doc.employee)) if not ret_ded: msgprint("PF Amount in Salary Structure is zero") @@ -257,7 +257,7 @@ class DocType: if (self.doc.ann_rent > 0): #query return sum of earning types amount where earning type = 'HRA' - ret_sal_slip = sql("select sum(e.e_amount) from `tabSS Earning Detail` e , `tabSalary Slip` s where s.fiscal_year = '%s' and s.docstatus = 1 and s.employee='%s' and e.parent = s.name and e.e_type = 'House Rent Allowance'" %(self.doc.fiscal_year,self.doc.employee)) + ret_sal_slip = sql("select sum(e.e_amount) from `tabSalary Slip Earning` e , `tabSalary Slip` s where s.fiscal_year = '%s' and s.docstatus = 1 and s.employee='%s' and e.parent = s.name and e.e_type = 'House Rent Allowance'" %(self.doc.fiscal_year,self.doc.employee)) if not ret_sal_slip: ret_sal_slip = 0.00 else: @@ -422,7 +422,7 @@ class DocType: def calc_tax_pm(self): ret_income_tax = 0 - ret_income_tax = sql("select sum(d.d_amount) from `tabSS Deduction Detail` d , `tabSalary Slip` s where s.docstatus = 1 and s.fiscal_year = '%s' and s.employee='%s' and d.parent = s.name and d.d_type = 'Income Tax'" %(self.doc.fiscal_year,self.doc.employee)) + ret_income_tax = sql("select sum(d.d_amount) from `tabSalary Slip Deduction` d , `tabSalary Slip` s where s.docstatus = 1 and s.fiscal_year = '%s' and s.employee='%s' and d.parent = s.name and d.d_type = 'Income Tax'" %(self.doc.fiscal_year,self.doc.employee)) new_tot_income = cint(self.doc.tax_tot_income) + cint(self.doc.edu_cess) - (cint(ret_income_tax[0][0]) or 0) diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 66647c13bc8..7ad637d60da 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -59,9 +59,9 @@ class DocType: """ get total holidays """ - tot_hol = sql("select count(*) from `tabHoliday List Detail` h1, `tabHoliday List` h2, `tabEmployee` e1 where e1.name = '%s' and h1.parent = h2.name and e1.holiday_list = h2.name and h1.holiday_date between '%s' and '%s'"% (self.doc.employee, self.doc.from_date, self.doc.to_date)) + tot_hol = sql("select count(*) from `tabHoliday` h1, `tabHoliday List` h2, `tabEmployee` e1 where e1.name = '%s' and h1.parent = h2.name and e1.holiday_list = h2.name and h1.holiday_date between '%s' and '%s'"% (self.doc.employee, self.doc.from_date, self.doc.to_date)) if not tot_hol: - tot_hol = sql("select count(*) from `tabHoliday List Detail` h1, `tabHoliday List` h2 where h1.parent = h2.name and h1.holiday_date between '%s' and '%s' and ifnull(h2.is_default,0) = 1 and h2.fiscal_year = %s"% (self.doc.from_date, self.doc.to_date, self.doc.fiscal_year)) + tot_hol = sql("select count(*) from `tabHoliday` h1, `tabHoliday List` h2 where h1.parent = h2.name and h1.holiday_date between '%s' and '%s' and ifnull(h2.is_default,0) = 1 and h2.fiscal_year = %s"% (self.doc.from_date, self.doc.to_date, self.doc.fiscal_year)) return tot_hol and flt(tot_hol[0][0]) or 0 diff --git a/erpnext/hr/doctype/salary_manager/test_salary_manager.py b/erpnext/hr/doctype/salary_manager/test_salary_manager.py index 0282bfee151..8cea1053a6a 100644 --- a/erpnext/hr/doctype/salary_manager/test_salary_manager.py +++ b/erpnext/hr/doctype/salary_manager/test_salary_manager.py @@ -30,15 +30,15 @@ class TestSalaryManager(unittest.TestCase): ss1[0].employee = emp1.name for s in ss1: s.save(1) for s in ss1[1:]: - sql("update `tabEarning Detail` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) - sql("update `tabDeduction Detail` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) + sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) + sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss1[0].name, s.name)) ss2[0].employee = emp2.name for s in ss2: s.save(1) for s in ss2[1:]: - sql("update `tabEarning Detail` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) - sql("update `tabDeduction Detail` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) + sql("update `tabSalary Structure Earning` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) + sql("update `tabSalary Structure Deduction` set parent = '%s' where name = '%s'" % (ss2[0].name, s.name)) sman.save() self.sm = get_obj('Salary Manager') @@ -158,7 +158,7 @@ ss1 = [ Document(fielddata={ 'parenttype':'Salary Structure', 'parentfield':'earning_details', - 'doctype':'Earning Detail', + 'doctype':'Salary Structure Earning', 'e_type' : 'Basic', 'depend_on_lwp':1, 'modified_value':100 @@ -166,7 +166,7 @@ ss1 = [ Document(fielddata={ 'parenttype':'Salary Structure', 'parentfield':'earning_details', - 'doctype':'Deduction Detail', + 'doctype':'Salary Structure Deduction', 'd_type':'TDS', 'd_modified_amt':20 }) @@ -181,14 +181,14 @@ ss2 = [ Document(fielddata={ 'parenttype':'Salary Structure', 'parentfield':'deduction_details', - 'doctype':'Earning Detail', + 'doctype':'Salary Structure Earning', 'e_type' : 'Basic', 'modified_value':100 }), Document(fielddata={ 'parenttype':'Salary Structure', 'parentfield':'deduction_details', - 'doctype':'Deduction Detail', + 'doctype':'Salary Structure Deduction', 'd_type':'TDS', 'd_modified_amt':20 }) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index 0dc7ad96409..5fe93a68a58 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -79,7 +79,7 @@ cur_frm.cscript.d_depends_on_lwp = cur_frm.cscript.d_modified_amount; // Calculate earning total // ------------------------------------------------------------------------ var calculate_earning_total = function(doc, dt, dn) { - var tbl = getchildren('SS Earning Detail', doc.name, 'earning_details', doc.doctype); + var tbl = getchildren('Salary Slip Earning', doc.name, 'earning_details', doc.doctype); var total_earn = 0; for(var i = 0; i < tbl.length; i++){ @@ -96,7 +96,7 @@ var calculate_earning_total = function(doc, dt, dn) { // Calculate deduction total // ------------------------------------------------------------------------ var calculate_ded_total = function(doc, dt, dn) { - var tbl = getchildren('SS Deduction Detail', doc.name, 'deduction_details', doc.doctype); + var tbl = getchildren('Salary Slip Deduction', doc.name, 'deduction_details', doc.doctype); var total_ded = 0; for(var i = 0; i < tbl.length; i++){ diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index e0313a430e2..f56b8a5d779 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -73,7 +73,7 @@ class DocType(TransactionBase): self.doc.clear_table(self.doclist, 'earning_details') self.doc.clear_table(self.doclist, 'deduction_details') - get_obj('DocType Mapper', 'Salary Structure-Salary Slip').dt_map('Salary Structure', 'Salary Slip', struct, self.doc, self.doclist, "[['Salary Structure', 'Salary Slip'],['Earning Detail', 'SS Earning Detail'],['Deduction Detail','SS Deduction Detail']]") + get_obj('DocType Mapper', 'Salary Structure-Salary Slip').dt_map('Salary Structure', 'Salary Slip', struct, self.doc, self.doclist, "[['Salary Structure', 'Salary Slip'],['Earning Detail', 'Salary Slip Earning'],['Deduction Detail','Salary Slip Deduction']]") basic_info = sql("select bank_name, bank_ac_no, esic_card_no, pf_number from `tabEmployee` where name ='%s'" % self.doc.employee) self.doc.bank_name = basic_info[0][0] @@ -109,9 +109,9 @@ class DocType(TransactionBase): # Calculate LWP #======================================================= def calculate_lwp(self, m): - holidays = sql("select t1.holiday_date from `tabHoliday List Detail` t1, tabEmployee t2 where t1.parent = t2.holiday_list and t2.name = '%s' and t1.holiday_date between '%s' and '%s'" % (self.doc.employee, m[1], m[2])) + holidays = sql("select t1.holiday_date from `tabHoliday` t1, tabEmployee t2 where t1.parent = t2.holiday_list and t2.name = '%s' and t1.holiday_date between '%s' and '%s'" % (self.doc.employee, m[1], m[2])) if not holidays: - holidays = sql("select t1.holiday_date from `tabHoliday List Detail` t1, `tabHoliday List` t2 where t1.parent = t2.name and ifnull(t2.is_default, 0) = 1 and t2.fiscal_year = '%s'" % self.doc.fiscal_year) + holidays = sql("select t1.holiday_date from `tabHoliday` t1, `tabHoliday List` t2 where t1.parent = t2.name and ifnull(t2.is_default, 0) = 1 and t2.fiscal_year = '%s'" % self.doc.fiscal_year) holidays = [cstr(i[0]) for i in holidays] lwp = 0 for d in range(m[3]): @@ -192,8 +192,8 @@ class DocType(TransactionBase): if emailid_ret: receiver = cstr(emailid_ret[0][0]) subj = 'Salary Slip - ' + cstr(self.doc.month) +'/'+cstr(self.doc.fiscal_year) - earn_ret=sql("select e_type,e_modified_amount from `tabSS Earning Detail` where parent = '%s'"%self.doc.name) - ded_ret=sql("select d_type,d_modified_amount from `tabSS Deduction Detail` where parent = '%s'"%self.doc.name) + earn_ret=sql("select e_type,e_modified_amount from `tabSalary Slip Earning` where parent = '%s'"%self.doc.name) + ded_ret=sql("select d_type,d_modified_amount from `tabSalary Slip Deduction` where parent = '%s'"%self.doc.name) earn_table = '' ded_table = '' diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.txt b/erpnext/hr/doctype/salary_slip/salary_slip.txt index ceff6fcd817..bd79edc630f 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.txt +++ b/erpnext/hr/doctype/salary_slip/salary_slip.txt @@ -414,10 +414,10 @@ 'doctype': u'DocField', 'fieldname': u'earning_details', 'fieldtype': u'Table', - 'label': u'Earning Details', + 'label': u'Salary Structure Earnings', 'oldfieldname': u'earning_details', 'oldfieldtype': u'Table', - 'options': u'SS Earning Detail', + 'options': u'Salary Slip Earning', 'permlevel': 0 }, @@ -441,7 +441,7 @@ 'label': u'Deduction Details', 'oldfieldname': u'deduction_details', 'oldfieldtype': u'Table', - 'options': u'SS Deduction Detail', + 'options': u'Salary Slip Deduction', 'permlevel': 0 }, diff --git a/erpnext/hr/doctype/professional_training_details/__init__.py b/erpnext/hr/doctype/salary_slip_deduction/__init__.py similarity index 100% rename from erpnext/hr/doctype/professional_training_details/__init__.py rename to erpnext/hr/doctype/salary_slip_deduction/__init__.py diff --git a/erpnext/hr/doctype/ss_deduction_detail/ss_deduction_detail.txt b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt similarity index 90% rename from erpnext/hr/doctype/ss_deduction_detail/ss_deduction_detail.txt rename to erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt index b94d48082d7..e76a1bae42d 100644 --- a/erpnext/hr/doctype/ss_deduction_detail/ss_deduction_detail.txt +++ b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.txt @@ -1,4 +1,4 @@ -# DocType, SS Deduction Detail +# DocType, Salary Slip Deduction [ # These values are common in all dictionaries @@ -28,7 +28,7 @@ 'colour': u'White:FFF', 'doctype': u'DocField', 'name': '__common__', - 'parent': u'SS Deduction Detail', + 'parent': u'Salary Slip Deduction', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -38,7 +38,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'SS Deduction Detail', + 'parent': u'Salary Slip Deduction', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -47,10 +47,10 @@ 'write': 1 }, - # DocType, SS Deduction Detail + # DocType, Salary Slip Deduction { 'doctype': 'DocType', - 'name': u'SS Deduction Detail' + 'name': u'Salary Slip Deduction' }, # DocPerm diff --git a/erpnext/hr/doctype/ss_deduction_detail/__init__.py b/erpnext/hr/doctype/salary_slip_earning/__init__.py similarity index 100% rename from erpnext/hr/doctype/ss_deduction_detail/__init__.py rename to erpnext/hr/doctype/salary_slip_earning/__init__.py diff --git a/erpnext/hr/doctype/ss_earning_detail/ss_earning_detail.txt b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt similarity index 91% rename from erpnext/hr/doctype/ss_earning_detail/ss_earning_detail.txt rename to erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt index cf8bf9d8dd1..d8c4c9b6097 100644 --- a/erpnext/hr/doctype/ss_earning_detail/ss_earning_detail.txt +++ b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.txt @@ -1,4 +1,4 @@ -# DocType, SS Earning Detail +# DocType, Salary Slip Earning [ # These values are common in all dictionaries @@ -27,7 +27,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'SS Earning Detail', + 'parent': u'Salary Slip Earning', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -37,7 +37,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'SS Earning Detail', + 'parent': u'Salary Slip Earning', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -46,10 +46,10 @@ 'write': 1 }, - # DocType, SS Earning Detail + # DocType, Salary Slip Earning { 'doctype': 'DocType', - 'name': u'SS Earning Detail' + 'name': u'Salary Slip Earning' }, # DocPerm diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js index fe57910b6dd..383c11f3d86 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.js +++ b/erpnext/hr/doctype/salary_structure/salary_structure.js @@ -19,8 +19,8 @@ cur_frm.add_fetch('employee', 'company', 'company'); // On load //======================================================================= cur_frm.cscript.onload = function(doc, dt, dn){ - e_tbl = getchildren('Earning Detail', doc.name, 'earning_details', doc.doctype); - d_tbl = getchildren('Deduction Detail', doc.name, 'deduction_details', doc.doctype); + e_tbl = getchildren('Salary Structure Earning', doc.name, 'earning_details', doc.doctype); + d_tbl = getchildren('Salary Structure Deduction', doc.name, 'deduction_details', doc.doctype); if (e_tbl.length == 0 && d_tbl.length == 0) $c_obj(make_doclist(doc.doctype,doc.name),'make_earn_ded_table','', function(r, rt) { refresh_many(['earning_details', 'deduction_details']);}); } @@ -60,7 +60,7 @@ cur_frm.cscript['Make Salary Slip'] = function(){ 'from_doctype':'Salary Structure', 'to_doctype':'Salary Slip', 'from_docname':doc.name, - 'from_to_list':"[['Salary Structure', 'Salary Slip'], ['Earning Detail', 'SS Earning Detail'], ['Deduction Detail', 'SS Deduction Detail']]" + 'from_to_list':"[['Salary Structure', 'Salary Slip'], ['Earning Detail', 'Salary Slip Earning'], ['Deduction Detail', 'Salary Slip Deduction']]" }, function(r,rt) { n.fiscal_year = sys_defaults.fiscal_year; @@ -98,8 +98,8 @@ cur_frm.cscript.d_modified_amt = function(doc, cdt, cdn){ // calculate totals //======================================================================= var calculate_totals = function(doc, cdt, cdn) { - var tbl1 = getchildren('Earning Detail', doc.name, 'earning_details', doc.doctype); - var tbl2 = getchildren('Deduction Detail', doc.name, 'deduction_details', doc.doctype); + var tbl1 = getchildren('Salary Structure Earning', doc.name, 'earning_details', doc.doctype); + var tbl2 = getchildren('Salary Structure Deduction', doc.name, 'deduction_details', doc.doctype); var total_earn = 0; var total_ded = 0; for(var i = 0; i < tbl1.length; i++){ diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py index 562a885bfb2..18d9291c2e4 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.py +++ b/erpnext/hr/doctype/salary_structure/salary_structure.py @@ -88,10 +88,10 @@ class DocType: #--------------------------------------------------------- def make_earn_ded_table(self): #Earning List - self.make_table('Earning Type','earning_details','Earning Detail') + self.make_table('Earning Type','earning_details','Salary Structure Earning') #Deduction List - self.make_table('Deduction Type','deduction_details', 'Deduction Detail') + self.make_table('Deduction Type','deduction_details', 'Salary Structure Deduction') # Check if another active ss exists diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.txt b/erpnext/hr/doctype/salary_structure/salary_structure.txt index 704ea185036..e760f744529 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.txt +++ b/erpnext/hr/doctype/salary_structure/salary_structure.txt @@ -352,7 +352,7 @@ 'label': u'Earning1', 'oldfieldname': u'earning_details', 'oldfieldtype': u'Table', - 'options': u'Earning Detail', + 'options': u'Salary Structure Earning', 'permlevel': 0 }, @@ -380,7 +380,7 @@ 'label': u'Deduction1', 'oldfieldname': u'deduction_details', 'oldfieldtype': u'Table', - 'options': u'Deduction Detail', + 'options': u'Salary Structure Deduction', 'permlevel': 0 }, diff --git a/erpnext/hr/doctype/ss_earning_detail/__init__.py b/erpnext/hr/doctype/salary_structure_deduction/__init__.py similarity index 100% rename from erpnext/hr/doctype/ss_earning_detail/__init__.py rename to erpnext/hr/doctype/salary_structure_deduction/__init__.py diff --git a/erpnext/hr/doctype/deduction_detail/deduction_detail.txt b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt similarity index 89% rename from erpnext/hr/doctype/deduction_detail/deduction_detail.txt rename to erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt index 74f3f985ea7..1815ca35a89 100644 --- a/erpnext/hr/doctype/deduction_detail/deduction_detail.txt +++ b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.txt @@ -1,4 +1,4 @@ -# DocType, Deduction Detail +# DocType, Salary Structure Deduction [ # These values are common in all dictionaries @@ -27,16 +27,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Deduction Detail', + 'parent': u'Salary Structure Deduction', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Deduction Detail + # DocType, Salary Structure Deduction { 'doctype': 'DocType', - 'name': u'Deduction Detail' + 'name': u'Salary Structure Deduction' }, # DocField diff --git a/erpnext/production/doctype/bill_of_materials/__init__.py b/erpnext/hr/doctype/salary_structure_earning/__init__.py similarity index 100% rename from erpnext/production/doctype/bill_of_materials/__init__.py rename to erpnext/hr/doctype/salary_structure_earning/__init__.py diff --git a/erpnext/hr/doctype/earning_detail/earning_detail.txt b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt similarity index 90% rename from erpnext/hr/doctype/earning_detail/earning_detail.txt rename to erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt index 905190cfb27..09ac7f5151a 100644 --- a/erpnext/hr/doctype/earning_detail/earning_detail.txt +++ b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.txt @@ -1,4 +1,4 @@ -# DocType, Earning Detail +# DocType, Salary Structure Earning [ # These values are common in all dictionaries @@ -29,16 +29,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Earning Detail', + 'parent': u'Salary Structure Earning', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Earning Detail + # DocType, Salary Structure Earning { 'doctype': 'DocType', - 'name': u'Earning Detail' + 'name': u'Salary Structure Earning' }, # DocField diff --git a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt b/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt index f3e1b4874b9..62b9aa60bd3 100644 --- a/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt +++ b/erpnext/hr/search_criteria/employee_in_company_experience/employee_in_company_experience.txt @@ -3,14 +3,14 @@ 'add_col': None, 'add_cond': None, 'add_tab': None, - 'columns': 'Employee Profile\x01Employee,Experience In Company Detail\x01Branch,Experience In Company Detail\x01Department,Experience In Company Detail\x01Designation,Experience In Company Detail\x01Grade,Experience In Company Detail\x01From Date,Experience In Company Detail\x01To Date', + 'columns': 'Employee Profile\x01Employee,Employee Internal Work History\x01Branch,Employee Internal Work History\x01Department,Employee Internal Work History\x01Designation,Employee Internal Work History\x01Grade,Employee Internal Work History\x01From Date,Employee Internal Work History\x01To Date', 'creation': '2010-12-14 10:33:09', 'criteria_name': 'Employee In Company Experience', 'custom_query': '', 'description': None, 'dis_filters': None, 'disabled': 1, - 'doc_type': 'Experience In Company Detail', + 'doc_type': 'Employee Internal Work History', 'docstatus': 0, 'doctype': 'Search Criteria', 'filters': '{}', diff --git a/erpnext/hr/search_criteria/expense_vouchers/expense_vouchers.txt b/erpnext/hr/search_criteria/expense_vouchers/expense_vouchers.txt index eeca0e0f6ad..dbc69f9391e 100644 --- a/erpnext/hr/search_criteria/expense_vouchers/expense_vouchers.txt +++ b/erpnext/hr/search_criteria/expense_vouchers/expense_vouchers.txt @@ -12,15 +12,15 @@ # These values are common for all Search Criteria { - 'columns': 'Expense Voucher\x01ID,Expense Voucher\x01Approval Status,Expense Voucher\x01From Employee,Expense Voucher\x01Employee Name,Expense Voucher\x01Approver,Expense Voucher\x01Posting Date,Expense Voucher\x01Total Claimed Amount,Expense Voucher\x01Total Sanctioned Amount', - 'criteria_name': 'Expense Vouchers', - 'doc_type': 'Expense Voucher', + 'columns': 'Expense Claim\x01ID,Expense Claim\x01Approval Status,Expense Claim\x01From Employee,Expense Claim\x01Employee Name,Expense Claim\x01Approver,Expense Claim\x01Posting Date,Expense Claim\x01Total Claimed Amount,Expense Claim\x01Total Sanctioned Amount', + 'criteria_name': 'Expense Claims', + 'doc_type': 'Expense Claim', 'doctype': 'Search Criteria', - 'filters': "{'Expense Voucher\x01Saved':1,'Expense Voucher\x01Submitted':1,'Expense Voucher\x01Approval Status':'','Expense Voucher\x01Fiscal Year':''}", + 'filters': "{'Expense Claim\x01Saved':1,'Expense Claim\x01Submitted':1,'Expense Claim\x01Approval Status':'','Expense Claim\x01Fiscal Year':''}", 'module': 'HR', 'name': '__common__', 'page_len': 50, - 'sort_by': '`tabExpense Voucher`.`name`', + 'sort_by': '`tabExpense Claim`.`name`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js index 388aa7befb4..41a4b9caf6f 100644 --- a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js +++ b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js @@ -17,37 +17,37 @@ report.customize_filters = function() { this.hide_all_filters(); - this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Expense Voucher'}); - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Approver'].df.in_first_page = 1; + this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Expense Claim'}); + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'Approver'].df.in_first_page = 1; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Employee'].df.filter_hide = 0; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Employee Name'].df.filter_hide = 0; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; - this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'From Employee'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'Employee Name'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; + this.filter_fields_dict['Expense Claim'+FILTER_SEP +'Company'].df.filter_hide = 0; } this.mytabs.items['Select Columns'].hide(); report.get_query = function(){ //get filter values - emp = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Employee'].get_value(); - emp_nm = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Employee Name'].get_value(); - frm_start_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Posting Date'].get_value(); - to_end_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'To Posting Date'].get_value(); - fiscal_year = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Fiscal Year'].get_value(); - approver = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Approver'].get_value(); - company = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Company'].get_value(); + emp = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'From Employee'].get_value(); + emp_nm = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'Employee Name'].get_value(); + frm_start_date = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'From Posting Date'].get_value(); + to_end_date = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'To Posting Date'].get_value(); + fiscal_year = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'Fiscal Year'].get_value(); + approver = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'Approver'].get_value(); + company = this.filter_fields_dict['Expense Claim'+FILTER_SEP+'Company'].get_value(); var cond = ''; - if(emp) cond += ' AND `tabExpense Voucher`.employee = "'+emp+'"'; - if(emp_nm) cond += ' AND `tabExpense Voucher`.employee_name = "'+emp_nm+'"'; - if(frm_start_date) cond += ' AND `tabExpense Voucher`.posting_date >= "'+frm_start_date+'"'; - if(to_end_date) cond += ' AND `tabExpense Voucher`.posting_date <= "'+to_end_date+'"'; - if(fiscal_year !='') cond += ' AND `tabExpense Voucher`.fiscal_year = "'+fiscal_year+'"'; - if(approver) cond += ' AND `tabExpense Voucher`.exp_approver = "'+approver+'"'; - if(company) cond += ' AND `tabExpense Voucher`.company = "'+company+'"'; + if(emp) cond += ' AND `tabExpense Claim`.employee = "'+emp+'"'; + if(emp_nm) cond += ' AND `tabExpense Claim`.employee_name = "'+emp_nm+'"'; + if(frm_start_date) cond += ' AND `tabExpense Claim`.posting_date >= "'+frm_start_date+'"'; + if(to_end_date) cond += ' AND `tabExpense Claim`.posting_date <= "'+to_end_date+'"'; + if(fiscal_year !='') cond += ' AND `tabExpense Claim`.fiscal_year = "'+fiscal_year+'"'; + if(approver) cond += ' AND `tabExpense Claim`.exp_approver = "'+approver+'"'; + if(company) cond += ' AND `tabExpense Claim`.company = "'+company+'"'; - var q = 'SELECT DISTINCT `tabExpense Voucher`.name, `tabExpense Voucher`.employee, `tabExpense Voucher`.employee_name, `tabExpense Voucher`.posting_date,`tabExpense Voucher`.exp_approver, `tabExpense Voucher`.total_claimed_amount, `tabExpense Voucher`.total_sanctioned_amount FROM `tabExpense Voucher` WHERE `tabExpense Voucher`.approval_status= "Submitted"'+cond; + var q = 'SELECT DISTINCT `tabExpense Claim`.name, `tabExpense Claim`.employee, `tabExpense Claim`.employee_name, `tabExpense Claim`.posting_date,`tabExpense Claim`.exp_approver, `tabExpense Claim`.total_claimed_amount, `tabExpense Claim`.total_sanctioned_amount FROM `tabExpense Claim` WHERE `tabExpense Claim`.approval_status= "Submitted"'+cond; return q; } \ No newline at end of file diff --git a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.txt b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.txt index 423b61428b4..7bb376f228c 100644 --- a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.txt +++ b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.txt @@ -12,10 +12,10 @@ # These values are common for all Search Criteria { - 'criteria_name': 'Pending Expense Vouchers', - 'doc_type': 'Expense Voucher', + 'criteria_name': 'Pending Expense Claims', + 'doc_type': 'Expense Claim', 'doctype': 'Search Criteria', - 'filters': "{'Expense Voucher\x01Approval Status':'','Expense Voucher\x01Fiscal Year':''}", + 'filters': "{'Expense Claim\x01Approval Status':'','Expense Claim\x01Fiscal Year':''}", 'module': 'HR', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.py b/erpnext/hr/search_criteria/salary_register/salary_register.py index c44954cd58b..9b9d5d4a9bf 100644 --- a/erpnext/hr/search_criteria/salary_register/salary_register.py +++ b/erpnext/hr/search_criteria/salary_register/salary_register.py @@ -19,8 +19,8 @@ for r in res: if not sal_slips_ids == '': sal_slips_ids +="," sal_slips_ids+="'%s'"%r[col_idx['ID']] -earn_heads =[i[0] for i in sql("select distinct e_type from `tabSS Earning Detail` where parent in (%s)"%sal_slips_ids)] -ded_heads =[i[0] for i in sql("select distinct d_type from `tabSS Deduction Detail` where parent in (%s)"%sal_slips_ids)] +earn_heads =[i[0] for i in sql("select distinct e_type from `tabSalary Slip Earning` where parent in (%s)"%sal_slips_ids)] +ded_heads =[i[0] for i in sql("select distinct d_type from `tabSalary Slip Deduction` where parent in (%s)"%sal_slips_ids)] col=[] @@ -57,9 +57,9 @@ for r in res: for i in range(6,len(colnames)): if colnames[i] not in ('Arrear Amount','Encashment Amount','Net Pay','Gross Pay','Total Deduction'): - amt = sql("select e_modified_amount from `tabSS Earning Detail` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0])) + amt = sql("select e_modified_amount from `tabSalary Slip Earning` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0])) if not amt: - amt = sql("select d_modified_amount from `tabSS Deduction Detail` where d_type = '%s' and parent = '%s'"%(colnames[i],r[0])) + amt = sql("select d_modified_amount from `tabSalary Slip Deduction` where d_type = '%s' and parent = '%s'"%(colnames[i],r[0])) amt = amt and amt[0][0] or 0 r.append(flt(amt)) diff --git a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py index 9f0a5c0cee7..42145764476 100644 --- a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py +++ b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py @@ -21,8 +21,8 @@ def execute(): reload_doc('accounts', 'doctype', 'pv_detail') reload_doc('buying', 'doctype', 'po_detail') reload_doc('stock', 'doctype', 'purchase_receipt_detail') - if webnotes.conn.sql("select name from `tabDocField` where parent = 'PO Detail' and fieldname = 'discount'"): - webnotes.conn.sql("update `tabPO Detail` set discount_rate=discount") + if webnotes.conn.sql("select name from `tabDocField` where parent = 'Purchase Order Item' and fieldname = 'discount'"): + webnotes.conn.sql("update `tabPurchase Order Item` set discount_rate=discount") # Features setup reload_doc('setup', 'doctype', 'features_setup') diff --git a/erpnext/patches/before_jan_2012/c_form_patch.py b/erpnext/patches/before_jan_2012/c_form_patch.py index 307dabc4d2e..76e3646b635 100644 --- a/erpnext/patches/before_jan_2012/c_form_patch.py +++ b/erpnext/patches/before_jan_2012/c_form_patch.py @@ -24,5 +24,5 @@ def execute(): reload_doc('accounts', 'Module Def', 'Accounts') sql = webnotes.conn.sql - sql("update `tabReceivable Voucher` set c_form_applicable = 'Yes' where c_form_applicable = 'Y'") - sql("update `tabReceivable Voucher` set c_form_applicable = 'No' where c_form_applicable = 'N'") + sql("update `tabSales Invoice` set c_form_applicable = 'Yes' where c_form_applicable = 'Y'") + sql("update `tabSales Invoice` set c_form_applicable = 'No' where c_form_applicable = 'N'") diff --git a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py index 2213c2021e1..424ef4abdc7 100644 --- a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py +++ b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py @@ -23,15 +23,15 @@ test=1 #-------------------------- def update_delivered_billed_qty(): # update billed amt in item table in so and dn - sql(""" update `tabSales Order Detail` so - set billed_amt = (select sum(amount) from `tabRV Detail` where `so_detail`= so.name and docstatus=1 and parent not like 'old%%'), - delivered_qty = (select sum(qty) from `tabDelivery Note Detail` where `prevdoc_detail_docname`= so.name and docstatus=1 and parent not like 'old%%'), + sql(""" update `tabSales Order Item` so + set billed_amt = (select sum(amount) from `tabSales Invoice Item` where `so_detail`= so.name and docstatus=1 and parent not like 'old%%'), + delivered_qty = (select sum(qty) from `tabDelivery Note Item` where `prevdoc_detail_docname`= so.name and docstatus=1 and parent not like 'old%%'), modified = now() where docstatus = 1 """) - sql(""" update `tabDelivery Note Detail` dn - set billed_amt = (select sum(amount) from `tabRV Detail` where `dn_detail`= dn.name and docstatus=1 and parent not like 'old%%'), + sql(""" update `tabDelivery Note Item` dn + set billed_amt = (select sum(amount) from `tabSales Invoice Item` where `dn_detail`= dn.name and docstatus=1 and parent not like 'old%%'), modified = now() where docstatus = 1 """) @@ -41,8 +41,8 @@ def update_delivered_billed_qty(): def update_percent(): # calculate % billed based on item table sql(""" update `tabSales Order` so - set per_delivered = (select sum(if(qty > ifnull(delivered_qty, 0), delivered_qty, qty))/sum(qty)*100 from `tabSales Order Detail` where parent=so.name), - per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabSales Order Detail` where parent = so.name), + set per_delivered = (select sum(if(qty > ifnull(delivered_qty, 0), delivered_qty, qty))/sum(qty)*100 from `tabSales Order Item` where parent=so.name), + per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabSales Order Item` where parent = so.name), modified = now() where docstatus = 1 """) @@ -50,7 +50,7 @@ def update_percent(): # update DN # --------- sql(""" update `tabDelivery Note` dn - set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabDelivery Note Detail` where parent = dn.name), + set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabDelivery Note Item` where parent = dn.name), modified = now() where docstatus=1 """) diff --git a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py index a9dcd751c22..0e0e68f79ab 100644 --- a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py +++ b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py @@ -85,7 +85,7 @@ def delete_unwanted_search_criteria(): def delete_unwanted_mappers(): "deletes unwanted mappers" - lst = ['Customer Issue-Maintenance Report', 'Enquiry-Service Quotation', 'Sales Order-Maintenance Report', 'Service Quotation-Service Order', 'Supplier Quotation-Purchase Order', 'Visit Schedule-Maintenance Report', 'RFQ-Supplier Quotation', 'Indent-RFQ'] + lst = ['Customer Issue-Maintenance Report', 'Enquiry-Service Quotation', 'Sales Order-Maintenance Report', 'Service Quotation-Service Order', 'Supplier Quotation-Purchase Order', 'Visit Schedule-Maintenance Report', 'RFQ-Supplier Quotation', 'Purchase Request-RFQ'] for d in lst: try: delete_doc('DocType Mapper', d) @@ -161,13 +161,13 @@ def sync_mapper(): "Put mappers into corresponding module" mappers = { - 'Accounts': ('Delivery Note-Receivable Voucher', 'Project-Receivable Voucher', 'Purchase Order-Payable Voucher', 'Purchase Receipt-Payable Voucher', 'Sales Order-Receivable Voucher'), - 'Selling': ('Delivery Note-Installation Note', 'Enquiry-Quotation', 'Lead-Enquiry', 'Lead-Customer', 'Project-Sales Order', 'Quotation-Sales Order', ), - 'Buying': ('Indent-Purchase Order', 'Sales Order-Indent'), - 'Stock': ('Purchase Order-Purchase Receipt', 'Project-Delivery Note', 'Receivable Voucher-Delivery Note', 'Sales Order-Delivery Note'), + 'Accounts': ('Delivery Note-Sales Invoice', 'Project-Sales Invoice', 'Purchase Order-Purchase Invoice', 'Purchase Receipt-Purchase Invoice', 'Sales Order-Sales Invoice'), + 'Selling': ('Delivery Note-Installation Note', 'Opportunity-Quotation', 'Lead-Opportunity', 'Lead-Customer', 'Project-Sales Order', 'Quotation-Sales Order', ), + 'Buying': ('Purchase Request-Purchase Order', 'Sales Order-Purchase Request'), + 'Stock': ('Purchase Order-Purchase Receipt', 'Project-Delivery Note', 'Sales Invoice-Delivery Note', 'Sales Order-Delivery Note'), 'Support': ('Customer Issue-Maintenance Visit', 'Sales Order-Maintenance Schedule', 'Sales Order-Maintenance Visit'), 'Production': ('Production Forecast-Production Plan', 'Production Forecast-Production Planning Tool', 'Sales Order-Production Plan'), - 'HR': ('KRA Template-Appraisal', 'Salary Structure-Salary Slip') + 'HR': ('Appraisal Template-Appraisal', 'Salary Structure-Salary Slip') } for mod in mappers.keys(): @@ -195,7 +195,7 @@ def sync_mapper(): #--------------------------------------- def run_patches(): # update module - dt_module = {'LC PR Detail':'Stock', 'Landed Cost Detail':'Stock', 'Comment Widget Record': 'Core', 'Tag':'Core', 'Tag Detail': 'Core', 'POS Settings': 'Accounts', 'Menu Item': 'Setup', 'Menu Item Role': 'Setup'} + dt_module = {'Landed Cost Purchase Receipt':'Stock', 'Landed Cost Item':'Stock', 'Comment': 'Core', 'Tag':'Core', 'Tag Detail': 'Core', 'POS Settings': 'Accounts', 'Menu Item': 'Setup', 'Menu Item Role': 'Setup'} for d in dt_module.keys(): sql("update `tabDocType` set module = '%s' where name = '%s'" % (dt_module[d], d)) delete_unwanted_mappers() diff --git a/erpnext/patches/before_jan_2012/index_patch.py b/erpnext/patches/before_jan_2012/index_patch.py index 7e1991c7b88..89a4f077897 100644 --- a/erpnext/patches/before_jan_2012/index_patch.py +++ b/erpnext/patches/before_jan_2012/index_patch.py @@ -26,14 +26,14 @@ def create_proper_index(): from webnotes.modules.export_module import export_to_files dt_index_fields={ - 'Purchase Receipt Detail': ['prevdoc_docname', 'item_code', 'warehouse', 'prevdoc_detail_docname'], + 'Purchase Receipt Item': ['prevdoc_docname', 'item_code', 'warehouse', 'prevdoc_detail_docname'], 'Period Closing Voucher': ['closing_account_head', 'fiscal_year'], 'Lead': ['lead_name', 'status', 'transaction_date'], 'Time Sheet Detail': ['app_name'], - 'Item Specification Detail': [], + 'Item Quality Inspection Parameter': [], 'Budget Detail': ['fiscal_year', 'account'], 'Grade': [], - 'RV Tax Detail': ['parenttype', 'account_head'], + 'Sales Taxes and Charges': ['parenttype', 'account_head'], 'TDS Category Account': ['account_head'], 'Role': [], 'Leave Allocation': ['leave_type', 'employee', 'fiscal_year'], @@ -50,25 +50,25 @@ def create_proper_index(): 'DocFormat': ['format'], 'DocType Mapper': ['from_doctype', 'to_doctype'], 'Brand': [], - 'Order Lost Reason': [], + 'Quotation Lost Reason': [], 'Journal Voucher': ['posting_date', 'voucher_type'], 'TDS Return Acknowledgement': ['date_of_receipt', 'acknowledgement'], 'BOM Report Detail': ['item_code'], - 'Quotation Detail': ['item_code'], + 'Quotation Item': ['item_code'], 'Update Delivery Date Detail': ['sales_order_no'], - 'Advance Adjustment Detail': ['journal_voucher'], + 'Sales Invoice Advance': ['journal_voucher'], 'Authorization Rule': ['approving_user', 'system_user', 'system_role', 'approving_role'], 'DocPerm': ['permlevel', 'role'], 'Stock Entry Detail': ['item_code', 't_warehouse', 's_warehouse'], 'Stock Entry': ['posting_date', 'delivery_note_no', 'purchase_receipt_no', 'production_order'], 'Price List': [], - 'KRA Sheet': [], + 'Appraisal Template Goal': [], 'Production Order': ['status', 'project_name', 'production_item'], 'Account': ['lft', 'rgt', 'parent_account'], 'Earn Deduction Detail': [], - 'Indent': ['status', 'transaction_date'], + 'Purchase Request': ['status', 'transaction_date'], 'Tag Detail': [], - 'SS Deduction Detail': ['d_type'], + 'Salary Slip Deduction': ['d_type'], 'Batch': ['item'], 'Deduction Type': [], 'Project': ['project_name', 'customer'], @@ -77,33 +77,33 @@ def create_proper_index(): 'Property Setter': ['doc_type', 'doc_name', 'property'], 'Appraisal': ['status', 'employee'], 'Letter Head': [], - 'Follow up': ['follow_up_by'], + 'Communication Log': ['follow_up_by'], 'Project Cost Breakup': [], 'Table Mapper Detail': [], 'Campaign': [], - 'Static Parameter Detail': [], + 'SMS Parameter': [], 'Leave Type': [], 'Account Balance': ['period', 'start_date', 'end_date', 'account'], 'Absent Days Detail': [], 'Tag': [], 'Raw Materials Supplied': ['raw_material'], 'Project Activity Update': [], - 'PR Raw Material Detail': [], + 'Purchase Receipt Item Supplied': [], 'Bank Reconciliation Detail': ['voucher_id'], 'Sales Order': ['quotation_no', 'project_name', 'customer', 'posting_date'], 'Chapter VI A Detail': [], - 'Experience In Company Detail': [], + 'Employee Internal Work History': [], 'Order Reconciliation Detail': ['sales_order_no'], 'Attendance': ['employee', 'att_date'], - 'Previous Experience Detail': [], - 'Earning Detail': ['e_type'], - 'Sales Order Detail': ['item_code', 'prevdoc_docname', 'reserved_warehouse'], - 'KRA Template': [], + 'Employee External Work History': [], + 'Salary Structure Earning': ['e_type'], + 'Sales Order Item': ['item_code', 'prevdoc_docname', 'reserved_warehouse'], + 'Appraisal Template': [], 'Budget Distribution': ['fiscal_year'], 'Workstation': ['warehouse'], 'Period': [], 'Training Session Details': [], - 'Other Charges': [], + 'Sales Taxes and Charges Master': [], 'State': [], 'Bulk Rename Tool': [], 'Landed Cost Master Detail': [], @@ -119,37 +119,37 @@ def create_proper_index(): 'Campaign Expense': [], 'Time Sheet': ['employee_name', 'time_sheet_date'], 'File Group': ['parent_group'], - 'Maintenance Visit Detail': ['item_code', 'service_person'], + 'Maintenance Visit Purpose': ['item_code', 'service_person'], 'Support Ticket Response': [], - 'PV Detail': ['item_code', 'purchase_order', 'po_detail', 'purchase_receipt', 'pr_detail', 'expense_head', 'cost_center'], + 'Purchase Invoice Item': ['item_code', 'purchase_order', 'po_detail', 'purchase_receipt', 'pr_detail', 'expense_head', 'cost_center'], 'Timesheet Detail': ['project_name', 'task_id', 'customer_name'], - 'Holiday List Detail': [], + 'Holiday': [], 'Workflow Rule Detail': [], 'Module Def': ['module_seq', 'module_page'], - 'Term': [], + 'Terms and Conditions': [], 'PF Detail': ['item_code'], 'POS Setting': ['user', 'territory'], - 'QA Specification Detail': [], + 'Quality Inspection Reading': [], 'Support Ticket': ['customer', 'allocated_to', 'status'], 'Project Activity': ['project'], 'Customer Group': ['lft', 'rgt', 'parent_customer_group'], - 'Return Detail': ['item_code'], + 'Sales and Purchase Return Item': ['item_code'], 'Series Detail': [], 'Event Role': ['role'], 'Contact': ['employee_id'], - 'BOM Material': ['item_code', 'bom_no'], + 'BOM Item': ['item_code', 'bom_no'], 'Invest 80 Declaration Detail': [], - 'PO Raw Material Detail': [], + 'Purchase Order Item Supplied': [], 'Industry Type': [], 'Declaration Detail': [], 'Holiday List': ['fiscal_year'], 'Sales Person': ['lft', 'rgt', 'parent_sales_person'], - 'RV Detail': ['item_code', 'sales_order', 'so_detail', 'delivery_note', 'dn_detail', 'cost_center', 'income_account'], + 'Sales Invoice Item': ['item_code', 'sales_order', 'so_detail', 'delivery_note', 'dn_detail', 'cost_center', 'income_account'], 'Module Def Item': [], 'TDS Category': [], 'DocTrigger': [], 'Print Format': ['standard'], - 'Installed Item Details': ['prevdoc_docname', 'item_code'], + 'Installation Note Item': ['prevdoc_docname', 'item_code'], 'Form 16A Tax Detail': [], 'Event': ['event_date', 'event_type'], 'Currency': [], @@ -157,10 +157,10 @@ def create_proper_index(): 'Warehouse Type': ['warehouse_type'], 'Sales BOM': ['item_group'], 'IT Checklist': ['employee'], - 'Purchase Other Charges': [], + 'Purchase Taxes and Charges Master': [], 'Company': [], 'Call Log': [], - 'Professional Training Details': [], + 'Employee Training': [], 'Warehouse': ['warehouse_type'], 'Competitor': [], 'Mode of Payment': [], @@ -168,19 +168,19 @@ def create_proper_index(): 'Cost Center': ['lft', 'rgt', 'parent_cost_center'], 'Timesheet': ['status', 'timesheet_date'], 'Form 16A': ['party_no'], - 'Sales BOM Detail': ['item_code'], + 'Sales BOM Item': ['item_code'], 'Answer': ['question'], 'Supplier': [], 'Installation Note': ['delivery_note_no', 'customer', 'inst_date'], - 'Expense Voucher': ['approval_status', 'employee'], + 'Expense Claim': ['approval_status', 'employee'], 'Target Detail': ['from_date', 'to_date', 'fiscal_year'], 'Page Role': ['role'], 'Partner Target Detail': ['fiscal_year', 'item_group'], 'Shipping Address': ['customer'], - 'Indent Detail': ['item_code', 'warehouse'], + 'Purchase Request Item': ['item_code', 'warehouse'], 'TDS Payment Detail': [], 'Market Segment': [], - 'Comment Widget Record': [], + 'Comment': [], 'Service Order Detail': ['item_code', 'prevdoc_docname'], 'TDS Payment': ['from_date', 'to_date', 'tds_category'], 'Lead Email CC Detail': [], @@ -188,28 +188,28 @@ def create_proper_index(): 'Salary Slip': ['month', 'year', 'employee'], 'Maintenance Schedule Detail': ['item_code', 'scheduled_date'], 'Employment Type': [], - 'Advance Allocation Detail': ['journal_voucher'], + 'Purchase Invoice Advance': ['journal_voucher'], 'Quotation': ['customer', 'transaction_date'], - 'Deduction Detail': ['d_type'], - 'Bill Of Materials': ['item', 'project_name'], + 'Salary Structure Deduction': ['d_type'], + 'BOM': ['item', 'project_name'], 'Earning Type': [], 'Designation': [], 'BOM Replace Utility Detail': ['parent_bom'], 'Question': [], 'Stock Ledger Entry': ['item_code', 'warehouse', 'posting_date', 'posting_time'], - 'Educational Qualifications Detail': [], + 'Employee Education': [], 'BOM Operation': [], 'Item Group': ['lft', 'rgt', 'parent_item_group'], 'Workflow Action Detail': [], 'User Setting-Profile': [], 'Customer Issue': ['item_code', 'customer', 'complaint_date'], 'Feed': [], - 'Purchase Tax Detail': ['account_head'], + 'Purchase Taxes and Charges': ['account_head'], 'GL Mapper Detail': [], 'TDS Detail': [], 'PRO Detail': ['item_code', 'source_warehouse'], 'DocType Label': [], - 'Receivable Voucher': ['posting_date', 'debit_to', 'project_name'], + 'Sales Invoice': ['posting_date', 'debit_to', 'project_name'], 'GL Entry': ['posting_date', 'account', 'voucher_no'], 'Serial No': ['status', 'warehouse'], 'Delivery Note': ['posting_date', 'project_name', 'customer'], @@ -221,23 +221,23 @@ def create_proper_index(): 'GL Mapper': [], 'Announcement': [], 'Call Log Details': [], - 'Enquiry': ['lead', 'customer', 'transaction_date'], - 'Flat BOM Detail': ['item_code'], - 'Landed Cost Detail': ['account_head'], + 'Opportunity': ['lead', 'customer', 'transaction_date'], + 'BOM Explosion Item': ['item_code'], + 'Landed Cost Item': ['account_head'], 'Field Mapper Detail': ['from_field', 'to_field'], 'File Data': [], 'Question Tag': [], - 'QA Inspection Report': ['item_code', 'purchase_receipt_no', 'report_date'], - 'Appraisal Detail': [], + 'Quality Inspection': ['item_code', 'purchase_receipt_no', 'report_date'], + 'Appraisal Goal': [], 'POS Settings': ['territory'], - 'Delivery Note Detail': ['item_code', 'prevdoc_docname', 'warehouse', 'prevdoc_detail_docname'], + 'Delivery Note Item': ['item_code', 'prevdoc_docname', 'warehouse', 'prevdoc_detail_docname'], 'Profile': [], 'Other Income Detail': [], 'Product': ['item_code', 'stock_warehouse'], - 'PO Detail': ['prevdoc_docname', 'item_code', 'prevdoc_detail_docname', 'warehouse'], + 'Purchase Order Item': ['prevdoc_docname', 'item_code', 'prevdoc_detail_docname', 'warehouse'], 'Module Def Role': ['role'], 'Sales Team': ['sales_person'], - 'Enquiry Detail': ['item_code'], + 'Opportunity Item': ['item_code'], 'DocType': [], 'Compaint Note': ['nature_of_complaint', 'compliance_date'], 'Maintenance Schedule': ['customer', 'sales_order_no'], @@ -246,39 +246,39 @@ def create_proper_index(): 'Purchase Receipt': ['posting_date', 'supplier', 'project_name'], 'Complaint Detail': ['item_name'], 'Address': ['customer', 'supplier'], - 'Ticket': ['request_date', 'allocated_to', 'category', 'customer', 'project'], + 'Task': ['request_date', 'allocated_to', 'category', 'customer', 'project'], 'Territory Target Detail': ['month', 'fiscal_year'], - 'LC PR Detail': ['purchase_receipt_no'], + 'Landed Cost Purchase Receipt': ['purchase_receipt_no'], 'Customer': ['customer_name', 'customer_group'], - 'PP SO Detail': [], - 'PP Detail': ['document_date', 'item_code', 'parent_item'], + 'Production Plan Sales Order': [], + 'Production Plan Item': ['document_date', 'item_code', 'parent_item'], 'User Setting-Role Permission': [], 'Custom Script': ['dt'], 'Country': [], 'DefaultValue': [], - 'Ledger Detail': [], - 'SS Earning Detail': ['e_type'], + 'Multi Ledger Report Detail': [], + 'Salary Slip Earning': ['e_type'], 'SMS Log': [], - 'Expense Type': [], + 'Expense Claim Type': [], 'Item': ['item_group'], 'Fiscal Year': [], - 'ToDo Item': ['role'], - 'Payable Voucher': ['posting_date', 'credit_to', 'project_name', 'supplier'], + 'ToDo': ['role'], + 'Purchase Invoice': ['posting_date', 'credit_to', 'project_name', 'supplier'], 'Journal Voucher Detail': ['account', 'against_voucher', 'against_invoice', 'against_jv'], 'Online Contact': [], 'Page': ['module'], 'Leave Application': ['employee', 'leave_type', 'from_date', 'to_date'], - 'Expense Voucher Detail': ['expense_type'], + 'Expense Claim Detail': ['expense_type'], 'Maintenance Visit': ['customer', 'sales_order_no', 'customer_issue_no'], - 'Ref Rate Detail': ['price_list_name', 'ref_currency'], - 'Receiver Detail': [], + 'Item Price': ['price_list_name', 'ref_currency'], + 'SMS Receiver': [], 'Naming Series Options': ['doc_type'], 'Activity Type': [], - 'PRO PP Detail': [], - 'Delivery Note Packing Detail': ['item_code', 'parent_item', 'warehouse'], + 'PRO Production Plan Item': [], + 'Delivery Note Packing Item': ['item_code', 'parent_item', 'warehouse'], 'Workflow Rule': ['select_form'], 'File': ['file_group'], - 'Item Maintenance Detail': ['item_code', 'start_date', 'end_date', 'prevdoc_docname'], + 'Maintenance Schedule Item': ['item_code', 'start_date', 'end_date', 'prevdoc_docname'], 'Purchase Order': ['supplier', 'project_name', 'posting_date'], 'Print Heading': [], 'TDS Rate Detail': ['category'] diff --git a/erpnext/patches/before_jan_2012/install_print_formats.py b/erpnext/patches/before_jan_2012/install_print_formats.py index ab0067c99dc..92bd60c7dbb 100644 --- a/erpnext/patches/before_jan_2012/install_print_formats.py +++ b/erpnext/patches/before_jan_2012/install_print_formats.py @@ -39,7 +39,7 @@ def prepare_pf_dict(args_list): pf_to_install = prepare_pf_dict([ { 'name' : 'Sales Invoice', - 'doc_type' : 'Receivable Voucher', + 'doc_type' : 'Sales Invoice', 'module' : 'Accounts' }, { diff --git a/erpnext/patches/before_jan_2012/lcw_patch.py b/erpnext/patches/before_jan_2012/lcw_patch.py index 27e9a56f978..dbf2f6de891 100644 --- a/erpnext/patches/before_jan_2012/lcw_patch.py +++ b/erpnext/patches/before_jan_2012/lcw_patch.py @@ -22,4 +22,4 @@ def execute(): reload_doc('stock', 'doctype', 'landed_cost_wizard') reload_doc('stock', 'doctype', 'lc_pr_detail') - webnotes.conn.sql("delete from `tabDocField` where parent ='LC PR Detail' and fieldname in ('purchase_receipt_no', 'include_in_landed_cost')") + webnotes.conn.sql("delete from `tabDocField` where parent ='Landed Cost Purchase Receipt' and fieldname in ('purchase_receipt_no', 'include_in_landed_cost')") diff --git a/erpnext/patches/before_jan_2012/p1.py b/erpnext/patches/before_jan_2012/p1.py index ef8ca4c6a33..74d847061f9 100644 --- a/erpnext/patches/before_jan_2012/p1.py +++ b/erpnext/patches/before_jan_2012/p1.py @@ -16,5 +16,5 @@ def execute(): import webnotes - if not webnotes.conn.sql("select name from tabDocFormat where parent = 'Receivable Voucher' and format != 'POS Invoice'"): - webnotes.conn.sql("update tabDocType set default_print_format = 'Standard' where name = 'Receivable Voucher'") + if not webnotes.conn.sql("select name from tabDocFormat where parent = 'Sales Invoice' and format != 'POS Invoice'"): + webnotes.conn.sql("update tabDocType set default_print_format = 'Standard' where name = 'Sales Invoice'") diff --git a/erpnext/patches/before_jan_2012/price_list_patch.py b/erpnext/patches/before_jan_2012/price_list_patch.py index 6cd3f9bfb35..d5d673e5ac8 100644 --- a/erpnext/patches/before_jan_2012/price_list_patch.py +++ b/erpnext/patches/before_jan_2012/price_list_patch.py @@ -25,5 +25,5 @@ def execute(): reload_doc('setup', 'doctype', 'manage_account') - for d in ['Receivable Voucher', 'Delivery Note', 'Sales Order', 'Quotation']: + for d in ['Sales Invoice', 'Delivery Note', 'Sales Order', 'Quotation']: webnotes.conn.sql("update `tab%s` set price_list_currency = currency, plc_conversion_rate = conversion_rate" % d) diff --git a/erpnext/patches/before_jan_2012/project_patch.py b/erpnext/patches/before_jan_2012/project_patch.py index df0e1e93be2..80900294efe 100644 --- a/erpnext/patches/before_jan_2012/project_patch.py +++ b/erpnext/patches/before_jan_2012/project_patch.py @@ -25,10 +25,10 @@ def execute(): reload_doc('stock', 'doctype', 'purchase_receipt_detail') # copy project value from parent to child - sql("update `tabPO Detail` t1, `tabPurchase Order` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") - sql("update `tabPV Detail` t1, `tabPayable Voucher` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") - sql("update `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") + sql("update `tabPurchase Order Item` t1, `tabPurchase Order` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") + sql("update `tabPurchase Invoice Item` t1, `tabPurchase Invoice` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") + sql("update `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 set t1.project_name = t2.project_name where t1.parent = t2.name and ifnull(t1.project_name, '') = ''") # delete project from parent - sql("delete from `tabDocField` where fieldname = 'project_name' and parent in ('Purchase Order', 'Purchase Receipt', 'Payable Voucher')") + sql("delete from `tabDocField` where fieldname = 'project_name' and parent in ('Purchase Order', 'Purchase Receipt', 'Purchase Invoice')") diff --git a/erpnext/patches/before_jan_2012/reload_doclayer.py b/erpnext/patches/before_jan_2012/reload_doclayer.py index 2c6e23e0a12..d12e609cd86 100644 --- a/erpnext/patches/before_jan_2012/reload_doclayer.py +++ b/erpnext/patches/before_jan_2012/reload_doclayer.py @@ -15,7 +15,7 @@ # along with this program. If not, see . """ - Reload DocLayer, DocLayerField and Print Format doctypes + Reload DocLayer, Customize Form Field and Print Format doctypes """ def execute(): from webnotes.modules import reload_doc @@ -25,7 +25,7 @@ def execute(): reload_doc('accounts', 'doctype', 'gl_entry') from webnotes.model.doc import Document d = Document('DocType Label') - d.dt = "DocLayer" + d.dt = "Customize Form" d.dt_label = "Customize Form View" d.save(1) from webnotes.session_cache import clear diff --git a/erpnext/patches/before_jan_2012/reload_lc_wizard.py b/erpnext/patches/before_jan_2012/reload_lc_wizard.py index e3df031c657..ac651778add 100644 --- a/erpnext/patches/before_jan_2012/reload_lc_wizard.py +++ b/erpnext/patches/before_jan_2012/reload_lc_wizard.py @@ -20,6 +20,6 @@ def execute(): from webnotes.model import delete_doc delete_doc('DocType', 'Landed Cost Wizard') - delete_doc('DocType', 'LC PR Detail') + delete_doc('DocType', 'Landed Cost Purchase Receipt') reload_doc('stock', 'doctype', 'landed_cost_wizard') reload_doc('stock', 'doctype', 'lc_pr_detail') diff --git a/erpnext/patches/before_jan_2012/reload_print_format.py b/erpnext/patches/before_jan_2012/reload_print_format.py index 9948beb24f1..cac8d6e8a41 100644 --- a/erpnext/patches/before_jan_2012/reload_print_format.py +++ b/erpnext/patches/before_jan_2012/reload_print_format.py @@ -26,8 +26,8 @@ def execute(): reload_doc('accounts', 'Print Format', 'Form 16A Print Format') reload_doc('accounts', 'Print Format', 'Cheque Printing Format') - if not webnotes.conn.sql("select format from `tabDocFormat` where name = 'POS Invoice' and parent = 'Receivable Voucher'"): - dt_obj = get_obj('DocType', 'Receivable Voucher', with_children = 1) + if not webnotes.conn.sql("select format from `tabDocFormat` where name = 'POS Invoice' and parent = 'Sales Invoice'"): + dt_obj = get_obj('DocType', 'Sales Invoice', with_children = 1) ch = addchild(dt_obj.doc, 'formats', 'DocFormat', 1) ch.format = 'POS Invoice' ch.save(1) diff --git a/erpnext/patches/before_jan_2012/reload_project_task.py b/erpnext/patches/before_jan_2012/reload_project_task.py index f17460371b5..b21135be149 100644 --- a/erpnext/patches/before_jan_2012/reload_project_task.py +++ b/erpnext/patches/before_jan_2012/reload_project_task.py @@ -19,5 +19,5 @@ """ def execute(): from webnotes.modules import reload_doc - reload_doc('Projects', 'DocType', 'Ticket') + reload_doc('Projects', 'DocType', 'Task') diff --git a/erpnext/patches/before_jan_2012/repost_stock.py b/erpnext/patches/before_jan_2012/repost_stock.py index 2c620396ae5..d8267ff9cea 100644 --- a/erpnext/patches/before_jan_2012/repost_stock.py +++ b/erpnext/patches/before_jan_2012/repost_stock.py @@ -24,7 +24,7 @@ def execute(): sr = sql("""select name, item_code, purchase_document_no from `tabSerial No` where docstatus = 1 and purchase_document_type = 'Purchase Receipt'""") for d in sr: - val_rate = sql("""select valuation_rate from `tabPurchase Receipt Detail` + val_rate = sql("""select valuation_rate from `tabPurchase Receipt Item` where item_code = %s and parent = %s""", (d[1], d[2])) sql("""update `tabSerial No` set purchase_rate = %s where name = %s""", (val_rate and flt(val_rate[0][0]) or 0, d[0])) diff --git a/erpnext/patches/jan_mar_2012/apps/todo_item.py b/erpnext/patches/jan_mar_2012/apps/todo_item.py index bbef2324443..f9a02bd2718 100644 --- a/erpnext/patches/jan_mar_2012/apps/todo_item.py +++ b/erpnext/patches/jan_mar_2012/apps/todo_item.py @@ -16,7 +16,7 @@ def execute(): """ - * Reload ToDo Item + * Reload ToDo """ from webnotes.modules import reload_doc reload_doc('utilities', 'doctype', 'todo_item') diff --git a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py index 653ff584342..d349dbc0348 100644 --- a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py +++ b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py @@ -33,7 +33,7 @@ def delete_fields_dn_detail(): 'print_packing_slip', 'shipping_mark', 'packed_by', 'packing_checked_by', 'Text', 'pack_size' ], - 'Delivery Note Detail': [ + 'Delivery Note Item': [ 'pack_no', 'pack_gross_wt', 'weight_uom', 'pack_nett_wt', 'no_of_packs', 'pack_unit', 'pack_size', 'packed_by', 'packing_checked_by' diff --git a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py index 0b6f405ab4c..9091e95dcb3 100644 --- a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py +++ b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py @@ -22,7 +22,7 @@ def execute(): """ webnotes.conn.sql(""" UPDATE `tabDocField` SET options=NULL - WHERE parent='DocLayer' AND fieldname='doc_type' + WHERE parent='Customize Form' AND fieldname='doc_type' """) from webnotes.modules import reload_doc reload_doc('core', 'doctype', 'doclayer') diff --git a/erpnext/patches/jan_mar_2012/jan_production_patches.py b/erpnext/patches/jan_mar_2012/jan_production_patches.py index 479cecb845a..65dd5a8fcb0 100644 --- a/erpnext/patches/jan_mar_2012/jan_production_patches.py +++ b/erpnext/patches/jan_mar_2012/jan_production_patches.py @@ -28,13 +28,13 @@ def execute(): webnotes.conn.sql(""" UPDATE tabDocField SET fieldtype='Float' - WHERE parent='Bill Of Materials' + WHERE parent='BOM' AND fieldname IN ('operating_cost', 'raw_material_cost', 'total_cost') """) webnotes.conn.sql(""" UPDATE tabDocField SET fieldtype='Float' - WHERE parent='BOM Material' + WHERE parent='BOM Item' AND fieldname IN ('qty', 'rate', 'amount', 'qty_consumed_per_unit') """) diff --git a/erpnext/patches/jan_mar_2012/label_cleanup.py b/erpnext/patches/jan_mar_2012/label_cleanup.py index f158495a428..9e4d4a9dae0 100644 --- a/erpnext/patches/jan_mar_2012/label_cleanup.py +++ b/erpnext/patches/jan_mar_2012/label_cleanup.py @@ -16,14 +16,14 @@ def execute(): webnotes.conn.sql("""delete from `tabDocField` where label in ('Note1', 'OT Notes', 'Note', 'Note HTML', 'Rates HTML') - and parent in ('Quotation', 'Sales Order', 'Delivery Note', 'Receivable Voucher', 'Purchase Order')""") + and parent in ('Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'Purchase Order')""") del_flds = { - 'Sales Order Detail': "'delivery_date', 'confirmation_date'", + 'Sales Order Item': "'delivery_date', 'confirmation_date'", 'Delivery Note': "'supplier', 'supplier_address', 'purchase_receipt_no', 'purchase_order_no', 'transaction_date'", - 'Receivable Voucher': "'voucher_date'", - 'Payable Voucher': "'voucher_date'", + 'Sales Invoice': "'voucher_date'", + 'Purchase Invoice': "'voucher_date'", 'Purchase Receipt': "'transaction_date'" } diff --git a/erpnext/patches/jan_mar_2012/map_conversion_rate.py b/erpnext/patches/jan_mar_2012/map_conversion_rate.py index 0b947b30201..dcb212d6a05 100644 --- a/erpnext/patches/jan_mar_2012/map_conversion_rate.py +++ b/erpnext/patches/jan_mar_2012/map_conversion_rate.py @@ -33,10 +33,10 @@ def execute(): }] }, { - 'parent': 'Purchase Order-Payable Voucher', + 'parent': 'Purchase Order-Purchase Invoice', 'map': [{ 'from_table': 'Purchase Order', - 'to_table': 'Payable Voucher', + 'to_table': 'Purchase Invoice', 'fields': [['conversion_rate', 'conversion_rate', 'Yes']] }] }, diff --git a/erpnext/patches/jan_mar_2012/mapper_fix.py b/erpnext/patches/jan_mar_2012/mapper_fix.py index c651c5ed744..a9b1a9bb6ab 100644 --- a/erpnext/patches/jan_mar_2012/mapper_fix.py +++ b/erpnext/patches/jan_mar_2012/mapper_fix.py @@ -1,3 +1,3 @@ def execute(): import webnotes - webnotes.conn.sql("delete from `tabTable Mapper Detail` where to_table = 'RV Detail' and parent = 'Delivery Note-Receivable Voucher' and validation_logic = 'amount > ifnull(billed_amt, 0) and docstatus = 1'") + webnotes.conn.sql("delete from `tabTable Mapper Detail` where to_table = 'Sales Invoice Item' and parent = 'Delivery Note-Sales Invoice' and validation_logic = 'amount > ifnull(billed_amt, 0) and docstatus = 1'") diff --git a/erpnext/patches/jan_mar_2012/pending_patches.py b/erpnext/patches/jan_mar_2012/pending_patches.py index 821a411cdf7..0cc73f3042b 100644 --- a/erpnext/patches/jan_mar_2012/pending_patches.py +++ b/erpnext/patches/jan_mar_2012/pending_patches.py @@ -38,8 +38,8 @@ def execute(): - if sql("select count(name) from `tabDocField` where label = 'Get Specification Details' and parent = 'QA Inspection Report' and fieldtype = 'Button'")[0][0] > 1: - sql("delete from `tabDocField` where label = 'Get Specification Details' and parent = 'QA Inspection Report' and fieldtype = 'Button' limit 1") + if sql("select count(name) from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button'")[0][0] > 1: + sql("delete from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button' limit 1") reload_doc('stock', 'DocType Mapper', 'Purchase Order-Purchase Receipt') diff --git a/erpnext/patches/jan_mar_2012/print_hide_totals.py b/erpnext/patches/jan_mar_2012/print_hide_totals.py index 4299cb4b532..bf16a77f465 100644 --- a/erpnext/patches/jan_mar_2012/print_hide_totals.py +++ b/erpnext/patches/jan_mar_2012/print_hide_totals.py @@ -23,7 +23,7 @@ def execute(): Uncheck print_hide for fields: net_total, grand_total_export and rounded_total_export For DocType(s): - * Receivable Voucher + * Sales Invoice * Sales Order * Delivery Note * Quotation @@ -32,5 +32,5 @@ def execute(): UPDATE tabDocField SET print_hide = 0 WHERE fieldname IN ('net_total', 'grand_total_export', 'rounded_total_export') - AND parent IN ('Receivable Voucher', 'Sales Order', 'Delivery Note', 'Quotation') + AND parent IN ('Sales Invoice', 'Sales Order', 'Delivery Note', 'Quotation') """) diff --git a/erpnext/patches/jan_mar_2012/production_cleanup.py b/erpnext/patches/jan_mar_2012/production_cleanup.py index e715f273115..e724ab885ba 100644 --- a/erpnext/patches/jan_mar_2012/production_cleanup.py +++ b/erpnext/patches/jan_mar_2012/production_cleanup.py @@ -22,10 +22,10 @@ def execute(): # Production Planning Tool #--------------------------------------------------------------- - #delete_doc('DocType', 'PP Detail') - #delete_doc('DocType', 'PP SO Detail') + #delete_doc('DocType', 'Production Plan Item') + #delete_doc('DocType', 'Production Plan Sales Order') #delete_doc('DocType', 'Production Planning Tool') - sql("delete from `tabDocField` where parent in ('Production Planning Tool', 'PP Detail', 'PP SO Detail')") + sql("delete from `tabDocField` where parent in ('Production Planning Tool', 'Production Plan Item', 'Production Plan Sales Order')") reload_doc('production', 'doctype', 'production_planning_tool') reload_doc('production', 'doctype', 'pp_detail') @@ -42,7 +42,7 @@ def execute(): """) - # Bill Of Materials + # BOM #--------------------------------------------------------------- reload_doc('production', 'doctype', 'bill_of_materials') reload_doc('production', 'doctype', 'bom_material') @@ -50,17 +50,17 @@ def execute(): reload_doc('production', 'doctype', 'flat_bom_detail') #copy values - sql("""update `tabBill Of Materials` set rm_cost_as_per = 'Valuation Rate', + sql("""update `tabBOM` set rm_cost_as_per = 'Valuation Rate', raw_material_cost = dir_mat_as_per_mar, total_cost = cost_as_per_mar, costing_date = cost_as_on""") - sql("update `tabBOM Material` set rate = moving_avg_rate, amount = amount_as_per_mar") + sql("update `tabBOM Item` set rate = moving_avg_rate, amount = amount_as_per_mar") - sql("update `tabFlat BOM Detail` set rate = moving_avg_rate, amount = amount_as_per_mar") + sql("update `tabBOM Explosion Item` set rate = moving_avg_rate, amount = amount_as_per_mar") # delete depricated flds from bom - sql(""" delete from `tabDocField` where parent = 'Bill Of Materials' + sql(""" delete from `tabDocField` where parent = 'BOM' and ( label in ('TreeView1', 'Set as Default BOM', 'Activate BOM', 'Inactivate BOM') or fieldname in ('cost_as_per_mar', 'cost_as_per_lpr', 'cost_as_per_sr', 'cost_as_on', @@ -72,14 +72,14 @@ def execute(): sql("delete from `tabDocField` where parent = 'BOM Operation' and fieldname in ('details', 'workstation_capacity')") # delete depricated flds from bom material - sql("""delete from `tabDocField` where parent = 'BOM Material' + sql("""delete from `tabDocField` where parent = 'BOM Item' and fieldname in ('dir_mat_as_per_mar', 'dir_mat_as_per_sr', 'dir_mat_as_per_lpr', 'operating_cost', 'value_as_per_mar', 'value_as_per_sr', 'value_as_per_lpr', 'moving_avg_rate', 'standard_rate', 'last_purchase_rate', 'amount_as_per_sr', 'amount_as_per_lpr', 'amount_as_per_mar') """) # delete depricated flds from flat bom - sql("""delete from tabDocField where parent = 'Flat BOM Detail' + sql("""delete from tabDocField where parent = 'BOM Explosion Item' and fieldname in ('moving_avg_rate', 'standard_rate', 'last_purchase_rate', 'amount_as_per_mar', 'amount_as_per_sr', 'amount_as_per_lpr', 'flat_bom_no', 'bom_mat_no', 'is_pro_applicable') """) diff --git a/erpnext/patches/jan_mar_2012/reload_mapper.py b/erpnext/patches/jan_mar_2012/reload_mapper.py index a6e3102bbaf..f3a469f1b57 100644 --- a/erpnext/patches/jan_mar_2012/reload_mapper.py +++ b/erpnext/patches/jan_mar_2012/reload_mapper.py @@ -3,7 +3,7 @@ def execute(): from webnotes.modules.module_manager import reload_doc reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note') - reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher') - reload_doc('accounts', 'DocType Mapper', 'Delivery Note-Receivable Voucher') + reload_doc('accounts', 'DocType Mapper', 'Sales Order-Sales Invoice') + reload_doc('accounts', 'DocType Mapper', 'Delivery Note-Sales Invoice') webnotes.conn.sql("delete from `tabField Mapper Detail` where parent = 'Sales Order-Delivery Note' and from_field = 'basic_rate' and to_field = 'basic_rate'") diff --git a/erpnext/patches/jan_mar_2012/remove_series_defval.py b/erpnext/patches/jan_mar_2012/remove_series_defval.py index 123cc412954..45eed574675 100644 --- a/erpnext/patches/jan_mar_2012/remove_series_defval.py +++ b/erpnext/patches/jan_mar_2012/remove_series_defval.py @@ -1,3 +1,3 @@ def execute(): import webnotes - webnotes.conn.sql("update `tabDocField` set `default`='' where parent = 'Receivable Voucher' and fieldname = 'naming_series' and `default` = 'INV'") + webnotes.conn.sql("update `tabDocField` set `default`='' where parent = 'Sales Invoice' and fieldname = 'naming_series' and `default` = 'INV'") diff --git a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py index 4e026f720ed..56e2086ff90 100644 --- a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py +++ b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py @@ -26,16 +26,16 @@ def execute(): def create_doctype_label(): """ - Creates a DocType Label Record for Indent + Creates a DocType Label Record for Purchase Request """ res = webnotes.conn.sql("""\ SELECT name FROM `tabDocType Label` - WHERE name='Indent' + WHERE name='Purchase Request' """) if not(res and res[0] and res[0][0]): from webnotes.model.doc import Document doclabel = Document('DocType Label') - doclabel.dt = 'Indent' + doclabel.dt = 'Purchase Request' doclabel.dt_label = 'Purchase Requisition' doclabel.save(1) diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py index 2492720ca7a..8d860a53dd9 100644 --- a/erpnext/patches/jan_mar_2012/rename_dt.py +++ b/erpnext/patches/jan_mar_2012/rename_dt.py @@ -7,9 +7,27 @@ from webnotes.modules.module_manager import reload_doc from webnotes.utils import make_esc import os +def execute3(): + # Dt Mapper renaming + ren_mapper = get_mapper_to_be_renamed() + # Rename mapper in db + rename_in_db(ren_mapper, 'DocType Mapper', 0) + #--------------------------------------------------- + # GL Mapper renaming + gl_mapper = {'Receivable Voucher': 'Sales Invoice', 'Payable Voucher': 'Purchase Invoice'} + rename_in_db(gl_mapper, 'GL Mapper', 0) + + + #--------------------------------------------------- + # remove dt label + webnotes.conn.sql("""delete from `tabDocType Label` where name in ('Ticket', 'Receivable Voucher', + 'QA Inspection Report', 'Payable Voucher', 'Manage Account', 'Indent', 'DocLayer')""") def execute(): + update_local_file_system() + +def execute2(): # delete dt, mapper delete_dt_and_mapper() @@ -235,7 +253,7 @@ def get_mapper_to_be_renamed(): 'Enquiry-Quotation' : 'Opportunity-Quotation', 'Delivery Note-Receivable Voucher' : 'Delivery Note-Sales Invoice' } - return ren_mapper + return ren_map @@ -250,9 +268,9 @@ def update_local_file_system(): rendt = get_dt_to_be_renamed() # replace dt in js/py file - update_file_content(rendt) + #update_file_content(rendt) # git mv - rename_dt_files(rendt) + #rename_dt_files(rendt) # Mapper renaming @@ -268,6 +286,7 @@ def update_local_file_system(): def update_file_content(rendt): for d in rendt: + print colored('Renaming... ' + d + ' --> '+ rendt[d], 'yellow') for extn in ['js', 'py', 'txt']: replace_code('/var/www/erpnext/', d, rendt[d], extn) @@ -293,13 +312,14 @@ def rename_dt_files(rendt): def rename_mapper_files(ren_mapper): for d in ren_mapper: # module - mod = '_'.join(webnotes.conn.sql("select module from `tabDocType Mapper` where name = %s", ren_mapper[d])[0][0].lower().split()) + mod = '_'.join(webnotes.conn.sql("select module from `tabDocType Mapper` where name = %s", ren_mapper[d], debug=1)[0][0].lower().split()) path = 'erpnext/' + mod + '/DocType Mapper/' # rename old dir esc = make_esc('$ ') os.system('git mv ' + esc(path + d) + ' ' + esc(path + ren_mapper[d])) print 'git mv ' + esc(path + d) + ' ' + esc(path + ren_mapper[d]) - os.system('git mv ' + esc(path + ren_mapper[d] + '/'+ d + '.' +extn) + ' ' + esc(path + ren_mapper[d] + '/' + ren_mapper[d] + '.' +extn)) + os.system('git mv ' + esc(path + ren_mapper[d] + '/'+ d + '.txt') + + ' ' + esc(path + ren_mapper[d] + '/' + ren_mapper[d] + '.txt')) print 'git mv ' + esc(path + ren_mapper[d] + '/'+ d + '.txt') + ' ' + esc(path + ren_mapper[d] + '/' + ren_mapper[d] + '.txt') diff --git a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py index d155107aa6a..99366beaa95 100644 --- a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py +++ b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py @@ -19,10 +19,10 @@ from webnotes.modules import reload_doc def execute(): """ - * Reload RV Tax Detail + * Reload Sales Taxes and Charges * Reload Support Ticket * Run Install Print Format Patch - * Reload DocLayer + * Reload Customize Form """ reload_doc('accounts', 'doctype', 'rv_tax_detail') reload_doc('support', 'doctype', 'support_ticket') diff --git a/erpnext/patches/jan_mar_2012/sync_ref_db.py b/erpnext/patches/jan_mar_2012/sync_ref_db.py index 62b39470671..efc831db9e5 100644 --- a/erpnext/patches/jan_mar_2012/sync_ref_db.py +++ b/erpnext/patches/jan_mar_2012/sync_ref_db.py @@ -12,4 +12,4 @@ def execute(): for r in del_rec[d]: delete_doc(d, r) - sql("delete from tabDocField where label='Repair Indent' and parent = 'Indent'") + sql("delete from tabDocField where label='Repair Purchase Request' and parent = 'Purchase Request'") diff --git a/erpnext/patches/jan_mar_2012/update_se_fld_options.py b/erpnext/patches/jan_mar_2012/update_se_fld_options.py index fab0b198278..95bb528829a 100644 --- a/erpnext/patches/jan_mar_2012/update_se_fld_options.py +++ b/erpnext/patches/jan_mar_2012/update_se_fld_options.py @@ -1,6 +1,6 @@ def execute(): import webnotes - webnotes.conn.sql("update `tabDocField` set options = 'Bill Of Materials' where fieldname = 'bom_no' and parent = 'Stock Entry'") + webnotes.conn.sql("update `tabDocField` set options = 'BOM' where fieldname = 'bom_no' and parent = 'Stock Entry'") from webnotes.modules.module_manager import reload_doc reload_doc('stock', 'doctype', 'stock_entry') diff --git a/erpnext/patches/jan_mar_2012/website/getfile_rename.py b/erpnext/patches/jan_mar_2012/website/getfile_rename.py index 769ac376be7..d6d4c571ae7 100644 --- a/erpnext/patches/jan_mar_2012/website/getfile_rename.py +++ b/erpnext/patches/jan_mar_2012/website/getfile_rename.py @@ -19,10 +19,10 @@ import webnotes def execute(): """rename from getfle""" l = [ - ('Quotation Detail', 'description'), - ('Sales Order Detail', 'description'), - ('Delivery Note Detail', 'description'), - ('RV Detail', 'description'), + ('Quotation Item', 'description'), + ('Sales Order Item', 'description'), + ('Delivery Note Item', 'description'), + ('Sales Invoice Item', 'description'), ('Item', 'description_html'), ('Letter Head', 'content') ] diff --git a/erpnext/patches/mar_2012/doctype_get_refactor.py b/erpnext/patches/mar_2012/doctype_get_refactor.py index 35f408514eb..c450e0adffb 100644 --- a/erpnext/patches/mar_2012/doctype_get_refactor.py +++ b/erpnext/patches/mar_2012/doctype_get_refactor.py @@ -111,17 +111,17 @@ def remove_custom_from_docfield(cf): f.get('fieldname'))) def create_file_list(): - should_exist = ['Website Settings', 'Web Page', 'Timesheet', 'Ticket', + should_exist = ['Website Settings', 'Web Page', 'Timesheet', 'Task', 'Support Ticket', 'Supplier', 'Style Settings', 'Stock Reconciliation', - 'Stock Entry', 'Serial No', 'Sales Order', 'Receivable Voucher', + 'Stock Entry', 'Serial No', 'Sales Order', 'Sales Invoice', 'Quotation', 'Question', 'Purchase Receipt', 'Purchase Order', 'Project', 'Profile', 'Production Order', 'Product', 'Print Format', - 'Price List', 'Payable Voucher', 'Page', 'Module Def', + 'Price List', 'Purchase Invoice', 'Page', 'Module Def', 'Maintenance Visit', 'Maintenance Schedule', 'Letter Head', - 'Leave Application', 'Lead', 'Journal Voucher', 'Item', 'Indent', - 'Expense Voucher', 'Enquiry', 'Employee', 'Delivery Note', + 'Leave Application', 'Lead', 'Journal Voucher', 'Item', 'Purchase Request', + 'Expense Claim', 'Opportunity', 'Employee', 'Delivery Note', 'Customer Issue', 'Customer', 'Contact Us Settings', 'Company', - 'Bulk Rename Tool', 'Blog', 'Bill Of Materials', 'About Us Settings'] + 'Bulk Rename Tool', 'Blog', 'BOM', 'About Us Settings'] from webnotes.model.code import get_obj diff --git a/erpnext/patches/mar_2012/so_rv_mapper_fix.py b/erpnext/patches/mar_2012/so_rv_mapper_fix.py index 8844773a2cc..5d60b3c7caa 100644 --- a/erpnext/patches/mar_2012/so_rv_mapper_fix.py +++ b/erpnext/patches/mar_2012/so_rv_mapper_fix.py @@ -1,10 +1,10 @@ def execute(): import webnotes count = webnotes.conn.sql("""SELECT COUNT(*) FROM `tabTable Mapper Detail` - WHERE parent='Sales Order-Receivable Voucher' - AND from_table='Sales Order Detail'""") + WHERE parent='Sales Order-Sales Invoice' + AND from_table='Sales Order Item'""") if count and count[0][0]==2: webnotes.conn.sql("""DELETE FROM `tabTable Mapper Detail` - WHERE parent='Sales Order-Receivable Voucher' - AND from_table='Sales Order Detail' + WHERE parent='Sales Order-Sales Invoice' + AND from_table='Sales Order Item' AND validation_logic='docstatus = 1'""") diff --git a/erpnext/patches/old_patches/customer_address.py b/erpnext/patches/old_patches/customer_address.py index 4757c023fd4..851fb9510d8 100644 --- a/erpnext/patches/old_patches/customer_address.py +++ b/erpnext/patches/old_patches/customer_address.py @@ -106,15 +106,15 @@ def delete_unwanted_fields(): ('Customer', 'region'), ('Customer', 'pincode'), ('Customer', 'city'), ('Customer', 'country'), ('Customer', 'state'), ('Customer', 'address'), ('Customer', 'telephone'), ('Customer', 'address_line2'), ('Customer', 'address_line1'), ('Customer', 'last_sales_order'), ('Customer', 'Shipping HTML'), ('Customer', 'phone_1'), ('Customer', 'Territory Help'), ('Customer', 'CG Help'), ('Customer', 'fax_1'), ('Customer', 'email_id'), ('Customer Issue', 'email_id'), ('Customer Issue', 'contact_no'), ('Delivery Note', 'customer_mobile_no'), ('Delivery Note', 'Send SMS'), ('Delivery Note', 'Get Other Charges'), ('Delivery Note', 'message'), ('Delivery Note', 'shipping_address'), ('Delivery Note', 'ship_to'), ('Delivery Note', 'ship_det_no'), ('Delivery Note', 'contact_no'), ('Delivery Note', 'Customer Details'), ('Delivery Note', 'email_id'), ('Delivery Note', 'delivery_address'), ('Delivery Note', 'Contact Help'), ('Delivery Note', 'Territory Help'), - ('Enquiry', 'address'), ('Enquiry', 'Send Email'), ('Enquiry', 'enquiry_attachment_detail'), ('Enquiry', 'contact_date_ref'), ('Enquiry', 'Update Follow up'), ('Enquiry', 'email_id1'), ('Enquiry', 'cc_to'), ('Enquiry', 'subject'), ('Enquiry', 'message'), ('Enquiry', 'Attachment Html'), ('Enquiry', 'Create New File'), ('Enquiry', 'contact_no'), ('Enquiry', 'email_id'), ('Enquiry', 'project'), ('Enquiry', 'update_follow_up'), ('Enquiry', 'Contact Help'), + ('Opportunity', 'address'), ('Opportunity', 'Send Email'), ('Opportunity', 'enquiry_attachment_detail'), ('Opportunity', 'contact_date_ref'), ('Opportunity', 'Update Communication Log'), ('Opportunity', 'email_id1'), ('Opportunity', 'cc_to'), ('Opportunity', 'subject'), ('Opportunity', 'message'), ('Opportunity', 'Attachment Html'), ('Opportunity', 'Create New File'), ('Opportunity', 'contact_no'), ('Opportunity', 'email_id'), ('Opportunity', 'project'), ('Opportunity', 'update_follow_up'), ('Opportunity', 'Contact Help'), ('Installation Note', 'address'), ('Lead', 'message'), ('Lead', 'Send Email'), ('Lead', 'address'), ('Lead', 'subject'), ('Lead', 'contact_no'), ('Lead', 'TerritoryHelp'), ('Maintenance Schedule', 'address'), ('Maintenance Visit', 'address'), ('Purchase Order', 'Contact Help'), ('Purchase Order', 'supplier_qtn'), ('Purchase Order', 'contact_no'), ('Purchase Order', 'email'), ('Purchase Receipt', 'Contact Help'), - ('Quotation', 'email_id'), ('Quotation', 'contact_no'), ('Quotation', 'Update Follow up'), ('Quotation', 'contact_date_ref'), ('Quotation', 'Territory Help'), ('Quotation', 'Contact Help'), - ('Receivable Voucher', 'Territory Help'), + ('Quotation', 'email_id'), ('Quotation', 'contact_no'), ('Quotation', 'Update Communication Log'), ('Quotation', 'contact_date_ref'), ('Quotation', 'Territory Help'), ('Quotation', 'Contact Help'), + ('Sales Invoice', 'Territory Help'), ('Sales Order', 'contact_no'), ('Sales Order', 'email_id'), ('Sales Order', 'Contact Help'), ('Sales Order', 'file_list'), ('Sales Order', 'ship_det_no'), ('Sales Order', 'mobile_no'), ('Sales Order', 'Territory Help'), ('Sales Order', 'ship_to'), ('Sales Order', 'Customer Details'), ('Sales Partner', 'area_code'), ('Sales Partner', 'telephone'), ('Sales Partner', 'email'), ('Sales Partner', 'address'), ('Sales Partner', 'TerritoryHelp'), ('Sales Partner', 'pincode'), ('Sales Partner', 'country'), ('Sales Partner', 'city'), ('Sales Partner', 'address_line2'), ('Sales Partner', 'address_line1'), ('Sales Partner', 'mobile'), ('Sales Partner', 'state'), ('Serial No', 'supplier_address'), @@ -124,7 +124,7 @@ def delete_unwanted_fields(): #def gen_txt_files(): # from webnotes.modules.export_module import export_to_files -# for dt in ['Contact','Customer','Customer Issue','Delivery Note','Enquiry','Installation Note','Lead','Maintenance Schedule','Maintenance Visit','Purchase Order','Purchase Receipt','Quotation','Receivable Voucher','Sales Order','Sales Partner','Serial No','Supplier']: +# for dt in ['Contact','Customer','Customer Issue','Delivery Note','Opportunity','Installation Note','Lead','Maintenance Schedule','Maintenance Visit','Purchase Order','Purchase Receipt','Quotation','Sales Invoice','Sales Order','Sales Partner','Serial No','Supplier']: # export_to_files(record_list=[['DocType',dt]]) def reload_doc_files(): @@ -152,30 +152,30 @@ def reload_mapper_files(): from webnotes.modules import reload_doc reload_doc('Mapper', 'DocType Mapper', 'Customer Issue-Maintenance Visit') reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Installation Note') - reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Receivable Voucher') - reload_doc('Mapper', 'DocType Mapper', 'Enquiry-Quotation') + reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Sales Invoice') + reload_doc('Mapper', 'DocType Mapper', 'Opportunity-Quotation') reload_doc('Mapper', 'DocType Mapper', 'Lead-Customer') - reload_doc('Mapper', 'DocType Mapper', 'Lead-Enquiry') - reload_doc('Mapper', 'DocType Mapper', 'Purchase Order-Payable Voucher') + reload_doc('Mapper', 'DocType Mapper', 'Lead-Opportunity') + reload_doc('Mapper', 'DocType Mapper', 'Purchase Order-Purchase Invoice') reload_doc('Mapper', 'DocType Mapper', 'Purchase Order-Purchase Receipt') - reload_doc('Mapper', 'DocType Mapper', 'Purchase Receipt-Payable Voucher') + reload_doc('Mapper', 'DocType Mapper', 'Purchase Receipt-Purchase Invoice') reload_doc('Mapper', 'DocType Mapper', 'Quotation-Sales Order') - reload_doc('Mapper', 'DocType Mapper', 'Receivable Voucher-Delivery Note') + reload_doc('Mapper', 'DocType Mapper', 'Sales Invoice-Delivery Note') reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Delivery Note') reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Maintenance Schedule') reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Maintenance Visit') - reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Receivable Voucher') + reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Sales Invoice') def delete_unwanted_mapper_fields(): delete_fields = [ ('Customer Issue-Maintenance Visit', 'customer_address', 'address'), ('Delivery Note-Installation Note', 'customer_address', 'address'), - ('Enquiry-Quotation', 'contact_no', 'contact_no'), ('Enquiry-Quotation', 'subject', 'enq_det'), ('Enquiry-Quotation', 'customer_name', 'customer_name'), ('Enquiry-Quotation', 'customer_name', 'customer_name'), ('Enquiry-Quotation', 'address', 'customer_address'), ('Enquiry-Quotation', 'email_id', 'email_id'), + ('Opportunity-Quotation', 'contact_no', 'contact_no'), ('Opportunity-Quotation', 'subject', 'enq_det'), ('Opportunity-Quotation', 'customer_name', 'customer_name'), ('Opportunity-Quotation', 'customer_name', 'customer_name'), ('Opportunity-Quotation', 'address', 'customer_address'), ('Opportunity-Quotation', 'email_id', 'email_id'), ('Quotation-Sales Order', 'contact_no', 'contact_no'), ('Quotation-Sales Order', 'email_id', 'email_id'), ('Quotation-Sales Order', 'customer_mobile_no', 'customer_mobile_no'), ('Sales Order-Delivery Note', 'customer_address', 'delivery_address'), ('Sales Order-Delivery Note', 'customer_address', 'customer_address'), ('Sales Order-Delivery Note', 'contact_no', 'contact_no'), ('Sales Order-Delivery Note', 'email_id', 'email_id'), ('Sales Order-Delivery Note', 'ship_det_no', 'ship_det_no'), ('Sales Order-Delivery Note', 'ship_to', 'ship_to'), ('Sales Order-Delivery Note', 'shipping_address', 'shipping_address'), ('Sales Order-Delivery Note', 'customer_mobile_no', 'customer_mobile_no'), ('Sales Order-Maintenance Schedule', 'customer_address', 'address'), ('Sales Order-Maintenance Visit', 'customer_address', 'address'), - ('Sales Order-Receivable Voucher', 'contact_no', 'contact_no')] + ('Sales Order-Sales Invoice', 'contact_no', 'contact_no')] for rec in delete_fields: webnotes.conn.sql("delete from `tabField Mapper Detail` where parent=%s and from_field=%s and to_field=%s",(rec[0], rec[1], rec[2])) @@ -185,16 +185,16 @@ def sync_docfield_properties(): ('Contact', 'customer', 'Customer', 0L, None, 0L, None), ('Contact', 'supplier', 'Supplier', 0L, None, None, None), ('Contact', 'is_primary_contact', None, 0L, None, None, None), ('Contact', 'email_id', None, 0L, 1L, None, None), ('Contact', 'department', 'Suggest', 0L, None, None, None), ('Contact', 'designation', 'Suggest', 0L, None, None, None), ('Customer Issue', 'customer', 'Customer', 0L, 1L, 1L, None), ('Customer Issue', 'customer_address', 'Address', 0L, None, 1L, None), ('Customer Issue', 'contact_person', 'Contact', 0L, None, 1L, None), ('Customer Issue', 'customer_name', None, 1L, None, None, None), ('Customer Issue', 'company', 'Company', 0L, 1L, 1L, None), ('Customer Issue', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), ('Delivery Note', 'customer_address', 'Address', 0L, None, 1L, None), ('Delivery Note', 'contact_person', 'Contact', 0L, None, 1L, None), ('Delivery Note', 'customer_name', None, 1L, None, None, None), ('Delivery Note', 'status', '\nDraft\nSubmitted\nCancelled', 1L, 1L, 1L, None), ('Delivery Note', 'territory', 'Territory', 0L, 1L, 1L, 0L), ('Delivery Note', 'customer_group', 'Customer Group', 0L, None, 1L, None), ('Delivery Note', 'transporter_name', None, 0L, 0L, 1L, None), ('Delivery Note', 'lr_no', None, 0L, 0L, 1L, None), ('Delivery Note', 'lr_date', None, 0L, None, 1L, None), ('Delivery Note', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Delivery Note', 'letter_head', 'link:Letter Head', 0L, None, 1L, None), - ('Enquiry', 'contact_person', 'Contact', 0L, None, 1L, None), ('Enquiry', 'customer_name', None, 1L, None, 0L, None), ('Enquiry', 'lead', 'Lead', 0L, None, 1L, 0L), ('Enquiry', 'enquiry_type', '\nSales\nMaintenance', 0L, 1L, None, None), ('Enquiry', 'territory', 'Territory', 0L, 1L, 1L, None), ('Enquiry', 'customer_group', 'Customer Group', 0L, 0L, 1L, 0L), ('Enquiry', 'contact_by', 'Profile', 0L, None, None, None), + ('Opportunity', 'contact_person', 'Contact', 0L, None, 1L, None), ('Opportunity', 'customer_name', None, 1L, None, 0L, None), ('Opportunity', 'lead', 'Lead', 0L, None, 1L, 0L), ('Opportunity', 'enquiry_type', '\nSales\nMaintenance', 0L, 1L, None, None), ('Opportunity', 'territory', 'Territory', 0L, 1L, 1L, None), ('Opportunity', 'customer_group', 'Customer Group', 0L, 0L, 1L, 0L), ('Opportunity', 'contact_by', 'Profile', 0L, None, None, None), ('Installation Note', 'contact_person', 'Contact', 0L, None, 1L, None), ('Installation Note', 'customer_name', None, 1L, 0L, None, None), ('Installation Note', 'territory', 'Territory', 0L, 1L, 1L, None), ('Installation Note', 'status', 'Draft\nSubmitted\nCancelled', 1L, 1L, 1L, None), ('Lead', 'city', None, 0L, 1L, 1L, None), ('Lead', 'country', 'link:Country', 0L, 1L, 1L, None), ('Lead', 'state', 'Suggest', 0L, None, 1L, None), ('Lead', 'company', 'Company', 0L, 1L, None, None), ('Lead', 'contact_by', 'Profile', 0L, 0L, 0L, 0L), ('Maintenance Schedule', 'customer', 'Customer', 0L, 1L, 1L, None), ('Maintenance Schedule', 'contact_person', 'Contact', 0L, None, 1L, None), ('Maintenance Schedule', 'status', '\nDraft\nSubmitted\nCancelled', 1L, 1L, None, None), ('Maintenance Schedule', 'territory', 'Territory', 0L, 1L, None, None), ('Maintenance Visit', 'customer', 'Customer', 0L, 1L, 1L, None), ('Maintenance Visit', 'contact_person', 'Contact', 0L, None, 1L, None), ('Maintenance Visit', 'customer_name', None, 1L, None, None, None), ('Maintenance Visit', 'company', 'link:Company', 0L, 1L, 1L, None), ('Maintenance Visit', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), ('Maintenance Visit', 'status', '\nDraft\nCancelled\nSubmitted', 1L, 1L, None, None), ('Maintenance Visit', 'territory', 'Territory', 0L, None, 1L, None), - ('Purchase Order', 'supplier_address', 'Address', 0L, None, 1L, None), ('Purchase Order', 'contact_person', 'Contact', 0L, None, 1L, None), ('Purchase Order', 'supplier_name', None, 1L, None, None, None), ('Purchase Order', 'status', '\nDraft\nSubmitted\nStopped\nCancelled', 1L, 1L, 1L, None), ('Purchase Order', 'indent_no', 'Indent', 0L, None, 1L, 0L), ('Purchase Order', 'is_subcontracted', '\nYes\nNo', 0L, None, 1L, None), ('Purchase Order', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Purchase Order', 'net_total', None, 1L, 0L, 1L, None), + ('Purchase Order', 'supplier_address', 'Address', 0L, None, 1L, None), ('Purchase Order', 'contact_person', 'Contact', 0L, None, 1L, None), ('Purchase Order', 'supplier_name', None, 1L, None, None, None), ('Purchase Order', 'status', '\nDraft\nSubmitted\nStopped\nCancelled', 1L, 1L, 1L, None), ('Purchase Order', 'indent_no', 'Purchase Request', 0L, None, 1L, 0L), ('Purchase Order', 'is_subcontracted', '\nYes\nNo', 0L, None, 1L, None), ('Purchase Order', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Purchase Order', 'net_total', None, 1L, 0L, 1L, None), ('Purchase Receipt', 'supplier_address', 'Address', 0L, None, 1L, None), ('Purchase Receipt', 'contact_person', 'Contact', 0L, None, 1L, None), ('Purchase Receipt', 'supplier_name', None, 1L, None, None, None), ('Purchase Receipt', 'status', '\nDraft\nSubmitted\nCancelled', 1L, 1L, 1L, None), ('Purchase Receipt', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Quotation', 'customer', 'Customer', 0L, None, 1L, 0L), ('Quotation', 'customer_address', 'Address', 0L, None, 1L, 0L), ('Quotation', 'contact_person', 'Contact', 0L, 0L, 1L, 0L), ('Quotation', 'customer_name', None, 1L, None, None, None), ('Quotation', 'lead', 'Lead', 0L, None, 1L, 0L), ('Quotation', 'lead_name', None, 1L, None, None, None), ('Quotation', 'order_type', '\nSales\nMaintenance', 0L, 1L, 0L, None), ('Quotation', 'status', '\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled', 1L, 1L, 1L, None), ('Quotation', 'territory', 'Territory', 0L, 1L, 1L, 0L), ('Quotation', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Quotation', 'letter_head', 'link:Letter Head', 0L, None, 1L, None), ('Quotation', 'order_lost_reason', None, 1L, None, 1L, None), ('Quotation', 'contact_by', 'Profile', 0L, None, 1L, None), ('Quotation', 'contact_date', None, 0L, None, 1L, None), ('Quotation', 'to_discuss', None, 0L, None, 1L, None), - ('Receivable Voucher', 'debit_to', 'Account', 0L, 1L, 1L, None), ('Receivable Voucher', 'customer_address', 'Address', 0L, None, 1L, None), ('Receivable Voucher', 'territory', 'Territory', 0L, 1L, 1L, None), ('Receivable Voucher', 'paid_amount', None, 0L, None, 1L, None), ('Receivable Voucher', 'company', 'Company', 0L, 1L, 1L, None), ('Receivable Voucher', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), ('Receivable Voucher', 'outstanding_amount', None, 1L, None, 1L, None), - ('Payable Voucher', 'supplier_address', 'Address', 0L, None, 1L, None), ('Payable Voucher', 'contact_display', None, 1L, None, None, None), ('Payable Voucher', 'contact_mobile', None, 1L, None, None, None), ('Payable Voucher', 'contact_email', None, 1L, None, 1L, None), ('Payable Voucher', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Payable Voucher', 'conversion_rate', None, 0L, 1L, 1L, None), ('Payable Voucher', 'company', 'Company', 0L, 1L, 1L, None), ('Payable Voucher', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), + ('Sales Invoice', 'debit_to', 'Account', 0L, 1L, 1L, None), ('Sales Invoice', 'customer_address', 'Address', 0L, None, 1L, None), ('Sales Invoice', 'territory', 'Territory', 0L, 1L, 1L, None), ('Sales Invoice', 'paid_amount', None, 0L, None, 1L, None), ('Sales Invoice', 'company', 'Company', 0L, 1L, 1L, None), ('Sales Invoice', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), ('Sales Invoice', 'outstanding_amount', None, 1L, None, 1L, None), + ('Purchase Invoice', 'supplier_address', 'Address', 0L, None, 1L, None), ('Purchase Invoice', 'contact_display', None, 1L, None, None, None), ('Purchase Invoice', 'contact_mobile', None, 1L, None, None, None), ('Purchase Invoice', 'contact_email', None, 1L, None, 1L, None), ('Purchase Invoice', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Purchase Invoice', 'conversion_rate', None, 0L, 1L, 1L, None), ('Purchase Invoice', 'company', 'Company', 0L, 1L, 1L, None), ('Purchase Invoice', 'fiscal_year', 'link:Fiscal Year', 0L, 1L, 1L, None), ('Sales Order', 'customer_address', 'Address', 0L, None, 1L, 0L), ('Sales Order', 'contact_person', 'Contact', 0L, None, 1L, None), ('Sales Order', 'customer_name', None, 1L, None, None, None), ('Sales Order', 'status', '\nDraft\nSubmitted\nStopped\nCancelled', 1L, 1L, 1L, None), ('Sales Order', 'quotation_date', None, 1L, 0L, 1L, 1L), ('Sales Order', 'currency', 'link:Currency', 0L, 1L, 1L, None), ('Sales Order', 'letter_head', 'link:Letter Head', 0L, None, 1L, None), ('Sales Partner', 'territory', 'Territory', 0L, 1L, None, None), ('Supplier', 'company', 'Company', 0L, 1L, None, None)] @@ -364,7 +364,7 @@ def sync_receivable_voucher_customer_data(): data_rec = webnotes.conn.sql(""" SELECT t.name as id,t.customer, ta.name as customer_address, ta.address_line1, ta.address_line2, ta.city, ta.country, ta.pincode, ta.state, ta.phone - FROM `tabReceivable Voucher` t, tabAddress ta + FROM `tabSales Invoice` t, tabAddress ta WHERE t.customer = ta.customer AND t.docstatus !=2 ORDER BY t.name @@ -374,7 +374,7 @@ def sync_receivable_voucher_customer_data(): address_display = cstr((rec['address_line1'] and rec['address_line1'] or '')) + cstr((rec['address_line2'] and '\n' + rec['address_line2'] or '')) + cstr((rec['city'] and '\n'+rec['city'] or '')) + cstr((rec['pincode'] and ', ' + rec['pincode'] or '')) + cstr((rec['state'] and '\n'+rec['state']+', ' or '')) + cstr((rec['country'] and rec['country'] or '')) + '\n' + cstr((rec['phone'] and 'Tel: '+rec['phone'] or '')) webnotes.conn.sql(""" - UPDATE `tabReceivable Voucher` SET + UPDATE `tabSales Invoice` SET customer_address = %s, address_display = %s WHERE name = %s @@ -383,7 +383,7 @@ def sync_receivable_voucher_customer_data(): data_rec = webnotes.conn.sql(""" SELECT t.name as id,t.customer, tc.name as contact_person, tc.first_name, tc.last_name, tc.email_id, tc.phone as contact_phone, tc.mobile_no, tc.department, tc.designation - FROM `tabReceivable Voucher` t, tabContact tc + FROM `tabSales Invoice` t, tabContact tc WHERE t.customer = tc.customer AND t.docstatus !=2 ORDER BY t.name @@ -393,7 +393,7 @@ def sync_receivable_voucher_customer_data(): contact_display = (rec['first_name'] and rec['first_name'] or '') + (rec['last_name'] and ' ' + rec['last_name'] or '') webnotes.conn.sql(""" - UPDATE `tabReceivable Voucher` SET + UPDATE `tabSales Invoice` SET contact_person = %s, contact_mobile = %s, contact_email = %s, @@ -406,7 +406,7 @@ def sync_payable_voucher_supplier_data(): data_rec = webnotes.conn.sql(""" SELECT t.name as id,t.supplier, ta.name as supplier_address, ta.address_line1, ta.address_line2, ta.city, ta.country, ta.pincode, ta.state, ta.phone - FROM `tabPayable Voucher` t, tabAddress ta + FROM `tabPurchase Invoice` t, tabAddress ta WHERE t.supplier = ta.supplier AND t.docstatus !=2 ORDER BY t.name @@ -416,7 +416,7 @@ def sync_payable_voucher_supplier_data(): address_display = cstr((rec['address_line1'] and rec['address_line1'] or '')) + cstr((rec['address_line2'] and '\n' + rec['address_line2'] or '')) + cstr((rec['city'] and '\n'+rec['city'] or '')) + cstr((rec['pincode'] and ', ' + rec['pincode'] or '')) + cstr((rec['state'] and '\n'+rec['state']+', ' or '')) + cstr((rec['country'] and rec['country'] or '')) + '\n' + cstr((rec['phone'] and 'Tel: '+rec['phone'] or '')) webnotes.conn.sql(""" - UPDATE `tabPayable Voucher` SET + UPDATE `tabPurchase Invoice` SET supplier_address = %s, address_display = %s WHERE name = %s @@ -425,7 +425,7 @@ def sync_payable_voucher_supplier_data(): data_rec = webnotes.conn.sql(""" SELECT t.name as id,t.supplier, tc.name as contact_person, tc.first_name, tc.last_name, tc.email_id, tc.phone as contact_phone, tc.mobile_no, tc.department, tc.designation - FROM `tabPayable Voucher` t, tabContact tc + FROM `tabPurchase Invoice` t, tabContact tc WHERE t.supplier = tc.supplier AND t.docstatus !=2 ORDER BY t.name @@ -435,7 +435,7 @@ def sync_payable_voucher_supplier_data(): contact_display = (rec['first_name'] and rec['first_name'] or '') + (rec['last_name'] and ' ' + rec['last_name'] or '') webnotes.conn.sql(""" - UPDATE `tabPayable Voucher` SET + UPDATE `tabPurchase Invoice` SET contact_person = %s, contact_mobile = %s, contact_email = %s, diff --git a/erpnext/patches/old_patches/feed_patch.py b/erpnext/patches/old_patches/feed_patch.py index d1fa147dbf6..3cc13b5e066 100644 --- a/erpnext/patches/old_patches/feed_patch.py +++ b/erpnext/patches/old_patches/feed_patch.py @@ -25,25 +25,25 @@ def set_subjects_and_tagfields(): 'Supplier':' ', 'Lead':'%(lead_name)s from %(company_name)s | To Discuss: %(to_discuss)s', 'Quotation':'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s', - 'Enquiry':'To %(customer_name)s%(lead_name)s on %(transaction_date)s', + 'Opportunity':'To %(customer_name)s%(lead_name)s on %(transaction_date)s', 'Sales Order':'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed', 'Delivery Note':'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed', - 'Indent':'%(per_ordered)s% ordered', + 'Purchase Request':'%(per_ordered)s% ordered', 'Purchase Order':'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered', 'Purchase Receipt':'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s', - 'Receivable Voucher':'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding', - 'Payable Voucher':'From %(supplier_name)s due on %(due_date)s | %(outstanding_amount)s outstanding', + 'Sales Invoice':'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding', + 'Purchase Invoice':'From %(supplier_name)s due on %(due_date)s | %(outstanding_amount)s outstanding', 'Journal Voucher':' ', 'Serial No':'%(item_code)s', 'Project':' ', - 'Ticket':'%(subject)s', + 'Task':'%(subject)s', 'Timesheet':'%(owner)s', 'Support Ticket':'%(problem_description)s', 'Installation Note':'At %(customer_name)s on %(inst_date)s', 'Maintenance Visit':'To %(customer_name)s on %(mntc_date)s', 'Customer Issue':'%(complaint)s By %(complaint_raised_by)s on %(issue_date)s', 'Employee':'%(employee_name)s', - 'Expense Voucher':'From %(employee_name)s for %(total_claimed_amount)s (claimed)', + 'Expense Claim':'From %(employee_name)s for %(total_claimed_amount)s (claimed)', 'Appraisal':'', 'Leave Application':'From %(employee_name)s, %(designation)s', 'Salary Structure':'For %(employee_name)s', @@ -58,25 +58,25 @@ def set_subjects_and_tagfields(): 'Supplier':'supplier_type', 'Lead':'status,source', 'Quotation':'status', - 'Enquiry':'', + 'Opportunity':'', 'Sales Order':'status', 'Delivery Note':'', - 'Indent':'', + 'Purchase Request':'', 'Purchase Order':'', 'Purchase Receipt':'', - 'Receivable Voucher':'', - 'Payable Voucher':'', + 'Sales Invoice':'', + 'Purchase Invoice':'', 'Journal Voucher':'voucher_type', 'Serial No':'status', 'Project':'status', - 'Ticket':'status', + 'Task':'status', 'Timesheet':'', 'Support Ticket':'', 'Installation Note':'', 'Maintenance Visit':'completion_status,maintenance_type', 'Customer Issue':'status', 'Employee':'status', - 'Expense Voucher':'approval_status', + 'Expense Claim':'approval_status', 'Appraisal':'', 'Leave Application':'leave_type', 'Salary Structure':'', diff --git a/erpnext/patches/old_patches/patch_1.py b/erpnext/patches/old_patches/patch_1.py index 9e9cb6f1a24..a1393338b8c 100644 --- a/erpnext/patches/old_patches/patch_1.py +++ b/erpnext/patches/old_patches/patch_1.py @@ -110,7 +110,7 @@ elif patch_no == 48: elif patch_no == 49: webnotes.conn.sql("update tabDocType set autoname = '' where name = 'Search Criteria'") elif patch_no == 50: - sql("update tabDocField set in_filter = 1 where fieldname in ('cost_center', 'income_account', 'Item Group') and parent = 'RV Detail'") + sql("update tabDocField set in_filter = 1 where fieldname in ('cost_center', 'income_account', 'Item Group') and parent = 'Sales Invoice Item'") elif patch_no == 51: sql("update tabDocField set options = 'link:Print Heading' where fieldtype = 'Select' and fieldname = 'select_print_heading' and parent = 'POS Setting'") elif patch_no == 52: @@ -140,10 +140,10 @@ elif patch_no == 58: # insert new module items from webnotes.model.doc import make_autoname - if not sql("select name from `tabModule Def Item` where parent='Projects' and doc_name='Ticket'"): + if not sql("select name from `tabModule Def Item` where parent='Projects' and doc_name='Task'"): sql("""insert into `tabModule Def Item` (name, parent, parenttype, parentfield, docstatus, doc_type, doc_name, display_name, idx) values - (%s, 'Projects', 'Module Def', 'items', 0, 'Forms', 'Ticket', 'Task', 1)""", make_autoname('MDI.#####')) + (%s, 'Projects', 'Module Def', 'items', 0, 'Forms', 'Task', 'Task', 1)""", make_autoname('MDI.#####')) if not sql("select name from `tabModule Def Item` where parent='Projects' and doc_name='Timesheet'"): sql("""insert into `tabModule Def Item` @@ -168,11 +168,11 @@ elif patch_no == 62: # Adding Status Filter sql("update tabDocType set search_fields = concat('status,',search_fields) where name IN ('Delivery Note','Leave Transaction')") - # Import Other Charges + # Import Sales Taxes and Charges Master import_from_files(record_list=[['setup','doctype','other_charges']]) elif patch_no == 63: - sql("update `tabDocField` set permlevel = 1 where fieldname in ('return_date', 'return_details') and parent = 'Sales and Purchase Return Wizard'") + sql("update `tabDocField` set permlevel = 1 where fieldname in ('return_date', 'return_details') and parent = 'Sales and Purchase Return Tool'") import_from_files(record_list = [['accounts', 'doctype', 'rv_detail'], ['material_management', 'doctype', 'sales_and_purchase_return_wizard'], ['material_management', 'doctype', 'stock_entry']]) elif patch_no == 64: @@ -192,7 +192,7 @@ elif patch_no == 66: from webnotes.session_cache import clear_cache clear_cache(webnotes.session['user']) elif patch_no == 67: - sql("update `tabDocField` set in_filter = 1 where fieldname = 'brand' and parent = 'RV Detail'") + sql("update `tabDocField` set in_filter = 1 where fieldname = 'brand' and parent = 'Sales Invoice Item'") sql("delete from `tabModule Def Item` where (display_name = 'Sales Invoice' and parent = 'CRM') or (display_name = 'Purchase Invoice' and parent = 'SRM')") elif patch_no == 68: from webnotes.modules.import_module import import_from_files @@ -232,7 +232,7 @@ elif patch_no == 69: # map tables - tbl_list = ['Experience In Company Detail', 'Previous Experience Detail', 'Educational Qualifications Detail'] + tbl_list = ['Employee Internal Work History', 'Employee External Work History', 'Employee Education'] for t in tbl_list: sql("update `tab%s` t1, `tabEmployee Profile` t2 set t1.parent = t2.employee, t1.parenttype = 'Employee' where t1.parent = t2.name" % t) @@ -264,8 +264,8 @@ elif patch_no == 70: elif patch_no == 71: # Make Stock Qty and Conversion Factor field editable. Also no need to mention Conversion factor in table can do it directly - sql("update `tabDocField` set `permlevel` = 0, `width` = '100px', `trigger` = 'Client' where parent IN ('PO Detail','Purchase Receipt Detail') and fieldname in ('stock_qty','conversion_factor')") - sql("update `tabDocField` set `width` = '100px' where parent IN ('PO Detail','Purchase Receipt Detail') and fieldname = 'stock_uom'") + sql("update `tabDocField` set `permlevel` = 0, `width` = '100px', `trigger` = 'Client' where parent IN ('Purchase Order Item','Purchase Receipt Item') and fieldname in ('stock_qty','conversion_factor')") + sql("update `tabDocField` set `width` = '100px' where parent IN ('Purchase Order Item','Purchase Receipt Item') and fieldname = 'stock_uom'") elif patch_no == 72: # Core Patch @@ -304,16 +304,16 @@ elif patch_no == 76: p = get_obj('Patch Util') p.set_field_property('Salary Structure', 'is_active', 'default', 'Yes') p.set_field_property('Salary Structure', 'ctc', 'reqd', '1') - p.set_field_property('Earning Detail', 'modified_value', 'width', '') - p.set_field_property('Earning Detail', 'modified_value', 'trigger', 'Client') - p.set_field_property('Deduction Detail', 'd_modified_amt', 'width', '') - p.set_field_property('Earning Detail', 'd_modified_amt', 'trigger', 'Client') + p.set_field_property('Salary Structure Earning', 'modified_value', 'width', '') + p.set_field_property('Salary Structure Earning', 'modified_value', 'trigger', 'Client') + p.set_field_property('Salary Structure Deduction', 'd_modified_amt', 'width', '') + p.set_field_property('Salary Structure Earning', 'd_modified_amt', 'trigger', 'Client') sql("Update tabDocField set `description` = 'You can create more earning and deduction type from Setup --> HR' where label = 'Earning & Deduction' and parent = 'Salary Structure' and fieldtype = 'Section Break'") # delete sql("update `tabSalary Structure` set net_pay = total") sql("delete from tabDocField where label in ('LWP Help', 'Calculate Total', 'Total') and parent = 'Salary Structure'") - sql("delete from tabDocPerm where parent in ('Earning Detail', 'Deduction Detail')") + sql("delete from tabDocPerm where parent in ('Salary Structure Earning', 'Salary Structure Deduction')") # permission @@ -339,14 +339,14 @@ elif patch_no == 78: p.set_field_property('Salary Slip', 'bank_name', 'permlevel', '1') p.set_field_property('Salary Slip', 'leave_without_pay', 'permlevel', '0') p.set_field_property('Salary Slip', 'leave_without_pay', 'trigger', 'Client') - p.set_field_property('SS Earning Detail', 'e_type', 'permlevel', '0') - p.set_field_property('SS Earning Detail', 'e_type', 'fieldtype', 'Link') - p.set_field_property('SS Earning Detail', 'e_type', 'options', 'Earning Type') - p.set_field_property('SS Deduction Detail', 'd_type', 'permlevel', '0') - p.set_field_property('SS Deduction Detail', 'd_type', 'fieldtype', 'Link') - p.set_field_property('SS Deduction Detail', 'd_type', 'options', 'Deduction Type') - sql("update `tabSS Earning Detail` set e_modified_amount = e_amount") - sql("update `tabSS Deduction Detail` set d_modified_amount = d_amount") + p.set_field_property('Salary Slip Earning', 'e_type', 'permlevel', '0') + p.set_field_property('Salary Slip Earning', 'e_type', 'fieldtype', 'Link') + p.set_field_property('Salary Slip Earning', 'e_type', 'options', 'Earning Type') + p.set_field_property('Salary Slip Deduction', 'd_type', 'permlevel', '0') + p.set_field_property('Salary Slip Deduction', 'd_type', 'fieldtype', 'Link') + p.set_field_property('Salary Slip Deduction', 'd_type', 'options', 'Deduction Type') + sql("update `tabSalary Slip Earning` set e_modified_amount = e_amount") + sql("update `tabSalary Slip Deduction` set d_modified_amount = d_amount") # permission p.delete_permission('Salary Slip', 'Administrator', 0) @@ -358,8 +358,8 @@ elif patch_no == 79: import_from_files(record_list=[['hr','doctype','leave_application'],['hr','doctype','leave_allocation'],['hr','doctype','leave_control_panel'],['hr','doctype','holiday_list'],['hr','doctype','holiday_list_detail'],['hr','Module Def','HR']]) elif patch_no == 80: # Holiday List - sql("update `tabHoliday List Detail` set description = holiday_name") - sql("delete from tabDocField where parent = 'Holiday List Detail' and fieldname = 'holiday_name'") + sql("update `tabHoliday` set description = holiday_name") + sql("delete from tabDocField where parent = 'Holiday' and fieldname = 'holiday_name'") sql("update tabDocField set fieldtype = 'Select', options = 'link:Fiscal Year' where parent = 'Holiday List' and fieldname = 'fiscal_year'") sql("delete from tabDocPerm where role in ('Administrator','HR User') and parent = 'Holiday List'") @@ -422,8 +422,8 @@ elif patch_no == 83: webnotes.conn.sql("set foreign_key_checks=1") elif patch_no == 84: p = get_obj('Patch Util') - p.set_field_property('SS Earning Detail', 'e_amount', 'permlevel', '1') - p.set_field_property('SS Deduction Detail', 'd_amount', 'permlevel', '1') + p.set_field_property('Salary Slip Earning', 'e_amount', 'permlevel', '1') + p.set_field_property('Salary Slip Deduction', 'd_amount', 'permlevel', '1') elif patch_no == 85: # permission p = get_obj('Patch Util') @@ -451,16 +451,16 @@ elif patch_no == 91: webnotes.conn.set_global("system_message", """

System Updates

Based on user feedback, we have cleaned up HR module (Partly):
  • Employee and Employee Profile are merged into a single document
  • Salary Structure and Salary Slip are now more user friendly
  • Leave Transaction document is now divided into 2 documents Leave Application and Leave Allocation
We will work on Reports, Attendance and other documents of Payroll module next week

Do send us your feedback!""") webnotes.conn.set_global("system_message_id", "5") elif patch_no == 92: - sql("update tabDocField set label = 'Get Charges' where parent IN ('Sales Order','Delivery Note','Receivable Voucher') and label = 'Get Other Charges' and fieldtype = 'Button'") + sql("update tabDocField set label = 'Get Charges' where parent IN ('Sales Order','Delivery Note','Sales Invoice') and label = 'Get Other Charges' and fieldtype = 'Button'") # Automated Other Charges Calculation basis - sql("update tabDocField set options = '', `trigger` = 'Client' where parent IN ('Quotation','Sales Order','Delivery Note','Receivable Voucher') and label = 'Get Charges' and fieldtype = 'Button'") + sql("update tabDocField set options = '', `trigger` = 'Client' where parent IN ('Quotation','Sales Order','Delivery Note','Sales Invoice') and label = 'Get Charges' and fieldtype = 'Button'") elif patch_no == 93: - sql("update `tabTable Mapper Detail` set validation_logic = 'qty > ifnull(billed_qty,0) and docstatus = 1' where parent = 'Sales Order-Receivable Voucher' and from_table = 'Sales Order Detail'") - sql("update `tabField Mapper Detail` set from_field = 'customer' where to_field = 'customer' and parent = 'Sales Order-Receivable Voucher'") + sql("update `tabTable Mapper Detail` set validation_logic = 'qty > ifnull(billed_qty,0) and docstatus = 1' where parent = 'Sales Order-Sales Invoice' and from_table = 'Sales Order Item'") + sql("update `tabField Mapper Detail` set from_field = 'customer' where to_field = 'customer' and parent = 'Sales Order-Sales Invoice'") elif patch_no == 94: import_from_files(record_list=[['selling','doctype','sms_center']]) elif patch_no == 95: - import_from_files(record_list=[['mapper','DocType Mapper','Sales Order-Receivable Voucher'], ['mapper','DocType Mapper','Delivery Note-Receivable Voucher']]) + import_from_files(record_list=[['mapper','DocType Mapper','Sales Order-Sales Invoice'], ['mapper','DocType Mapper','Delivery Note-Sales Invoice']]) elif patch_no == 96: sql("delete from `tabModule Def Item` where doc_type = 'Reports' and display_name = 'Cenvat Credit - Input or Capital Goods' and parent = 'Accounts'") elif patch_no == 97: @@ -515,7 +515,7 @@ elif patch_no == 110: elif patch_no == 111: sql("update tabDocType set search_fields = 'transfer_date, from_warehouse, to_warehouse, purpose, remarks' where name = 'Stock Entry'") elif patch_no == 112: - sql("delete from tabDocField where label = 'Get Other Charges' and fieldtype = 'Button' and parent = 'Receivable Voucher'") + sql("delete from tabDocField where label = 'Get Other Charges' and fieldtype = 'Button' and parent = 'Sales Invoice'") elif patch_no == 113: sql("update tabDocField set reqd = 1 where parent = 'Customer' and fieldname = 'phone_1'") elif patch_no == 114: @@ -547,7 +547,7 @@ elif patch_no == 116: import_from_files(record_list = [['Projects', 'DocType', 'Timesheet Detail']]) elif patch_no == 117: op = '\n' + 'Walk In' - sql("update `tabDocField` set `options` = concat(options, %s) where parent = 'Enquiry' and fieldname = 'source' and options not like '%%Walk%%'", op) + sql("update `tabDocField` set `options` = concat(options, %s) where parent = 'Opportunity' and fieldname = 'source' and options not like '%%Walk%%'", op) elif patch_no == 118: from webnotes.utils import get_defaults ss = sql("select name, net_pay from `tabSalary Slip`") @@ -558,9 +558,9 @@ elif patch_no == 118: elif patch_no == 119: sql("update tabDocType set in_create = 1 where name = 'Profile'") elif patch_no == 120: - sql("update tabDocField set permlevel = 0 where parent = 'Sales and Purchase Return Wizard' and fieldname = 'return_date'") + sql("update tabDocField set permlevel = 0 where parent = 'Sales and Purchase Return Tool' and fieldname = 'return_date'") elif patch_no == 121: - import_from_files(record_list = [['CRM', 'DocType', 'Return Detail'], ['Material Management', 'DocType', 'Sales and Purchase Return Wizard']]) + import_from_files(record_list = [['CRM', 'DocType', 'Sales and Purchase Return Item'], ['Material Management', 'DocType', 'Sales and Purchase Return Tool']]) elif patch_no == 122: sql("delete from tabDocField where (fieldname = 'serial_no' or label = 'Warrany Status') and parent = 'Sales Order'") elif patch_no == 123: @@ -574,26 +574,26 @@ elif patch_no == 125: elif patch_no == 126: sql("delete from tabDocField where parent = 'Delivery Note' and label in ('Make Sales Invoice', 'Make Installation Note', 'Intro Note')") elif patch_no == 127: - sql("delete from tabDocPerm where role = 'All' and parent = 'Expense Voucher' and (permlevel = 0 or permlevel = 2)") + sql("delete from tabDocPerm where role = 'All' and parent = 'Expense Claim' and (permlevel = 0 or permlevel = 2)") p = get_obj('Patch Util') - p.add_permission('Expense Voucher', 'Employee', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1, match = 'owner') - p.add_permission('Expense Voucher', 'HR Manager', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1) - p.add_permission('Expense Voucher', 'HR User', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1) + p.add_permission('Expense Claim', 'Employee', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1, match = 'owner') + p.add_permission('Expense Claim', 'HR Manager', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1) + p.add_permission('Expense Claim', 'HR User', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1) elif patch_no == 128: from webnotes.modules import import_module import_module.import_from_files(record_list=[['selling','doctype','sales_order'], ['selling','doctype','sales_order_detail'], ['stock','doctype','delivery_note'], ['stock','doctype','delivery_note_detail']]) elif patch_no == 129: - sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Sales Order-Receivable Voucher' and from_table = 'Sales Order Detail' and to_table = 'RV Detail'") - sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Delivery Note-Receivable Voucher' and from_table = 'Delivery Note Detail' and to_table = 'RV Detail'") + sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Sales Order-Sales Invoice' and from_table = 'Sales Order Item' and to_table = 'Sales Invoice Item'") + sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Delivery Note-Sales Invoice' and from_table = 'Delivery Note Item' and to_table = 'Sales Invoice Item'") elif patch_no == 130: # update from rv from webnotes.model.code import get_obj from webnotes.utils import cstr - for d in sql("select name, docstatus from `tabReceivable Voucher` where ifnull(docstatus,0) != 0"): + for d in sql("select name, docstatus from `tabSales Invoice` where ifnull(docstatus,0) != 0"): sql("COMMIT") sql("START TRANSACTION") try: - obj = get_obj('Receivable Voucher', cstr(d[0]), with_children = 1) + obj = get_obj('Sales Invoice', cstr(d[0]), with_children = 1) is_submit = 1 if cint(d[1]) == 2: is_submit = 0 get_obj('Sales Common').update_prevdoc_detail(is_submit, obj) @@ -615,17 +615,17 @@ elif patch_no == 130: pass sql("COMMIT") elif patch_no == 131: - sql("update `tabDocType` set allow_trash = 1 where name = 'Purchase Other Charges'") - sql("update tabDocPerm set `cancel` = 1 where parent = 'Purchase Other Charges' and permlevel = 0 and `read` = 1 and `write` = 1") + sql("update `tabDocType` set allow_trash = 1 where name = 'Purchase Taxes and Charges Master'") + sql("update tabDocPerm set `cancel` = 1 where parent = 'Purchase Taxes and Charges Master' and permlevel = 0 and `read` = 1 and `write` = 1") elif patch_no == 132: - sql("update tabDocField set no_copy = 0 where parent = 'Receivable Voucher' and fieldname = 'customer'") + sql("update tabDocField set no_copy = 0 where parent = 'Sales Invoice' and fieldname = 'customer'") elif patch_no == 133: from webnotes.modules import import_module import_module.import_from_files(record_list=[['accounts','doctype','receivable_voucher']]) elif patch_no == 134: - sql("update tabDocField set no_copy = 1 where parent = 'Receivable Voucher' and fieldname = 'posting_time'") + sql("update tabDocField set no_copy = 1 where parent = 'Sales Invoice' and fieldname = 'posting_time'") elif patch_no == 135: - sql("update tabDocField set `default` = 'Today' where parent = 'Receivable Voucher' and fieldname = 'due_date'") + sql("update tabDocField set `default` = 'Today' where parent = 'Sales Invoice' and fieldname = 'due_date'") elif patch_no == 136: from webnotes.modules import import_module import_module.import_from_files(record_list=[['accounts','doctype','rv_detail']]) @@ -636,7 +636,7 @@ elif patch_no == 138: sql("update `tabDocType` set allow_attach = 1 where name = 'Price List'") elif patch_no == 139: from webnotes.modules import import_module - import_module.import_from_files(record_list=[['mapper','DocType Mapper','Sales Order-Receivable Voucher'], ['mapper','DocType Mapper','Delivery Note-Receivable Voucher']]) + import_module.import_from_files(record_list=[['mapper','DocType Mapper','Sales Order-Sales Invoice'], ['mapper','DocType Mapper','Delivery Note-Sales Invoice']]) elif patch_no == 140: from webnotes.modules import import_module import_module.import_from_files(record_list=[['accounts','doctype','rv_detail']]) @@ -660,7 +660,7 @@ elif patch_no == 145: elif patch_no == 146: import_from_files(record_list=[['accounts','doctype','account']]) elif patch_no == 147: - import_from_files(record_list=[['mapper', 'DocType Mapper', 'Purchase Order-Payable Voucher'], ['mapper', 'DocType Mapper', 'Purchase Receipt-Payable Voucher'], ['mapper', 'DocType Mapper', 'Purchase Order-Purchase Receipt']]) + import_from_files(record_list=[['mapper', 'DocType Mapper', 'Purchase Order-Purchase Invoice'], ['mapper', 'DocType Mapper', 'Purchase Receipt-Purchase Invoice'], ['mapper', 'DocType Mapper', 'Purchase Order-Purchase Receipt']]) elif patch_no == 148: sql("delete from `tabDocField` where (fieldname = 'account_balances' or label = 'Balances') and parent = 'Account'") sql("update tabDocType set istable = 0, section_style = 'Simple', search_fields = 'account, period, fiscal_year, balance' where name = 'Account Balance'") @@ -700,8 +700,8 @@ elif patch_no == 158: elif patch_no == 159: sql("update tabAccount set account_type = 'Chargeable' where account_name in ('Advertising and Publicity', 'Freight & Forwarding Charges', 'Miscellaneous Expenses', 'Sales Promotion Expenses')") elif patch_no == 160: - sql("update `tabDocType` set search_fields = 'posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount' where name = 'Receivable Voucher'") - sql("update `tabDocType` set search_fields = 'posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount' where name = 'Payable Voucher'") + sql("update `tabDocType` set search_fields = 'posting_date, due_date, debit_to, fiscal_year, grand_total, outstanding_amount' where name = 'Sales Invoice'") + sql("update `tabDocType` set search_fields = 'posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount' where name = 'Purchase Invoice'") elif patch_no == 161: sql("update tabDocType set autoname = 'field:batch_id' where name = 'Batch'") sql("update tabDocField set no_copy = 1 where parent = 'Batch' and fieldname = 'batch_id'") @@ -724,7 +724,7 @@ elif patch_no == 168: elif patch_no == 169: import_from_files(record_list=[['accounts', 'doctype', 'pv_detail'], ['accounts', 'doctype', 'rv_detail']]) elif patch_no == 170: - import_from_files(record_list=[['mapper', 'DocType Mapper', 'Delivery Note-Receivable Voucher']]) + import_from_files(record_list=[['mapper', 'DocType Mapper', 'Delivery Note-Sales Invoice']]) elif patch_no == 171: import_from_files(record_list=[['buying', 'doctype', 'supplier']]) elif patch_no == 172: @@ -735,9 +735,9 @@ elif patch_no == 173: sql("delete from tabDocField where label = 'Get Other Charges' and parent = 'Delivery Note'") sql("update tabDocField set reqd = 0 where fieldname = 'posting_time' and parent = 'Serial No'") elif patch_no == 174: - c = sql("select count(name) from `tabField Mapper Detail` where parent = 'Delivery Note-Receivable Voucher' and from_field = 'description' and to_field = 'description' and match_id = 2") + c = sql("select count(name) from `tabField Mapper Detail` where parent = 'Delivery Note-Sales Invoice' and from_field = 'description' and to_field = 'description' and match_id = 2") if c and cint(c[0][0]) > 1: - sql("update `tabField Mapper Detail` set match_id = 1 where parent = 'Delivery Note-Receivable Voucher' and from_field = 'description' and to_field = 'description' limit 1") + sql("update `tabField Mapper Detail` set match_id = 1 where parent = 'Delivery Note-Sales Invoice' and from_field = 'description' and to_field = 'description' limit 1") elif patch_no == 175: import webnotes webnotes.conn.set_global("system_message", """If your financial year starts on 1st April then you have make some changes in the system to start entry in the new year.
We have made some guidelines regarding the basic steps you should follow. Please click on link How to start Entries in the New Fiscal Year in ERPNext?""") @@ -762,7 +762,7 @@ elif patch_no == 181: elif patch_no == 182: sql("update tabDocField set options = CONCAT(options, '\nWrite Off Voucher') where fieldname = 'voucher_type' and parent = 'Journal Voucher'") elif patch_no == 183: - sql("delete from tabDocField where label = 'SMS' and fieldtype = 'Section Break' and parent in ('Enquiry', 'Lead', 'Sales Order', 'Delivery Note')") + sql("delete from tabDocField where label = 'SMS' and fieldtype = 'Section Break' and parent in ('Opportunity', 'Lead', 'Sales Order', 'Delivery Note')") elif patch_no == 184: from webnotes.model import delete_doc delete_doc('DocType', 'Feed') @@ -789,11 +789,11 @@ elif patch_no==186: from webnotes.modules import reload_doc reload_doc('event_updates','doctype','feed') elif patch_no == 187: - sql("update tabDocType set autoname = '' where name = 'QA Inspection Report'") + sql("update tabDocType set autoname = '' where name = 'Quality Inspection'") elif patch_no == 188: import_from_files(record_list = [['buying', 'doctype', 'qa_inspection_report']]) elif patch_no == 189: - sql("update `tabDocField` set allow_on_submit = 1 where fieldname in ('entries', 'other_charges') and parent = 'Receivable Voucher'") + sql("update `tabDocField` set allow_on_submit = 1 where fieldname in ('entries', 'other_charges') and parent = 'Sales Invoice'") elif patch_no == 190: sql("update tabDocField set permlevel=0 where fieldname = 'fiscal_year' and parent = 'Stock Entry'") elif patch_no == 191: @@ -815,9 +815,9 @@ elif patch_no == 197: sql("update `tabDocField` set permlevel = 0, in_filter = 1 where fieldname = 'warranty_amc_status' and parent = 'Customer Issue'") import_from_files(record_list = [['support', 'doctype', 'customer_issue']]) elif patch_no == 198: - sql("delete from `tabDocField` where (label in ('SMS', 'Send SMS') or fieldname in ('message', 'customer_mobile_no')) and parent in ('Quoattion', 'Sales Order', 'Delivery Note', 'Receivable Voucher')") + sql("delete from `tabDocField` where (label in ('SMS', 'Send SMS') or fieldname in ('message', 'customer_mobile_no')) and parent in ('Quoattion', 'Sales Order', 'Delivery Note', 'Sales Invoice')") sql("delete from `tabDocField` where label in ('SMS', 'Send SMS') and parent = 'Purchase Order'") - sql("delete from `tabDocField` where (label in ('Send SMS', 'SMS Html') or fieldname in ('sms_message', 'lead_sms_detail', 'enquiry_sms_detail')) and parent in ('Lead', 'Enquiry')") + sql("delete from `tabDocField` where (label in ('Send SMS', 'SMS Html') or fieldname in ('sms_message', 'lead_sms_detail', 'enquiry_sms_detail')) and parent in ('Lead', 'Opportunity')") from webnotes.model import delete_doc delete_doc('DocType', 'Lead SMS Detail') delete_doc('DocType', 'Enquiry SMS Detail') @@ -846,7 +846,7 @@ elif patch_no == 207: import_from_files(record_list = [['setup', 'doctype', 'company']]) elif patch_no == 208: sql("delete from `tabDocField` where (label in ('SMS', 'Send SMS') or fieldname in ('message', 'customer_mobile_no')) and parent ='Quotation'") - default_currency = get_obj('Manage Account').doc.default_currency + default_currency = get_obj('Global Defaults').doc.default_currency sql("update tabCompany set default_currency = '%s'" % default_currency) elif patch_no == 209: import_from_files(record_list = [['setup', 'doctype', 'company']]) @@ -869,7 +869,7 @@ elif patch_no == 216: import_from_files(record_list = [['stock', 'doctype', 'serial_no'], ['stock', 'doctype', 'stock_ledger_entry']]) elif patch_no == 217: sql("update tabDocField set options = '\nIn Store\nDelivered\nNot in Use' where fieldname = 'status' and parent = 'Serial No'") - sql("update tabDocField set no_copy = 1 where fieldname = 'serial_no' and parent = 'Delivery Note Detail'") + sql("update tabDocField set no_copy = 1 where fieldname = 'serial_no' and parent = 'Delivery Note Item'") sql("update tabDocField set no_copy = 1 where fieldname = 'serial_no' and parent = 'Stock Entry Detail'") elif patch_no == 218: for d in sql("select name from `tabSerial No`"): @@ -895,7 +895,7 @@ elif patch_no == 220: elif patch_no == 221: sql("update tabDocField set reqd = 1 where fieldname in ('purchase_rate', 'warehouse') and parent = 'Serial No'") elif patch_no == 222: - sql("update tabDocField set options = '\nDelivery Note\nReceivable Voucher\nStock Entry' where fieldname = 'delivery_document_type' and parent = 'Serial No'") + sql("update tabDocField set options = '\nDelivery Note\nSales Invoice\nStock Entry' where fieldname = 'delivery_document_type' and parent = 'Serial No'") elif patch_no == 223: sql("update tabDocField set hidden = 0 where fieldname in ('pay_to_recd_from', 'total_amount', 'total_amount_in_words') and parent = 'Journal Voucher'") sql("update tabDocField set permlevel = 0 where fieldname = 'pay_to_recd_from' and parent = 'Journal Voucher'") @@ -921,16 +921,16 @@ elif patch_no == 229: elif patch_no == 230: reload_doc('buying', 'doctype', 'indent') reload_doc('buying', 'doctype', 'indent_detail') - reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Indent') + reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Purchase Request') elif patch_no == 231: - reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Indent') + reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Purchase Request') elif patch_no == 232: - sql("update `tabDocField` set options = 'Sales Order' where fieldname = 'sales_order_no' and parent = 'Indent'") + sql("update `tabDocField` set options = 'Sales Order' where fieldname = 'sales_order_no' and parent = 'Purchase Request'") elif patch_no == 233: - reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Receivable Voucher') - reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Receivable Voucher') + reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Sales Invoice') + reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Sales Invoice') elif patch_no == 234: - sql("update `tabTable Mapper Detail` set validation_logic = 'docstatus=1' where parent = 'Sales Order-Indent' and from_table = 'Sales Order Detail'") + sql("update `tabTable Mapper Detail` set validation_logic = 'docstatus=1' where parent = 'Sales Order-Purchase Request' and from_table = 'Sales Order Item'") elif patch_no == 235: for sc in sql("""select name from `tabSearch Criteria` where ifnull(name,'') like 'srch%' or ifnull(name,'') like '%stdsrch'"""): @@ -943,7 +943,7 @@ elif patch_no == 236: # warehouse not mandatory for delivered serial nos sql("update tabDocField set reqd=0 where parent='Serial No' and fieldname='warehouse'") elif patch_no == 237: - sql("update tabDocField set depends_on = 'eval:doc.is_pos==1' where fieldname = 'cash_bank_account' and parent = 'Receivable Voucher'") + sql("update tabDocField set depends_on = 'eval:doc.is_pos==1' where fieldname = 'cash_bank_account' and parent = 'Sales Invoice'") elif patch_no == 238: reload_doc('accounts', 'doctype', 'receivable_voucher') reload_doc('accounts', 'GL Mapper', 'POS with write off') @@ -1007,15 +1007,15 @@ elif patch_no == 253: reload_doc('accounts', 'Module Def', 'Accounts') from webnotes.model.db_schema import updatedb - updatedb('Ledger Balance Export') - updatedb('Ledger Detail') + updatedb('Multi Ledger Report') + updatedb('Multi Ledger Report Detail') elif patch_no == 254: reload_doc('setup', 'doctype', 'sms_settings') reload_doc('setup', 'doctype', 'static_parameter_detail') from webnotes.model.db_schema import updatedb updatedb('SMS Settings') - updatedb('Static Parameter Detail') + updatedb('SMS Parameter') elif patch_no == 255: from patches.old_patches.customer_address import run_old_data_sync_patch run_old_data_sync_patch() @@ -1029,18 +1029,18 @@ elif patch_no == 257: elif patch_no == 258: sql("update tabDocField set `default`=NULL where fieldname = 'naming_series'") elif patch_no == 259: - sql("update `tabQuotation Detail` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") - sql("update `tabSales Order Detail` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") - sql("update `tabRV Detail` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") - sql("update `tabDelivery Note Detail` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") + sql("update `tabQuotation Item` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") + sql("update `tabSales Order Item` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") + sql("update `tabSales Invoice Item` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") + sql("update `tabDelivery Note Item` set description = replace(description, 'http://46.4.50.84/v170-test/', '')") elif patch_no == 260: sql("update `tabLetter Head` set content = replace(content, 'http://46.4.50.84/v170/', '')") sql("update `tabSingles` set value = replace(value, 'http://46.4.50.84/v170/', '') where field in ('letter_head', 'client_name') and doctype = 'Control Panel'") sql("update `tabItem` set description_html = replace(description_html, 'http://46.4.50.84/v170/', '')") - sql("update `tabQuotation Detail` set description = replace(description, 'http://46.4.50.84/v170/', '')") - sql("update `tabSales Order Detail` set description = replace(description, 'http://46.4.50.84/v170/', '')") - sql("update `tabRV Detail` set description = replace(description, 'http://46.4.50.84/v170/', '')") - sql("update `tabDelivery Note Detail` set description = replace(description, 'http://46.4.50.84/v170/', '')") + sql("update `tabQuotation Item` set description = replace(description, 'http://46.4.50.84/v170/', '')") + sql("update `tabSales Order Item` set description = replace(description, 'http://46.4.50.84/v170/', '')") + sql("update `tabSales Invoice Item` set description = replace(description, 'http://46.4.50.84/v170/', '')") + sql("update `tabDelivery Note Item` set description = replace(description, 'http://46.4.50.84/v170/', '')") elif patch_no == 261: sql("update `tabPrint Format` set html = replace(html, 'customer_address', 'address_display')") elif patch_no == 262: @@ -1116,7 +1116,7 @@ elif patch_no == 279: for d in rec: sql("update `tab%s` set docstatus = %s where name = '%s'" % (d[0], d[2]=='No' and 1 or 2, d[1])) - other_dt = ['Enquiry', 'Quotation', 'Sales Order', 'Indent', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note'] + other_dt = ['Opportunity', 'Quotation', 'Sales Order', 'Purchase Request', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note'] for dt in other_dt: rec = sql("select name, status from `tab%s` where modified >= '2011-06-15 01:00:00'" % dt) for r in rec: @@ -1129,7 +1129,7 @@ elif patch_no == 281: sql("update `tab%s` set status = 'Submitted' where docstatus = 1 and modified >='2011-06-15 01:00:00'" % dt) sql("update `tab%s` set status = 'Cancelled' where docstatus = 2 and modified >='2011-06-15 01:00:00'" % dt) elif patch_no == 282: - dt_list = ['Enquiry', 'Quotation', 'Sales Order', 'Indent', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note', 'Receivable Voucher', 'Payable Voucher', 'Delivery Note', 'Purchase Receipt', 'Journal Voucher', 'Stock Entry'] + dt_list = ['Opportunity', 'Quotation', 'Sales Order', 'Purchase Request', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note', 'Sales Invoice', 'Purchase Invoice', 'Delivery Note', 'Purchase Receipt', 'Journal Voucher', 'Stock Entry'] for d in dt_list: tbl = sql("select options from `tabDocField` where fieldtype = 'Table' and parent = '%s'" % d) for t in tbl: @@ -1149,7 +1149,7 @@ elif patch_no == 287: elif patch_no == 288: reload_doc('accounts', 'doctype', 'payable_voucher') elif patch_no == 289: - sql("update `tabDocType` set subject = 'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding' where name = 'Payable Voucher'") + sql("update `tabDocType` set subject = 'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding' where name = 'Purchase Invoice'") sql("update `tabDocType` set search_fields = 'status,transaction_date,customer,lead,order_type' where name = 'Quotation'") elif patch_no == 290: count = sql("""SELECT * FROM `tabModule Def` @@ -1187,7 +1187,7 @@ elif patch_no == 297: reload_doc('hr', 'doctype', 'salary_slip') elif patch_no == 298: sql("update `tabDocField` set options = 'link:Company' where parent = 'Attendance' and fieldname = 'company'") - sql("update `tabDocField` set options = 'link:Company' where parent = 'Expense Voucher' and fieldname = 'company'") + sql("update `tabDocField` set options = 'link:Company' where parent = 'Expense Claim' and fieldname = 'company'") sql("update `tabDocField` set options = 'link:Company' where parent = 'Appraisal' and fieldname = 'company'") elif patch_no == 299: sql("update `tabDocPerm` set `match` = NULL where parent = 'Employee' and role = 'Employee'") diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py index 5b9f7a0c471..c1fd28433b6 100644 --- a/erpnext/patches/patch.py +++ b/erpnext/patches/patch.py @@ -47,7 +47,7 @@ def execute(patch_no): elif patch_no == 306: sql("update `tabDocField` set options = '\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem' where parent = 'Rename Tool' and fieldname = 'select_doctype'") sql("update `tabDocField` set options = 'link:Item' where parent = 'Raw Materials Supplied' and fieldname = 'po_item'") - sql("update `tabDocField` set options = 'Sales Order' where parent = 'Indent Detail' and fieldname = 'sales_order_no'") + sql("update `tabDocField` set options = 'Sales Order' where parent = 'Purchase Request Item' and fieldname = 'sales_order_no'") sql("update `tabDocField` set options = 'link:Company', fieldtype = 'Select' where parent = 'Stock Ledger Entry' and fieldname = 'company'") reload_doc('utilities', 'doctype', 'rename_tool') elif patch_no == 307: @@ -74,7 +74,7 @@ def execute(patch_no): for d in rec: sql("update `tab%s` set docstatus = %s where name = '%s'" % (d[0], d[2]=='No' and 1 or 2, d[1])) - other_dt = ['Enquiry', 'Quotation', 'Sales Order', 'Indent', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note'] + other_dt = ['Opportunity', 'Quotation', 'Sales Order', 'Purchase Request', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note'] for dt in other_dt: rec = sql("select name, status from `tab%s` where modified >= '2011-07-06 10:00:00'" % dt) for r in rec: @@ -86,7 +86,7 @@ def execute(patch_no): sql("update `tab%s` set status = 'Submitted' where docstatus = 1 and modified >='2011-07-06 10:00:00'" % dt) sql("update `tab%s` set status = 'Cancelled' where docstatus = 2 and modified >='2011-07-06 10:00:00'" % dt) - dt_list = ['Enquiry', 'Quotation', 'Sales Order', 'Indent', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note', 'Receivable Voucher', 'Payable Voucher', 'Delivery Note', 'Purchase Receipt', 'Journal Voucher', 'Stock Entry'] + dt_list = ['Opportunity', 'Quotation', 'Sales Order', 'Purchase Request', 'Purchase Order', 'Production Order', 'Customer Issue', 'Installation Note', 'Sales Invoice', 'Purchase Invoice', 'Delivery Note', 'Purchase Receipt', 'Journal Voucher', 'Stock Entry'] for d in dt_list: tbl = sql("select options from `tabDocField` where fieldtype = 'Table' and parent = '%s'" % d) for t in tbl: @@ -221,21 +221,21 @@ def execute(patch_no): reload_doc('stock','doctype','delivery_note') # delete billed_qty field - sql("delete from `tabDocField` where fieldname = 'billed_qty' and parent in ('Sales Order Detail', 'Delivery Note Detail')") + sql("delete from `tabDocField` where fieldname = 'billed_qty' and parent in ('Sales Order Item', 'Delivery Note Item')") # update billed amt in item table in so and dn - sql(""" update `tabSales Order Detail` so - set billed_amt = (select sum(amount) from `tabRV Detail` where `so_detail`= so.name and docstatus=1 and parent not like 'old%%'), modified = now()""") + sql(""" update `tabSales Order Item` so + set billed_amt = (select sum(amount) from `tabSales Invoice Item` where `so_detail`= so.name and docstatus=1 and parent not like 'old%%'), modified = now()""") - sql(""" update `tabDelivery Note Detail` dn - set billed_amt = (select sum(amount) from `tabRV Detail` where `dn_detail`= dn.name and docstatus=1 and parent not like 'old%%'), modified = now()""") + sql(""" update `tabDelivery Note Item` dn + set billed_amt = (select sum(amount) from `tabSales Invoice Item` where `dn_detail`= dn.name and docstatus=1 and parent not like 'old%%'), modified = now()""") # calculate % billed based on item table sql(""" update `tabSales Order` so - set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabSales Order Detail` where parent = so.name), modified = now()""") + set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabSales Order Item` where parent = so.name), modified = now()""") sql(""" update `tabDelivery Note` dn - set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabDelivery Note Detail` where parent = dn.name), modified = now()""") + set per_billed = (select sum(if(amount > ifnull(billed_amt, 0), billed_amt, amount))/sum(amount)*100 from `tabDelivery Note Item` where parent = dn.name), modified = now()""") # update billing status based on % billed sql("""update `tabSales Order` set billing_status = if(ifnull(per_billed,0) < 0.001, 'Not Billed', @@ -314,7 +314,7 @@ def execute(patch_no): reload_doc('stock', 'doctype', 'delivery_note') reload_doc('stock', 'doctype', 'delivery_note_detail') elif patch_no == 355: - sql("update `tabDocField` set print_hide =1 where fieldname in ('pack_no', 'pack_gross_wt', 'weight_uom', 'pack_nett_wt') and parent = 'Delivery Note Detail'") + sql("update `tabDocField` set print_hide =1 where fieldname in ('pack_no', 'pack_gross_wt', 'weight_uom', 'pack_nett_wt') and parent = 'Delivery Note Item'") elif patch_no == 356: sql("update `tabDocField` set print_hide =1 where fieldname = 'print_packing_slip' and parent = 'Delivery Note'") elif patch_no == 357: @@ -348,7 +348,7 @@ def execute(patch_no): elif patch_no == 364: sql("""delete from `tabField Mapper Detail` where to_field in ('qty', 'amount', 'export_amount') - and parent in ('Sales Order-Receivable Voucher', 'Delivery Note-Receivable Voucher') + and parent in ('Sales Order-Sales Invoice', 'Delivery Note-Sales Invoice') """) mappers = sql("select name, module from `tabDocType Mapper`") for d in mappers: @@ -461,8 +461,8 @@ def execute(patch_no): reload_doc('accounts', 'doctype', 'ir_payment_detail') reload_doc('accounts', 'Module Def', 'Accounts') elif patch_no == 382: - if sql("select count(name) from `tabDocField` where label = 'Get Specification Details' and parent = 'QA Inspection Report' and fieldtype = 'Button'")[0][0] > 1: - sql("delete from `tabDocField` where label = 'Get Specification Details' and parent = 'QA Inspection Report' and fieldtype = 'Button' limit 1") + if sql("select count(name) from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button'")[0][0] > 1: + sql("delete from `tabDocField` where label = 'Get Specification Details' and parent = 'Quality Inspection' and fieldtype = 'Button' limit 1") elif patch_no == 383: reload_doc('accounts', 'doctype', 'cost_center') elif patch_no == 384: diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 9f33c66ecb2..a4a0ac726d1 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -28,7 +28,7 @@ patch_list = [ { 'patch_module': 'patches.jan_mar_2012', 'patch_file': 'rename_doctype_indent', - 'description': 'Add DocType Label: Indent to Purchase Requisition' + 'description': 'Add DocType Label: Purchase Request to Purchase Requisition' }, { 'patch_module': 'patches.jan_mar_2012', diff --git a/erpnext/production/DocType Mapper/Production Forecast-Production Plan/Production Forecast-Production Plan.txt b/erpnext/production/DocType Mapper/Production Forecast-Production Plan/Production Forecast-Production Plan.txt index 7065fa6ecc5..9dff4da819a 100644 --- a/erpnext/production/DocType Mapper/Production Forecast-Production Plan/Production Forecast-Production Plan.txt +++ b/erpnext/production/DocType Mapper/Production Forecast-Production Plan/Production Forecast-Production Plan.txt @@ -96,7 +96,7 @@ 'from_table': 'PF Detail', 'match_id': 1, 'to_field': 'pp_details', - 'to_table': 'PP Detail', + 'to_table': 'Production Plan Item', 'validation_logic': 'docstatus =1 and qty > planned_qty ' } ] \ No newline at end of file diff --git a/erpnext/production/DocType Mapper/Production Forecast-Production Planning Tool/Production Forecast-Production Planning Tool.txt b/erpnext/production/DocType Mapper/Production Forecast-Production Planning Tool/Production Forecast-Production Planning Tool.txt index 3d6281195d5..289fe677e95 100644 --- a/erpnext/production/DocType Mapper/Production Forecast-Production Planning Tool/Production Forecast-Production Planning Tool.txt +++ b/erpnext/production/DocType Mapper/Production Forecast-Production Planning Tool/Production Forecast-Production Planning Tool.txt @@ -89,7 +89,7 @@ 'from_table': 'PF Detail', 'match_id': 1, 'to_field': 'pp_details', - 'to_table': 'PP Detail', + 'to_table': 'Production Plan Item', 'validation_logic': 'docstatus =1 and qty > planned_qty ' } ] \ No newline at end of file diff --git a/erpnext/production/DocType Mapper/Sales Order-Production Plan/Sales Order-Production Plan.txt b/erpnext/production/DocType Mapper/Sales Order-Production Plan/Sales Order-Production Plan.txt index 780b841208d..95890dd609e 100644 --- a/erpnext/production/DocType Mapper/Sales Order-Production Plan/Sales Order-Production Plan.txt +++ b/erpnext/production/DocType Mapper/Sales Order-Production Plan/Sales Order-Production Plan.txt @@ -94,10 +94,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'packing_details', - 'from_table': 'Delivery Note Packing Detail', + 'from_table': 'Delivery Note Packing Item', 'match_id': 1, 'to_field': 'pp_details', - 'to_table': 'PP Detail', + 'to_table': 'Production Plan Item', 'validation_logic': 'docstatus =1 and qty > planned_qty' } ] \ No newline at end of file diff --git a/erpnext/production/Module Def/Production/Production.txt b/erpnext/production/Module Def/Production/Production.txt index 169acf555ea..50e9adce95f 100644 --- a/erpnext/production/Module Def/Production/Production.txt +++ b/erpnext/production/Module Def/Production/Production.txt @@ -30,8 +30,8 @@ 'click_function': None, 'creation': '2010-11-30 22:42:49', 'description': 'Bill of material master containing raw materials, operation and costs', - 'display_name': 'Bill Of Materials', - 'doc_name': 'Bill Of Materials', + 'display_name': 'BOM', + 'doc_name': 'BOM', 'doc_type': 'Forms', 'docstatus': 0, 'doctype': 'Module Def Item', @@ -199,7 +199,7 @@ 'creation': '2011-03-24 15:04:47', 'description': None, 'display_name': 'Delivery Plan', - 'doc_name': 'Sales Order Detail', + 'doc_name': 'Sales Order Item', 'doc_type': 'Reports', 'docstatus': 0, 'doctype': 'Module Def Item', @@ -261,8 +261,8 @@ 'click_function': None, 'creation': '2010-11-30 22:42:49', 'description': 'Bill of material master containing raw materials, operation and costs', - 'display_name': 'Bill Of Materials', - 'doc_name': 'Bill Of Materials', + 'display_name': 'BOM', + 'doc_name': 'BOM', 'doc_type': 'Forms', 'docstatus': 0, 'doctype': 'Module Def Item', @@ -430,7 +430,7 @@ 'creation': '2011-03-24 15:04:47', 'description': None, 'display_name': 'Delivery Plan', - 'doc_name': 'Sales Order Detail', + 'doc_name': 'Sales Order Item', 'doc_type': 'Reports', 'docstatus': 0, 'doctype': 'Module Def Item', diff --git a/erpnext/production/doctype/bom_material/__init__.py b/erpnext/production/doctype/bom/__init__.py similarity index 100% rename from erpnext/production/doctype/bom_material/__init__.py rename to erpnext/production/doctype/bom/__init__.py diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js b/erpnext/production/doctype/bom/bom.js similarity index 88% rename from erpnext/production/doctype/bill_of_materials/bill_of_materials.js rename to erpnext/production/doctype/bom/bom.js index ae611475388..15b972e2433 100644 --- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js +++ b/erpnext/production/doctype/bom/bom.js @@ -117,12 +117,12 @@ var calculate_op_cost = function(doc, dt, dn) { // Calculate Raw Material Cost var calculate_rm_cost = function(doc, dt, dn) { - var rm = getchildren('BOM Material', doc.name, 'bom_materials'); + var rm = getchildren('BOM Item', doc.name, 'bom_materials'); total_rm_cost = 0; for(var i=0;i count ): - boms = sql(" select %s from `tabBOM Material` where %s = '%s' " % (d[0], d[1], cstr(bom_list[count]))) + boms = sql(" select %s from `tabBOM Item` where %s = '%s' " % (d[0], d[1], cstr(bom_list[count]))) count = count + 1 for b in boms: if b[0] == self.doc.name: @@ -327,7 +327,7 @@ class DocType: "Add items to Flat BOM table" self.doc.clear_table(self.doclist, 'flat_bom_details', 1) for d in self.cur_flat_bom_items: - ch = addchild(self.doc, 'flat_bom_details', 'Flat BOM Detail', 1, self.doclist) + ch = addchild(self.doc, 'flat_bom_details', 'BOM Explosion Item', 1, self.doclist) for i in d.keys(): ch.fields[i] = d[i] ch.docstatus = is_submit @@ -340,7 +340,7 @@ class DocType: """ Add all items from Flat BOM of child BOM""" child_fb_items = sql("""select item_code, description, stock_uom, qty, rate, amount, parent_bom, mat_detail_no, qty_consumed_per_unit - from `tabFlat BOM Detail` where parent = '%s' and docstatus = 1""" % bom_no, as_dict = 1) + from `tabBOM Explosion Item` where parent = '%s' and docstatus = 1""" % bom_no, as_dict = 1) for d in child_fb_items: self.cur_flat_bom_items.append({ 'item_code' : d['item_code'], @@ -386,7 +386,7 @@ class DocType: def get_parent_bom_list(self, bom_no): - p_bom = sql("select parent from `tabBOM Material` where bom_no = '%s'" % bom_no) + p_bom = sql("select parent from `tabBOM Item` where bom_no = '%s'" % bom_no) return p_bom and [i[0] for i in p_bom] or [] @@ -397,7 +397,7 @@ class DocType: def on_cancel(self): # check if used in any other bom - par = sql("""select t1.parent from `tabBOM Material` t1, `tabBill Of Materials` t2 + par = sql("""select t1.parent from `tabBOM Item` t1, `tabBOM` t2 where t1.parent = t2.name and t1.bom_no = %s and t1.docstatus = 1 and t2.is_active = 'Yes'""", self.doc.name) if par: msgprint("BOM can not be cancelled, as it is a child item in following active BOM %s"% [d[0] for d in par]) diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.txt b/erpnext/production/doctype/bom/bom.txt similarity index 95% rename from erpnext/production/doctype/bill_of_materials/bill_of_materials.txt rename to erpnext/production/doctype/bom/bom.txt index 33492757dc6..646321efd49 100644 --- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.txt +++ b/erpnext/production/doctype/bom/bom.txt @@ -1,4 +1,4 @@ -# DocType, Bill Of Materials +# DocType, BOM [ # These values are common in all dictionaries @@ -44,7 +44,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Bill Of Materials', + 'parent': u'BOM', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -53,16 +53,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Bill Of Materials', + 'parent': u'BOM', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Bill Of Materials + # DocType, BOM { 'doctype': 'DocType', - 'name': u'Bill Of Materials' + 'name': u'BOM' }, # DocPerm @@ -194,7 +194,7 @@ # DocField { - 'description': u'Select name of the project if Bill Of Materials need to be created against any project', + 'description': u'Select name of the project if BOM need to be created against any project', 'doctype': u'DocField', 'fieldname': u'project_name', 'fieldtype': u'Link', @@ -303,10 +303,10 @@ 'doctype': u'DocField', 'fieldname': u'bom_materials', 'fieldtype': u'Table', - 'label': u'BOM Material', + 'label': u'BOM Item', 'oldfieldname': u'bom_materials', 'oldfieldtype': u'Table', - 'options': u'BOM Material', + 'options': u'BOM Item', 'permlevel': 0 }, @@ -414,11 +414,11 @@ 'fieldname': u'flat_bom_details', 'fieldtype': u'Table', 'hidden': 1, - 'label': u'Flat BOM Detail', + 'label': u'BOM Explosion Item', 'no_copy': 1, 'oldfieldname': u'flat_bom_details', 'oldfieldtype': u'Table', - 'options': u'Flat BOM Detail', + 'options': u'BOM Explosion Item', 'permlevel': 0, 'print_hide': 1 }, @@ -455,7 +455,7 @@ 'fieldtype': u'Link', 'label': u'Amended From', 'no_copy': 1, - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 } diff --git a/erpnext/production/doctype/bom_control/bom_control.py b/erpnext/production/doctype/bom_control/bom_control.py index d8a9e591135..8123fcc132b 100644 --- a/erpnext/production/doctype/bom_control/bom_control.py +++ b/erpnext/production/doctype/bom_control/bom_control.py @@ -44,7 +44,7 @@ class DocType: ret = sql("select name from `tabItem Group` ") item_group = [] for r in ret: - item =sql("select t1.name from `tabItem` t1, `tabBill Of Materials` t2 where t2.item = t1.name and t1.item_group = '%s' " % (r[0])) + item =sql("select t1.name from `tabItem` t1, `tabBOM` t2 where t2.item = t1.name and t1.item_group = '%s' " % (r[0])) if item and item[0][0]: item_group.append(r[0]) return '~~~'.join([r for r in item_group]) @@ -52,23 +52,23 @@ class DocType: def get_item_code(self,item_group): - """ here Bill Of Materials docstatus = 1 and is_active ='yes' condition is not given because some bom + """ here BOM docstatus = 1 and is_active ='yes' condition is not given because some bom is under construction that is it is still in saved mode and they want see till where they have reach. """ - ret = sql("select distinct t1.name from `tabItem` t1, `tabBill Of Materials` t2 where t2.item = t1.name and t1.item_group = '%s' " % (item_group)) + ret = sql("select distinct t1.name from `tabItem` t1, `tabBOM` t2 where t2.item = t1.name and t1.item_group = '%s' " % (item_group)) return '~~~'.join([r[0] for r in ret]) def get_bom_no(self,item_code): - ret = sql("select name from `tabBill Of Materials` where item = '%s' " % (item_code)) + ret = sql("select name from `tabBOM` where item = '%s' " % (item_code)) return '~~~'.join([r[0] for r in ret]) def get_operations(self,bom_no): ret = sql("select operation_no,opn_description,workstation,hour_rate,time_in_mins from `tabBOM Operation` where parent = %s", bom_no, as_dict = 1) - cost = sql("select dir_mat_as_per_mar , operating_cost , cost_as_per_mar from `tabBill Of Materials` where name = %s", bom_no, as_dict = 1) + cost = sql("select dir_mat_as_per_mar , operating_cost , cost_as_per_mar from `tabBOM` where name = %s", bom_no, as_dict = 1) # Validate the BOM ENTRIES reply = [] @@ -87,7 +87,7 @@ class DocType: def get_item_bom(self,data): data = eval(data) reply = [] - ret = sql("select item_code,description,bom_no,qty,scrap,stock_uom,value_as_per_mar,moving_avg_rate from `tabBOM Material` where parent = '%s' and operation_no = '%s'" % (data['bom_no'],data['op_no']), as_dict =1 ) + ret = sql("select item_code,description,bom_no,qty,scrap,stock_uom,value_as_per_mar,moving_avg_rate from `tabBOM Item` where parent = '%s' and operation_no = '%s'" % (data['bom_no'],data['op_no']), as_dict =1 ) for r in ret: item = sql("select is_manufactured_item, is_sub_contracted_item from `tabItem` where name = '%s'" % r['item_code'], as_dict=1) @@ -106,7 +106,7 @@ class DocType: main_bom_list = get_obj('Production Control').traverse_bom_tree( bom_no = bom_no, qty = 1, calculate_cost = 1) main_bom_list.reverse() for bom in main_bom_list: - bom_obj = get_obj('Bill Of Materials', bom, with_children = 1) + bom_obj = get_obj('BOM', bom, with_children = 1) bom_obj.calculate_cost() return 'calculated' @@ -115,7 +115,7 @@ class DocType: def get_bom_tree_list(self,args): arg = eval(args) i =[] - for a in sql("select t1.name from `tabBill Of Materials` t1, `tabItem` t2 where t2.item_group like '%s' and t1.item like '%s'"%(arg['item_group'] +'%',arg['item_code'] + '%')): + for a in sql("select t1.name from `tabBOM` t1, `tabItem` t2 where t2.item_group like '%s' and t1.item like '%s'"%(arg['item_group'] +'%',arg['item_code'] + '%')): if a[0] not in i: i.append(a[0]) return i diff --git a/erpnext/production/doctype/flat_bom_detail/__init__.py b/erpnext/production/doctype/bom_explosion_item/__init__.py similarity index 100% rename from erpnext/production/doctype/flat_bom_detail/__init__.py rename to erpnext/production/doctype/bom_explosion_item/__init__.py diff --git a/erpnext/production/doctype/flat_bom_detail/flat_bom_detail.txt b/erpnext/production/doctype/bom_explosion_item/bom_explosion_item.txt similarity index 95% rename from erpnext/production/doctype/flat_bom_detail/flat_bom_detail.txt rename to erpnext/production/doctype/bom_explosion_item/bom_explosion_item.txt index 6618d28d94d..1ba688f77ef 100644 --- a/erpnext/production/doctype/flat_bom_detail/flat_bom_detail.txt +++ b/erpnext/production/doctype/bom_explosion_item/bom_explosion_item.txt @@ -1,4 +1,4 @@ -# DocType, Flat BOM Detail +# DocType, BOM Explosion Item [ # These values are common in all dictionaries @@ -30,16 +30,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Flat BOM Detail', + 'parent': u'BOM Explosion Item', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Flat BOM Detail + # DocType, BOM Explosion Item { 'doctype': 'DocType', - 'name': u'Flat BOM Detail' + 'name': u'BOM Explosion Item' }, # DocField diff --git a/erpnext/production/doctype/pp_detail/__init__.py b/erpnext/production/doctype/bom_item/__init__.py similarity index 100% rename from erpnext/production/doctype/pp_detail/__init__.py rename to erpnext/production/doctype/bom_item/__init__.py diff --git a/erpnext/production/doctype/bom_material/bom_material.txt b/erpnext/production/doctype/bom_item/bom_item.txt similarity index 95% rename from erpnext/production/doctype/bom_material/bom_material.txt rename to erpnext/production/doctype/bom_item/bom_item.txt index 5345408fc2e..741de0e0307 100644 --- a/erpnext/production/doctype/bom_material/bom_material.txt +++ b/erpnext/production/doctype/bom_item/bom_item.txt @@ -1,4 +1,4 @@ -# DocType, BOM Material +# DocType, BOM Item [ # These values are common in all dictionaries @@ -28,7 +28,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'BOM Material', + 'parent': u'BOM Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -37,17 +37,17 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'BOM Material', + 'parent': u'BOM Item', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1, 'role': u'System Manager' }, - # DocType, BOM Material + # DocType, BOM Item { 'doctype': 'DocType', - 'name': u'BOM Material' + 'name': u'BOM Item' }, # DocPerm @@ -100,7 +100,7 @@ 'label': u'BOM No', 'oldfieldname': u'bom_no', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 0, 'reqd': 0, 'search_index': 1, diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js index 41cb17c6e09..efaf61f4e84 100644 --- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js +++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js @@ -17,11 +17,11 @@ // Get Query functions cur_frm.fields_dict['s_bom'].get_query = function(doc) { - return 'SELECT `tabBill Of Materials`.`name` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`docstatus` = 1 AND `tabBill Of Materials`.%(key)s LIKE "%s" ORDER BY `tabBill Of Materials`.`name` DESC LIMIT 50'; + return 'SELECT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`docstatus` = 1 AND `tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` DESC LIMIT 50'; } cur_frm.fields_dict['r_bom'].get_query = function(doc) { - return 'SELECT `tabBill Of Materials`.`name` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`docstatus` = 1 and `tabBill Of Materials`.%(key)s LIKE "%s" ORDER BY `tabBill Of Materials`.`name` DESC LIMIT 50'; + return 'SELECT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`docstatus` = 1 and `tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` DESC LIMIT 50'; } cur_frm.fields_dict['s_item'].get_query = function(doc) { diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py index c7ab0d3df63..31b147328e6 100644 --- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py +++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py @@ -39,12 +39,12 @@ class DocType: self.doclist = doclist def search_parent_bom_of_bom(self): - pbom = sql("select parent from `tabBOM Material` where bom_no = '%s' and docstatus = 1 " % self.doc.s_bom ) + pbom = sql("select parent from `tabBOM Item` where bom_no = '%s' and docstatus = 1 " % self.doc.s_bom ) self.doc.clear_table(self.doclist,'replace_bom_details', 1) self.add_to_replace_bom_utility_detail(pbom, 'replace_bom_details') def search_parent_bom_of_item(self): - pbom = sql("select parent from `tabBOM Material` where item_code = '%s' and (bom_no is NULL or bom_no = '') and docstatus =1" % self.doc.s_item ) + pbom = sql("select parent from `tabBOM Item` where item_code = '%s' and (bom_no is NULL or bom_no = '') and docstatus =1" % self.doc.s_item ) self.doc.clear_table(self.doclist,'replace_item_details', 1) self.add_to_replace_bom_utility_detail(pbom, 'replace_item_details') @@ -57,7 +57,7 @@ class DocType: def replace_bom(self): # validate r_bom - bom = sql("select name, is_active, docstatus from `tabBill Of Materials` where name = %s",self.doc.r_bom, as_dict =1) + bom = sql("select name, is_active, docstatus from `tabBOM` where name = %s",self.doc.r_bom, as_dict =1) if not bom: msgprint("Please Enter Valid BOM to replace with.") raise Exception @@ -69,7 +69,7 @@ class DocType: raise Exception # get item code of r_bom - item_code = cstr(sql("select item from `tabBill Of Materials` where name = '%s' " % self.doc.r_bom)[0][0]) + item_code = cstr(sql("select item from `tabBOM` where name = '%s' " % self.doc.r_bom)[0][0]) # call replace bom engine self.replace_bom_engine('replace_bom_details', 'bom_no', self.doc.s_bom, self.doc.r_bom, item_code) @@ -107,12 +107,12 @@ class DocType: # make copy if self.doc.create_new_bom: import webnotes.model.doc - new_bom_dl = copy_doclist(webnotes.model.doc.get('Bill Of Materials', d.parent_bom), no_copy = ['is_active', 'is_default', 'is_sub_assembly', 'remarks', 'flat_bom_details']) + new_bom_dl = copy_doclist(webnotes.model.doc.get('BOM', d.parent_bom), no_copy = ['is_active', 'is_default', 'is_sub_assembly', 'remarks', 'flat_bom_details']) new_bom_dl[0].docstatus = 0 new_bom_dl[0].save() else: - new_bom_dl = get_obj('Bill Of Materials', d.parent_bom, with_children = 1).doclist + new_bom_dl = get_obj('BOM', d.parent_bom, with_children = 1).doclist # replace s_data with r_data in Bom Material Detail Table self.replace_data_in_bom_materials(new_bom_dl, fname, s_data, r_data, item_code) @@ -121,7 +121,7 @@ class DocType: d.save() def update_docstatus(self): - sql("update `tabBill Of Materials` set docstatus = 0 where name = '%s' limit 1" % self.doc.bom) + sql("update `tabBOM` set docstatus = 0 where name = '%s' limit 1" % self.doc.bom) msgprint("Updated") def update_bom(self): @@ -132,7 +132,7 @@ class DocType: #msgprint(main_bom_list) for bom in main_bom_list: if bom and bom not in self.check_bom_list: - bom_obj = get_obj('Bill Of Materials', bom, with_children = 1) + bom_obj = get_obj('BOM', bom, with_children = 1) #print(bom_obj.doc.fields) bom_obj.validate() bom_obj.doc.docstatus = 1 diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.txt b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.txt index c20e61e6075..acfc9647971 100644 --- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.txt +++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.txt @@ -122,7 +122,7 @@ 'fieldname': u's_bom', 'fieldtype': u'Link', 'label': u'Select BOM', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'trigger': u'Client' }, @@ -169,7 +169,7 @@ 'fieldname': u'r_bom', 'fieldtype': u'Link', 'label': u'Replace Bom with', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'trigger': u'Client' }, @@ -341,7 +341,7 @@ 'fieldname': u'fg_bom_no', 'fieldtype': u'Link', 'label': u'FG BOM No', - 'options': u'Bill Of Materials' + 'options': u'BOM' }, # DocField @@ -368,7 +368,7 @@ 'fieldname': u'bom', 'fieldtype': u'Link', 'label': u'BOM', - 'options': u'Bill Of Materials' + 'options': u'BOM' }, # DocField diff --git a/erpnext/production/doctype/bom_replace_utility_detail/bom_replace_utility_detail.txt b/erpnext/production/doctype/bom_replace_utility_detail/bom_replace_utility_detail.txt index 7f21ac6f444..a001555b89b 100644 --- a/erpnext/production/doctype/bom_replace_utility_detail/bom_replace_utility_detail.txt +++ b/erpnext/production/doctype/bom_replace_utility_detail/bom_replace_utility_detail.txt @@ -70,7 +70,7 @@ 'label': u'Parent BOM', 'oldfieldname': u'parent_bom', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 1, 'reqd': 1 }, @@ -94,7 +94,7 @@ 'label': u'BOM Created', 'oldfieldname': u'bom_created', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 1, 'search_index': 0 } diff --git a/erpnext/production/doctype/pf_detail/pf_detail.txt b/erpnext/production/doctype/pf_detail/pf_detail.txt index 853d9d82a76..c222604244e 100644 --- a/erpnext/production/doctype/pf_detail/pf_detail.txt +++ b/erpnext/production/doctype/pf_detail/pf_detail.txt @@ -223,7 +223,7 @@ 'fieldtype': u'Link', 'label': u'Amended From', 'no_copy': 1, - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 } diff --git a/erpnext/production/doctype/production_control/production_control.py b/erpnext/production/doctype/production_control/production_control.py index c051d1efe8a..6afd6ae607e 100644 --- a/erpnext/production/doctype/production_control/production_control.py +++ b/erpnext/production/doctype/production_control/production_control.py @@ -46,7 +46,7 @@ class DocType: count, bom_list, qty_list = 0, [bom_no], [qty] while (count < len(bom_list)): # get child items from BOM MAterial Table. - child_items = sql("select item_code, bom_no, qty, qty_consumed_per_unit from `tabBOM Material` where parent = %s", bom_list[count], as_dict = 1) + child_items = sql("select item_code, bom_no, qty, qty_consumed_per_unit from `tabBOM Item` where parent = %s", bom_list[count], as_dict = 1) child_items = child_items and child_items or [] for item in child_items: # Calculate qty required for FG's qty. @@ -106,7 +106,7 @@ class DocType: # run calculate cost and get for bom in main_bom_list: if bom and bom not in self.check_bom_list: - bom_obj = get_obj('Bill Of Materials', bom, with_children = 1) + bom_obj = get_obj('BOM', bom, with_children = 1) bom_obj.doc.save() bom_obj.check_recursion() bom_obj.update_flat_bom_engine() diff --git a/erpnext/production/doctype/production_order/production_order.js b/erpnext/production/doctype/production_order/production_order.js index 227f3ca470d..6ac70652ae3 100644 --- a/erpnext/production/doctype/production_order/production_order.js +++ b/erpnext/production/doctype/production_order/production_order.js @@ -109,7 +109,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) { cur_frm.fields_dict['bom_no'].get_query = function(doc) { if (doc.production_item){ - return 'SELECT DISTINCT `tabBill Of Materials`.`name` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`item` = "' + cstr(doc.production_item) + '" AND`tabBill Of Materials`.%(key)s LIKE "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50'; + return 'SELECT DISTINCT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`is_active` = "Yes" AND `tabBOM`.docstatus = 1 AND `tabBOM`.`item` = "' + cstr(doc.production_item) + '" AND`tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` LIMIT 50'; } else { alert(" Please Enter Production Item First.") diff --git a/erpnext/production/doctype/production_order/production_order.py b/erpnext/production/doctype/production_order/production_order.py index ded32ff29bc..65ee47179e8 100644 --- a/erpnext/production/doctype/production_order/production_order.py +++ b/erpnext/production/doctype/production_order/production_order.py @@ -63,7 +63,7 @@ class DocType: raise Exception if self.doc.bom_no: - bom = sql("""select name from `tabBill Of Materials` where name = %s and docstatus = 1 + bom = sql("""select name from `tabBOM` where name = %s and docstatus = 1 and is_active = 'Yes' and item = %s""", (self.doc.bom_no, self.doc.production_item), as_dict =1) if not bom: msgprint("""Incorrect BOM: %s entered. diff --git a/erpnext/production/doctype/production_order/production_order.txt b/erpnext/production/doctype/production_order/production_order.txt index 954dc9fa775..62aa6102177 100644 --- a/erpnext/production/doctype/production_order/production_order.txt +++ b/erpnext/production/doctype/production_order/production_order.txt @@ -153,7 +153,7 @@ 'label': u'BOM No', 'oldfieldname': u'bom_no', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 1, 'reqd': 1, 'trigger': u'Client' diff --git a/erpnext/production/doctype/pp_so_detail/__init__.py b/erpnext/production/doctype/production_plan_item/__init__.py similarity index 100% rename from erpnext/production/doctype/pp_so_detail/__init__.py rename to erpnext/production/doctype/production_plan_item/__init__.py diff --git a/erpnext/production/doctype/pp_detail/pp_detail.txt b/erpnext/production/doctype/production_plan_item/production_plan_item.txt similarity index 94% rename from erpnext/production/doctype/pp_detail/pp_detail.txt rename to erpnext/production/doctype/production_plan_item/production_plan_item.txt index d2bbdb27cdd..8b546a48cd5 100644 --- a/erpnext/production/doctype/pp_detail/pp_detail.txt +++ b/erpnext/production/doctype/production_plan_item/production_plan_item.txt @@ -1,4 +1,4 @@ -# DocType, PP Detail +# DocType, Production Plan Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PP Detail', + 'parent': u'Production Plan Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, PP Detail + # DocType, Production Plan Item { 'doctype': 'DocType', - 'name': u'PP Detail' + 'name': u'Production Plan Item' }, # DocField @@ -75,7 +75,7 @@ 'label': u'BOM No', 'oldfieldname': u'bom_no', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 0, 'reqd': 1, 'width': u'100px' diff --git a/erpnext/projects/doctype/ticket/__init__.py b/erpnext/production/doctype/production_plan_sales_order/__init__.py similarity index 100% rename from erpnext/projects/doctype/ticket/__init__.py rename to erpnext/production/doctype/production_plan_sales_order/__init__.py diff --git a/erpnext/production/doctype/pp_so_detail/pp_so_detail.txt b/erpnext/production/doctype/production_plan_sales_order/production_plan_sales_order.txt similarity index 91% rename from erpnext/production/doctype/pp_so_detail/pp_so_detail.txt rename to erpnext/production/doctype/production_plan_sales_order/production_plan_sales_order.txt index ba8bc3119ff..810c1402ce0 100644 --- a/erpnext/production/doctype/pp_so_detail/pp_so_detail.txt +++ b/erpnext/production/doctype/production_plan_sales_order/production_plan_sales_order.txt @@ -1,4 +1,4 @@ -# DocType, PP SO Detail +# DocType, Production Plan Sales Order [ # These values are common in all dictionaries @@ -29,7 +29,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'PP SO Detail', + 'parent': u'Production Plan Sales Order', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -38,17 +38,17 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'PP SO Detail', + 'parent': u'Production Plan Sales Order', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1, 'role': u'System Manager' }, - # DocType, PP SO Detail + # DocType, Production Plan Sales Order { 'doctype': 'DocType', - 'name': u'PP SO Detail' + 'name': u'Production Plan Sales Order' }, # DocPerm diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js index e52c853eefb..847f00a9096 100644 --- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js +++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js @@ -46,5 +46,5 @@ cur_frm.fields_dict['pp_details'].grid.get_field('item_code').get_query = functi cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(doc) { var d = locals[this.doctype][this.docname]; - return 'SELECT DISTINCT `tabBill Of Materials`.`name` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + d.item_code + '" AND `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`name` like "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50'; + return 'SELECT DISTINCT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`item` = "' + d.item_code + '" AND `tabBOM`.`is_active` = "Yes" AND `tabBOM`.docstatus = 1 AND `tabBOM`.`name` like "%s" ORDER BY `tabBOM`.`name` LIMIT 50'; } diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py index 4e4832f780c..2b45bb326a3 100644 --- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py +++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py @@ -75,7 +75,7 @@ class DocType: select distinct t1.name, t1.transaction_date, t1.customer, t1.grand_total from - `tabSales Order` t1, `tabSales Order Detail` t2, `tabDelivery Note Packing Detail` t3, tabItem t4 + `tabSales Order` t1, `tabSales Order Item` t2, `tabDelivery Note Packing Item` t3, tabItem t4 where t1.name = t2.parent and t1.name = t3.parent and t3.parenttype = 'Sales Order' and t1.docstatus = 1 and t2.item_code = t3.parent_item and t4.name = t3.item_code and t1.status != 'Stopped' and t1.company = '%s' and ifnull(t2.qty, 0) > ifnull(t2.delivered_qty, 0) @@ -117,7 +117,7 @@ class DocType: so_list.append(d.sales_order) for r in open_so: if cstr(r['name']) not in so_list: - pp_so = addchild(self.doc, 'pp_so_details', 'PP SO Detail', 1, self.doclist) + pp_so = addchild(self.doc, 'pp_so_details', 'Production Plan Sales Order', 1, self.doclist) pp_so.sales_order = r['name'] pp_so.sales_order_date = cstr(r['transaction_date']) pp_so.customer = cstr(r['customer']) @@ -147,7 +147,7 @@ class DocType: t0.name, t2.parent_item, t2.item_code, (t1.qty - ifnull(t1.delivered_qty,0)) * (ifnull(t2.qty,0) / ifnull(t1.qty,1)) as 'pending_qty' from - `tabSales Order` t0, `tabSales Order Detail` t1, `tabDelivery Note Packing Detail` t2, `tabItem` t3 + `tabSales Order` t0, `tabSales Order Item` t1, `tabDelivery Note Packing Item` t2, `tabItem` t3 where t0.name = t1.parent and t0.name = t2.parent and t1.name = t2.parent_detail_docname and t0.name in (%s) and t0.docstatus = 1 and t1.qty > ifnull(t1.delivered_qty,0) and t3.name = t2.item_code @@ -164,7 +164,7 @@ class DocType: for p in packing_items: item_details = sql("select description, stock_uom, default_bom from tabItem where name=%s", p['item_code']) - pi = addchild(self.doc, 'pp_details', 'PP Detail', 1, self.doclist) + pi = addchild(self.doc, 'pp_details', 'Production Plan Item', 1, self.doclist) pi.sales_order = p['name'] pi.parent_packing_item = p['parent_item'] pi.item_code = p['item_code'] @@ -191,7 +191,7 @@ class DocType: if not d.bom_no: msgprint("Please enter bom no for item: %s at row no: %s" % (d.item_code, d.idx), raise_exception=1) else: - bom = sql("""select name from `tabBill Of Materials` where item = %s and docstatus = 1 + bom = sql("""select name from `tabBOM` where item = %s and docstatus = 1 and name = %s and ifnull(is_active, 'No') = 'Yes'""", (d.item_code, d.bom_no), as_dict = 1) if not bom: msgprint("""Incorrect BOM No: %s entered for item: %s at row no: %s @@ -216,7 +216,7 @@ class DocType: # so no childs of SA items fl_bom_items = sql(""" select item_code, ifnull(sum(qty_consumed_per_unit), 0) * '%s', description, stock_uom - from `tabBOM Material` + from `tabBOM Item` where parent = '%s' and docstatus < 2 group by item_code """ % (flt(bom_dict[bom]), bom)) @@ -229,7 +229,7 @@ class DocType: from ( select distinct fb.name, fb.description, fb.item_code, fb.qty_consumed_per_unit, fb.stock_uom - from `tabFlat BOM Detail` fb,`tabItem` it + from `tabBOM Explosion Item` fb,`tabItem` it where it.name = fb.item_code and ifnull(it.is_pro_applicable, 'No') = 'No' and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2 and fb.parent=%s ) a diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.txt b/erpnext/production/doctype/production_planning_tool/production_planning_tool.txt index 2e9fbaef08b..9634f933446 100644 --- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.txt +++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.txt @@ -201,8 +201,8 @@ 'doctype': u'DocField', 'fieldname': u'pp_so_details', 'fieldtype': u'Table', - 'label': u'PP SO Details', - 'options': u'PP SO Detail' + 'label': u'Production Plan Sales Orders', + 'options': u'Production Plan Sales Order' }, # DocField @@ -256,8 +256,8 @@ 'doctype': u'DocField', 'fieldname': u'pp_details', 'fieldtype': u'Table', - 'label': u'PP Details', - 'options': u'PP Detail' + 'label': u'Production Plan Items', + 'options': u'Production Plan Item' }, # DocField diff --git a/erpnext/production/page/bill_of_materials/bill_of_materials.js b/erpnext/production/page/bill_of_materials/bill_of_materials.js index aba5666f1dc..7fcd6aac867 100644 --- a/erpnext/production/page/bill_of_materials/bill_of_materials.js +++ b/erpnext/production/page/bill_of_materials/bill_of_materials.js @@ -489,7 +489,7 @@ function TreeNode(tree, parent, head_op, label, imagesrc, onclick, onexpand) { if(i==1) { var c = $a(this.tab.rows[0].cells[i], 'div', 'link_type', {overflow:'hidden', width:'100%'}); c.bom_no = label[tree.col_details[i][3]] - c.onclick = function() { loaddoc("Bill Of Materials", this.bom_no); } + c.onclick = function() { loaddoc("BOM", this.bom_no); } c.innerHTML = label[tree.col_details[i][3]]; } if(this.is_item == 1 && i > 1 && i < 6) { diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js index 63d0da8e0c6..03f910550f2 100644 --- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js +++ b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js @@ -25,8 +25,8 @@ report.customize_filters = function() { // to unhide required filters this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer Name'].df.filter_hide = 0; - this.filter_fields_dict['Sales Order Detail'+FILTER_SEP +'From Confirmed Delivery Date'].df.filter_hide = 0; - this.filter_fields_dict['Sales Order Detail'+FILTER_SEP +'To Confirmed Delivery Date'].df.filter_hide = 0; + this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'From Confirmed Delivery Date'].df.filter_hide = 0; + this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'To Confirmed Delivery Date'].df.filter_hide = 0; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company; diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt b/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt index 683acb7d09a..1210b27f7df 100644 --- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt +++ b/erpnext/production/search_criteria/delivery_plan/delivery_plan.txt @@ -12,14 +12,14 @@ # These values are common for all Search Criteria { - 'add_col': "SUM(`tabSales Order Detail`.`pending_qty` * `tabSales Order Detail`.`basic_rate` ) AS 'Amount'", - 'add_cond': "`tabSales Order Detail`.pending_qty > 0 and (`tabSales Order Detail`.confirmation_date is not null or `tabSales Order Detail`.confirmation_date!='' or `tabSales Order Detail`.confirmation_date != '00-00-0000')", + 'add_col': "SUM(`tabSales Order Item`.`pending_qty` * `tabSales Order Item`.`basic_rate` ) AS 'Amount'", + 'add_cond': "`tabSales Order Item`.pending_qty > 0 and (`tabSales Order Item`.confirmation_date is not null or `tabSales Order Item`.confirmation_date!='' or `tabSales Order Item`.confirmation_date != '00-00-0000')", 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Name', 'criteria_name': 'Delivery Plan', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", - 'group_by': '`tabSales Order Detail`.`confirmation_date`, `tabSales Order`.`name`', + 'group_by': '`tabSales Order Item`.`confirmation_date`, `tabSales Order`.`name`', 'module': 'Production', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/projects/doctype/project_control/project_control.py b/erpnext/projects/doctype/project_control/project_control.py index a1fdf11990c..036ffb88784 100644 --- a/erpnext/projects/doctype/project_control/project_control.py +++ b/erpnext/projects/doctype/project_control/project_control.py @@ -68,10 +68,10 @@ class DocType: n_tasks = {} for p in pl: - t1 = sql('select count(*) from tabTicket where project=%s and docstatus!=2', p)[0][0] + t1 = sql('select count(*) from tabTask where project=%s and docstatus!=2', p)[0][0] n_tasks[p] = t1 or 0 if t1: - t2 = sql('select count(*) from tabTicket where project=%s and docstatus!=2 and status="Closed"', p)[0][0] + t2 = sql('select count(*) from tabTask where project=%s and docstatus!=2 and status="Closed"', p)[0][0] comp[p] = cint(flt(t2)*100/t1) return {'pl':pl, 'ml':ml, 'comp':comp, 'n_tasks':n_tasks, 'status':status} @@ -80,15 +80,15 @@ class DocType: ret = {} # resource list - rl = sql("select distinct allocated_to, assignee_email from tabTicket") + rl = sql("select distinct allocated_to, assignee_email from tabTask") # get open & closed tickets for r in rl: if r[0]: ret[r[1]] = {} ret[r[1]]['id'] = r[0] - ret[r[1]]['Total'] = sql("select count(*) from tabTicket where allocated_to=%s and docstatus!=2", r[0])[0][0] - ret[r[1]]['Closed'] = sql("select count(*) from tabTicket where allocated_to=%s and status='Closed' and docstatus!=2", r[0])[0][0] + ret[r[1]]['Total'] = sql("select count(*) from tabTask where allocated_to=%s and docstatus!=2", r[0])[0][0] + ret[r[1]]['Closed'] = sql("select count(*) from tabTask where allocated_to=%s and status='Closed' and docstatus!=2", r[0])[0][0] ret[r[1]]['percent'] = cint(flt(ret[r[1]]['Closed']) * 100 / ret[r[1]]['Total']) return ret @@ -98,7 +98,7 @@ class DocType: def get_init_data(self, arg=''): pl = [p[0] for p in sql('select name from tabProject where docstatus != 2')] - rl = [p[0] for p in sql('select distinct allocated_to from tabTicket where docstatus != 2 and ifnull(allocated_to,"") != ""')] + rl = [p[0] for p in sql('select distinct allocated_to from tabTask where docstatus != 2 and ifnull(allocated_to,"") != ""')] return {'pl':pl, 'rl':rl} def get_tasks(self, arg): @@ -113,7 +113,7 @@ class DocType: tl = sql(""" select subject, allocated_to, project, exp_start_date, exp_end_date, priority, status, name - from tabTicket + from tabTask where ((exp_start_date between '%(st)s' and '%(end)s') or (exp_end_date between '%(st)s' and '%(end)s') or @@ -122,7 +122,7 @@ class DocType: return convert_to_lists(tl) def declare_proj_completed(self, arg): - chk = sql("select name from `tabTicket` where project=%s and status='Open'", arg) + chk = sql("select name from `tabTask` where project=%s and status='Open'", arg) if chk: chk_lst = [x[0] for x in chk] msgprint("Task(s) "+','.join(chk_lst)+" has staus 'Open'. Please submit all tasks against this project before closing the project.") @@ -136,7 +136,7 @@ def sent_reminder_task(): task_list = sql(""" select subject, allocated_to, project, exp_start_date, exp_end_date, priority, status, name, senders_name, opening_date, review_date, description - from tabTicket + from tabTask where task_email_notify=1 and sent_reminder=0 and status='Open' @@ -157,5 +157,5 @@ def sent_reminder_task():

(This notification is autogenerated)

""" % i sendmail(i['allocated_to'], sender='automail@webnotestech.com', msg=msg2,send_now=1, \ subject='A task has been assigned') - sql("update `tabTicket` set sent_reminder='1' where name='%(name)s' and allocated_to= '%(allocated_to)s'" % i) + sql("update `tabTask` set sent_reminder='1' where name='%(name)s' and allocated_to= '%(allocated_to)s'" % i) diff --git a/erpnext/selling/doctype/enquiry/__init__.py b/erpnext/projects/doctype/task/__init__.py similarity index 100% rename from erpnext/selling/doctype/enquiry/__init__.py rename to erpnext/projects/doctype/task/__init__.py diff --git a/erpnext/projects/doctype/ticket/ticket.js b/erpnext/projects/doctype/task/task.js similarity index 100% rename from erpnext/projects/doctype/ticket/ticket.js rename to erpnext/projects/doctype/task/task.js diff --git a/erpnext/projects/doctype/ticket/ticket.py b/erpnext/projects/doctype/task/task.py similarity index 100% rename from erpnext/projects/doctype/ticket/ticket.py rename to erpnext/projects/doctype/task/task.py diff --git a/erpnext/projects/doctype/ticket/ticket.txt b/erpnext/projects/doctype/task/task.txt similarity index 98% rename from erpnext/projects/doctype/ticket/ticket.txt rename to erpnext/projects/doctype/task/task.txt index 71ead26c809..4ff337d4cb9 100644 --- a/erpnext/projects/doctype/ticket/ticket.txt +++ b/erpnext/projects/doctype/task/task.txt @@ -1,4 +1,4 @@ -# DocType, Ticket +# DocType, Task [ # These values are common in all dictionaries @@ -33,7 +33,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Ticket', + 'parent': u'Task', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -42,16 +42,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Ticket', + 'parent': u'Task', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Ticket + # DocType, Task { 'doctype': 'DocType', - 'name': u'Ticket' + 'name': u'Task' }, # DocPerm @@ -346,7 +346,7 @@ 'label': u'Category', 'oldfieldname': u'category', 'oldfieldtype': u'Link', - 'options': u'Ticket Category', + 'options': u'Task Category', 'permlevel': 0 }, diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index a49b5a1c34b..81f0420ec8d 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -28,9 +28,9 @@ cur_frm.fields_dict['timesheet_details'].grid.get_field("project_name").get_quer var cond=cond1=''; var d = locals[cdt][cdn]; //if(d.customer_name) cond = 'ifnull(`tabProject`.customer_name, "") = "'+d.customer_name+'" AND'; - if(d.task_id) cond1 = 'ifnull(`tabTicket`.project, "") = `tabProject`.name AND `tabTicket`.name = "'+d.task_id+'" AND'; + if(d.task_id) cond1 = 'ifnull(`tabTask`.project, "") = `tabProject`.name AND `tabTask`.name = "'+d.task_id+'" AND'; - return repl('SELECT distinct `tabProject`.`name` FROM `tabProject`, `tabTicket` WHERE %(cond1)s `tabProject`.`name` LIKE "%s" ORDER BY `tabProject`.`name` ASC LIMIT 50', {cond1:cond1}); + return repl('SELECT distinct `tabProject`.`name` FROM `tabProject`, `tabTask` WHERE %(cond1)s `tabProject`.`name` LIKE "%s" ORDER BY `tabProject`.`name` ASC LIMIT 50', {cond1:cond1}); } cur_frm.cscript.task_name = function(doc, cdt, cdn){ @@ -41,7 +41,7 @@ cur_frm.cscript.task_name = function(doc, cdt, cdn){ cur_frm.fields_dict['timesheet_details'].grid.get_field("task_name").get_query = function(doc,cdt,cdn){ var cond=''; var d = locals[cdt][cdn]; - if(d.project_name) cond = 'ifnull(`tabTicket`.project, "") = "'+d.project_name+'" AND'; + if(d.project_name) cond = 'ifnull(`tabTask`.project, "") = "'+d.project_name+'" AND'; - return repl('SELECT distinct `tabTicket`.`subject` FROM `tabTicket` WHERE %(cond)s `tabTicket`.`subject` LIKE "%s" ORDER BY `tabTicket`.`subject` ASC LIMIT 50', {cond:cond}); + return repl('SELECT distinct `tabTask`.`subject` FROM `tabTask` WHERE %(cond)s `tabTask`.`subject` LIKE "%s" ORDER BY `tabTask`.`subject` ASC LIMIT 50', {cond:cond}); } \ No newline at end of file diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index ec58a468b6d..cacfc7453f6 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -45,7 +45,7 @@ class DocType: return (ret) def get_task_details(self, task_sub): - tsk = sql("select name, project, customer, customer_name from `tabTicket` where subject = %s", task_sub) + tsk = sql("select name, project, customer, customer_name from `tabTask` where subject = %s", task_sub) if tsk: ret = {'task_id': tsk and tsk[0][0] or '', 'project_name': tsk and tsk[0][1] or '', 'customer_name': tsk and tsk[0][3] or ''} return ret diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.txt b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.txt index 12e5b98c99d..dc4f105a1a2 100644 --- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.txt +++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.txt @@ -138,7 +138,7 @@ 'label': u'Task Id', 'oldfieldname': u'task_id', 'oldfieldtype': u'Link', - 'options': u'Ticket', + 'options': u'Task', 'permlevel': 0, 'search_index': 1, 'width': u'150px' diff --git a/erpnext/projects/page/projects/projects.js b/erpnext/projects/page/projects/projects.js index 3778a34b61e..cda9ec5643f 100644 --- a/erpnext/projects/page/projects/projects.js +++ b/erpnext/projects/page/projects/projects.js @@ -217,7 +217,7 @@ GanttTask = function(grid, data, idx) { // label this.label = $a(grid.y_labels, 'div', '', {'top':(idx*40) + 'px', overflow:'hidden', position:'absolute', 'width':'100%', height: '40px'}); - var l1 = $a($a(this.label, 'div'), 'span', 'link_type'); l1.innerHTML = data[0]; l1.dn = data[7]; l1.onclick = function() { loaddoc('Ticket', this.dn) }; + var l1 = $a($a(this.label, 'div'), 'span', 'link_type'); l1.innerHTML = data[0]; l1.dn = data[7]; l1.onclick = function() { loaddoc('Task', this.dn) }; var l2 = $a(this.label, 'div', '', {fontSize:'10px'}); l2.innerHTML = data[1]; // bar diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt index fbd19fb02dd..c8e69fa438f 100644 --- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt +++ b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Posting Date,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Item Name,Delivery Note Detail\x01Quantity,Delivery Note Detail\x01Amount*', + 'columns': 'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Posting Date,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Amount*', 'criteria_name': 'Dispatch Report', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Saved':1,'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}", 'module': 'Projects', diff --git a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js index 77ce6243312..c8b42dc2c3e 100644 --- a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js +++ b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js @@ -17,7 +17,7 @@ report.customize_filters = function() { this.hide_all_filters(); - //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Delivery Note Detail'}); + //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Delivery Note Item'}); this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df.filter_hide = 0; diff --git a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt index a084040937f..aa31288d00b 100644 --- a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt +++ b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.txt @@ -13,9 +13,9 @@ # These values are common for all Search Criteria { 'add_cond': 'IFNULL(`tabDelivery Note`.`project_name`,"")!=""', - 'columns': 'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Item Name,Delivery Note Detail\x01Quantity,Delivery Note\x01Posting Date,Delivery Note\x01% Billed,Delivery Note Detail\x01Amount*', + 'columns': 'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note\x01Posting Date,Delivery Note\x01% Billed,Delivery Note Item\x01Amount*', 'criteria_name': 'Projectwise Delivered Qty and Costs', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}", 'module': 'Projects', diff --git a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js index e04a7c642ce..ce56077bd74 100644 --- a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js +++ b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js @@ -17,7 +17,7 @@ report.customize_filters = function() { this.hide_all_filters(); - //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Sales Order Detail'}); + //this.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Sales Order Item'}); this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0; diff --git a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt index 1c6821b0e6d..5a54ded5924 100644 --- a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt +++ b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.txt @@ -12,11 +12,11 @@ # These values are common for all Search Criteria { - 'add_col': "SUM(`tabSales Order Detail`.`qty` - `tabSales Order Detail`.`delivered_qty`) AS 'Pending Qty'\nSUM((`tabSales Order Detail`.`qty` - `tabSales Order Detail`.`delivered_qty`)* `tabSales Order Detail`.basic_rate) AS 'Pending Amount'", - 'add_cond': '`tabSales Order Detail`.`qty` > `tabSales Order Detail`.`delivered_qty`\nIFNULL(`tabSales Order`.`project_name`,"")!=""\n`tabSales Order`.order_type = \'Sales\'', - 'columns': 'Sales Order\x01ID,Sales Order\x01Project Name,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Detail\x01Item Code,Sales Order Detail\x01Item Name,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date', + 'add_col': "SUM(`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`) AS 'Pending Qty'\nSUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`)* `tabSales Order Item`.basic_rate) AS 'Pending Amount'", + 'add_cond': '`tabSales Order Item`.`qty` > `tabSales Order Item`.`delivered_qty`\nIFNULL(`tabSales Order`.`project_name`,"")!=""\n`tabSales Order`.order_type = \'Sales\'', + 'columns': 'Sales Order\x01ID,Sales Order\x01Project Name,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date', 'criteria_name': 'Projectwise Pending Qty and Costs', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'Submitted','Sales Order\x01Fiscal Year':''}", 'module': 'Projects', diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js index 0401c28005e..bd4be54e78d 100644 --- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js +++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js @@ -88,7 +88,7 @@ report.get_query = function() { if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND '; - var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.supplier, t1.supplier_name,t1.grand_total FROM `tabPurchase Receipt` t1, `tabPurchase Receipt Detail` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; + var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.supplier, t1.supplier_name,t1.grand_total FROM `tabPurchase Receipt` t1, `tabPurchase Receipt Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; return q; } @@ -101,7 +101,7 @@ report.get_query = function() { if(company) cond += ' t1.company = "'+company+'" AND '; if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND '; - var q = 'SELECT DISTINCT t1.name , t1.credit_to , t1.project_name, t1.supplier, t1.supplier_name , t1.grand_total FROM `tabPayable Voucher` t1, `tabPV Detail` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; + var q = 'SELECT DISTINCT t1.name , t1.credit_to , t1.project_name, t1.supplier, t1.supplier_name , t1.grand_total FROM `tabPurchase Invoice` t1, `tabPurchase Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; return q; } diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py index 21476992bac..4dab05c082a 100644 --- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py +++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py @@ -22,7 +22,7 @@ if based_on == 'Purchase Order': col = [['Purchase Order ID','Link','Purchase Order'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['% Received','Data',''],['% Billed','Data',''],['Grand Total','Currency','']] elif based_on == 'Purchase Invoice': - col = [['Purchase Receipt ID','Link','Payable Voucher'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']] + col = [['Purchase Receipt ID','Link','Purchase Invoice'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']] elif based_on == 'Purchase Receipt': col = [['Purchase Invoice ID','Link','Purchase Receipt'],['Credit To','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']] diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js index 83951b5389a..4e92c3c4637 100644 --- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js +++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js @@ -89,7 +89,7 @@ report.get_query = function() { if(company) cond += ' t1.company = "'+company+'" AND '; if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND '; - var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.customer, t1.customer_name, t1.per_billed, t1.per_installed, t1.grand_total FROM `tabDelivery Note` t1, `tabDelivery Note Detail` t2 WHERE '+cond+' IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2'; + var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.customer, t1.customer_name, t1.per_billed, t1.per_installed, t1.grand_total FROM `tabDelivery Note` t1, `tabDelivery Note Item` t2 WHERE '+cond+' IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2'; return q; } @@ -104,7 +104,7 @@ report.get_query = function() { if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND '; - var q = 'SELECT DISTINCT t1.name , t1.debit_to , t1.project_name , t1.customer , t1.customer_name , t1.grand_total FROM `tabReceivable Voucher` t1, `tabRV Detail` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; + var q = 'SELECT DISTINCT t1.name , t1.debit_to , t1.project_name , t1.customer , t1.customer_name , t1.grand_total FROM `tabSales Invoice` t1, `tabSales Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent'; return q; } diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py index 15a20a7c787..065a03d94d6 100644 --- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py +++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py @@ -25,7 +25,7 @@ elif based_on == 'Delivery Note': cols = [['Delivery Note No','Link','150px','Delivery Note'], ['Status','Data','100px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['% Installed','Currency','100px',''], ['% Billed','Currency','100px',''], ['Grand Total','Currency','150px','']] elif based_on == 'Sales Invoice': - cols = [['Sales Invoice No','Link','150px','Receivable Voucher'], ['Debit To','Data','150px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['Grand Total','Currency','150px','']] + cols = [['Sales Invoice No','Link','150px','Sales Invoice'], ['Debit To','Data','150px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['Grand Total','Currency','150px','']] for c in cols: diff --git a/erpnext/sandbox/testdata/masters.py b/erpnext/sandbox/testdata/masters.py index 368e6e40acd..61fa2cb982c 100644 --- a/erpnext/sandbox/testdata/masters.py +++ b/erpnext/sandbox/testdata/masters.py @@ -237,7 +237,7 @@ main_masters = { ), Document( fielddata = { - 'doctype': 'Ref Rate Detail', + 'doctype': 'Item Price', 'parentfield': 'ref_rate_details', 'parenttype': 'Item', 'parent' : 'it', diff --git a/erpnext/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt b/erpnext/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt index da8762deab6..b597f924d3d 100644 --- a/erpnext/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt +++ b/erpnext/selling/DocType Mapper/Delivery Note-Installation Note/Delivery Note-Installation Note.txt @@ -123,10 +123,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'delivery_note_details', - 'from_table': 'Delivery Note Detail', + 'from_table': 'Delivery Note Item', 'match_id': 1, 'to_field': 'installed_item_details', - 'to_table': 'Installed Item Details', + 'to_table': 'Installation Note Item', 'validation_logic': 'qty > ifnull(installed_qty,0) and docstatus = 1' }, @@ -147,7 +147,7 @@ 'reference_doctype_key': 'prevdoc_doctype', 'reference_key': 'prevdoc_docname', 'to_field': 'installed_item_details', - 'to_table': 'Installed Item Details', + 'to_table': 'Installation Note Item', 'validation_logic': 'docstatus = 1' } ] \ No newline at end of file diff --git a/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt b/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt similarity index 87% rename from erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt rename to erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt index 5dc1c8fef14..9e023422eb0 100644 --- a/erpnext/selling/DocType Mapper/Lead-Enquiry/Lead-Enquiry.txt +++ b/erpnext/selling/DocType Mapper/Lead-Opportunity/Lead-Opportunity.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Lead-Enquiry +# DocType Mapper, Lead-Opportunity [ # These values are common in all dictionaries @@ -16,10 +16,10 @@ 'from_table': 'Lead', 'match_id': 0, 'name': '__common__', - 'parent': 'Lead-Enquiry', + 'parent': 'Lead-Opportunity', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper', - 'to_table': 'Enquiry', + 'to_table': 'Opportunity', 'validation_logic': 'name is not null' }, @@ -28,7 +28,7 @@ 'doctype': 'Field Mapper Detail', 'match_id': 0, 'name': '__common__', - 'parent': 'Lead-Enquiry', + 'parent': 'Lead-Opportunity', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -39,13 +39,13 @@ 'from_doctype': 'Lead', 'module': 'Selling', 'name': '__common__', - 'to_doctype': 'Enquiry' + 'to_doctype': 'Opportunity' }, - # DocType Mapper, Lead-Enquiry + # DocType Mapper, Lead-Opportunity { 'doctype': u'DocType Mapper', - 'name': 'Lead-Enquiry' + 'name': 'Lead-Opportunity' }, # Field Mapper Detail diff --git a/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt b/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt similarity index 88% rename from erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt rename to erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt index de6f60d965a..18b6431f6f2 100644 --- a/erpnext/selling/DocType Mapper/Enquiry-Quotation/Enquiry-Quotation.txt +++ b/erpnext/selling/DocType Mapper/Opportunity-Quotation/Opportunity-Quotation.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Enquiry-Quotation +# DocType Mapper, Opportunity-Quotation [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': 'Table Mapper Detail', 'name': '__common__', - 'parent': 'Enquiry-Quotation', + 'parent': 'Opportunity-Quotation', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper', 'validation_logic': 'docstatus=1' @@ -24,7 +24,7 @@ { 'doctype': 'Field Mapper Detail', 'name': '__common__', - 'parent': 'Enquiry-Quotation', + 'parent': 'Opportunity-Quotation', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -32,17 +32,17 @@ # These values are common for all DocType Mapper { 'doctype': u'DocType Mapper', - 'from_doctype': 'Enquiry', + 'from_doctype': 'Opportunity', 'module': 'Selling', 'name': '__common__', 'ref_doc_submitted': 1, 'to_doctype': 'Quotation' }, - # DocType Mapper, Enquiry-Quotation + # DocType Mapper, Opportunity-Quotation { 'doctype': u'DocType Mapper', - 'name': 'Enquiry-Quotation' + 'name': 'Opportunity-Quotation' }, # Field Mapper Detail @@ -129,7 +129,7 @@ # Table Mapper Detail { 'doctype': 'Table Mapper Detail', - 'from_table': 'Enquiry', + 'from_table': 'Opportunity', 'match_id': 0, 'to_table': 'Quotation' }, @@ -138,9 +138,9 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'enq_details', - 'from_table': 'Enquiry Detail', + 'from_table': 'Opportunity Item', 'match_id': 1, 'to_field': 'quotation_details', - 'to_table': 'Quotation Detail' + 'to_table': 'Quotation Item' } ] \ No newline at end of file diff --git a/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt b/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt index feadb98f9a9..77e6cac8d14 100644 --- a/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt +++ b/erpnext/selling/DocType Mapper/Quotation-Sales Order/Quotation-Sales Order.txt @@ -134,10 +134,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'other_charges', - 'from_table': 'RV Tax Detail', + 'from_table': 'Sales Taxes and Charges', 'match_id': 2, 'to_field': 'other_charges', - 'to_table': 'RV Tax Detail', + 'to_table': 'Sales Taxes and Charges', 'validation_logic': 'name is not null' }, @@ -145,11 +145,11 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'quotation_details', - 'from_table': 'Quotation Detail', + 'from_table': 'Quotation Item', 'match_id': 1, 'reference_doctype_key': 'prevdoc_doctype', 'to_field': 'sales_order_details', - 'to_table': 'Sales Order Detail', + 'to_table': 'Sales Order Item', 'validation_logic': 'name is not null' }, diff --git a/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt b/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt index 48620bcac37..a912888a604 100644 --- a/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt +++ b/erpnext/selling/Print Format/Quotation Classic/Quotation Classic.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Quotation', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt b/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt index be9aa37b6c1..3bdc6936df3 100644 --- a/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt +++ b/erpnext/selling/Print Format/Quotation Modern/Quotation Modern.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Quotation', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation No.
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation No.
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt b/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt index 3700c7d7e5e..1571b410af1 100644 --- a/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt +++ b/erpnext/selling/Print Format/Quotation Spartan/Quotation Spartan.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Quotation', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Quotation Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt b/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt index f955bf8e33a..79afbceeb4b 100644 --- a/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt +++ b/erpnext/selling/Print Format/Sales Order Classic/Sales Order Classic.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Sales Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt b/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt index 234256f01d4..639ed631f63 100644 --- a/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt +++ b/erpnext/selling/Print Format/Sales Order Modern/Sales Order Modern.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Sales Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order No.
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order No.
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt b/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt index 5fc3c45906b..dd603b36976 100644 --- a/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt +++ b/erpnext/selling/Print Format/Sales Order Spartan/Sales Order Spartan.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Sales Order', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Sales Order Date
Delivery Date
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Selling', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/selling/doctype/enquiry_detail/__init__.py b/erpnext/selling/doctype/communication_log/__init__.py similarity index 100% rename from erpnext/selling/doctype/enquiry_detail/__init__.py rename to erpnext/selling/doctype/communication_log/__init__.py diff --git a/erpnext/selling/doctype/follow_up/follow_up.txt b/erpnext/selling/doctype/communication_log/communication_log.txt similarity index 92% rename from erpnext/selling/doctype/follow_up/follow_up.txt rename to erpnext/selling/doctype/communication_log/communication_log.txt index 496b5879ff4..c33724a310d 100644 --- a/erpnext/selling/doctype/follow_up/follow_up.txt +++ b/erpnext/selling/doctype/communication_log/communication_log.txt @@ -1,4 +1,4 @@ -# DocType, Follow up +# DocType, Communication Log [ # These values are common in all dictionaries @@ -28,16 +28,16 @@ 'allow_on_submit': 1, 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Follow up', + 'parent': u'Communication Log', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Follow up + # DocType, Communication Log { 'doctype': 'DocType', - 'name': u'Follow up' + 'name': u'Communication Log' }, # DocField diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 9f5f717e1f6..5b229dcb5ee 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -214,11 +214,11 @@ cur_frm.cscript.make_si_list = function(parent,doc){ lst.colwidths = ['5%','20%','20%','20%','20%','15%']; lst.colnames = ['Sr.','Id','Posting Date','Due Date','Debit To','Grand Total']; lst.coltypes = ['Data','Link','Data','Data','Link','Currency']; - lst.coloptions = ['','Receivable Voucher','','','Account','']; + lst.coloptions = ['','Sales Invoice','','','Account','']; - var q = repl("select name,posting_date,due_date,debit_to,grand_total from `tabReceivable Voucher` where customer='%(cust)s' order by posting_date desc", {'cust':doc.name}); - var q_max = repl("select count(name) from `tabReceivable Voucher` where customer='%(cust)s'", {'cust':doc.name}); + var q = repl("select name,posting_date,due_date,debit_to,grand_total from `tabSales Invoice` where customer='%(cust)s' order by posting_date desc", {'cust':doc.name}); + var q_max = repl("select count(name) from `tabSales Invoice` where customer='%(cust)s'", {'cust':doc.name}); - cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Sales Invoice','Receivable Voucher'); + cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Sales Invoice','Sales Invoice'); } diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 4530cf57c86..80ac9142ef8 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -253,19 +253,19 @@ class DocType: ('Contact', 'customer'), ('Customer Issue', 'customer'), ('Delivery Note', 'customer'), - ('Enquiry', 'customer'), + ('Opportunity', 'customer'), ('Installation Note', 'customer'), ('Maintenance Schedule', 'customer'), ('Maintenance Visit', 'customer'), ('Project', 'customer'), ('Quotation', 'customer'), - ('Receivable Voucher', 'customer'), + ('Sales Invoice', 'customer'), ('Sales Order', 'customer'), ('Serial No', 'customer'), ('Shipping Address', 'customer'), ('Stock Entry', 'customer'), ('Support Ticket', 'customer'), - ('Ticket', 'customer')] + ('Task', 'customer')] for rec in update_fields: sql("update `tab%s` set customer_name = '%s' where %s = '%s'" %(rec[0],newdn,rec[1],olddn)) diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js index 5486857d601..36c2fa9e9ec 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.js +++ b/erpnext/selling/doctype/installation_note/installation_note.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "Installed Item Details"; +cur_frm.cscript.tname = "Installation Note Item"; cur_frm.cscript.fname = "installed_item_details"; cur_frm.cscript.onload = function(doc, dt, dn) { @@ -34,7 +34,7 @@ cur_frm.fields_dict['delivery_note_no'].get_query = function(doc) { if(doc.customer) { cond = '`tabDelivery Note`.customer = "'+doc.customer+'" AND'; } - return repl('SELECT DISTINCT `tabDelivery Note`.name, `tabDelivery Note`.customer_name FROM `tabDelivery Note`, `tabDelivery Note Detail` WHERE `tabDelivery Note`.company = "%(company)s" AND `tabDelivery Note`.docstatus = 1 AND ifnull(`tabDelivery Note`.per_installed,0) < 100 AND %(cond)s `tabDelivery Note`.name LIKE "%s" ORDER BY `tabDelivery Note`.name DESC LIMIT 50', {company:doc.company, cond:cond}); + return repl('SELECT DISTINCT `tabDelivery Note`.name, `tabDelivery Note`.customer_name FROM `tabDelivery Note`, `tabDelivery Note Item` WHERE `tabDelivery Note`.company = "%(company)s" AND `tabDelivery Note`.docstatus = 1 AND ifnull(`tabDelivery Note`.per_installed,0) < 100 AND %(cond)s `tabDelivery Note`.name LIKE "%s" ORDER BY `tabDelivery Note`.name DESC LIMIT 50', {company:doc.company, cond:cond}); } diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py index 0b5f3c26049..846d1436469 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.py +++ b/erpnext/selling/doctype/installation_note/installation_note.py @@ -38,7 +38,7 @@ class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - self.tname = 'Installed Item Details' + self.tname = 'Installation Note Item' self.fname = 'installed_item_details' # Autoname @@ -51,7 +51,7 @@ class DocType(TransactionBase): #==================================== def pull_delivery_note_details(self): self.validate_prev_docname() - self.doclist = get_obj('DocType Mapper', 'Delivery Note-Installation Note').dt_map('Delivery Note', 'Installation Note', self.doc.delivery_note_no, self.doc, self.doclist, "[['Delivery Note', 'Installation Note'],['Delivery Note Detail', 'Installed Item Details']]") + self.doclist = get_obj('DocType Mapper', 'Delivery Note-Installation Note').dt_map('Delivery Note', 'Installation Note', self.doc.delivery_note_no, self.doc, self.doclist, "[['Delivery Note', 'Installation Note'],['Delivery Note Item', 'Installation Note Item']]") # Validates that Delivery Note is not pulled twice #============================================ @@ -116,7 +116,7 @@ class DocType(TransactionBase): def get_prevdoc_serial_no(self, prevdoc_detail_docname, prevdoc_docname): from stock.doctype.stock_ledger.stock_ledger import get_sr_no_list - res = sql("select serial_no from `tabDelivery Note Detail` where name = '%s' and parent ='%s'" % (prevdoc_detail_docname, prevdoc_docname)) + res = sql("select serial_no from `tabDelivery Note Item` where name = '%s' and parent ='%s'" % (prevdoc_detail_docname, prevdoc_docname)) return get_sr_no_list(res[0][0]) #check if all serial nos from current record exist in resp delivery note diff --git a/erpnext/selling/doctype/installation_note/installation_note.txt b/erpnext/selling/doctype/installation_note/installation_note.txt index 7660910c19a..a3812d7e863 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.txt +++ b/erpnext/selling/doctype/installation_note/installation_note.txt @@ -444,10 +444,10 @@ 'doctype': u'DocField', 'fieldname': u'installed_item_details', 'fieldtype': u'Table', - 'label': u'Installed Item Details', + 'label': u'Installation Note Item', 'oldfieldname': u'installed_item_details', 'oldfieldtype': u'Table', - 'options': u'Installed Item Details', + 'options': u'Installation Note Item', 'permlevel': 0 } ] \ No newline at end of file diff --git a/erpnext/selling/doctype/follow_up/__init__.py b/erpnext/selling/doctype/installation_note_item/__init__.py similarity index 100% rename from erpnext/selling/doctype/follow_up/__init__.py rename to erpnext/selling/doctype/installation_note_item/__init__.py diff --git a/erpnext/selling/doctype/installed_item_details/installed_item_details.txt b/erpnext/selling/doctype/installation_note_item/installation_note_item.txt similarity index 95% rename from erpnext/selling/doctype/installed_item_details/installed_item_details.txt rename to erpnext/selling/doctype/installation_note_item/installation_note_item.txt index e8aadd64c68..8a999f4c060 100644 --- a/erpnext/selling/doctype/installed_item_details/installed_item_details.txt +++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.txt @@ -1,4 +1,4 @@ -# DocType, Installed Item Details +# DocType, Installation Note Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Installed Item Details', + 'parent': u'Installation Note Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Installed Item Details + # DocType, Installation Note Item { 'doctype': 'DocType', - 'name': u'Installed Item Details' + 'name': u'Installation Note Item' }, # DocField diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js index a32acf7df5b..73f5af87f29 100644 --- a/erpnext/selling/doctype/lead/lead.js +++ b/erpnext/selling/doctype/lead/lead.js @@ -20,7 +20,7 @@ wn.require('erpnext/utilities/doctype/sms_control/sms_control.js'); cur_frm.cscript.onload = function(doc, cdt, cdn) { if(user =='Guest'){ - hide_field(['status', 'naming_series', 'order_lost_reason', 'customer', 'rating', 'fax', 'website', 'territory', 'TerritoryHelp', 'address_line1', 'address_line2', 'city', 'state', 'country', 'pincode', 'address', 'lead_owner', 'market_segment', 'industry', 'campaign_name', 'interested_in', 'company', 'fiscal_year', 'contact_by', 'contact_date', 'last_contact_date', 'contact_date_ref', 'to_discuss', 'More Info', 'follow_up', 'Communication History', 'cc_to', 'subject', 'message', 'Attachment Html', 'Create New File', 'lead_attachment_detail', 'Send Email', 'Email', 'Create Customer', 'Create Enquiry', 'Next Steps', 'transaction_date', 'type', 'source']); + hide_field(['status', 'naming_series', 'order_lost_reason', 'customer', 'rating', 'fax', 'website', 'territory', 'TerritoryHelp', 'address_line1', 'address_line2', 'city', 'state', 'country', 'pincode', 'address', 'lead_owner', 'market_segment', 'industry', 'campaign_name', 'interested_in', 'company', 'fiscal_year', 'contact_by', 'contact_date', 'last_contact_date', 'contact_date_ref', 'to_discuss', 'More Info', 'follow_up', 'Communication History', 'cc_to', 'subject', 'message', 'Attachment Html', 'Create New File', 'lead_attachment_detail', 'Send Email', 'Email', 'Create Customer', 'Create Opportunity', 'Next Steps', 'transaction_date', 'type', 'source']); doc.source = 'Website'; } if(!doc.status) set_multiple(dt,dn,{status:'Open'}); @@ -40,7 +40,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons() if(!doc.__islocal && !in_list(['Converted', 'Lead Lost'], doc.status)) { cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']); - cur_frm.add_custom_button('Create Enquiry', cur_frm.cscript['Create Enquiry']); + cur_frm.add_custom_button('Create Opportunity', cur_frm.cscript['Create Opportunity']); cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); } } @@ -130,9 +130,9 @@ cur_frm.cscript['Send Email'] = function(doc,cdt,cdn){ } } -// Create New Enquiry +// Create New Opportunity // =============================================================== -cur_frm.cscript['Create Enquiry'] = function(){ +cur_frm.cscript['Create Opportunity'] = function(){ var doc = cur_frm.doc; $c('runserverobj',args={ 'method':'check_status', 'docs':compress_doclist([doc])}, function(r,rt){ @@ -140,16 +140,16 @@ cur_frm.cscript['Create Enquiry'] = function(){ msgprint("This lead is now converted to customer. Please create enquiry on behalf of customer"); } else{ - n = createLocal("Enquiry"); + n = createLocal("Opportunity"); $c('dt_map', args={ - 'docs':compress_doclist([locals["Enquiry"][n]]), + 'docs':compress_doclist([locals["Opportunity"][n]]), 'from_doctype':'Lead', - 'to_doctype':'Enquiry', + 'to_doctype':'Opportunity', 'from_docname':doc.name, - 'from_to_list':"[['Lead', 'Enquiry']]" + 'from_to_list':"[['Lead', 'Opportunity']]" } , function(r,rt) { - loaddoc("Enquiry", n); + loaddoc("Opportunity", n); } ); } diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py index e5d2633298f..50e996a31ec 100644 --- a/erpnext/selling/doctype/lead/lead.py +++ b/erpnext/selling/doctype/lead/lead.py @@ -84,7 +84,7 @@ class DocType: # self.doc.address = comp_address if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason: - msgprint("Please Enter Order Lost Reason") + msgprint("Please Enter Quotation Lost Reason") raise Exception if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest': @@ -204,7 +204,7 @@ Cheers! #---------------------- Add details in follow up table---------------- def add_in_follow_up(self,message,type): import datetime - child = addchild( self.doc, 'follow_up', 'Follow up', 1, self.doclist) + child = addchild( self.doc, 'follow_up', 'Communication Log', 1, self.doclist) child.date = datetime.datetime.now().date().strftime('%Y-%m-%d') child.notes = message child.follow_up_type = type diff --git a/erpnext/selling/doctype/lead/lead.txt b/erpnext/selling/doctype/lead/lead.txt index 2a7df9051e9..2ec8963f5f4 100644 --- a/erpnext/selling/doctype/lead/lead.txt +++ b/erpnext/selling/doctype/lead/lead.txt @@ -370,7 +370,7 @@ 'label': u'Lost Reason', 'oldfieldname': u'order_lost_reason', 'oldfieldtype': u'Link', - 'options': u'Order Lost Reason', + 'options': u'Quotation Lost Reason', 'permlevel': 0 }, @@ -746,10 +746,10 @@ 'doctype': u'DocField', 'fieldname': u'follow_up', 'fieldtype': u'Table', - 'label': u'Follow up', + 'label': u'Communication Log', 'oldfieldname': u'follow_up', 'oldfieldtype': u'Table', - 'options': u'Follow up', + 'options': u'Communication Log', 'permlevel': 0 } ] \ No newline at end of file diff --git a/erpnext/selling/doctype/installed_item_details/__init__.py b/erpnext/selling/doctype/opportunity/__init__.py similarity index 100% rename from erpnext/selling/doctype/installed_item_details/__init__.py rename to erpnext/selling/doctype/opportunity/__init__.py diff --git a/erpnext/selling/doctype/enquiry/listview.js b/erpnext/selling/doctype/opportunity/listview.js similarity index 84% rename from erpnext/selling/doctype/enquiry/listview.js rename to erpnext/selling/doctype/opportunity/listview.js index 1bd1b96e94d..db7f67c46c5 100644 --- a/erpnext/selling/doctype/enquiry/listview.js +++ b/erpnext/selling/doctype/opportunity/listview.js @@ -1,11 +1,11 @@ -wn.doclistviews['Enquiry'] = wn.views.ListView.extend({ +wn.doclistviews['Opportunity'] = wn.views.ListView.extend({ init: function(d) { this._super(d) this.fields = this.fields.concat([ - 'tabEnquiry.enquiry_from', - 'tabEnquiry.lead_name', - 'tabEnquiry.customer_name', - 'tabEnquiry.status', + 'tabOpportunity.enquiry_from', + 'tabOpportunity.lead_name', + 'tabOpportunity.customer_name', + 'tabOpportunity.status', ]); this.stats = this.stats.concat(['status', 'source', 'enquiry_from', 'company']); }, diff --git a/erpnext/selling/doctype/enquiry/enquiry.js b/erpnext/selling/doctype/opportunity/opportunity.js similarity index 94% rename from erpnext/selling/doctype/enquiry/enquiry.js rename to erpnext/selling/doctype/opportunity/opportunity.js index bf2628feaf1..45a66ea9d33 100644 --- a/erpnext/selling/doctype/enquiry/enquiry.js +++ b/erpnext/selling/doctype/opportunity/opportunity.js @@ -21,11 +21,11 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){ // if(!doc.docstatus){ - hide_field(['Update Follow up']); + hide_field(['Update Communication Log']); hide_field(['email_id1','cc_to','subject','message','Attachment Html', 'Create New File', 'enquiry_attachment_detail','Send Email']); } else{ - unhide_field(['Update Follow up']); + unhide_field(['Update Communication Log']); unhide_field(['email_id1','cc_to','subject','message','Attachment Html', 'Create New File', 'enquiry_attachment_detail','Send Email']); } @@ -33,7 +33,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){ cur_frm.clear_custom_buttons(); if(doc.docstatus == 1) { cur_frm.add_custom_button('Create Quotation', cur_frm.cscript['Create Quotation']); - cur_frm.add_custom_button('Enquiry Lost', cur_frm.cscript['Declare Enquiry Lost']); + cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']); cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); } @@ -231,7 +231,7 @@ cur_frm.cscript['Create New File'] = function(doc){ //update follow up //================================================================================= -cur_frm.cscript['Update Follow up'] = function(doc,cdt,cdn){ +cur_frm.cscript['Update Communication Log'] = function(doc,cdt,cdn){ $c_obj(make_doclist(doc.doctype, doc.name),'update_follow_up','',function(r, rt){ refresh_field('follow_up'); @@ -246,10 +246,10 @@ cur_frm.cscript['Create Quotation'] = function(){ n = createLocal("Quotation"); $c('dt_map', args={ 'docs':compress_doclist([locals["Quotation"][n]]), - 'from_doctype':'Enquiry', + 'from_doctype':'Opportunity', 'to_doctype':'Quotation', 'from_docname':cur_frm.docname, - 'from_to_list':"[['Enquiry', 'Quotation'],['Enquiry Detail','Quotation Detail']]" + 'from_to_list':"[['Enquiry', 'Quotation'],['Opportunity Item','Quotation Item']]" } , function(r,rt) { loaddoc("Quotation", n); @@ -260,14 +260,14 @@ cur_frm.cscript['Create Quotation'] = function(){ // declare enquiry lost //------------------------- -cur_frm.cscript['Declare Enquiry Lost'] = function(){ +cur_frm.cscript['Declare Opportunity Lost'] = function(){ var e_lost_dialog; set_e_lost_dialog = function(){ - e_lost_dialog = new Dialog(400,150,'Add Enquiry Lost Reason'); + e_lost_dialog = new Dialog(400,150,'Add Opportunity Lost Reason'); e_lost_dialog.make_body([ ['HTML', 'Message', '
Please add enquiry lost reason
'], - ['Text', 'Enquiry Lost Reason'], + ['Text', 'Opportunity Lost Reason'], ['HTML', 'Response', '
'], ['HTML', 'Add Reason', '
'] ]); @@ -282,14 +282,14 @@ cur_frm.cscript['Declare Enquiry Lost'] = function(){ add_reason_btn2.onclick = function(){ e_lost_dialog.hide();} e_lost_dialog.onshow = function() { - e_lost_dialog.widgets['Enquiry Lost Reason'].value = ''; + e_lost_dialog.widgets['Opportunity Lost Reason'].value = ''; $i('update_enquiry_dialog_response').innerHTML = ''; } e_lost_dialog.add = function() { // sending... $i('update_enquiry_dialog_response').innerHTML = 'Processing...'; - var arg = strip(e_lost_dialog.widgets['Enquiry Lost Reason'].value); + var arg = strip(e_lost_dialog.widgets['Opportunity Lost Reason'].value); var call_back = function(r,rt) { if(r.message == 'true'){ $i('update_enquiry_dialog_response').innerHTML = 'Done'; @@ -318,7 +318,7 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) { return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';} /* -//===================== Enquiry From validation - either customer or lead is mandatory ===================================== +//===================== Opportunity From validation - either customer or lead is mandatory ===================================== cur_frm.cscript.enq_frm_validate = function(doc,cdt,cdn){ if(doc.enquiry_from == 'Lead'){ diff --git a/erpnext/selling/doctype/enquiry/enquiry.py b/erpnext/selling/doctype/opportunity/opportunity.py similarity index 91% rename from erpnext/selling/doctype/enquiry/enquiry.py rename to erpnext/selling/doctype/opportunity/opportunity.py index debc3d7ceb8..1dc8757a2bc 100644 --- a/erpnext/selling/doctype/enquiry/enquiry.py +++ b/erpnext/selling/doctype/opportunity/opportunity.py @@ -39,7 +39,7 @@ class DocType(TransactionBase): self.doc = doc self.doclist = doclist self.fname = 'enq_details' - self.tname = 'Enquiry Detail' + self.tname = 'Opportunity Item' # Autoname # ==================================================================================================================== @@ -117,7 +117,7 @@ class DocType(TransactionBase): ev.event_date = self.doc.contact_date ev.event_hour = '10:00' ev.event_type = 'Private' - ev.ref_type = 'Enquiry' + ev.ref_type = 'Opportunity' ev.ref_name = self.doc.name ev.save(1) @@ -156,14 +156,14 @@ class DocType(TransactionBase): ysd=fy and fy[0][0] or "" yed=add_days(str(ysd),365) if str(self.doc.transaction_date) < str(ysd) or str(self.doc.transaction_date) > str(yed): - msgprint("Enquiry Date is not within the Fiscal Year selected") + msgprint("Opportunity Date is not within the Fiscal Year selected") raise Exception def validate_lead_cust(self): if self.doc.enquiry_from == 'Lead' and not self.doc.lead: - msgprint("Lead Id is mandatory if 'Enquiry From' is selected as Lead", raise_exception=1) + msgprint("Lead Id is mandatory if 'Opportunity From' is selected as Lead", raise_exception=1) elif self.doc.enquiry_from == 'Customer' and not self.doc.customer: - msgprint("Customer is mandatory if 'Enquiry From' is selected as Customer", raise_exception=1) + msgprint("Customer is mandatory if 'Opportunity From' is selected as Customer", raise_exception=1) def validate(self): @@ -179,9 +179,9 @@ class DocType(TransactionBase): # ==================================================================================================================== def on_cancel(self): - chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Detail` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) + chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) if chk: - msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Enquiry. Thus can not be cancelled.") + msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus can not be cancelled.") raise Exception else: set(self.doc, 'status', 'Cancelled') @@ -189,19 +189,19 @@ class DocType(TransactionBase): # declare as enquiry lost #--------------------------- def declare_enquiry_lost(self,arg): - chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Detail` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) + chk = sql("select t1.name from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.docstatus=1 and (t1.status!='Order Lost' and t1.status!='Cancelled') and t2.prevdoc_docname = %s",self.doc.name) if chk: - msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Enquiry. Thus 'Enquiry Lost' can not be declared against it.") + msgprint("Quotation No. "+cstr(chk[0][0])+" is submitted against this Opportunity. Thus 'Opportunity Lost' can not be declared against it.") raise Exception else: - set(self.doc, 'status', 'Enquiry Lost') + set(self.doc, 'status', 'Opportunity Lost') set(self.doc, 'order_lost_reason', arg) return 'true' # ==================================================================================================================== def update_follow_up(self): - sql("delete from `tabFollow up` where parent = '%s'"%self.doc.name); + sql("delete from `tabCommunication Log` where parent = '%s'"%self.doc.name); for d in getlist(self.doclist, 'follow_up'): d.save() self.doc.save() @@ -211,9 +211,9 @@ class DocType(TransactionBase): # ==================================================================================================================== #def send_emails(self,email,sender,subject,message): # if email: - # sendmail(email,sender,subject=subject or 'Enquiry',parts=[['text/plain',message or self.get_enq_summary()]]) + # sendmail(email,sender,subject=subject or 'Opportunity',parts=[['text/plain',message or self.get_enq_summary()]]) - # Prepare HTML Table and Enter Enquiry Details in it, which will be added in enq summary + # Prepare HTML Table and Enter Opportunity Items in it, which will be added in enq summary # ==================================================================================================================== def quote_table(self): if getlist(self.doclist,'enq_details'): @@ -236,7 +236,7 @@ class DocType(TransactionBase): item_tbl += '''
''' return item_tbl - # Prepare HTML Page containing summary of Enquiry, which will be sent as message in E-mail + # Prepare HTML Page containing summary of Opportunity, which will be sent as message in E-mail # ==================================================================================================================== def get_enq_summary(self): @@ -249,9 +249,9 @@ class DocType(TransactionBase):
%(company_address)s
-
Quotation Details
+
Quotation Items
- +
Enquiry No: %(name)s
Opportunity No: %(name)s
Opening Date: %(transaction_date)s
Expected By Date: %(expected_date)s
@@ -321,7 +321,7 @@ To login into the system, use link :
. // Module CRM -cur_frm.cscript.tname = "Quotation Detail"; +cur_frm.cscript.tname = "Quotation Item"; cur_frm.cscript.fname = "quotation_details"; cur_frm.cscript.other_fname = "other_charges"; cur_frm.cscript.sales_team_fname = "sales_team"; @@ -91,8 +91,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); } - if (!doc.docstatus) hide_field(['Update Follow up']); - else unhide_field(['Update Follow up']); + if (!doc.docstatus) hide_field(['Update Communication Log']); + else unhide_field(['Update Communication Log']); } @@ -151,11 +151,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) { cur_frm.fields_dict['enq_no'].get_query = function(doc,cdt,cdn){ var cond=''; var cond1=''; - if(doc.order_type) cond = 'ifnull(`tabEnquiry`.enquiry_type, "") = "'+doc.order_type+'" AND'; - if(doc.customer) cond1 = '`tabEnquiry`.customer = "'+doc.customer+'" AND'; - else if(doc.lead) cond1 = '`tabEnquiry`.lead = "'+doc.lead+'" AND'; + if(doc.order_type) cond = 'ifnull(`tabOpportunity`.enquiry_type, "") = "'+doc.order_type+'" AND'; + if(doc.customer) cond1 = '`tabOpportunity`.customer = "'+doc.customer+'" AND'; + else if(doc.lead) cond1 = '`tabOpportunity`.lead = "'+doc.lead+'" AND'; - return repl('SELECT `tabEnquiry`.`name` FROM `tabEnquiry` WHERE `tabEnquiry`.`docstatus` = 1 AND `tabEnquiry`.status = "Submitted" AND %(cond)s %(cond1)s `tabEnquiry`.`name` LIKE "%s" ORDER BY `tabEnquiry`.`name` ASC LIMIT 50', {cond:cond, cond1:cond1}); + return repl('SELECT `tabOpportunity`.`name` FROM `tabOpportunity` WHERE `tabOpportunity`.`docstatus` = 1 AND `tabOpportunity`.status = "Submitted" AND %(cond)s %(cond1)s `tabOpportunity`.`name` LIKE "%s" ORDER BY `tabOpportunity`.`name` ASC LIMIT 50', {cond:cond, cond1:cond1}); } // Make Sales Order @@ -170,7 +170,7 @@ cur_frm.cscript['Make Sales Order'] = function() { 'from_doctype':'Quotation', 'to_doctype':'Sales Order', 'from_docname':doc.name, - 'from_to_list':"[['Quotation', 'Sales Order'], ['Quotation Detail', 'Sales Order Detail'],['RV Tax Detail','RV Tax Detail'], ['Sales Team', 'Sales Team'], ['TC Detail', 'TC Detail']]" + 'from_to_list':"[['Quotation', 'Sales Order'], ['Quotation Item', 'Sales Order Item'],['Sales Taxes and Charges','Sales Taxes and Charges'], ['Sales Team', 'Sales Team'], ['TC Detail', 'TC Detail']]" }, function(r,rt) { loaddoc("Sales Order", n); }); @@ -178,7 +178,7 @@ cur_frm.cscript['Make Sales Order'] = function() { } //pull enquiry details -cur_frm.cscript['Pull Enquiry Detail'] = function(doc,cdt,cdn){ +cur_frm.cscript['Pull Opportunity Detail'] = function(doc,cdt,cdn){ var callback = function(r,rt){ if(r.message){ @@ -200,7 +200,7 @@ cur_frm.cscript['Pull Enquiry Detail'] = function(doc,cdt,cdn){ //update follow up //================================================================================= -cur_frm.cscript['Update Follow up'] = function(doc){ +cur_frm.cscript['Update Communication Log'] = function(doc){ $c_obj(make_doclist(doc.doctype, doc.name),'update_followup_details','',function(r, rt){ refresh_field('follow_up'); @@ -264,10 +264,10 @@ cur_frm.cscript['Declare Order Lost'] = function(){ // ======================================================================================== cur_frm.cscript['Get Report'] = function(doc,cdt,cdn) { var callback = function(report){ - report.set_filter('Sales Order Detail', 'Quotation No.',doc.name) + report.set_filter('Sales Order Item', 'Quotation No.',doc.name) report.dt.run(); } - loadreport('Sales Order Detail','Itemwise Sales Details', callback); + loadreport('Sales Order Item','Itemwise Sales Details', callback); } @@ -309,20 +309,20 @@ cur_frm.fields_dict['quotation_details'].grid.get_field('item_code').get_query= (\ select q.item_code,q.quote_rate from\ (\ - select q.transaction_date,qd.item_code,basic_rate as quote_rate from `tabQuotation Detail` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s'\ + select q.transaction_date,qd.item_code,basic_rate as quote_rate from `tabQuotation Item` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s'\ )q,\ (\ - select qd.item_code,max(transaction_date) as transaction_date from `tabQuotation Detail` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s' group by qd.item_code\ + select qd.item_code,max(transaction_date) as transaction_date from `tabQuotation Item` qd, `tabQuotation` q where q.name=qd.parent and q.docstatus=1 and customer='%(cust)s' group by qd.item_code\ )m where q.item_code=m.item_code and q.transaction_date=m.transaction_date\ )q on i.item_code=q.item_code\ left join\ (\ select r.item_code,r.sales_rate from\ (\ - select r.voucher_date,rd.item_code,basic_rate as sales_rate from `tabRV Detail` rd, `tabReceivable Voucher` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s'\ + select r.voucher_date,rd.item_code,basic_rate as sales_rate from `tabSales Invoice Item` rd, `tabSales Invoice` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s'\ )r,\ (\ - select rd.item_code,max(voucher_date) as voucher_date from `tabRV Detail` rd, `tabReceivable Voucher` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s' group by rd.item_code\ + select rd.item_code,max(voucher_date) as voucher_date from `tabSales Invoice Item` rd, `tabSales Invoice` r where r.name=rd.parent and r.docstatus=1 and customer='%(cust)s' group by rd.item_code\ )m where r.item_code=m.item_code and r.voucher_date=m.voucher_date\ )s on i.item_code=s.item_code ORDER BY item_code LIMIT 50",{cust:doc.customer, cond:cond}); else diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index f18546850cb..3436b842d7e 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -38,7 +38,7 @@ class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - self.tname = 'Quotation Detail' + self.tname = 'Quotation Item' self.fname = 'quotation_details' # Autoname @@ -50,11 +50,11 @@ class DocType(TransactionBase): # DOCTYPE TRIGGER FUNCTIONS # ============================================================================== - # Pull Enquiry Details + # Pull Opportunity Details # -------------------- def pull_enq_details(self): self.doc.clear_table(self.doclist, 'quotation_details') - get_obj('DocType Mapper', 'Enquiry-Quotation').dt_map('Enquiry', 'Quotation', self.doc.enq_no, self.doc, self.doclist, "[['Enquiry', 'Quotation'],['Enquiry Detail', 'Quotation Detail']]") + get_obj('DocType Mapper', 'Enquiry-Quotation').dt_map('Enquiry', 'Quotation', self.doc.enq_no, self.doc, self.doclist, "[['Enquiry', 'Quotation'],['Opportunity Item', 'Quotation Item']]") self.get_adj_percent() @@ -65,7 +65,7 @@ class DocType(TransactionBase): def get_contact_details(self): return get_obj('Sales Common').get_contact_details(self,0) - # Clear Quotation Details + # Clear Quotation Items # ----------------------- def clear_quotation_details(self): self.doc.clear_table(self.doclist, 'quotation_details') @@ -245,7 +245,7 @@ class DocType(TransactionBase): ev.event_date = self.doc.contact_date ev.event_hour = '10:00' ev.event_type = 'Private' - ev.ref_type = 'Enquiry' + ev.ref_type = 'Opportunity' ev.ref_name = self.doc.name ev.save(1) @@ -270,18 +270,18 @@ class DocType(TransactionBase): if prevdoc: if flag == 'submit': #on submit - sql("update `tabEnquiry` set status = 'Quotation Sent' where name = %s", prevdoc) + sql("update `tabOpportunity` set status = 'Quotation Sent' where name = %s", prevdoc) elif flag == 'cancel': #on cancel - sql("update `tabEnquiry` set status = 'Open' where name = %s", prevdoc) + sql("update `tabOpportunity` set status = 'Open' where name = %s", prevdoc) elif flag == 'order lost': #order lost - sql("update `tabEnquiry` set status = 'Enquiry Lost' where name=%s", prevdoc) + sql("update `tabOpportunity` set status = 'Opportunity Lost' where name=%s", prevdoc) elif flag == 'order confirm': #order confirm - sql("update `tabEnquiry` set status='Order Confirmed' where name=%s", prevdoc) + sql("update `tabOpportunity` set status='Order Confirmed' where name=%s", prevdoc) # declare as order lost #------------------------- def declare_order_lost(self,arg): - chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Detail` t2 where t2.parent = t1.name and t1.docstatus=1 and t2.prevdoc_docname = %s",self.doc.name) + chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t1.docstatus=1 and t2.prevdoc_docname = %s",self.doc.name) if chk: msgprint("Sales Order No. "+cstr(chk[0][0])+" is submitted against this Quotation. Thus 'Order Lost' can not be declared against it.") raise Exception @@ -350,6 +350,6 @@ class DocType(TransactionBase): return print_lst def update_followup_details(self): - sql("delete from `tabFollow up` where parent = '%s'"%self.doc.name) + sql("delete from `tabCommunication Log` where parent = '%s'"%self.doc.name) for d in getlist(self.doclist, 'follow_up'): d.save() diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt index e313e2da577..263597515d9 100644 --- a/erpnext/selling/doctype/quotation/quotation.txt +++ b/erpnext/selling/doctype/quotation/quotation.txt @@ -602,17 +602,17 @@ # DocField { 'colour': u'White:FFF', - 'description': u"To create Quotation against Enquiry, Select Enquiry No. and click on 'Pull Enquiry Details' ", + 'description': u"To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ", 'doctype': u'DocField', 'fieldname': u'enq_no', 'fieldtype': u'Link', 'hidden': 0, 'in_filter': 1, - 'label': u'Enquiry No', + 'label': u'Opportunity No', 'no_copy': 0, 'oldfieldname': u'enq_no', 'oldfieldtype': u'Link', - 'options': u'Enquiry', + 'options': u'Opportunity', 'permlevel': 0, 'print_hide': 0, 'report_hide': 0, @@ -625,7 +625,7 @@ 'fieldname': u'pull_enquiry_detail', 'fieldtype': u'Button', 'hidden': 0, - 'label': u'Pull Enquiry Detail', + 'label': u'Pull Opportunity Detail', 'no_copy': 0, 'oldfieldtype': u'Button', 'permlevel': 0, @@ -651,10 +651,10 @@ 'doctype': u'DocField', 'fieldname': u'quotation_details', 'fieldtype': u'Table', - 'label': u'Quotation Details', + 'label': u'Quotation Items', 'oldfieldname': u'quotation_details', 'oldfieldtype': u'Table', - 'options': u'Quotation Detail', + 'options': u'Quotation Item', 'permlevel': 0, 'width': u'40px' }, @@ -718,7 +718,7 @@ 'label': u'Select Charges Master', 'oldfieldname': u'charge', 'oldfieldtype': u'Link', - 'options': u'Other Charges', + 'options': u'Sales Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1, 'trigger': u'Client' @@ -742,10 +742,10 @@ 'doctype': u'DocField', 'fieldname': u'other_charges', 'fieldtype': u'Table', - 'label': u'Other Charges', + 'label': u'Sales Taxes and Charges Master', 'oldfieldname': u'other_charges', 'oldfieldtype': u'Table', - 'options': u'RV Tax Detail', + 'options': u'Sales Taxes and Charges', 'permlevel': 0 }, @@ -920,7 +920,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1, 'report_hide': 1 @@ -1031,7 +1031,7 @@ 'fieldname': u'enq_det', 'fieldtype': u'Text', 'hidden': 1, - 'label': u'Enquiry Detail', + 'label': u'Opportunity Item', 'no_copy': 0, 'oldfieldname': u'enq_det', 'oldfieldtype': u'Text', @@ -1095,7 +1095,7 @@ 'doctype': u'DocField', 'fieldname': u'order_lost_reason', 'fieldtype': u'Small Text', - 'label': u'Order Lost Reason', + 'label': u'Quotation Lost Reason', 'no_copy': 1, 'oldfieldname': u'order_lost_reason', 'oldfieldtype': u'Small Text', @@ -1204,10 +1204,10 @@ 'doctype': u'DocField', 'fieldname': u'follow_up', 'fieldtype': u'Table', - 'label': u'Follow up', + 'label': u'Communication Log', 'oldfieldname': u'follow_up', 'oldfieldtype': u'Table', - 'options': u'Follow up', + 'options': u'Communication Log', 'permlevel': 0, 'print_hide': 1, 'width': u'40px' diff --git a/erpnext/selling/doctype/return_detail/__init__.py b/erpnext/selling/doctype/quotation_item/__init__.py similarity index 100% rename from erpnext/selling/doctype/return_detail/__init__.py rename to erpnext/selling/doctype/quotation_item/__init__.py diff --git a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_item/quotation_item.txt similarity index 98% rename from erpnext/selling/doctype/quotation_detail/quotation_detail.txt rename to erpnext/selling/doctype/quotation_item/quotation_item.txt index 8619e821f6a..9cee3de24ae 100644 --- a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt +++ b/erpnext/selling/doctype/quotation_item/quotation_item.txt @@ -1,4 +1,4 @@ -# DocType, Quotation Detail +# DocType, Quotation Item [ # These values are common in all dictionaries @@ -30,15 +30,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Quotation Detail', + 'parent': u'Quotation Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Quotation Detail + # DocType, Quotation Item { 'doctype': 'DocType', - 'name': u'Quotation Detail' + 'name': u'Quotation Item' }, # DocField diff --git a/erpnext/selling/doctype/sales_order_detail/__init__.py b/erpnext/selling/doctype/sales_and_purchase_return_item/__init__.py similarity index 100% rename from erpnext/selling/doctype/sales_order_detail/__init__.py rename to erpnext/selling/doctype/sales_and_purchase_return_item/__init__.py diff --git a/erpnext/selling/doctype/return_detail/return_detail.txt b/erpnext/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt similarity index 93% rename from erpnext/selling/doctype/return_detail/return_detail.txt rename to erpnext/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt index 5f0f250a2b2..e064714fede 100644 --- a/erpnext/selling/doctype/return_detail/return_detail.txt +++ b/erpnext/selling/doctype/sales_and_purchase_return_item/sales_and_purchase_return_item.txt @@ -1,4 +1,4 @@ -# DocType, Return Detail +# DocType, Sales and Purchase Return Item [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Return Detail', + 'parent': u'Sales and Purchase Return Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Return Detail + # DocType, Sales and Purchase Return Item { 'doctype': 'DocType', - 'name': u'Return Detail' + 'name': u'Sales and Purchase Return Item' }, # DocField diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index 192875c2a8e..06cb424e74a 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -25,7 +25,7 @@ cur_frm.cscript.load_taxes = function(doc, cdt, cdn, callback) { // run if this is not executed from dt_map... doc = locals[doc.doctype][doc.name]; - if(doc.customer || getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length) { + if(doc.customer || getchildren('Sales Taxes and Charges', doc.name, 'other_charges', doc.doctype).length) { if(callback) { callback(doc, cdt, cdn); } @@ -105,7 +105,7 @@ var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) { cur_frm.fields_dict['conversion_rate'].label_span.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')'; cur_frm.fields_dict['plc_conversion_rate'].label_span.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')'; - if (doc.doctype == 'Receivable Voucher') { + if (doc.doctype == 'Sales Invoice') { cur_frm.fields_dict['total_advance'].label_span.innerHTML = 'Total Advance (' + base_curr + ')'; cur_frm.fields_dict['outstanding_amount'].label_span.innerHTML = 'Outstanding Amount (' + base_curr + ')'; } @@ -127,12 +127,12 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) { //tax table flds tax_cols = {'tax_amount': 'Amount', 'total': 'Total'}; - for (d in tax_cols) $('[data-grid-fieldname="RV Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')'); + for (d in tax_cols) $('[data-grid-fieldname="Sales Taxes and Charges-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')'); - if (doc.doctype == 'Receivable Voucher') { + if (doc.doctype == 'Sales Invoice') { // advance table flds adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount'} - for (d in adv_cols) $('[data-grid-fieldname="Advance Adjustment Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')'); + for (d in adv_cols) $('[data-grid-fieldname="Sales Invoice Advance-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')'); } } @@ -359,7 +359,7 @@ cur_frm.cscript.export_rate = function(doc,cdt,cdn) { // ************* GET OTHER CHARGES BASED ON COMPANY ************* cur_frm.fields_dict.charge.get_query = function(doc) { - return 'SELECT DISTINCT `tabOther Charges`.name FROM `tabOther Charges` WHERE `tabOther Charges`.company = "'+doc.company+'" AND `tabOther Charges`.company is not NULL AND `tabOther Charges`.docstatus != 2 AND `tabOther Charges`.%(key)s LIKE "%s" ORDER BY `tabOther Charges`.name LIMIT 50'; + return 'SELECT DISTINCT `tabSales Taxes and Charges Master`.name FROM `tabSales Taxes and Charges Master` WHERE `tabSales Taxes and Charges Master`.company = "'+doc.company+'" AND `tabSales Taxes and Charges Master`.company is not NULL AND `tabSales Taxes and Charges Master`.docstatus != 2 AND `tabSales Taxes and Charges Master`.%(key)s LIKE "%s" ORDER BY `tabSales Taxes and Charges Master`.name LIMIT 50'; } // ********************* Get Charges **************************** @@ -390,7 +390,7 @@ cur_frm.cscript.recalc = function(doc, n) { if(n > 0) cur_frm.cscript.update_fname_table(doc , tname , fname , n, other_fname); // updates all values in table (i.e. amount, export amount, net total etc.) if(flt(doc.net_total) > 0) { - var cl = getchildren('RV Tax Detail', doc.name, other_fname,doc.doctype); + var cl = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype); for(var i = 0; iCalculation Details for Other Charges:'; var cl = getchildren(tname, doc.name, fname); - var tax = getchildren('RV Tax Detail', doc.name, other_fname,doc.doctype); + var tax = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype); // Make display table var otc = make_table(cur_frm.fields_dict['Other Charges Calculation'].disp_area, @@ -486,7 +486,7 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) // Add Item Code in new Row $td(otc,i+1,0).innerHTML = cl[i].item_code ? cl[i].item_code : cl[i].description; - //var tax = getchildren('RV Tax Detail', doc.name, other_fname,doc.doctype); + //var tax = getchildren('Sales Taxes and Charges', doc.name, other_fname,doc.doctype); var total = net_total; @@ -512,7 +512,7 @@ cur_frm.cscript.calc_other_charges = function(doc , tname , fname , other_fname) tax[t].tax_amount += flt(tax_amount); var total_amount = flt(tax[t].tax_amount); total_tax_amount = flt(tax[t].total_tax_amount) + flt(total_amount); - set_multiple('RV Tax Detail', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'amount':roundNumber(flt(total_amount), 2), 'total':roundNumber(flt(total)+flt(tax[t].tax_amount), 2)}, other_fname); + set_multiple('Sales Taxes and Charges', tax[t].name, { 'item_wise_tax_detail':tax[t].item_wise_tax_detail, 'amount':roundNumber(flt(total_amount), 2), 'total':roundNumber(flt(total)+flt(tax[t].tax_amount), 2)}, other_fname); prev_total += flt(tax[t].total_amount); // for previous row total total += flt(tax[t].tax_amount); // for adding total to previous amount @@ -582,7 +582,7 @@ cur_frm.cscript.check_charge_type_and_get_tax_amount = function( doc, tax, t, cl // ********************** Functions for inclusive value calc ****************************** cur_frm.cscript.consider_incl_rate = function(doc, other_fname) { - var tax_list = getchildren('RV Tax Detail', doc.name, other_fname, doc.doctype); + var tax_list = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype); for(var i=0; i\ @@ -746,7 +746,7 @@ cur_frm.cscript['Re-Calculate Values'] = function(doc, cdt, cdn) { cur_frm.cscript['Calculate Charges'] = function(doc, cdt, cdn) { var other_fname = cur_frm.cscript.other_fname; - var cl = getchildren('RV Tax Detail', doc.name, other_fname, doc.doctype); + var cl = getchildren('Sales Taxes and Charges', doc.name, other_fname, doc.doctype); for(var i = 0; i flt(max_qty))): reserved_qty = -(flt(max_qty)-flt(tot_qty)) else: @@ -405,7 +405,7 @@ class DocType(TransactionBase): def add_packing_list_item(self,obj, item_code, qty, warehouse, line): bin = self.get_bin_qty(item_code, warehouse) item = self.get_packing_item_details(item_code) - pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Detail', 1, obj.doclist) + pi = addchild(obj.doc, 'packing_details', 'Delivery Note Packing Item', 1, obj.doclist) pi.parent_item = item_code pi.item_code = item_code pi.item_name = item['item_name'] @@ -511,7 +511,7 @@ class DocType(TransactionBase): import datetime for d in getlist(obj.doclist, obj.fname): if d.prevdoc_doctype and d.prevdoc_docname: - if d.prevdoc_doctype == 'Receivable Voucher': + if d.prevdoc_doctype == 'Sales Invoice': dt = webnotes.conn.sql("select posting_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname)) else: dt = webnotes.conn.sql("select transaction_date from `tab%s` where name = '%s'" % (d.prevdoc_doctype, d.prevdoc_docname)) @@ -537,7 +537,7 @@ class StatusUpdater: - Update Percent - Validate over delivery - From Receivable Voucher + From Sales Invoice - Update Billed Amt - Update Percent - Validate over billing @@ -559,30 +559,30 @@ class StatusUpdater: def validate_all_qty(self): """ - Validates over-billing / delivery / installation in Delivery Note, Receivable Voucher, Installation Note + Validates over-billing / delivery / installation in Delivery Note, Sales Invoice, Installation Note To called after update_all_qty """ if self.obj.doc.doctype=='Delivery Note': self.validate_qty({ - 'source_dt' :'Delivery Note Detail', + 'source_dt' :'Delivery Note Item', 'compare_field' :'delivered_qty', 'compare_ref_field' :'qty', - 'target_dt' :'Sales Order Detail', + 'target_dt' :'Sales Order Item', 'join_field' :'prevdoc_detail_docname' }) - elif self.obj.doc.doctype=='Receivable Voucher': + elif self.obj.doc.doctype=='Sales Invoice': self.validate_qty({ - 'source_dt' :'RV Detail', + 'source_dt' :'Sales Invoice Item', 'compare_field' :'billed_amt', 'compare_ref_field' :'amount', - 'target_dt' :'Sales Order Detail', + 'target_dt' :'Sales Order Item', 'join_field' :'so_detail' }) self.validate_qty({ - 'source_dt' :'RV Detail', + 'source_dt' :'Sales Invoice Item', 'compare_field' :'billed_amt', 'compare_ref_field' :'amount', - 'target_dt' :'Delivery Note Detail', + 'target_dt' :'Delivery Note Item', 'join_field' :'dn_detail' }, no_tolerance =1) elif self.obj.doc.doctype=='Installation Note': @@ -590,7 +590,7 @@ class StatusUpdater: 'source_dt' :'Installation Item Details', 'compare_field' :'installed_qty', 'compare_ref_field' :'qty', - 'target_dt' :'Delivery Note Detail', + 'target_dt' :'Delivery Note Item', 'join_field' :'dn_detail' }, no_tolerance =1) @@ -606,7 +606,7 @@ class StatusUpdater: if not(tolerance): if self.global_tolerance == None: - self.global_tolerance = flt(get_value('Manage Account',None,'tolerance') or 0) + self.global_tolerance = flt(get_value('Global Defaults',None,'tolerance') or 0) tolerance = self.global_tolerance self.tolerance[item_code] = tolerance @@ -675,11 +675,11 @@ class StatusUpdater: if self.obj.doc.doctype=='Delivery Note': self.update_qty({ 'target_field' :'delivered_qty', - 'target_dt' :'Sales Order Detail', + 'target_dt' :'Sales Order Item', 'target_parent_dt' :'Sales Order', 'target_parent_field' :'per_delivered', 'target_ref_field' :'qty', - 'source_dt' :'Delivery Note Detail', + 'source_dt' :'Delivery Note Item', 'source_field' :'qty', 'join_field' :'prevdoc_detail_docname', 'percent_join_field' :'prevdoc_docname', @@ -687,14 +687,14 @@ class StatusUpdater: 'keyword' :'Delivered' }) - elif self.obj.doc.doctype=='Receivable Voucher': + elif self.obj.doc.doctype=='Sales Invoice': self.update_qty({ 'target_field' :'billed_amt', - 'target_dt' :'Sales Order Detail', + 'target_dt' :'Sales Order Item', 'target_parent_dt' :'Sales Order', 'target_parent_field' :'per_billed', 'target_ref_field' :'amount', - 'source_dt' :'RV Detail', + 'source_dt' :'Sales Invoice Item', 'source_field' :'amount', 'join_field' :'so_detail', 'percent_join_field' :'sales_order', @@ -704,11 +704,11 @@ class StatusUpdater: self.update_qty({ 'target_field' :'billed_amt', - 'target_dt' :'Delivery Note Detail', + 'target_dt' :'Delivery Note Item', 'target_parent_dt' :'Delivery Note', 'target_parent_field' :'per_billed', 'target_ref_field' :'amount', - 'source_dt' :'RV Detail', + 'source_dt' :'Sales Invoice Item', 'source_field' :'amount', 'join_field' :'dn_detail', 'percent_join_field' :'delivery_note', @@ -719,11 +719,11 @@ class StatusUpdater: if self.obj.doc.doctype=='Installation Note': self.update_qty({ 'target_field' :'installed_qty', - 'target_dt' :'Delivery Note Detail', + 'target_dt' :'Delivery Note Item', 'target_parent_dt' :'Delivery Note', 'target_parent_field' :'per_installed', 'target_ref_field' :'qty', - 'source_dt' :'Installed Item Details', + 'source_dt' :'Installation Note Item', 'source_field' :'qty', 'join_field' :'prevdoc_detail_docname', 'percent_join_field' :'prevdoc_docname', diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 9a877c60b88..d3d89d32535 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -16,7 +16,7 @@ // Module CRM -cur_frm.cscript.tname = "Sales Order Detail"; +cur_frm.cscript.tname = "Sales Order Item"; cur_frm.cscript.fname = "sales_order_details"; cur_frm.cscript.other_fname = "other_charges"; cur_frm.cscript.sales_team_fname = "sales_team"; @@ -77,7 +77,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // indent if(doc.order_type != 'Maintenance') - cur_frm.add_custom_button('Make ' + get_doctype_label('Indent'), cur_frm.cscript['Make Purchase Requisition']); + cur_frm.add_custom_button('Make ' + get_doctype_label('Purchase Request'), cur_frm.cscript['Make Purchase Requisition']); // sales invoice if(doc.per_billed < 100) @@ -135,7 +135,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; } -cur_frm.cscript['Pull Quotation Details'] = function(doc,dt,dn) { +cur_frm.cscript['Pull Quotation Items'] = function(doc,dt,dn) { var callback = function(r,rt){ var doc = locals[cur_frm.doctype][cur_frm.docname]; if(r.message){ @@ -217,7 +217,7 @@ cur_frm.cscript['Make Maintenance Schedule'] = function() { 'from_doctype':'Sales Order', 'to_doctype':'Maintenance Schedule', 'from_docname':doc.name, - 'from_to_list':"[['Sales Order', 'Maintenance Schedule'], ['Sales Order Detail', 'Item Maintenance Detail']]" + 'from_to_list':"[['Sales Order', 'Maintenance Schedule'], ['Sales Order Item', 'Maintenance Schedule Item']]" } , function(r,rt) { loaddoc("Maintenance Schedule", n); @@ -246,7 +246,7 @@ cur_frm.cscript['Make Maintenance Visit'] = function() { 'from_doctype':'Sales Order', 'to_doctype':'Maintenance Visit', 'from_docname':doc.name, - 'from_to_list':"[['Sales Order', 'Maintenance Visit'], ['Sales Order Detail', 'Maintenance Visit Detail']]" + 'from_to_list':"[['Sales Order', 'Maintenance Visit'], ['Sales Order Item', 'Maintenance Visit Purpose']]" } , function(r,rt) { loaddoc("Maintenance Visit", n); @@ -266,16 +266,16 @@ cur_frm.cscript['Make Maintenance Visit'] = function() { cur_frm.cscript['Make Purchase Requisition'] = function() { var doc = cur_frm.doc; if (doc.docstatus == 1) { - n = createLocal("Indent"); + n = createLocal("Purchase Request"); $c('dt_map', args={ - 'docs':compress_doclist([locals["Indent"][n]]), + 'docs':compress_doclist([locals["Purchase Request"][n]]), 'from_doctype':'Sales Order', - 'to_doctype':'Indent', + 'to_doctype':'Purchase Request', 'from_docname':doc.name, - 'from_to_list':"[['Sales Order', 'Indent'], ['Sales Order Detail', 'Indent Detail']]" + 'from_to_list':"[['Sales Order', 'Purchase Request'], ['Sales Order Item', 'Purchase Request Item']]" } , function(r,rt) { - loaddoc("Indent", n); + loaddoc("Purchase Request", n); } ); } @@ -293,7 +293,7 @@ cur_frm.cscript['Make Delivery Note'] = function() { 'from_doctype':'Sales Order', 'to_doctype':'Delivery Note', 'from_docname':doc.name, - 'from_to_list':"[['Sales Order', 'Delivery Note'], ['Sales Order Detail', 'Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]" + 'from_to_list':"[['Sales Order', 'Delivery Note'], ['Sales Order Item', 'Delivery Note Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]" } , function(r,rt) { loaddoc("Delivery Note", n); @@ -308,15 +308,15 @@ cur_frm.cscript['Make Delivery Note'] = function() { cur_frm.cscript['Make Sales Invoice'] = function() { var doc = cur_frm.doc; - n = createLocal('Receivable Voucher'); + n = createLocal('Sales Invoice'); $c('dt_map', args={ - 'docs':compress_doclist([locals['Receivable Voucher'][n]]), + 'docs':compress_doclist([locals['Sales Invoice'][n]]), 'from_doctype':doc.doctype, - 'to_doctype':'Receivable Voucher', + 'to_doctype':'Sales Invoice', 'from_docname':doc.name, - 'from_to_list':"[['Sales Order','Receivable Voucher'],['Sales Order Detail','RV Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]" + 'from_to_list':"[['Sales Order','Sales Invoice'],['Sales Order Item','Sales Invoice Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]" }, function(r,rt) { - loaddoc('Receivable Voucher', n); + loaddoc('Sales Invoice', n); } ); } diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 7796e15cbd7..f12a999da05 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -38,7 +38,7 @@ class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - self.tname = 'Sales Order Detail' + self.tname = 'Sales Order Item' self.fname = 'sales_order_details' self.person_tname = 'Target Detail' self.partner_tname = 'Partner Target Detail' @@ -52,7 +52,7 @@ class DocType(TransactionBase): # DOCTYPE TRIGGER FUNCTIONS # ============================= - # Pull Quotation Details + # Pull Quotation Items # ----------------------- def pull_quotation_details(self): self.doc.clear_table(self.doclist, 'other_charges') @@ -60,7 +60,7 @@ class DocType(TransactionBase): self.doc.clear_table(self.doclist, 'sales_team') self.doc.clear_table(self.doclist, 'tc_details') if self.doc.quotation_no: - get_obj('DocType Mapper', 'Quotation-Sales Order').dt_map('Quotation', 'Sales Order', self.doc.quotation_no, self.doc, self.doclist, "[['Quotation', 'Sales Order'],['Quotation Detail', 'Sales Order Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team'],['TC Detail','TC Detail']]") + get_obj('DocType Mapper', 'Quotation-Sales Order').dt_map('Quotation', 'Sales Order', self.doc.quotation_no, self.doc, self.doclist, "[['Quotation', 'Sales Order'],['Quotation Item', 'Sales Order Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team'],['TC Detail','TC Detail']]") else: msgprint("Please select Quotation whose details need to pull") @@ -91,7 +91,7 @@ class DocType(TransactionBase): def get_comm_rate(self, sales_partner): return get_obj('Sales Common').get_comm_rate(sales_partner, self) - # Clear Sales Order Details Table + # Clear Sales Order Items Table # -------------------------------- def clear_sales_order_details(self): self.doc.clear_table(self.doclist, 'sales_order_details') @@ -163,7 +163,7 @@ class DocType(TransactionBase): #check if maintenance schedule already generated #============================================ def check_maintenance_schedule(self): - nm = sql("select t1.name from `tabMaintenance Schedule` t1, `tabItem Maintenance Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", self.doc.name) + nm = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", self.doc.name) nm = nm and nm[0][0] or '' if not nm: @@ -172,7 +172,7 @@ class DocType(TransactionBase): #check if maintenance visit already generated #============================================ def check_maintenance_visit(self): - nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name) + nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name) nm = nm and nm[0][0] or '' if not nm: @@ -216,7 +216,7 @@ class DocType(TransactionBase): def validate_for_items(self): check_list,flag = [],0 chk_dupl_itm = [] - # Sales Order Details Validations + # Sales Order Items Validations for d in getlist(self.doclist, 'sales_order_details'): if cstr(self.doc.quotation_no) == cstr(d.prevdoc_docname): flag = 1 @@ -358,9 +358,9 @@ class DocType(TransactionBase): raise Exception , "Validation Error. " def update_enquiry_status(self, prevdoc, flag): - enq = sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Detail` t2 where t2.parent = t1.name and t1.name=%s", prevdoc) + enq = sql("select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s", prevdoc) if enq: - sql("update `tabEnquiry` set status = %s where name=%s",(flag,enq[0][0])) + sql("update `tabOpportunity` set status = %s where name=%s",(flag,enq[0][0])) #update status of quotation, enquiry #---------------------------------------- @@ -373,7 +373,7 @@ class DocType(TransactionBase): #update enquiry self.update_enquiry_status(d.prevdoc_docname, 'Order Confirmed') elif flag == 'cancel': - chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Detail` t2 where t2.parent = t1.name and t2.prevdoc_docname=%s and t1.name!=%s and t1.docstatus=1", (d.prevdoc_docname,self.doc.name)) + chk = sql("select t1.name from `tabSales Order` t1, `tabSales Order Item` t2 where t2.parent = t1.name and t2.prevdoc_docname=%s and t1.name!=%s and t1.docstatus=1", (d.prevdoc_docname,self.doc.name)) if not chk: sql("update `tabQuotation` set status = 'Submitted' where name=%s",d.prevdoc_docname) @@ -421,18 +421,18 @@ class DocType(TransactionBase): # ---------------------------------------------------------------------------- def check_nextdoc_docstatus(self): # Checks Delivery Note - submit_dn = sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Detail` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_dn = sql("select t1.name from `tabDelivery Note` t1,`tabDelivery Note Item` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_dn: msgprint("Delivery Note : " + cstr(submit_dn[0][0]) + " has been submitted against " + cstr(self.doc.doctype) + ". Please cancel Delivery Note : " + cstr(submit_dn[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) - # Checks Receivable Voucher - submit_rv = sql("select t1.name from `tabReceivable Voucher` t1,`tabRV Detail` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name)) + # Checks Sales Invoice + submit_rv = sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_rv: msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Sales Invoice : "+ cstr(submit_rv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) #check maintenance schedule - submit_ms = sql("select t1.name from `tabMaintenance Schedule` t1, `tabItem Maintenance Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) + submit_ms = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) if submit_ms: msgprint("Maintenance Schedule : " + cstr(submit_ms[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Schedule : "+ cstr(submit_ms[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) - submit_mv = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) + submit_mv = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1",self.doc.name) if submit_mv: msgprint("Maintenance Visit : " + cstr(submit_mv[0][0]) + " has already been submitted against " +cstr(self.doc.doctype)+ ". Please cancel Maintenance Visit : " + cstr(submit_mv[0][0]) + " first and then cancel "+ cstr(self.doc.doctype), raise_exception = 1) diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt index 27bd86c4d09..11a2dc59f91 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.txt +++ b/erpnext/selling/doctype/sales_order/sales_order.txt @@ -707,7 +707,7 @@ 'doctype': u'DocField', 'fieldname': u'pull_quotation_details', 'fieldtype': u'Button', - 'label': u'Pull Quotation Details', + 'label': u'Pull Quotation Items', 'oldfieldtype': u'Button', 'options': u'pull_quotation_details', 'permlevel': 0, @@ -729,10 +729,10 @@ 'doctype': u'DocField', 'fieldname': u'sales_order_details', 'fieldtype': u'Table', - 'label': u'Sales Order Details', + 'label': u'Sales Order Items', 'oldfieldname': u'sales_order_details', 'oldfieldtype': u'Table', - 'options': u'Sales Order Detail', + 'options': u'Sales Order Item', 'permlevel': 0, 'print_hide': 0, 'width': u'40px' @@ -797,7 +797,7 @@ 'label': u'Select Charges Master', 'oldfieldname': u'charge', 'oldfieldtype': u'Link', - 'options': u'Other Charges', + 'options': u'Sales Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -818,10 +818,10 @@ 'doctype': u'DocField', 'fieldname': u'other_charges', 'fieldtype': u'Table', - 'label': u'Other Charges', + 'label': u'Sales Taxes and Charges Master', 'oldfieldname': u'other_charges', 'oldfieldtype': u'Table', - 'options': u'RV Tax Detail', + 'options': u'Sales Taxes and Charges', 'permlevel': 0 }, @@ -987,7 +987,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1, 'search_index': 0 @@ -1022,7 +1022,7 @@ 'doctype': u'DocField', 'fieldname': u'terms', 'fieldtype': u'Text Editor', - 'label': u'Term Details', + 'label': u'Terms and Conditions Details', 'oldfieldname': u'terms', 'oldfieldtype': u'Text Editor', 'permlevel': 0, @@ -1228,7 +1228,7 @@ 'label': u'Packing Details', 'oldfieldname': u'packing_details', 'oldfieldtype': u'Table', - 'options': u'Delivery Note Packing Detail', + 'options': u'Delivery Note Packing Item', 'permlevel': 1, 'print_hide': 1 }, diff --git a/erpnext/setup/doctype/manage_account/__init__.py b/erpnext/selling/doctype/sales_order_item/__init__.py similarity index 100% rename from erpnext/setup/doctype/manage_account/__init__.py rename to erpnext/selling/doctype/sales_order_item/__init__.py diff --git a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt similarity index 98% rename from erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt rename to erpnext/selling/doctype/sales_order_item/sales_order_item.txt index cc95c7a6055..854d2f94410 100644 --- a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.txt @@ -1,4 +1,4 @@ -# DocType, Sales Order Detail +# DocType, Sales Order Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Sales Order Detail', + 'parent': u'Sales Order Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Sales Order Detail + # DocType, Sales Order Item { 'doctype': 'DocType', - 'name': u'Sales Order Detail' + 'name': u'Sales Order Item' }, # DocField diff --git a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt index fb442743fe9..d458ad0a2f2 100644 --- a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt +++ b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.txt @@ -12,12 +12,12 @@ # These values are common for all Search Criteria { - 'add_col': "(`tabDelivery Note Detail`.`qty`- ifnull(`tabDelivery Note Detail`.`installed_qty`, 0)) AS 'Pending to Install'", - 'add_cond': '`tabDelivery Note Detail`.`qty` > ifnull(`tabDelivery Note Detail`.`installed_qty`, 0)', - 'columns': 'Delivery Note\x01ID,Delivery Note\x01Status,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Contact Person,Delivery Note\x01Voucher Date,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Item Name,Delivery Note Detail\x01Quantity,Delivery Note Detail\x01Installed Qty,Delivery Note\x01% Installed', + 'add_col': "(`tabDelivery Note Item`.`qty`- ifnull(`tabDelivery Note Item`.`installed_qty`, 0)) AS 'Pending to Install'", + 'add_cond': '`tabDelivery Note Item`.`qty` > ifnull(`tabDelivery Note Item`.`installed_qty`, 0)', + 'columns': 'Delivery Note\x01ID,Delivery Note\x01Status,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note\x01Contact Person,Delivery Note\x01Voucher Date,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Installed Qty,Delivery Note\x01% Installed', 'criteria_name': 'Delivered Items to be Install', 'description': 'Delivered Items to be Install', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Saved':1,'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Fiscal Year':''}", 'module': 'Selling', diff --git a/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt b/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt index 5351e4e53df..ff8e77a5344 100644 --- a/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt +++ b/erpnext/selling/search_criteria/delivery_note_itemwise_pending_to_bill/delivery_note_itemwise_pending_to_bill.txt @@ -12,14 +12,14 @@ # These values are common for all Search Criteria { - 'add_col': "SUM(`tabDelivery Note Detail`.`qty` - `tabDelivery Note Detail`.`billed_qty`) AS 'Pending Qty'\nSUM((`tabDelivery Note Detail`.`qty` - `tabDelivery Note Detail`.`billed_qty`) * `tabDelivery Note Detail`.`basic_rate`) AS 'Pending Amount'", + 'add_col': "SUM(`tabDelivery Note Item`.`qty` - `tabDelivery Note Item`.`billed_qty`) AS 'Pending Qty'\nSUM((`tabDelivery Note Item`.`qty` - `tabDelivery Note Item`.`billed_qty`) * `tabDelivery Note Item`.`basic_rate`) AS 'Pending Amount'", 'add_cond': "`tabDelivery Note`.status != 'Stopped'\nCASE WHEN `tabDelivery Note`.`per_billed` IS NULL OR `tabDelivery Note`.per_billed = '' THEN 0 < 100 ELSE `tabDelivery Note`.per_billed <100 END", - 'columns': 'Delivery Note\x01ID,Delivery Note\x01Owner,Delivery Note\x01Status,Delivery Note\x01Customer Name,Delivery Note\x01Voucher Date,Delivery Note\x01% Billed,Delivery Note\x01Posting Date,Delivery Note\x01Company Name,Delivery Note\x01Fiscal Year,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Against Document No,Delivery Note Detail\x01Document Type,Delivery Note Detail\x01Against Document Detail No', + 'columns': 'Delivery Note\x01ID,Delivery Note\x01Owner,Delivery Note\x01Status,Delivery Note\x01Customer Name,Delivery Note\x01Voucher Date,Delivery Note\x01% Billed,Delivery Note\x01Posting Date,Delivery Note\x01Company Name,Delivery Note\x01Fiscal Year,Delivery Note Item\x01Item Code,Delivery Note Item\x01Against Document No,Delivery Note Item\x01Document Type,Delivery Note Item\x01Against Document Detail No', 'criteria_name': 'Delivery Note Itemwise Pending To Bill', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Saved':1,'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Company Name':'','Delivery Note\x01Fiscal Year':''}", - 'group_by': '`tabDelivery Note Detail`.item_code, `tabDelivery Note`.`name`', + 'group_by': '`tabDelivery Note Item`.item_code, `tabDelivery Note`.`name`', 'module': 'Selling', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js index f9c3cbacf93..e0e2215fbbb 100644 --- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js +++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js @@ -19,38 +19,38 @@ report.customize_filters = function() { this.mytabs.items['More Filters'].hide() this.hide_all_filters(); - this.add_filter({fieldname:'follow_up_on', label:'Follow up on', fieldtype:'Select', options:''+NEWLINE+'Lead'+NEWLINE+'Enquiry'+NEWLINE+'Quotation',ignore : 1,parent:'Follow up', in_first_page : 1, single_select :1}); - this.add_filter({fieldname:'lead_name', label:'Lead', fieldtype:'Link', options:'Lead', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1}); - this.add_filter({fieldname:'enq_name', label:'Enquiry', fieldtype:'Link', options:'Enquiry', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1}); - this.add_filter({fieldname:'qtn_name', label:'Quotation', fieldtype:'Link', options:'Quotation', report_default:'', ignore : 1, parent:'Follow up', in_first_page : 1}); + this.add_filter({fieldname:'follow_up_on', label:'Follow up on', fieldtype:'Select', options:''+NEWLINE+'Lead'+NEWLINE+'Opportunity'+NEWLINE+'Quotation',ignore : 1,parent:'Follow up', in_first_page : 1, single_select :1}); + this.add_filter({fieldname:'lead_name', label:'Lead', fieldtype:'Link', options:'Lead', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1}); + this.add_filter({fieldname:'enq_name', label:'Opportunity', fieldtype:'Link', options:'Opportunity', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1}); + this.add_filter({fieldname:'qtn_name', label:'Quotation', fieldtype:'Link', options:'Quotation', report_default:'', ignore : 1, parent:'Communication Log', in_first_page : 1}); this.get_filter('Follow up', 'Follow up type').set_as_single(); this.set_filter_properties('Follow up', 'Follow up by', {filter_hide:0, in_first_page : 1}); this.set_filter_properties('Follow up', 'Follow up type', {filter_hide:0, in_first_page : 1}); - this.set_filter_properties('Follow up', 'From Date', {filter_hide:0, in_first_page : 1}); - this.set_filter_properties('Follow up', 'To Date', {filter_hide:0, in_first_page : 1}); + this.set_filter_properties('Communication Log', 'From Date', {filter_hide:0, in_first_page : 1}); + this.set_filter_properties('Communication Log', 'To Date', {filter_hide:0, in_first_page : 1}); - this.orig_sort_list = [['Date','`tabFollow up`.`date`'],['Document Type','`tabFollow up`.`parenttype`'],['Document','`tabFollow up`.`parent`'],['Follow Up By','`tabFollow up`.`follow_up_by`'],['Follow Up Type','`tabFollow up`.`follow_up_type`']]; + this.orig_sort_list = [['Date','`tabCommunication Log`.`date`'],['Document Type','`tabCommunication Log`.`parenttype`'],['Document','`tabCommunication Log`.`parent`'],['Follow Up By','`tabCommunication Log`.`follow_up_by`'],['Follow Up Type','`tabCommunication Log`.`follow_up_type`']]; } report.get_query = function() { - var lead_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Lead'].get_value(); - var enq_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Enquiry'].get_value(); - var quo_id = this.filter_fields_dict['Follow up'+FILTER_SEP+'Quotation'].get_value(); + var lead_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Lead'].get_value(); + var enq_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Opportunity'].get_value(); + var quo_id = this.filter_fields_dict['Communication Log'+FILTER_SEP+'Quotation'].get_value(); var follow_up_on = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up on'].get_value(); var follow_up_by = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up by'].get_value(); var on_type = this.filter_fields_dict['Follow up'+FILTER_SEP+'Follow up type'].get_value(); - var from_date = this.filter_fields_dict['Follow up'+FILTER_SEP+'From Date'].get_value(); - var to_date = this.filter_fields_dict['Follow up'+FILTER_SEP+'To Date'].get_value(); + var from_date = this.filter_fields_dict['Communication Log'+FILTER_SEP+'From Date'].get_value(); + var to_date = this.filter_fields_dict['Communication Log'+FILTER_SEP+'To Date'].get_value(); - var cond = 'parenttype IN ("Lead","Enquiry","Quotation")'; + var cond = 'parenttype IN ("Lead","Opportunity","Quotation")'; if(follow_up_on) cond = 'parenttype = "'+follow_up_on+'"'; if((follow_up_on == 'Lead' && lead_id) || (lead_id && !follow_up_on)) cond +=' AND parent = "'+lead_id+'"'; - if((follow_up_on == 'Enquiry' && enq_id) || (enq_id && !follow_up_on)) cond +=' AND parent = "'+enq_id+'"'; + if((follow_up_on == 'Opportunity' && enq_id) || (enq_id && !follow_up_on)) cond +=' AND parent = "'+enq_id+'"'; if((follow_up_on == 'Quotation' && quo_id) || (quo_id && !follow_up_on)) cond +=' AND parent = "'+quo_id+'"'; if(on_type) cond += ' AND follow_up_type ="'+on_type+'"'; @@ -58,6 +58,6 @@ report.get_query = function() { if(to_date) cond += ' AND date <="'+to_date+'"'; if(follow_up_by) cond += ' AND follow_up_by = "'+follow_up_by+'"'; - var q ='SELECT distinct `tabFollow up`.`parenttype`, `tabFollow up`.`parent`, `tabFollow up`.`date`, `tabFollow up`.`notes`, `tabFollow up`.`follow_up_type`, `tabFollow up`.`follow_up_by` FROM `tabFollow up` WHERE '+cond+' ORDER BY '+sel_val(this.dt.sort_sel)+' '+this.dt.sort_order; + var q ='SELECT distinct `tabCommunication Log`.`parenttype`, `tabCommunication Log`.`parent`, `tabCommunication Log`.`date`, `tabCommunication Log`.`notes`, `tabCommunication Log`.`follow_up_type`, `tabCommunication Log`.`follow_up_by` FROM `tabCommunication Log` WHERE '+cond+' ORDER BY '+sel_val(this.dt.sort_sel)+' '+this.dt.sort_order; return q; } diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt index 64271acb1fd..e4dec13f700 100644 --- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt +++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Lead\x01ID,Follow up\x01Date,Follow up\x01Notes,Follow up\x01Follow up type', + 'columns': 'Lead\x01ID,Communication Log\x01Date,Communication Log\x01Notes,Communication Log\x01Communication Log type', 'criteria_name': 'Follow-up Report', - 'doc_type': 'Follow up', + 'doc_type': 'Communication Log', 'doctype': 'Search Criteria', 'filters': "{'Lead\x01Status':'','Lead\x01Source':'','Lead\x01Lead Type':'','Lead\x01Rating':'','Lead\x01Market Segment':'','Lead\x01Fiscal Year':''}", 'module': 'Selling', diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.js b/erpnext/selling/search_criteria/gross_profit/gross_profit.js index d53c07dfa9f..4ad67358bf1 100644 --- a/erpnext/selling/search_criteria/gross_profit/gross_profit.js +++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.js @@ -21,12 +21,12 @@ report.customize_filters = function() { this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.filter_hide = 0; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0; - this.filter_fields_dict['Delivery Note Detail'+FILTER_SEP +'Item Code'].df.filter_hide = 0; + this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'ID'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1; - this.filter_fields_dict['Delivery Note Detail'+FILTER_SEP +'Item Code'].df.in_first_page = 1; + this.filter_fields_dict['Delivery Note Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1; this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1; } \ No newline at end of file diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.py b/erpnext/selling/search_criteria/gross_profit/gross_profit.py index 47ca3832494..d1b0a864e4d 100644 --- a/erpnext/selling/search_criteria/gross_profit/gross_profit.py +++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.py @@ -39,7 +39,7 @@ out, tot_amount, tot_val_amount, tot_gross_profit = [], 0, 0, 0 for r in res: tot_val_rate = 0 - packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Detail` where parent = %s and parent_item = %s", (r[col_idx['ID']], r[col_idx['Item Code']])) + packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = %s and parent_item = %s", (r[col_idx['ID']], r[col_idx['Item Code']])) for d in packing_list_items: if d[1]: val_rate = sql("select valuation_rate from `tabStock Ledger Entry` where item_code = %s and warehouse = %s and voucher_type = 'Delivery Note' and voucher_no = %s and is_cancelled = 'No'", (d[0], d[1], r[col_idx['ID']])) diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.txt b/erpnext/selling/search_criteria/gross_profit/gross_profit.txt index 76753196fb8..f1209a85f9a 100644 --- a/erpnext/selling/search_criteria/gross_profit/gross_profit.txt +++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.txt @@ -12,10 +12,10 @@ # These values are common for all Search Criteria { - 'columns': 'Delivery Note\x01ID,Delivery Note\x01Posting Date,Delivery Note\x01Posting Time,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Item Name,Delivery Note Detail\x01Description,Delivery Note\x01Project Name,Delivery Note Detail\x01Quantity,Delivery Note Detail\x01Rate*,Delivery Note Detail\x01Amount*', + 'columns': 'Delivery Note\x01ID,Delivery Note\x01Posting Date,Delivery Note\x01Posting Time,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Description,Delivery Note\x01Project Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Rate*,Delivery Note Item\x01Amount*', 'criteria_name': 'Gross Profit', 'description': 'Invoice wise', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01Fiscal Year':''}", 'module': 'Selling', diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt index fbba495eb15..9af1678c6e7 100644 --- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt +++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Delivery Note\x01ID,Delivery Note Detail\x01Item Code,Delivery Note Detail\x01Item Name,Delivery Note Detail\x01Quantity,Delivery Note Detail\x01Rate*,Delivery Note Detail\x01Amount*,Delivery Note Detail\x01Billed Qty,Delivery Note\x01Company', + 'columns': 'Delivery Note\x01ID,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Rate*,Delivery Note Item\x01Amount*,Delivery Note Item\x01Billed Qty,Delivery Note\x01Company', 'criteria_name': 'Itemwise Delivery Details', - 'doc_type': 'Delivery Note Detail', + 'doc_type': 'Delivery Note Item', 'doctype': 'Search Criteria', 'filters': "{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01From Voucher Date\x01lower':'','Delivery Note\x01To Voucher Date\x01upper':'','Delivery Note\x01Fiscal Year':''}", 'module': 'Selling', diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js index 05b2e755ae7..7ff214a4951 100644 --- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js +++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js @@ -19,7 +19,7 @@ report.customize_filters = function() { this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date; this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df['report_default'] = dateutil.obj_to_str(new Date()); this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company; - this.filter_fields_dict['Sales Order Detail'+FILTER_SEP +'Item Code'].df.in_first_page = 1; + this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Status'].df.filter_hide = 1; } diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt index d2246936a0a..8d586e71931 100644 --- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt +++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.txt @@ -12,9 +12,9 @@ # These values are common for all Search Criteria { - 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order Detail\x01Item Code,Sales Order Detail\x01Item Name,Sales Order Detail\x01Quantity,Sales Order Detail\x01Basic Rate*,Sales Order Detail\x01Amount*,Sales Order Detail\x01Delivered Qty,Sales Order Detail\x01Billed Qty,Sales Order\x01Company', + 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Quantity,Sales Order Item\x01Basic Rate*,Sales Order Item\x01Amount*,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty,Sales Order\x01Company', 'criteria_name': 'Itemwise Sales Details', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", 'module': 'Selling', diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js index ef3cef51219..2fa8a0fae0d 100644 --- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js +++ b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js @@ -22,8 +22,8 @@ report.customize_filters = function() { //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.filter_hide = 0; //this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order Date'].df.in_first_page = 1; - this.filter_fields_dict['Sales Order Detail'+FILTER_SEP +'Item Code'].df.filter_hide = 0; - this.filter_fields_dict['Sales Order Detail'+FILTER_SEP +'Item Code'].df.in_first_page = 1; + this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.filter_hide = 0; + this.filter_fields_dict['Sales Order Item'+FILTER_SEP +'Item Code'].df.in_first_page = 1; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0; this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.in_first_page = 1; diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt index 4672949c357..b4d370fde92 100644 --- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt +++ b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.txt @@ -12,19 +12,19 @@ # These values are common for all Search Criteria { - 'columns': 'Sales Order Detail\x01Item Code,Sales Order Detail\x01Quantity,Sales Order Detail\x01Delivered Qty,Sales Order Detail\x01Billed Qty', + 'columns': 'Sales Order Item\x01Item Code,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty', 'criteria_name': 'Periodic Sales Summary', 'dis_filters': 'fiscal_year', 'disabled': 1, - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Company Name':'','Sales Order\x01Fiscal Year':''}", - 'group_by': '`tabSales Order Detail`.`item_code`', + 'group_by': '`tabSales Order Item`.`item_code`', 'module': 'Selling', 'name': '__common__', 'page_len': 50, 'parent_doc_type': 'Sales Order', - 'sort_by': '`tabSales Order Detail`.`item_code`', + 'sort_by': '`tabSales Order Item`.`item_code`', 'sort_order': 'DESC', 'standard': 'Yes' }, diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt index 1ea02d9550e..a13b00b3fb0 100644 --- a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt +++ b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.txt @@ -1,16 +1,16 @@ [ { - 'add_col': '(`tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.delivered_qty, 0)) AS "Qty To Deliver"\n(`tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.billed_qty, 0)) AS "Qty To Bill"\n(`tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.delivered_qty, 0))*`tabSales Order Detail`.basic_rate AS "Amount To Deliver"\n(`tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.billed_qty, 0))*`tabSales Order Detail`.basic_rate AS "Amount To Bill"', - 'add_cond': '(`tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.delivered_qty, 0) > 0 or `tabSales Order Detail`.qty - ifnull(`tabSales Order Detail`.billed_qty, 0) > 0)\n`tabSales Order`.status != "Stopped"', + 'add_col': '(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) AS "Qty To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0)) AS "Qty To Bill"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Bill"', + 'add_cond': '(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0) > 0 or `tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0) > 0)\n`tabSales Order`.status != "Stopped"', 'add_tab': None, - 'columns': 'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Detail\x01Item Code,Sales Order Detail\x01Item Name,Sales Order Detail\x01Description,Sales Order Detail\x01Quantity,Sales Order Detail\x01Delivered Qty,Sales Order Detail\x01Billed Qty', + 'columns': 'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Description,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty', 'creation': '2011-05-09 11:04:19', 'criteria_name': 'Sales Order Pending Items1', 'custom_query': '', 'description': 'Sales Order Pending Items', 'dis_filters': None, 'disabled': None, - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'docstatus': 0, 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", diff --git a/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt b/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt index 0ef2f072a47..6ffb24988f0 100644 --- a/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt +++ b/erpnext/selling/search_criteria/sales_orderwise_booking_&_delivery_summary/sales_orderwise_booking_&_delivery_summary.txt @@ -12,11 +12,11 @@ # These values are common for all Search Criteria { - 'add_col': "SUM(CASE WHEN `tabSales Order`.`status` = 'Stopped' THEN (`tabSales Order Detail`.`delivered_qty` * `tabSales Order Detail`.`basic_rate`) ELSE (`tabSales Order Detail`.`qty` * `tabSales Order Detail`.`basic_rate`) END) AS 'Booking Total'\nSUM(`tabSales Order Detail`.`delivered_qty` * `tabSales Order Detail`.`basic_rate`) AS 'Delivered Amount'", + 'add_col': "SUM(CASE WHEN `tabSales Order`.`status` = 'Stopped' THEN (`tabSales Order Item`.`delivered_qty` * `tabSales Order Item`.`basic_rate`) ELSE (`tabSales Order Item`.`qty` * `tabSales Order Item`.`basic_rate`) END) AS 'Booking Total'\nSUM(`tabSales Order Item`.`delivered_qty` * `tabSales Order Item`.`basic_rate`) AS 'Delivered Amount'", 'columns': 'Sales Order\x01ID,Sales Order\x01Status,Sales Order\x01% Billed,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order\x01Territory', 'criteria_name': 'Sales Orderwise Booking & Delivery Summary', 'description': 'Sales Orderwise Booking & Delivery Summary', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", 'group_by': '`tabSales Order`.`name`', diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt index e46e10d6824..e66c0825fc2 100644 --- a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt +++ b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.txt @@ -12,12 +12,12 @@ # These values are common for all Search Criteria { - 'add_col': 'SUM((`tabSales Order Detail`.`qty` - ifnull(`tabSales Order Detail`.`billed_qty`, 0)) * `tabSales Order Detail`.`basic_rate`) AS "Pending Amount"', + 'add_col': 'SUM((`tabSales Order Item`.`qty` - ifnull(`tabSales Order Item`.`billed_qty`, 0)) * `tabSales Order Item`.`basic_rate`) AS "Pending Amount"', 'add_cond': '`tabSales Order`.status != "Stopped"\n`tabSales Order`.order_type!="Maintenance"', 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Address,Sales Order\x01Status,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Company Name,Sales Order\x01Sales Order Date,Sales Order\x01Net Total,Sales Order\x01Zone,Sales Order\x01Territory,Sales Order\x01Email Id', 'criteria_name': 'Sales Orderwise Pending Amount To Bill', 'description': 'Sales Orderwise Pending Amount To Bill', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Company Name':'','Sales Order\x01Fiscal Year':''}", 'group_by': '`tabSales Order`.`name`', diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt b/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt index 74fc1065ae4..b089c643bef 100644 --- a/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt +++ b/erpnext/selling/search_criteria/sales_orderwise_pending_qty_to_deliver/sales_orderwise_pending_qty_to_deliver.txt @@ -12,12 +12,12 @@ # These values are common for all Search Criteria { - 'add_col': 'SUM(`tabSales Order Detail`.`qty` - ifnull(`tabSales Order Detail`.`delivered_qty`, 0)) AS "Pending Qty"', - 'add_cond': '`tabSales Order`.status != "Stopped"\n`tabSales Order Detail`.`qty` > ifnull(`tabSales Order Detail`.`delivered_qty`, 0)', + 'add_col': 'SUM(`tabSales Order Item`.`qty` - ifnull(`tabSales Order Item`.`delivered_qty`, 0)) AS "Pending Qty"', + 'add_cond': '`tabSales Order`.status != "Stopped"\n`tabSales Order Item`.`qty` > ifnull(`tabSales Order Item`.`delivered_qty`, 0)', 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order\x01Customer Address,Sales Order\x01Status,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Sales Order Date,Sales Order\x01Territory,Sales Order\x01Email Id', 'criteria_name': 'Sales Orderwise Pending Qty To Deliver', 'description': 'Sales Orderwise Pending Qty To Deliver', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", 'group_by': '`tabSales Order`.`name`', diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js index 135b68d078d..9491bbb63a5 100644 --- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js +++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js @@ -35,7 +35,7 @@ report.get_query = function() { sales_person = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Sales Person'].get_value(); target_on = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Target On'].get_value(); under = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Under'].get_value(); - if(under == 'Sales Invoice') under = 'Receivable Voucher'; + if(under == 'Sales Invoice') under = 'Sales Invoice'; if(target_on == 'Quantity'){ q1 = 't1.target_qty AS "Target Quantity"'; @@ -49,7 +49,7 @@ report.get_query = function() { cond1 = 'ifnull(t1.target_amount,"")!=""'; cond2 = 'ifnull(t6.target_amount,"")!=""'; } - if(under =='Receivable Voucher') + if(under =='Sales Invoice') tab = 'RV'; else tab = under; diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py index 3375f08da11..83a65118286 100644 --- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py +++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py @@ -25,7 +25,7 @@ for f in flt_dict: fiscal_year = filter_values.get('fiscal_year') period = filter_values.get('period') under = filter_values.get('under') -if under == 'Sales Invoice': under = 'Receivable Voucher' +if under == 'Sales Invoice': under = 'Sales Invoice' sales_person = filter_values.get('sales_person') target_on = filter_values.get('target_on') @@ -124,12 +124,12 @@ for r in res: #---------------------------------------------------------- if target_on == "Quantity": - actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Receivable Voucher') and 'RV' or under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) #---------------------------------------------------------- if target_on == "Amount": - actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Receivable Voucher') and 'RV' or under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t2.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, sales_person, r[0].strip(), date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) #---------------------------------------------------------- actual = actual and flt(actual[0][0]) or 0 diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js index e1bd1d31372..48791833aeb 100755 --- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js +++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js @@ -40,7 +40,7 @@ report.get_query = function() { date_fld = 'transaction_date'; if(based_on == 'Sales Invoice') { - based_on = 'Receivable Voucher'; + based_on = 'Sales Invoice'; date_fld = 'voucher_date'; } diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py index 83c61f4e9cc..7b1d6b9c6c0 100755 --- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py +++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py @@ -15,7 +15,7 @@ # along with this program. If not, see . if filter_values.get('based_on') == 'Sales Invoice': - based_on_dt = 'Receivable Voucher' + based_on_dt = 'Sales Invoice' else: based_on_dt = filter_values.get('based_on') diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js index 155b98d33b6..cc8e03ed4ae 100644 --- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js +++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js @@ -21,7 +21,7 @@ report.customize_filters = function() { this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Target Detail'}); this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'}); this.add_filter({fieldname:'group_by', label:'Group By', fieldtype:'Select', options:NEWLINE+'Item Group',ignore : 1, parent:'Target Detail'}); - this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Receivable Voucher',report_default:'Sales Order',ignore : 1, parent:'Target Detail'}); + this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'}); } diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py index 771fd2885ae..aa673559547 100644 --- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py +++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py @@ -108,14 +108,14 @@ for r in res: actual = 0 if based_on == 'Cost Center' or based_on == 'Sales Partner': if group_by =='Item Group': - actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Receivable Voucher') and 'RV' or under, under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2, `tabItem` t3 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t3.name = t2.item_code and t3.item_group = '%s' and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) actual = flt(actual[0][0]) else: actual = sql("select sum(ifnull(net_total,0)) from `tab%s` where %s = '%s' and docstatus = 1 and %s between '%s' and '%s' " % (under, based_on_fn, r[0], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) actual = flt(actual[0][0]) elif based_on == 'Sales Person': if group_by =='Item Group': - actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Receivable Voucher') and 'RV' or under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.amount,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3, `tabItem` t4 where t2.parent = t1.name and t3.parent = t1.name and t3.%s = '%s' and t4.name = t2.item_code and t4.item_group = '%s' and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, r[0], r[1], date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) actual = flt(actual[0][0]) else: actual = sql("select sum(ifnull(t2.allocated_amount,0)) from `tab%s` t1, `tabSales Team` t2 where t2.%s = '%s' and t2.parenttype='%s' and t1.docstatus != 2 and t2.parent = t1.name and t1.%s between '%s' and '%s'"%(under, based_on_fn, r[0], under, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js index 1afb7b1d88a..d7dcf703912 100644 --- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js +++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js @@ -35,7 +35,7 @@ report.get_query = function() { territory = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Territory'].get_value(); target_on = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Target On'].get_value(); under = this.filter_fields_dict['Target Detail'+FILTER_SEP+'Under'].get_value(); - if(under == 'Sales Invoice') under = 'Receivable Voucher'; + if(under == 'Sales Invoice') under = 'Sales Invoice'; if(target_on == 'Quantity'){ q1 = 't1.target_qty AS "Target Quantity"'; @@ -49,7 +49,7 @@ report.get_query = function() { cond1 = 'ifnull(t1.target_amount,"")!=""'; cond2 = 'ifnull(t5.target_amount,"")!=""'; } - if(under =='Receivable Voucher') + if(under =='Sales Invoice') tab = 'RV'; else tab = under; diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py index eacb6069504..85eb52808da 100644 --- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py +++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py @@ -25,7 +25,7 @@ for f in flt_dict: fiscal_year = filter_values.get('fiscal_year') period = filter_values.get('period') under = filter_values.get('under') -if under == 'Sales Invoice': under = 'Receivable Voucher' +if under == 'Sales Invoice': under = 'Sales Invoice' territory = filter_values.get('territory') target_on = filter_values.get('target_on') @@ -124,13 +124,13 @@ for r in res: #---------------------------------------------------------- if target_on == "Quantity": - actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Receivable Voucher') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) #---------------------------------------------------------- if target_on == "Amount": - actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Receivable Voucher') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.amount,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s = '%s' and t1.docstatus = 1 and t2.item_group = '%s' and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, territory, r[0],date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) #---------------------------------------------------------- diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py index cf1df24c4bf..560596e8d25 100644 --- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py +++ b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py @@ -63,16 +63,16 @@ for r in res: dn = sql("select name from `tabItem` where item_group in %s"%(cn)) for n in dn: - dt = sql("select sum(qty),sum(amount) from `tabDelivery Note Detail` where item_code ='%s' and docstatus = 1"%n[0]) + dt = sql("select sum(qty),sum(amount) from `tabDelivery Note Item` where item_code ='%s' and docstatus = 1"%n[0]) qty += dt[0][0] and dt[0][0] or 0 amt += dt[0][1] and dt[0][1] or 0 - prt = sql("select distinct t1.name from `tabDelivery Note` t1, `tabDelivery Note Detail` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t2.docstatus =1 order by t1.name"%n[0]) + prt = sql("select distinct t1.name from `tabDelivery Note` t1, `tabDelivery Note Item` t2 where t1.name = t2.parent and t2.item_code = '%s' and t1.docstatus = 1 and t2.docstatus =1 order by t1.name"%n[0]) for p in prt: - d1 = sql("select qty from `tabDelivery Note Detail` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1 and item_code = '%s'"%(p[0],n[0])) + d1 = sql("select qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1 and item_code = '%s'"%(p[0],n[0])) for t in d1: tot_val_rate = 0 - packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Detail` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse, qty"%(p[0],n[0])) + packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse, qty"%(p[0],n[0])) for d in packing_list_items: if d[1]: @@ -89,15 +89,15 @@ for r in res: for n in dn: - dt = sql("select sum(qty), sum(amount) from `tabDelivery Note Detail` where parent = '%s' and docstatus = 1"%n[0]) + dt = sql("select sum(qty), sum(amount) from `tabDelivery Note Item` where parent = '%s' and docstatus = 1"%n[0]) qty += dt[0][0] and dt[0][0] or 0 amt += dt[0][1] and dt[0][1] or 0 - d1 = sql("select item_code,qty from `tabDelivery Note Detail` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1"%n[0]) + d1 = sql("select item_code,qty from `tabDelivery Note Item` where parent = '%s' and parenttype ='Delivery Note' and docstatus =1"%n[0]) for t in d1: tot_val_rate = 0 - packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Detail` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse,qty"%(n[0],t[0])) + packing_list_items = sql("select item_code, warehouse, qty from `tabDelivery Note Packing Item` where parent = '%s' and parent_item = '%s' and docstatus = 1 order by item_code, warehouse,qty"%(n[0],t[0])) for d in packing_list_items: if d[1]: diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js index 2d725d20c65..aabd4e179e4 100644 --- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js +++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js @@ -15,7 +15,7 @@ // along with this program. If not, see . report.customize_filters = function() { - this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Receivable Voucher',report_default:'Sales Order',ignore : 1, parent:'Territory'}); + this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Territory'}); this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Territory'}); this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company',report_default:sys_defaults.company, ignore : 1, parent:'Territory'}); this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Territory'}); diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py index fb6dee1135b..fde72371965 100644 --- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py +++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py @@ -25,7 +25,7 @@ for f in flt_dict: fiscal_year = filter_values.get('fiscal_year') period = filter_values.get('period') under = filter_values.get('under') -if under == 'Sales Invoice': under = 'Receivable Voucher' +if under == 'Sales Invoice': under = 'Sales Invoice' based_on = filter_values.get('based_on') target_on = filter_values.get('target_on') @@ -201,10 +201,10 @@ for r in res: #---------------------------------------------------------- if target_on == "Quantity": if based_on == "Territory": - actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s in %s and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Receivable Voucher') and 'RV' or under, under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.qty,0)) from `tab%s` t1, `tab%s Detail` t2 where t2.parenttype = '%s' and t2.parent = t1.name and t1.%s in %s and t1.docstatus = 1 and t1.%s between '%s' and '%s'" % (under, (under == 'Sales Invoice') and 'RV' or under, under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) elif based_on == 'Sales Person': - actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s in %s and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Receivable Voucher') and 'RV' or under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) + actual = sql("select sum(ifnull(t2.qty,0) * ifnull(t3.allocated_percentage,0) / 100) from `tab%s` t1, `tab%s Detail` t2, `tabSales Team` t3 where t2.parent = t1.name and t3.parent = t1.name and t3.%s in %s and t1.docstatus != 2 and t1.docstatus = 1 and t1.%s between '%s' and '%s' "%(under, (under == 'Sales Invoice') and 'RV' or under, based_on_fn, ch, date_fn, mon_list[count][data['start_date']], mon_list[count][data['end_date']])) #---------------------------------------------------------- if target_on == "Amount": diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.js b/erpnext/selling/search_criteria/variance_report/variance_report.js index e4011e5e77b..b5fe3fb8fd4 100644 --- a/erpnext/selling/search_criteria/variance_report/variance_report.js +++ b/erpnext/selling/search_criteria/variance_report/variance_report.js @@ -22,7 +22,7 @@ report.customize_filters = function() { this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Target Detail'}); // this.add_filter({fieldname:'item_group', label:'Item Group', fieldtype:'Link', options:'Item Group', ignore : 1, parent:'Target Detail'}); this.add_filter({fieldname:'group_by', label:'Group By', fieldtype:'Select', options:NEWLINE+'Item Group',ignore : 1, parent:'Target Detail'}); - this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Receivable Voucher',report_default:'Sales Order',ignore : 1, parent:'Target Detail'}); + this.add_filter({fieldname:'under', label:'Under',fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1, parent:'Target Detail'}); } //this.mytabs.items['Select Columns'].hide() diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.py b/erpnext/selling/search_criteria/variance_report/variance_report.py index 6948eac4ae8..f200f111a02 100644 --- a/erpnext/selling/search_criteria/variance_report/variance_report.py +++ b/erpnext/selling/search_criteria/variance_report/variance_report.py @@ -58,7 +58,7 @@ elif based_on == 'Sales Partner': based = 'sales_partner' -if under == 'Receivable Voucher': +if under == 'Sales Invoice': under_detail = 'RV' dt = 'posting_date' else: diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py index ddfca533b78..d3c89a828da 100644 --- a/erpnext/setup/doctype/authorization_control/authorization_control.py +++ b/erpnext/setup/doctype/authorization_control/authorization_control.py @@ -102,7 +102,7 @@ class DocType(TransactionBase): if based_on == 'Grand Total': auth_value = total elif based_on == 'Customerwise Discount': if doc_obj: - if doc_obj.doc.doctype == 'Receivable Voucher': customer = doc_obj.doc.customer + if doc_obj.doc.doctype == 'Sales Invoice': customer = doc_obj.doc.customer else: customer = doc_obj.doc.customer_name add_cond = " and master_name = '"+make_esc("'")(cstr(customer))+"'" if based_on == 'Itemwise Discount': @@ -116,8 +116,8 @@ class DocType(TransactionBase): # Check Approving Authority for transactions other than expense voucher and Appraisal # ------------------------- def validate_approving_authority(self, doctype_name,company, total, doc_obj = ''): - if doctype_name == 'Payable Voucher': doctype_name = 'Purchase Invoice' - elif doctype_name == 'Receivable Voucher': doctype_name = 'Sales Invoice' + if doctype_name == 'Purchase Invoice': doctype_name = 'Purchase Invoice' + elif doctype_name == 'Sales Invoice': doctype_name = 'Sales Invoice' av_dis = 0 if doc_obj: ref_rate, basic_rate = 0, 0 @@ -192,7 +192,7 @@ class DocType(TransactionBase): rule ={} if doc_obj: - if doctype_name == 'Expense Voucher': + if doctype_name == 'Expense Claim': rule = self.get_value_based_rule(doctype_name,doc_obj.doc.employee,doc_obj.doc.total_claimed_amount, doc_obj.doc.company) elif doctype_name == 'Appraisal': rule = sql("select name, to_emp, to_designation, approving_role, approving_user from `tabAuthorization Rule` where transaction=%s and (to_emp=%s or to_designation IN (select designation from `tabEmployee` where name=%s)) and company = %s and docstatus!=2",(doctype_name,doc_obj.doc.employee, doc_obj.doc.employee, doc_obj.doc.company),as_dict=1) diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.js b/erpnext/setup/doctype/authorization_rule/authorization_rule.js index 02bd6536ccd..887835833b7 100644 --- a/erpnext/setup/doctype/authorization_rule/authorization_rule.js +++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.js @@ -32,7 +32,7 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ if(doc.based_on == 'Not Applicable') hide_field('value'); else unhide_field('value'); - if(doc.transaction == 'Expense Voucher' || doc.transaction == 'Appraisal'){ + if(doc.transaction == 'Expense Claim' || doc.transaction == 'Appraisal'){ hide_field(['master_name','system_role', 'system_user']); unhide_field(['to_emp','to_designation']); if(doc.transaction == 'Appraisal') hide_field('value'); @@ -63,7 +63,7 @@ cur_frm.cscript.based_on = function(doc){ } cur_frm.cscript.transaction = function(doc,cdt,cdn){ - if(doc.transaction == 'Expense Voucher' || doc.transaction == 'Appraisal'){ + if(doc.transaction == 'Expense Claim' || doc.transaction == 'Appraisal'){ doc.master_name = doc.system_role = doc.system_user = ''; refresh_many(['master_name','system_role', 'system_user']); hide_field(['master_name','system_role', 'system_user']); @@ -80,7 +80,7 @@ cur_frm.cscript.transaction = function(doc,cdt,cdn){ hide_field(['to_emp','to_designation']); } - if(doc.transaction == 'Expense Voucher') doc.based_on = 'Total Claimed Amount'; + if(doc.transaction == 'Expense Claim') doc.based_on = 'Total Claimed Amount'; if(doc.transaction == 'Appraisal') doc.based_on == 'Not Applicable'; } diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py index 2c4a0dc0da6..81ca2028613 100644 --- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py +++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py @@ -69,7 +69,7 @@ class DocType: # Validate Rule # -------------- def validate_rule(self): - if not self.doc.transaction == 'Expense Voucher' and not self.doc.transaction == 'Appraisal': + if not self.doc.transaction == 'Expense Claim' and not self.doc.transaction == 'Appraisal': if not self.doc.approving_role and not self.doc.approving_user: msgprint("Please enter Approving Role or Approving User") raise Exception @@ -95,8 +95,8 @@ class DocType: if self.doc.transaction == 'Appraisal' and self.doc.based_on != 'Not Applicable': msgprint("Based on is 'Not Applicable' while setting authorization rule for 'Appraisal'") raise Exception - if self.doc.transaction == 'Expense Voucher' and self.doc.based_on != 'Total Claimed Amount': - msgprint("Authorization rule should be based on 'Total Calimed Amount' while setting authorization rule for 'Expense Voucher'") + if self.doc.transaction == 'Expense Claim' and self.doc.based_on != 'Total Claimed Amount': + msgprint("Authorization rule should be based on 'Total Calimed Amount' while setting authorization rule for 'Expense Claim'") raise Exception diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.txt b/erpnext/setup/doctype/authorization_rule/authorization_rule.txt index 51c364f92b9..e3585449827 100644 --- a/erpnext/setup/doctype/authorization_rule/authorization_rule.txt +++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.txt @@ -88,7 +88,7 @@ 'label': u'Transaction', 'oldfieldname': u'transaction', 'oldfieldtype': u'Select', - 'options': u'\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nStock Entry\nExpense Voucher\nAppraisal', + 'options': u'\nDelivery Note\nPurchase Invoice\nPurchase Order\nPurchase Receipt\nQuotation\nSales Invoice\nSales Order\nStock Entry\nExpense Claim\nAppraisal', 'reqd': 1 }, diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 9756583c7bc..e0c12d8adab 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -241,14 +241,14 @@ class DocType: #update value as blank for tabDefaultValue defkey=company sql("update `tabDefaultValue` set defvalue = '' where defkey='company' and defvalue = %s", self.doc.name) - #update value as blank for tabSingles Manage Account - sql("update `tabSingles` set value = '' where doctype='Manage Account' and field = 'default_company' and value = %s", self.doc.name) + #update value as blank for tabSingles Global Defaults + sql("update `tabSingles` set value = '' where doctype='Global Defaults' and field = 'default_company' and value = %s", self.doc.name) # on rename # --------- def on_rename(self,newdn,olddn): sql("update `tabCompany` set company_name = '%s' where name = '%s'" %(newdn,olddn)) - sql("update `tabSingles` set value = %s where doctype='Manage Account' and field = 'default_company' and value = %s", (newdn, olddn)) + sql("update `tabSingles` set value = %s where doctype='Global Defaults' and field = 'default_company' and value = %s", (newdn, olddn)) if get_defaults('company') == olddn: set_default('company', newdn) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index ff9bf687190..31cc637a475 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -99,7 +99,7 @@ class DocType: 'new_enquiries': self.generate_new_type_query({ 'type': 'new_enquiries', - 'doctype': 'Enquiry' + 'doctype': 'Opportunity' }), 'new_quotations': self.generate_new_type_query({ @@ -110,7 +110,7 @@ class DocType: 'new_sales_orders': self.generate_new_type_query({ 'type': 'new_sales_orders', - 'doctype': 'Receivable Voucher', + 'doctype': 'Sales Invoice', 'sum_col': 'grand_total' }), diff --git a/erpnext/setup/doctype/features_setup/features_setup.txt b/erpnext/setup/doctype/features_setup/features_setup.txt index 8b036653484..fdbf96dcfe1 100644 --- a/erpnext/setup/doctype/features_setup/features_setup.txt +++ b/erpnext/setup/doctype/features_setup/features_setup.txt @@ -97,7 +97,7 @@ # DocField { 'colour': u'White:FFF', - 'description': u'To track brand name in the following documents
\nDelivery Note, Enuiry, Indent, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Receivable Voucher, Sales BOM, Sales Order, Serial No', + 'description': u'To track brand name in the following documents
\nDelivery Note, Enuiry, Purchase Request, Item, Purchase Order, Purchase Voucher, Purchaser Receipt, Quotation, Sales Invoice, Sales BOM, Sales Order, Serial No', 'doctype': u'DocField', 'fieldname': u'fs_brands', 'fieldtype': u'Check', @@ -179,7 +179,7 @@ # DocField { 'colour': u'White:FFF', - 'description': u'Field available in Delivery Note, Quotation, Receivable Voucher, Sales Order', + 'description': u'Field available in Delivery Note, Quotation, Sales Invoice, Sales Order', 'doctype': u'DocField', 'fieldname': u'fs_discounts', 'fieldtype': u'Check', @@ -208,7 +208,7 @@ # DocField { - 'description': u'Available in \nBill Of Materials, Delivery Note, Payable Voucher, Production Order, Purchase Order, Purchase Receipt, Receivable Voucher, Sales Order, Stock Entry, Timesheet', + 'description': u'Available in \nBOM, Delivery Note, Purchase Invoice, Production Order, Purchase Order, Purchase Receipt, Sales Invoice, Sales Order, Stock Entry, Timesheet', 'doctype': u'DocField', 'fieldname': u'fs_projects', 'fieldtype': u'Check', diff --git a/erpnext/setup/doctype/order_lost_reason/__init__.py b/erpnext/setup/doctype/global_defaults/__init__.py similarity index 100% rename from erpnext/setup/doctype/order_lost_reason/__init__.py rename to erpnext/setup/doctype/global_defaults/__init__.py diff --git a/erpnext/setup/doctype/manage_account/manage_account.js b/erpnext/setup/doctype/global_defaults/global_defaults.js similarity index 100% rename from erpnext/setup/doctype/manage_account/manage_account.js rename to erpnext/setup/doctype/global_defaults/global_defaults.js diff --git a/erpnext/setup/doctype/manage_account/manage_account.py b/erpnext/setup/doctype/global_defaults/global_defaults.py similarity index 100% rename from erpnext/setup/doctype/manage_account/manage_account.py rename to erpnext/setup/doctype/global_defaults/global_defaults.py diff --git a/erpnext/setup/doctype/manage_account/manage_account.txt b/erpnext/setup/doctype/global_defaults/global_defaults.txt similarity index 98% rename from erpnext/setup/doctype/manage_account/manage_account.txt rename to erpnext/setup/doctype/global_defaults/global_defaults.txt index 970e2798e7c..4c37e52aa94 100644 --- a/erpnext/setup/doctype/manage_account/manage_account.txt +++ b/erpnext/setup/doctype/global_defaults/global_defaults.txt @@ -1,4 +1,4 @@ -# DocType, Manage Account +# DocType, Global Defaults [ # These values are common in all dictionaries @@ -35,7 +35,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Manage Account', + 'parent': u'Global Defaults', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -45,16 +45,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Manage Account', + 'parent': u'Global Defaults', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Manage Account + # DocType, Global Defaults { 'doctype': 'DocType', - 'name': u'Manage Account' + 'name': u'Global Defaults' }, # DocPerm @@ -273,7 +273,7 @@ 'doctype': u'DocField', 'fieldname': u'auto_indent', 'fieldtype': u'Check', - 'label': u'Raise Indent when stock reaches re-order level' + 'label': u'Raise Purchase Request when stock reaches re-order level' }, # DocField diff --git a/erpnext/setup/doctype/notification_control/notification_control.py b/erpnext/setup/doctype/notification_control/notification_control.py index 9dc00765986..650486ece7b 100644 --- a/erpnext/setup/doctype/notification_control/notification_control.py +++ b/erpnext/setup/doctype/notification_control/notification_control.py @@ -99,7 +99,7 @@ class DocType: """ Get default print format from doclayer """ - doclayer = get_obj('DocLayer', 'DocLayer') + doclayer = get_obj('Customize Form', 'Customize Form') doclayer.doc.doc_type = args.get('doctype') doclayer.get() if doclayer.doc.default_print_format: diff --git a/erpnext/setup/doctype/notification_control/notification_control.txt b/erpnext/setup/doctype/notification_control/notification_control.txt index 55cf475514b..49526caed4d 100644 --- a/erpnext/setup/doctype/notification_control/notification_control.txt +++ b/erpnext/setup/doctype/notification_control/notification_control.txt @@ -91,7 +91,7 @@ 'fieldname': u'enquiry', 'fieldtype': u'Check', 'hidden': 1, - 'label': u'Enquiry', + 'label': u'Opportunity', 'print_hide': 1 }, @@ -166,7 +166,7 @@ 'doctype': u'DocField', 'fieldname': u'expense_voucher', 'fieldtype': u'Check', - 'label': u'Expense Voucher' + 'label': u'Expense Claim' }, # DocField @@ -291,7 +291,7 @@ 'fieldname': u'expense_voucher_approved_message', 'fieldtype': u'Text', 'hidden': 1, - 'label': u'Expense Voucher Approved Message', + 'label': u'Expense Claim Approved Message', 'print_hide': 1 }, @@ -301,7 +301,7 @@ 'fieldname': u'expense_voucher_rejected_message', 'fieldtype': u'Text', 'hidden': 1, - 'label': u'Expense Voucher Rejected Message', + 'label': u'Expense Claim Rejected Message', 'print_hide': 1 } ] \ No newline at end of file diff --git a/erpnext/setup/doctype/permission_control/permission_control.py b/erpnext/setup/doctype/permission_control/permission_control.py index d261c41ab97..fef322e0d7d 100644 --- a/erpnext/setup/doctype/permission_control/permission_control.py +++ b/erpnext/setup/doctype/permission_control/permission_control.py @@ -154,7 +154,7 @@ class DocType: def update_permissions(self,args=''): args = eval(args) di = args['perm_dict'] - doctype_keys = di.keys() # ['Enquiry','Competitor','Zone','State'] + doctype_keys = di.keys() # ['Opportunity','Competitor','Zone','State'] for parent in doctype_keys: for permlevel in di[parent].keys(): for role in di[parent][permlevel].keys(): diff --git a/erpnext/setup/doctype/price_list/price_list.py b/erpnext/setup/doctype/price_list/price_list.py index ec1a7c297a7..1c6959cbf68 100644 --- a/erpnext/setup/doctype/price_list/price_list.py +++ b/erpnext/setup/doctype/price_list/price_list.py @@ -62,12 +62,12 @@ class DocType: if sql("select name from tabItem where name=%s", line[0]): if self.is_currency_valid(line[2]): # if price exists - ref_ret_detail = sql("select name from `tabRef Rate Detail` where parent=%s and price_list_name=%s and ref_currency=%s", \ + ref_ret_detail = sql("select name from `tabItem Price` where parent=%s and price_list_name=%s and ref_currency=%s", \ (line[0], self.doc.name, line[2])) if ref_ret_detail: - sql("update `tabRef Rate Detail` set ref_rate=%s where name=%s", (line[1], ref_ret_detail[0][0])) + sql("update `tabItem Price` set ref_rate=%s where name=%s", (line[1], ref_ret_detail[0][0])) else: - d = Document('Ref Rate Detail') + d = Document('Item Price') d.parent = line[0] d.parentfield = 'ref_rate_details' d.parenttype = 'Item' @@ -87,8 +87,8 @@ class DocType: # clear prices def clear_prices(self): - cnt = sql("select count(*) from `tabRef Rate Detail` where price_list_name = %s", self.doc.name) - sql("delete from `tabRef Rate Detail` where price_list_name = %s", self.doc.name) + cnt = sql("select count(*) from `tabItem Price` where price_list_name = %s", self.doc.name) + sql("delete from `tabItem Price` where price_list_name = %s", self.doc.name) msgprint("%s prices cleared" % cnt[0][0]) # Update CSV data diff --git a/erpnext/setup/doctype/other_charges/__init__.py b/erpnext/setup/doctype/quotation_lost_reason/__init__.py similarity index 100% rename from erpnext/setup/doctype/other_charges/__init__.py rename to erpnext/setup/doctype/quotation_lost_reason/__init__.py diff --git a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.js similarity index 100% rename from erpnext/setup/doctype/order_lost_reason/order_lost_reason.js rename to erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.js diff --git a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.txt b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt similarity index 87% rename from erpnext/setup/doctype/order_lost_reason/order_lost_reason.txt rename to erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt index f146dc57ac9..959745a8eb4 100644 --- a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.txt +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.txt @@ -1,4 +1,4 @@ -# DocType, Order Lost Reason +# DocType, Quotation Lost Reason [ # These values are common in all dictionaries @@ -29,7 +29,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Order Lost Reason', + 'parent': u'Quotation Lost Reason', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -40,7 +40,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Order Lost Reason', + 'parent': u'Quotation Lost Reason', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -48,10 +48,10 @@ 'write': 1 }, - # DocType, Order Lost Reason + # DocType, Quotation Lost Reason { 'doctype': 'DocType', - 'name': u'Order Lost Reason' + 'name': u'Quotation Lost Reason' }, # DocPerm @@ -84,7 +84,7 @@ 'doctype': u'DocField', 'fieldname': u'order_lost_reason', 'fieldtype': u'Data', - 'label': u'Order Lost Reason', + 'label': u'Quotation Lost Reason', 'oldfieldname': u'order_lost_reason', 'oldfieldtype': u'Data', 'permlevel': 0, diff --git a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py index 3d820e1cd45..76f26da93af 100644 --- a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py +++ b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py @@ -82,7 +82,7 @@ class DocType: #validation for trash of default record if not type == 'Sales Person': field = 'default_'+type.lower().replace(' ','_') - chk = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = '%s' and value = '%s'"%(field,name)) + chk = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = '%s' and value = '%s'"%(field,name)) if chk: msgprint("'%s' record is set as a default %s in Global Defaults. Please change default %s then try to trash '%s' record."%(name,type.lower(), type.lower(), name)) raise Exception diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js index 30ab18a324c..77da493e608 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.js +++ b/erpnext/setup/doctype/sales_partner/sales_partner.js @@ -138,12 +138,12 @@ cur_frm.cscript.make_si_list = function(parent,doc){ lst.colwidths = ['5%','25%','20%','25%','25%']; lst.colnames = ['Sr.','Id','Invoice Date','Total Commission','Grand Total']; lst.coltypes = ['Data','Link','Data','Data','Currency','Currency']; - lst.coloptions = ['','Receivable Voucher','','','','']; + lst.coloptions = ['','Sales Invoice','','','','']; cur_frm.cscript.set_list_opts(lst); - var q = repl("select name,posting_date, total_commission,grand_total from `tabReceivable Voucher` where sales_partner='%(sp)s'", {'sp':doc.name}); - var q_max = repl("select count(name) from `tabReceivable Voucher` where sales_partner='%(cust)s'", {'sp':doc.name}); + var q = repl("select name,posting_date, total_commission,grand_total from `tabSales Invoice` where sales_partner='%(sp)s'", {'sp':doc.name}); + var q_max = repl("select count(name) from `tabSales Invoice` where sales_partner='%(cust)s'", {'sp':doc.name}); - cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Sales Invoice','Receivable Voucher'); + cur_frm.cscript.run_list(lst,parent,q,q_max,doc,'Sales Invoice','Sales Invoice'); } diff --git a/erpnext/setup/doctype/static_parameter_detail/__init__.py b/erpnext/setup/doctype/sales_taxes_and_charges_master/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from erpnext/setup/doctype/static_parameter_detail/__init__.py rename to erpnext/setup/doctype/sales_taxes_and_charges_master/__init__.py diff --git a/erpnext/setup/doctype/other_charges/other_charges.js b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js similarity index 98% rename from erpnext/setup/doctype/other_charges/other_charges.js rename to erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index 85bdb7968a8..66bfd61be45 100644 --- a/erpnext/setup/doctype/other_charges/other_charges.js +++ b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -64,7 +64,7 @@ cur_frm.pformat.other_charges= function(doc){ } } - var cl = getchildren('RV Tax Detail',doc.name,'other_charges'); + var cl = getchildren('Sales Taxes and Charges',doc.name,'other_charges'); // outer table var out='
'; diff --git a/erpnext/setup/doctype/other_charges/other_charges.py b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py similarity index 92% rename from erpnext/setup/doctype/other_charges/other_charges.py rename to erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py index eb9ebb54da5..f57de83d686 100644 --- a/erpnext/setup/doctype/other_charges/other_charges.py +++ b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.py @@ -44,7 +44,7 @@ class DocType: get_obj('Sales Common').get_rate(arg, self) def update_other_default_charges(self): - sql("update `tabOther Charges` set is_default = 0 where ifnull(is_default,0) = 1 and name != '%s' and company = '%s'" % (self.doc.name, self.doc.company)) + sql("update `tabSales Taxes and Charges Master` set is_default = 0 where ifnull(is_default,0) = 1 and name != '%s' and company = '%s'" % (self.doc.name, self.doc.company)) def on_update(self): self.update_other_default_charges() diff --git a/erpnext/setup/doctype/other_charges/other_charges.txt b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt similarity index 91% rename from erpnext/setup/doctype/other_charges/other_charges.txt rename to erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt index 170e5576354..2ab0541ba02 100644 --- a/erpnext/setup/doctype/other_charges/other_charges.txt +++ b/erpnext/setup/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.txt @@ -1,4 +1,4 @@ -# DocType, Other Charges +# DocType, Sales Taxes and Charges Master [ # These values are common in all dictionaries @@ -31,7 +31,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Other Charges', + 'parent': u'Sales Taxes and Charges Master', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -40,16 +40,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Other Charges', + 'parent': u'Sales Taxes and Charges Master', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Other Charges + # DocType, Sales Taxes and Charges Master { 'doctype': 'DocType', - 'name': u'Other Charges' + 'name': u'Sales Taxes and Charges Master' }, # DocPerm @@ -186,10 +186,10 @@ 'doctype': u'DocField', 'fieldname': u'other_charges', 'fieldtype': u'Table', - 'label': u'Other Charges', + 'label': u'Sales Taxes and Charges Master', 'oldfieldname': u'other_charges', 'oldfieldtype': u'Table', - 'options': u'RV Tax Detail', + 'options': u'Sales Taxes and Charges', 'permlevel': 0 } ] \ No newline at end of file diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py index 50b9bb03cb4..ba39358866b 100644 --- a/erpnext/setup/doctype/setup_control/setup_control.py +++ b/erpnext/setup/doctype/setup_control/setup_control.py @@ -30,7 +30,7 @@ class DocType: #Default Naming Series #--------------------------------------------------- def naming_series(self): - ns = [['TDS Payment', 'TDSP'], ['Payable Voucher', 'BILL'], ['Journal Voucher', 'JV'], ['Receivable Voucher', 'INV'], ['Lead', 'Lead'], ['Indent', 'IDT'], ['Enquiry', 'Enquiry'], ['Purchase Order', 'PO'], ['Quotation', 'QTN'], ['Purchase Receipt', 'GRN'], ['Stock Entry', 'STE'], ['Sales Order', 'SO'], ['Delivery Note', 'DN'], ['Employee', 'EMP/']] + ns = [['TDS Payment', 'TDSP'], ['Purchase Invoice', 'BILL'], ['Journal Voucher', 'JV'], ['Sales Invoice', 'INV'], ['Lead', 'Lead'], ['Purchase Request', 'IDT'], ['Opportunity', 'Opportunity'], ['Purchase Order', 'PO'], ['Quotation', 'QTN'], ['Purchase Receipt', 'GRN'], ['Stock Entry', 'STE'], ['Sales Order', 'SO'], ['Delivery Note', 'DN'], ['Employee', 'EMP/']] for r in ns: rec = Document('Naming Series') rec.select_doc_for_series = r[0] @@ -131,25 +131,25 @@ class DocType: def create_feed_and_todo(self): """update activty feed and create todo for creation of item, customer, vendor""" import home - home.make_feed('Comment', 'ToDo Item', '', webnotes.session['user'], + home.make_feed('Comment', 'ToDo', '', webnotes.session['user'], '"' + 'Setup Complete. Please check your \ To Do List' + '"', '#6B24B3') - d = Document('ToDo Item') + d = Document('ToDo') d.description = 'Create your first Customer' d.priority = 'High' d.date = nowdate() d.reference_type = 'Customer' d.save(1) - d = Document('ToDo Item') + d = Document('ToDo') d.description = 'Create your first Item' d.priority = 'High' d.date = nowdate() d.reference_type = 'Item' d.save(1) - d = Document('ToDo Item') + d = Document('ToDo') d.description = 'Create your first Supplier' d.priority = 'High' d.date = nowdate() @@ -195,7 +195,7 @@ class DocType: # Set System Defaults # -------------------- def set_defaults(self, def_args): - ma_obj = get_obj('Manage Account','Manage Account') + ma_obj = get_obj('Global Defaults','Global Defaults') for d in def_args.keys(): ma_obj.doc.fields[d] = def_args[d] ma_obj.doc.save() diff --git a/erpnext/setup/doctype/term/__init__.py b/erpnext/setup/doctype/sms_parameter/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from erpnext/setup/doctype/term/__init__.py rename to erpnext/setup/doctype/sms_parameter/__init__.py diff --git a/erpnext/setup/doctype/static_parameter_detail/static_parameter_detail.txt b/erpnext/setup/doctype/sms_parameter/sms_parameter.txt similarity index 85% rename from erpnext/setup/doctype/static_parameter_detail/static_parameter_detail.txt rename to erpnext/setup/doctype/sms_parameter/sms_parameter.txt index 79de26131cf..fd6a225bec7 100755 --- a/erpnext/setup/doctype/static_parameter_detail/static_parameter_detail.txt +++ b/erpnext/setup/doctype/sms_parameter/sms_parameter.txt @@ -1,4 +1,4 @@ -# DocType, Static Parameter Detail +# DocType, SMS Parameter [ # These values are common in all dictionaries @@ -27,7 +27,7 @@ 'doctype': u'DocField', 'fieldtype': u'Data', 'name': '__common__', - 'parent': u'Static Parameter Detail', + 'parent': u'SMS Parameter', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0, @@ -35,10 +35,10 @@ 'width': u'150px' }, - # DocType, Static Parameter Detail + # DocType, SMS Parameter { 'doctype': 'DocType', - 'name': u'Static Parameter Detail' + 'name': u'SMS Parameter' }, # DocField diff --git a/erpnext/setup/doctype/sms_settings/sms_settings.txt b/erpnext/setup/doctype/sms_settings/sms_settings.txt index a552d7a76b9..e54f436c24b 100755 --- a/erpnext/setup/doctype/sms_settings/sms_settings.txt +++ b/erpnext/setup/doctype/sms_settings/sms_settings.txt @@ -127,7 +127,7 @@ 'doctype': u'DocField', 'fieldname': u'static_parameter_details', 'fieldtype': u'Table', - 'label': u'Static Parameter Details', - 'options': u'Static Parameter Detail' + 'label': u'SMS Parameters', + 'options': u'SMS Parameter' } ] \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_note_detail/__init__.py b/erpnext/setup/doctype/terms_and_conditions/__init__.py similarity index 100% rename from erpnext/stock/doctype/delivery_note_detail/__init__.py rename to erpnext/setup/doctype/terms_and_conditions/__init__.py diff --git a/erpnext/setup/doctype/term/term.js b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.js similarity index 100% rename from erpnext/setup/doctype/term/term.js rename to erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.js diff --git a/erpnext/setup/doctype/term/term.txt b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt similarity index 93% rename from erpnext/setup/doctype/term/term.txt rename to erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt index ae1d1b0aced..57b83640417 100644 --- a/erpnext/setup/doctype/term/term.txt +++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.txt @@ -1,4 +1,4 @@ -# DocType, Term +# DocType, Terms and Conditions [ # These values are common in all dictionaries @@ -31,7 +31,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Term', + 'parent': u'Terms and Conditions', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -40,16 +40,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Term', + 'parent': u'Terms and Conditions', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Term + # DocType, Terms and Conditions { 'doctype': 'DocType', - 'name': u'Term' + 'name': u'Terms and Conditions' }, # DocPerm diff --git a/erpnext/setup/page/webforms/webforms.js b/erpnext/setup/page/webforms/webforms.js index 85caadf46fe..b95b32addb3 100644 --- a/erpnext/setup/page/webforms/webforms.js +++ b/erpnext/setup/page/webforms/webforms.js @@ -36,7 +36,7 @@ pscript.onload_Webforms = function(){ lead_dv.innerHTML = '<iframe src ="'+url+'?ac_name='+acc_id+'&embed=Lead" width ="400" height="800" frameborder="0"></iframe>'; cust_issue_dv.innerHTML = '<iframe src ="'+url+'?ac_name='+acc_id+'&embed=Customer Issue" width ="400" height="500" frameborder="0"></iframe>'; job_dv.innerHTML = '<iframe src ="'+url+'?ac_name='+acc_id+'&embed=Job Application" width ="400" height="800" frameborder="0""></iframe>'; - ticket_dv.innerHTML = '<iframe src ="'+url+'?ac_name='+acc_id+'&embed=Support Ticket" width ="400" height="800" frameborder="0""></iframe>'; + ticket_dv.innerHTML = '<iframe src ="'+url+'?ac_name='+acc_id+'&embed=Support Task" width ="400" height="800" frameborder="0""></iframe>'; } }); } diff --git a/erpnext/startup/js/feature_setup.js b/erpnext/startup/js/feature_setup.js index 8006dca3173..4a7ebfefd05 100644 --- a/erpnext/startup/js/feature_setup.js +++ b/erpnext/startup/js/feature_setup.js @@ -28,13 +28,13 @@ Dictionary Format // ====================================================================*/ pscript.feature_dict = { 'fs_projects': { - 'Bill Of Materials': {'fields':['project_name']}, + 'BOM': {'fields':['project_name']}, 'Delivery Note': {'fields':['project_name']}, - 'Payable Voucher': {'fields':['project_name']}, + 'Purchase Invoice': {'fields':['project_name']}, 'Production Order': {'fields':['project_name']}, 'Purchase Order': {'fields':['project_name']}, 'Purchase Receipt': {'fields':['project_name']}, - 'Receivable Voucher': {'fields':['project_name']}, + 'Sales Invoice': {'fields':['project_name']}, 'Sales Order': {'fields':['project_name']}, 'Stock Entry': {'fields':['project_name']}, 'Timesheet': {'timesheet_details':['project_name']} @@ -46,22 +46,22 @@ pscript.feature_dict = { 'fs_discounts': { 'Delivery Note': {'delivery_note_details':['adj_rate']}, 'Quotation': {'quotation_details':['adj_rate']}, - 'Receivable Voucher': {'entries':['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']}, - 'Payable Voucher': {'entries':['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']}, - 'Indent': {'indent_details':['brand']}, + 'Purchase Request': {'indent_details':['brand']}, 'Item': {'fields':['brand']}, 'Purchase Order': {'po_details':['brand']}, - 'Payable Voucher': {'entries':['brand']}, + 'Purchase Invoice': {'entries':['brand']}, 'Quotation': {'quotation_details':['brand']}, - 'Receivable Voucher': {'entries':['brand']}, + 'Sales Invoice': {'entries':['brand']}, 'Sales BOM': {'fields':['new_item_brand']}, 'Sales Order': {'sales_order_details':['brand']}, 'Serial No': {'fields':['brand']} @@ -73,9 +73,9 @@ pscript.feature_dict = { 'Delivery Note': {'delivery_note_details':['batch_no']}, 'Item': {'fields':['has_batch_no']}, 'Purchase Receipt': {'purchase_receipt_details':['batch_no']}, - 'QA Inspection Report': {'fields':['batch_no']}, + 'Quality Inspection': {'fields':['batch_no']}, 'Sales and Pruchase Return Wizard': {'return_details':['batch_no']}, - 'Receivable Voucher': {'entries':['batch_no']}, + 'Sales Invoice': {'entries':['batch_no']}, 'Stock Entry': {'mtn_details':['batch_no']}, 'Stock Ledger Entry': {'fields':['batch_no']} }, @@ -87,23 +87,23 @@ pscript.feature_dict = { 'Maintenance Schedule': {'item_maintenance_details':['serial_no'],'maintenance_schedule_details':['serial_no']}, 'Maintenance Visit': {'maintenance_visit_details':['serial_no']}, 'Purchase Receipt': {'purchase_receipt_details':['serial_no']}, - 'QA Inspection Report': {'fields':['item_serial_no']}, + 'Quality Inspection': {'fields':['item_serial_no']}, 'Sales and Pruchase Return Wizard': {'return_details':['serial_no']}, - 'Receivable Voucher': {'entries':['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']}, - 'Enquiry': {'enquiry_details':['item_group']}, - 'Indent': {'indent_details':['item_group']}, + 'Opportunity': {'enquiry_details':['item_group']}, + 'Purchase Request': {'indent_details':['item_group']}, 'Item': {'fields':['item_group']}, - 'Manage Account': {'fields':['default_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']}, - 'Receivable Voucher': {'entries':['item_group']}, + 'Sales Invoice': {'entries':['item_group']}, 'Sales BOM': {'fields':['serial_no']}, 'Sales Order': {'sales_order_details':['item_group']}, 'Serial No': {'fields':['item_group']}, @@ -113,25 +113,25 @@ pscript.feature_dict = { }, 'fs_page_break': { 'Delivery Note': {'delivery_note_details':['page_break'],'packing_details':['page_break']}, - 'Indent': {'indent_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']}, - 'Receivable Voucher': {'entries':['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']}, - 'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['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': { - 'Payable Voucher': {'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 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']} @@ -145,19 +145,19 @@ pscript.feature_dict = { 'Customer': {'fields':['sales_team']}, 'Delivery Note': {'fields':['sales_team','Packing List']}, 'Item': {'fields':['item_customer_details']}, - 'Receivable Voucher': {'fields':['sales_team']}, + 'Sales Invoice': {'fields':['sales_team']}, 'Sales Order': {'fields':['sales_team','Packing List']} }, 'fs_more_info': { 'Delivery Note': {'fields':['More Info']}, - 'Enquiry': {'fields':['More Info']}, - 'Indent': {'fields':['More Info']}, + 'Opportunity': {'fields':['More Info']}, + 'Purchase Request': {'fields':['More Info']}, 'Lead': {'fields':['More Info']}, - 'Payable Voucher': {'fields':['More Info']}, + 'Purchase Invoice': {'fields':['More Info']}, 'Purchase Order': {'fields':['More Info']}, 'Purchase Receipt': {'fields':['More Info']}, 'Quotation': {'fields':['More Info']}, - 'Receivable Voucher': {'fields':['More Info']}, + 'Sales Invoice': {'fields':['More Info']}, 'Sales Order': {'fields':['More Info']}, }, 'fs_quality': { @@ -168,10 +168,10 @@ pscript.feature_dict = { 'Item': {'fields':['Manufacturing']} }, 'fs_pos': { - 'Receivable Voucher': {'fields':['is_pos']} + 'Sales Invoice': {'fields':['is_pos']} }, 'fs_recurring_invoice': { - 'Receivable Voucher': {'fields': ['Recurring Invoice']} + 'Sales Invoice': {'fields': ['Recurring Invoice']} } } diff --git a/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt b/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt index a4d266f429d..e89caa4d4d5 100644 --- a/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt +++ b/erpnext/stock/DocType Label/QA Inspection Report/QA Inspection Report.txt @@ -1 +1 @@ -[{'modified_by': 'Administrator', 'name': 'QA Inspection Report', 'parent': None, 'dt_label': 'Quality Inspection', 'creation': '2010-06-28 12:56:06', 'modified': '2010-06-28 12:56:06', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'QA Inspection Report', 'parentfield': None}] \ No newline at end of file +[{'modified_by': 'Administrator', 'name': 'Quality Inspection', 'parent': None, 'dt_label': 'Quality Inspection', 'creation': '2010-06-28 12:56:06', 'modified': '2010-06-28 12:56:06', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Quality Inspection', 'parentfield': None}] \ No newline at end of file diff --git a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt index 7cc23502c15..42ba6f014bb 100644 --- a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt +++ b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt @@ -84,10 +84,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'delivery_note_details', - 'from_table': u'Delivery Note Detail', + 'from_table': u'Delivery Note Item', 'match_id': 1, 'to_field': u'item_details', - 'to_table': u'Packing Slip Detail', + 'to_table': u'Packing Slip Item', 'validation_logic': u'IFNULL(packed_qty, 0) < IFNULL(qty, 0)' } ] \ No newline at end of file diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt index 43be9986e97..0a27e19dac0 100644 --- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt +++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt @@ -189,12 +189,12 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'po_details', - 'from_table': u'PO Detail', + 'from_table': u'Purchase Order Item', 'match_id': 1, 'reference_doctype_key': u'prevdoc_doctype', 'reference_key': u'prevdoc_detail_docname', 'to_field': u'purchase_receipt_details', - 'to_table': u'Purchase Receipt Detail', + 'to_table': u'Purchase Receipt Item', 'validation_logic': u'docstatus=1 and qty > ifnull(received_qty,0)' }, @@ -212,10 +212,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'purchase_tax_details', - 'from_table': u'Purchase Tax Detail', + 'from_table': u'Purchase Taxes and Charges', 'match_id': 2, 'to_field': u'purchase_tax_details', - 'to_table': u'Purchase Tax Detail', + 'to_table': u'Purchase Taxes and Charges', 'validation_logic': u'docstatus = 1' } ] \ No newline at end of file diff --git a/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt similarity index 87% rename from erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt rename to erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt index 61b33ee9506..4f9e97af359 100755 --- a/erpnext/stock/DocType Mapper/Receivable Voucher-Delivery Note/Receivable Voucher-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Sales Invoice-Delivery Note/Sales Invoice-Delivery Note.txt @@ -1,4 +1,4 @@ -# DocType Mapper, Receivable Voucher-Delivery Note +# DocType Mapper, Sales Invoice-Delivery Note [ # These values are common in all dictionaries @@ -14,7 +14,7 @@ { 'doctype': 'Table Mapper Detail', 'name': '__common__', - 'parent': 'Receivable Voucher-Delivery Note', + 'parent': 'Sales Invoice-Delivery Note', 'parentfield': 'table_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -23,7 +23,7 @@ { 'doctype': 'Field Mapper Detail', 'name': '__common__', - 'parent': 'Receivable Voucher-Delivery Note', + 'parent': 'Sales Invoice-Delivery Note', 'parentfield': 'field_mapper_details', 'parenttype': 'DocType Mapper' }, @@ -31,17 +31,17 @@ # These values are common for all DocType Mapper { 'doctype': u'DocType Mapper', - 'from_doctype': 'Receivable Voucher', + 'from_doctype': 'Sales Invoice', 'module': 'Stock', 'name': '__common__', 'ref_doc_submitted': 1, 'to_doctype': 'Delivery Note' }, - # DocType Mapper, Receivable Voucher-Delivery Note + # DocType Mapper, Sales Invoice-Delivery Note { 'doctype': u'DocType Mapper', - 'name': 'Receivable Voucher-Delivery Note' + 'name': 'Sales Invoice-Delivery Note' }, # Field Mapper Detail @@ -128,7 +128,7 @@ # Table Mapper Detail { 'doctype': 'Table Mapper Detail', - 'from_table': 'Receivable Voucher', + 'from_table': 'Sales Invoice', 'match_id': 0, 'to_table': 'Delivery Note', 'validation_logic': 'docstatus=1' @@ -138,10 +138,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'entries', - 'from_table': 'RV Detail', + 'from_table': 'Sales Invoice Item', 'match_id': 1, 'to_field': 'delivery_note_details', - 'to_table': 'Delivery Note Detail', + 'to_table': 'Delivery Note Item', 'validation_logic': 'docstatus = 1' }, @@ -149,10 +149,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'other_charges', - 'from_table': 'RV Tax Detail', + 'from_table': 'Sales Taxes and Charges', 'match_id': 2, 'to_field': 'other_charges', - 'to_table': 'RV Tax Detail', + 'to_table': 'Sales Taxes and Charges', 'validation_logic': 'name is not null' }, diff --git a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt index f1068697759..651131e8fb2 100644 --- a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt @@ -235,10 +235,10 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'other_charges', - 'from_table': u'RV Tax Detail', + 'from_table': u'Sales Taxes and Charges', 'match_id': 2, 'to_field': u'other_charges', - 'to_table': u'RV Tax Detail', + 'to_table': u'Sales Taxes and Charges', 'validation_logic': u'name is not null' }, @@ -246,12 +246,12 @@ { 'doctype': u'Table Mapper Detail', 'from_field': u'sales_order_details', - 'from_table': u'Sales Order Detail', + 'from_table': u'Sales Order Item', 'match_id': 1, 'reference_doctype_key': u'prevdoc_doctype', 'reference_key': u'prevdoc_detail_docname', 'to_field': u'delivery_note_details', - 'to_table': u'Delivery Note Detail', + 'to_table': u'Delivery Note Item', 'validation_logic': u'qty > ifnull(delivered_qty,0) and docstatus = 1' }, diff --git a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt index b33b28d5c4c..30181e364ea 100644 --- a/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt +++ b/erpnext/stock/Print Format/Delivery Note Classic/Delivery Note Classic.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Delivery Note', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Stock', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt index 065f3f49d05..8da9cb7357a 100644 --- a/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt +++ b/erpnext/stock/Print Format/Delivery Note Modern/Delivery Note Modern.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Delivery Note', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note No.
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note No.
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Stock', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt index 1309b5cefdf..7e5fd314230 100644 --- a/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt +++ b/erpnext/stock/Print Format/Delivery Note Spartan/Delivery Note Spartan.txt @@ -14,7 +14,7 @@ { 'doc_type': 'Delivery Note', 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', + 'html': '\n\n\n\n\n\n\n\n\n\n\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t

\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
Name
Address
Contact
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t
Delivery Note Date
Sales Order No.\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t()\n\t\t\t\t\t\t
\n
\n
\n\t\n\t\n
\n
\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t
\n\t\t\t\t\tTerms, Conditions & Other Information:
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
Net Total
Grand Total
Rounded Total
\n\t\t\t\t\t
In Words
\n\t\t\t\t\t\n\t\t\t\t
\n
\n', 'module': 'Stock', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt b/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt index 8ffb83e5d32..4cfaeb968a8 100644 --- a/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt +++ b/erpnext/stock/Print Format/Purchase Receipt Format/Purchase Receipt Format.txt @@ -13,7 +13,7 @@ # These values are common for all Print Format { 'doctype': 'Print Format', - 'html': '\n\n\n\n\n\n
\n\n
\n
\n

Purchase Receipt:
\n
Date:
\n
\n\n
\n
\n

\n
\n\n
\n
\n \n\n
\n\n\n
\n\n \n \n
\n
\n
\n

Payment Terms
\n

\n

For NCSCI
\n


(Authorised Signatory)
\n
\n', + 'html': '\n\n\n\n\n\n
\n\n
\n
\n

Purchase Receipt:
\n
Date:
\n
\n\n
\n
\n

\n
\n\n
\n
\n \n\n
\n\n\n
\n\n \n \n
\n
\n
\n

Payment Terms
\n

\n

For NCSCI
\n


(Authorised Signatory)
\n
\n', 'module': 'Stock', 'name': '__common__', 'standard': 'Yes' diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index de2d1315c48..c8046266d1c 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -324,7 +324,7 @@ class DocType: def reorder_item(self,doc_type,doc_name): """ Reorder item if stock reaches reorder level""" - if get_value('Manage Account', None, 'auto_indent'): + if get_value('Global Defaults', None, 'auto_indent'): #check if re-order is required ret = sql("select re_order_level, item_name, description, brand, item_group, lead_time_days, min_order_qty, email_notify, re_order_qty from tabItem where item_code = %s", (self.doc.item_code), as_dict=1) @@ -345,15 +345,15 @@ class DocType: def create_auto_indent(self, i , doc_type, doc_name, cur_qty): """ Create indent on reaching reorder level """ - indent = Document('Indent') + indent = Document('Purchase Request') indent.transaction_date = nowdate() indent.naming_series = 'IDT' indent.company = get_defaults()['company'] indent.fiscal_year = get_defaults()['fiscal_year'] - indent.remark = "This is an auto generated Indent. It was raised because the (actual + ordered + indented - reserved) quantity reaches re-order level when %s %s was created"%(doc_type,doc_name) + indent.remark = "This is an auto generated Purchase Request. It was raised because the (actual + ordered + indented - reserved) quantity reaches re-order level when %s %s was created"%(doc_type,doc_name) indent.save(1) - indent_obj = get_obj('Indent',indent.name,with_children=1) - indent_details_child = addchild(indent_obj.doc,'indent_details','Indent Detail',0) + indent_obj = get_obj('Purchase Request',indent.name,with_children=1) + indent_details_child = addchild(indent_obj.doc,'indent_details','Purchase Request Item',0) indent_details_child.item_code = self.doc.item_code indent_details_child.uom = self.doc.stock_uom indent_details_child.warehouse = self.doc.warehouse @@ -364,11 +364,11 @@ class DocType: indent_details_child.qty = i['re_order_qty'] or (flt(i['re_order_level']) - flt(cur_qty)) indent_details_child.brand = i['brand'] indent_details_child.save() - indent_obj = get_obj('Indent',indent.name,with_children=1) + indent_obj = get_obj('Purchase Request',indent.name,with_children=1) indent_obj.validate() set(indent_obj.doc,'docstatus',1) indent_obj.on_submit() - msgprint("Item: " + self.doc.item_code + " is to be re-ordered. Indent %s raised. It was generated from %s %s"%(indent.name,doc_type, doc_name )) + msgprint("Item: " + self.doc.item_code + " is to be re-ordered. Purchase Request %s raised. It was generated from %s %s"%(indent.name,doc_type, doc_name )) if(i['email_notify']): send_email_notification(doc_type,doc_name) @@ -378,9 +378,9 @@ class DocType: """ Notify user about auto creation of indent""" email_list=[d for d in sql("select parent from tabUserRole where role in ('Purchase Manager','Material Manager') ")] - msg1='An Indent has been raised for item %s: %s on %s '%(doc_type, doc_name, nowdate()) + msg1='An Purchase Request has been raised for item %s: %s on %s '%(doc_type, doc_name, nowdate()) sendmail(email_list, sender='automail@webnotestech.com', \ - subject='Auto Indent Generation Notification', parts=[['text/plain',msg1]]) + subject='Auto Purchase Request Generation Notification', parts=[['text/plain',msg1]]) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index 95bd7bf5047..810c385f543 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -15,7 +15,7 @@ // along with this program. If not, see . // Module Material Management -cur_frm.cscript.tname = "Delivery Note Detail"; +cur_frm.cscript.tname = "Delivery Note Item"; cur_frm.cscript.fname = "delivery_note_details"; cur_frm.cscript.other_fname = "other_charges"; cur_frm.cscript.sales_team_fname = "sales_team"; @@ -203,15 +203,15 @@ cur_frm.fields_dict['transporter_name'].get_query = function(doc) { //-----------------------------------Make Sales Invoice---------------------------------------------- cur_frm.cscript['Make Sales Invoice'] = function() { var doc = cur_frm.doc - n = createLocal('Receivable Voucher'); + n = createLocal('Sales Invoice'); $c('dt_map', args={ - 'docs':compress_doclist([locals['Receivable Voucher'][n]]), + 'docs':compress_doclist([locals['Sales Invoice'][n]]), 'from_doctype':doc.doctype, - 'to_doctype':'Receivable Voucher', + 'to_doctype':'Sales Invoice', 'from_docname':doc.name, - 'from_to_list':"[['Delivery Note','Receivable Voucher'],['Delivery Note Detail','RV Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]" + 'from_to_list':"[['Delivery Note','Sales Invoice'],['Delivery Note Item','Sales Invoice Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]" }, function(r,rt) { - loaddoc('Receivable Voucher', n); + loaddoc('Sales Invoice', n); } ); } @@ -226,7 +226,7 @@ cur_frm.cscript['Make Installation Note'] = function() { 'from_doctype':doc.doctype, 'to_doctype':'Installation Note', 'from_docname':doc.name, - 'from_to_list':"[['Delivery Note','Installation Note'],['Delivery Note Detail','Installed Item Details']]" + 'from_to_list':"[['Delivery Note','Installation Note'],['Delivery Note Item','Installation Note Item']]" }, function(r,rt) { loaddoc('Installation Note', n); } @@ -245,7 +245,7 @@ cur_frm.cscript['Make Packing Slip'] = function() { 'from_doctype':doc.doctype, 'to_doctype':'Packing Slip', 'from_docname':doc.name, - 'from_to_list':"[['Delivery Note','Packing Slip'],['Delivery Note Detail','Packing Slip Detail']]" + 'from_to_list':"[['Delivery Note','Packing Slip'],['Delivery Note Item','Packing Slip Item']]" }, function(r,rt) { loaddoc('Packing Slip', n); } @@ -264,16 +264,16 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) { var set_print_hide= function(doc, cdt, cdn){ if (doc.print_without_amount) { fields['Delivery Note']['currency'].print_hide = 1; - fields['Delivery Note Detail']['export_rate'].print_hide = 1; - fields['Delivery Note Detail']['adj_rate'].print_hide = 1; - fields['Delivery Note Detail']['ref_rate'].print_hide = 1; - fields['Delivery Note Detail']['export_amount'].print_hide = 1; + fields['Delivery Note Item']['export_rate'].print_hide = 1; + fields['Delivery Note Item']['adj_rate'].print_hide = 1; + fields['Delivery Note Item']['ref_rate'].print_hide = 1; + fields['Delivery Note Item']['export_amount'].print_hide = 1; } else { fields['Delivery Note']['currency'].print_hide = 0; - fields['Delivery Note Detail']['export_rate'].print_hide = 0; - fields['Delivery Note Detail']['adj_rate'].print_hide = 0; - fields['Delivery Note Detail']['ref_rate'].print_hide = 0; - fields['Delivery Note Detail']['export_amount'].print_hide = 0; + fields['Delivery Note Item']['export_rate'].print_hide = 0; + fields['Delivery Note Item']['adj_rate'].print_hide = 0; + fields['Delivery Note Item']['ref_rate'].print_hide = 0; + fields['Delivery Note Item']['export_amount'].print_hide = 0; } } @@ -296,7 +296,7 @@ cur_frm.pformat.sales_order_no= function(doc, cdt, cdn){ out =''; - var cl = getchildren('Delivery Note Detail',doc.name,'delivery_note_details'); + var cl = getchildren('Delivery Note Item',doc.name,'delivery_note_details'); // outer table var out='
'; diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 5940bb22840..8d0ae993921 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -38,7 +38,7 @@ class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist - self.tname = 'Delivery Note Detail' + self.tname = 'Delivery Note Item' self.fname = 'delivery_note_details' # Autoname @@ -62,13 +62,13 @@ class DocType(TransactionBase): def get_comm_rate(self, sales_partner): return get_obj('Sales Common').get_comm_rate(sales_partner, self) - # *************** Pull Sales Order Details ************************ + # *************** Pull Sales Order Items ************************ def pull_sales_order_details(self): self.validate_prev_docname() self.doc.clear_table(self.doclist,'other_charges') if self.doc.sales_order_no: - get_obj('DocType Mapper', 'Sales Order-Delivery Note').dt_map('Sales Order', 'Delivery Note', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Delivery Note'],['Sales Order Detail', 'Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]") + get_obj('DocType Mapper', 'Sales Order-Delivery Note').dt_map('Sales Order', 'Delivery Note', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Delivery Note'],['Sales Order Item', 'Delivery Note Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]") else: msgprint("Please select Sales Order No. whose details need to be pulled") @@ -159,7 +159,7 @@ class DocType(TransactionBase): #check in manage account if sales order required or not. # ==================================================================================== def so_required(self): - res = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'so_required'") + res = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'so_required'") if res and res[0][0] == 'Yes': for d in getlist(self.doclist,'delivery_note_details'): if not d.prevdoc_docname: @@ -297,9 +297,9 @@ class DocType(TransactionBase): # ------------------------------------------------------------------ def validate_items_with_prevdoc(self, d): if d.prevdoc_doctype == 'Sales Order': - data = sql("select item_code, reserved_warehouse from `tabSales Order Detail` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname)) + data = sql("select item_code, reserved_warehouse from `tabSales Order Item` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname)) if d.prevdoc_doctype == 'Purchase Receipt': - data = sql("select item_code, rejected_warehouse from `tabPurchase Receipt Detail` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname)) + data = sql("select item_code, rejected_warehouse from `tabPurchase Receipt Item` where parent = '%s' and name = '%s'" % (d.prevdoc_docname, d.prevdoc_detail_docname)) if not data or data[0][0] != d.item_code or data[0][1] != d.warehouse: msgprint("Item: %s / Warehouse: %s is not matching with Sales Order: %s. Sales Order might be modified after fetching data from it. Please delete items and fetch again." % (d.item_code, d.warehouse, d.prevdoc_docname)) raise Exception @@ -343,11 +343,11 @@ class DocType(TransactionBase): Validate that if packed qty exists, it should be equal to qty """ if not any([flt(d.fields.get('packed_qty')) for d in self.doclist if - d.doctype=='Delivery Note Detail']): + d.doctype=='Delivery Note Item']): return packing_error_list = [] for d in self.doclist: - if d.doctype != 'Delivery Note Detail': continue + if d.doctype != 'Delivery Note Item': continue if flt(d.fields.get('qty')) != flt(d.fields.get('packed_qty')): packing_error_list.append([ d.fields.get('item_code', ''), @@ -387,12 +387,12 @@ class DocType(TransactionBase): # ******************** Check Next DocStatus ************************** def check_next_docstatus(self): - submit_rv = sql("select t1.name from `tabReceivable Voucher` t1,`tabRV Detail` t2 where t1.name = t2.parent and t2.delivery_note = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_rv = sql("select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.delivery_note = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_rv: msgprint("Sales Invoice : " + cstr(submit_rv[0][0]) + " has already been submitted !") raise Exception , "Validation Error." - submit_in = sql("select t1.name from `tabInstallation Note` t1, `tabInstalled Item Details` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_in = sql("select t1.name from `tabInstallation Note` t1, `tabInstallation Note Item` t2 where t1.name = t2.parent and t2.prevdoc_docname = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_in: msgprint("Installation Note : "+cstr(submit_in[0][0]) +" has already been submitted !") raise Exception , "Validation Error." diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt index 2ea3cfe0368..eabc4293f0d 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.txt +++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt @@ -660,11 +660,11 @@ 'doctype': u'DocField', 'fieldname': u'delivery_note_details', 'fieldtype': u'Table', - 'label': u'Delivery Note Details', + 'label': u'Delivery Note Items', 'no_copy': 0, 'oldfieldname': u'delivery_note_details', 'oldfieldtype': u'Table', - 'options': u'Delivery Note Detail', + 'options': u'Delivery Note Item', 'permlevel': 0, 'print_hide': 0 }, @@ -716,7 +716,7 @@ 'label': u'Charge', 'oldfieldname': u'charge', 'oldfieldtype': u'Link', - 'options': u'Other Charges', + 'options': u'Sales Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -738,11 +738,11 @@ 'doctype': u'DocField', 'fieldname': u'other_charges', 'fieldtype': u'Table', - 'label': u'Other Charges', + 'label': u'Sales Taxes and Charges Master', 'no_copy': 0, 'oldfieldname': u'other_charges', 'oldfieldtype': u'Table', - 'options': u'RV Tax Detail', + 'options': u'Sales Taxes and Charges', 'permlevel': 0 }, @@ -910,7 +910,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1 }, @@ -948,7 +948,7 @@ 'doctype': u'DocField', 'fieldname': u'terms', 'fieldtype': u'Text Editor', - 'label': u'Term Details', + 'label': u'Terms and Conditions Details', 'oldfieldname': u'terms', 'oldfieldtype': u'Text Editor', 'permlevel': 0 @@ -1260,7 +1260,7 @@ 'label': u'Packing Details', 'oldfieldname': u'packing_details', 'oldfieldtype': u'Table', - 'options': u'Delivery Note Packing Detail', + 'options': u'Delivery Note Packing Item', 'permlevel': 1, 'print_hide': 1 }, diff --git a/erpnext/stock/doctype/delivery_note_packing_detail/__init__.py b/erpnext/stock/doctype/delivery_note_item/__init__.py similarity index 100% rename from erpnext/stock/doctype/delivery_note_packing_detail/__init__.py rename to erpnext/stock/doctype/delivery_note_item/__init__.py diff --git a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt similarity index 98% rename from erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt rename to erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt index 4465d4de827..c1ea5d116ca 100644 --- a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.txt @@ -1,4 +1,4 @@ -# DocType, Delivery Note Detail +# DocType, Delivery Note Item [ # These values are common in all dictionaries @@ -30,15 +30,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Delivery Note Detail', + 'parent': u'Delivery Note Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Delivery Note Detail + # DocType, Delivery Note Item { 'doctype': 'DocType', - 'name': u'Delivery Note Detail' + 'name': u'Delivery Note Item' }, # DocField diff --git a/erpnext/stock/doctype/item_specification_detail/__init__.py b/erpnext/stock/doctype/delivery_note_packing_item/__init__.py similarity index 100% rename from erpnext/stock/doctype/item_specification_detail/__init__.py rename to erpnext/stock/doctype/delivery_note_packing_item/__init__.py diff --git a/erpnext/stock/doctype/delivery_note_packing_detail/delivery_note_packing_detail.txt b/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt similarity index 96% rename from erpnext/stock/doctype/delivery_note_packing_detail/delivery_note_packing_detail.txt rename to erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt index d9df51d9caa..4299fcc0f71 100644 --- a/erpnext/stock/doctype/delivery_note_packing_detail/delivery_note_packing_detail.txt +++ b/erpnext/stock/doctype/delivery_note_packing_item/delivery_note_packing_item.txt @@ -1,4 +1,4 @@ -# DocType, Delivery Note Packing Detail +# DocType, Delivery Note Packing Item [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Delivery Note Packing Detail', + 'parent': u'Delivery Note Packing Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Delivery Note Packing Detail + # DocType, Delivery Note Packing Item { 'doctype': 'DocType', - 'name': u'Delivery Note Packing Detail' + 'name': u'Delivery Note Packing Item' }, # DocField diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 59235ab0324..b15c0c528a6 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -34,7 +34,7 @@ cur_frm.cscript.refresh = function(doc) { cur_frm.fields_dict['default_bom'].get_query = function(doc) { //var d = locals[this.doctype][this.docname]; - return 'SELECT DISTINCT `tabBill Of Materials`.`name` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + doc.item_code + '" AND `tabBill Of Materials`.`is_active` = "No" and `tabBill Of Materials`.docstatus != 2 AND `tabBill Of Materials`.%(key)s LIKE "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50' + return 'SELECT DISTINCT `tabBOM`.`name` FROM `tabBOM` WHERE `tabBOM`.`item` = "' + doc.item_code + '" AND `tabBOM`.`is_active` = "No" and `tabBOM`.docstatus != 2 AND `tabBOM`.%(key)s LIKE "%s" ORDER BY `tabBOM`.`name` LIMIT 50' } @@ -127,7 +127,7 @@ cur_frm.cscript.validate = function(doc,cdt,cdn){ cur_frm.cscript.weight_to_validate(doc,cdt,cdn); } -//===========Fill Default Currency in "Ref Rate Details==================== +//===========Fill Default Currency in "Item Prices==================== cur_frm.fields_dict['ref_rate_details'].grid.onrowadd = function(doc, cdt, cdn){ locals[cdt][cdn].ref_currency = sys_defaults.currency; refresh_field('ref_currency',cdn,'ref_rate_details'); diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 64cb0c906f5..ab61f28bd2d 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -118,12 +118,12 @@ class DocType: def check_for_active_boms(self, check): if check in ['Is Active', 'Is Purchase Item']: - bom_mat = sql("select distinct t1.parent from `tabBOM Material` t1, `tabBill Of Materials` t2 where t1.item_code ='%s' and (t1.bom_no = '' or t1.bom_no is NULL) and t2.name = t1.parent and t2.is_active = 'Yes' and t2.docstatus = 1 and t1.docstatus =1 " % self.doc.name ) + bom_mat = sql("select distinct t1.parent from `tabBOM Item` t1, `tabBOM` t2 where t1.item_code ='%s' and (t1.bom_no = '' or t1.bom_no is NULL) and t2.name = t1.parent and t2.is_active = 'Yes' and t2.docstatus = 1 and t1.docstatus =1 " % self.doc.name ) if bom_mat and bom_mat[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 if check == 'Is Active' or ( check == 'Is Manufactured Item' and self.doc.is_sub_contracted_item != 'Yes') or (check == 'Is Sub Contracted Item' and self.doc.is_manufactured_item != 'Yes') : - bom = sql("select name from `tabBill Of Materials` where item = '%s' and is_active ='Yes'" % cstr(self.doc.name)) + bom = sql("select name from `tabBOM` where item = '%s' and is_active ='Yes'" % cstr(self.doc.name)) 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 diff --git a/erpnext/stock/doctype/item/item.txt b/erpnext/stock/doctype/item/item.txt index 19e6a48254d..28efdf8ddcb 100644 --- a/erpnext/stock/doctype/item/item.txt +++ b/erpnext/stock/doctype/item/item.txt @@ -534,7 +534,7 @@ # DocField { 'colour': u'White:FFF', - 'description': u'Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Indent when you select this item.', + 'description': u'Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Purchase Request when you select this item.', 'doctype': u'DocField', 'fieldname': u'lead_time_days', 'fieldtype': u'Int', @@ -782,10 +782,10 @@ 'doctype': u'DocField', 'fieldname': u'ref_rate_details', 'fieldtype': u'Table', - 'label': u'Ref Rate Details', + 'label': u'Item Prices', 'oldfieldname': u'ref_rate_details', 'oldfieldtype': u'Table', - 'options': u'Ref Rate Detail', + 'options': u'Item Price', 'permlevel': 0 }, @@ -852,10 +852,10 @@ 'doctype': u'DocField', 'fieldname': u'item_specification_details', 'fieldtype': u'Table', - 'label': u'Item Specification Detail', + 'label': u'Item Quality Inspection Parameter', 'oldfieldname': u'item_specification_details', 'oldfieldtype': u'Table', - 'options': u'Item Specification Detail', + 'options': u'Item Quality Inspection Parameter', 'permlevel': 0 }, @@ -895,7 +895,7 @@ 'no_copy': 1, 'oldfieldname': u'default_bom', 'oldfieldtype': u'Link', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 1 }, diff --git a/erpnext/stock/doctype/landed_cost_detail/__init__.py b/erpnext/stock/doctype/item_price/__init__.py similarity index 100% rename from erpnext/stock/doctype/landed_cost_detail/__init__.py rename to erpnext/stock/doctype/item_price/__init__.py diff --git a/erpnext/stock/doctype/ref_rate_detail/ref_rate_detail.txt b/erpnext/stock/doctype/item_price/item_price.txt similarity index 92% rename from erpnext/stock/doctype/ref_rate_detail/ref_rate_detail.txt rename to erpnext/stock/doctype/item_price/item_price.txt index 0a467b0c89d..a48f8d15cba 100644 --- a/erpnext/stock/doctype/ref_rate_detail/ref_rate_detail.txt +++ b/erpnext/stock/doctype/item_price/item_price.txt @@ -1,4 +1,4 @@ -# DocType, Ref Rate Detail +# DocType, Item Price [ # These values are common in all dictionaries @@ -32,17 +32,17 @@ 'doctype': u'DocField', 'in_filter': 1, 'name': '__common__', - 'parent': u'Ref Rate Detail', + 'parent': u'Item Price', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0, 'search_index': 1 }, - # DocType, Ref Rate Detail + # DocType, Item Price { 'doctype': 'DocType', - 'name': u'Ref Rate Detail' + 'name': u'Item Price' }, # DocField diff --git a/erpnext/stock/doctype/lc_pr_detail/__init__.py b/erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py similarity index 100% rename from erpnext/stock/doctype/lc_pr_detail/__init__.py rename to erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py diff --git a/erpnext/stock/doctype/item_specification_detail/item_specification_detail.txt b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt similarity index 85% rename from erpnext/stock/doctype/item_specification_detail/item_specification_detail.txt rename to erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt index 2c3d9006f2a..1ab6d066485 100644 --- a/erpnext/stock/doctype/item_specification_detail/item_specification_detail.txt +++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.txt @@ -1,4 +1,4 @@ -# DocType, Item Specification Detail +# DocType, Item Quality Inspection Parameter [ # These values are common in all dictionaries @@ -30,16 +30,16 @@ 'fieldtype': u'Data', 'name': '__common__', 'oldfieldtype': u'Data', - 'parent': u'Item Specification Detail', + 'parent': u'Item Quality Inspection Parameter', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Item Specification Detail + # DocType, Item Quality Inspection Parameter { 'doctype': 'DocType', - 'name': u'Item Specification Detail' + 'name': u'Item Quality Inspection Parameter' }, # DocField diff --git a/erpnext/stock/doctype/packing_slip_detail/__init__.py b/erpnext/stock/doctype/landed_cost_item/__init__.py similarity index 100% rename from erpnext/stock/doctype/packing_slip_detail/__init__.py rename to erpnext/stock/doctype/landed_cost_item/__init__.py diff --git a/erpnext/stock/doctype/landed_cost_detail/landed_cost_detail.txt b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt similarity index 91% rename from erpnext/stock/doctype/landed_cost_detail/landed_cost_detail.txt rename to erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt index 186283d5fdb..41570395fdf 100644 --- a/erpnext/stock/doctype/landed_cost_detail/landed_cost_detail.txt +++ b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.txt @@ -1,4 +1,4 @@ -# DocType, Landed Cost Detail +# DocType, Landed Cost Item [ # These values are common in all dictionaries @@ -28,17 +28,17 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Landed Cost Detail', + 'parent': u'Landed Cost Item', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0, 'reqd': 1 }, - # DocType, Landed Cost Detail + # DocType, Landed Cost Item { 'doctype': 'DocType', - 'name': u'Landed Cost Detail' + 'name': u'Landed Cost Item' }, # DocField diff --git a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.txt b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.txt index 8013d0b79f2..f84eafea100 100644 --- a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.txt +++ b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.txt @@ -138,7 +138,7 @@ 'doctype': u'DocField', 'fieldname': u'landed_cost_details', 'fieldtype': u'Section Break', - 'label': u'Landed Cost Details', + 'label': u'Landed Cost Items', 'oldfieldtype': u'Section Break', 'permlevel': 0 }, diff --git a/erpnext/stock/doctype/purchase_receipt_detail/__init__.py b/erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py similarity index 100% rename from erpnext/stock/doctype/purchase_receipt_detail/__init__.py rename to erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py diff --git a/erpnext/stock/doctype/lc_pr_detail/lc_pr_detail.txt b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt similarity index 87% rename from erpnext/stock/doctype/lc_pr_detail/lc_pr_detail.txt rename to erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt index aaca21fe2cf..ada4fef39b4 100644 --- a/erpnext/stock/doctype/lc_pr_detail/lc_pr_detail.txt +++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.txt @@ -1,4 +1,4 @@ -# DocType, LC PR Detail +# DocType, Landed Cost Purchase Receipt [ # These values are common in all dictionaries @@ -28,16 +28,16 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'LC PR Detail', + 'parent': u'Landed Cost Purchase Receipt', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, LC PR Detail + # DocType, Landed Cost Purchase Receipt { 'doctype': 'DocType', - 'name': u'LC PR Detail' + 'name': u'Landed Cost Purchase Receipt' }, # DocField diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py index 24682478047..6123ac28b9d 100644 --- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py +++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py @@ -51,7 +51,7 @@ class DocType: msgprint("Please enter date of shorter duration as there are too many purchase receipt, hence it cannot be loaded.", raise_exception=1) for i in pr: - ch = addchild(self.doc, 'lc_pr_details', 'LC PR Detail', 1, self.doclist) + ch = addchild(self.doc, 'lc_pr_details', 'Landed Cost Purchase Receipt', 1, self.doclist) ch.purchase_receipt = i and i['name'] or '' ch.save() @@ -62,7 +62,7 @@ class DocType: idx = 0 landed_cost = sql("select account_head, description from `tabLanded Cost Master Detail` where parent=%s", (self.doc.landed_cost), as_dict = 1) for cost in landed_cost: - lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Detail', 1, self.doclist) + lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Item', 1, self.doclist) lct.account_head = cost['account_head'] lct.description = cost['description'] @@ -98,9 +98,9 @@ class DocType: self.prwise_cost[pr] = self.prwise_cost.get(pr, 0) + amt cumulative_grand_total += amt - pr_oc_row = sql("select name from `tabPurchase Tax Detail` where parent = %s and category = 'For Valuation' and add_deduct_tax = 'Add' and charge_type = 'Actual' and account_head = %s",(pr, lc.account_head)) + pr_oc_row = sql("select name from `tabPurchase Taxes and Charges` where parent = %s and category = 'For Valuation' and add_deduct_tax = 'Add' and charge_type = 'Actual' and account_head = %s",(pr, lc.account_head)) if not pr_oc_row: # add if not exists - ch = addchild(pr_obj.doc, 'purchase_tax_details', 'Purchase Tax Detail', 1) + ch = addchild(pr_obj.doc, 'purchase_tax_details', 'Purchase Taxes and Charges', 1) ch.category = 'For Valuation' ch.add_deduct_tax = 'Add' ch.charge_type = 'Actual' @@ -113,7 +113,7 @@ class DocType: ch.idx = 500 # add at the end ch.save(1) else: # overwrite if exists - sql("update `tabPurchase Tax Detail` set rate = %s, tax_amount = %s where name = %s and parent = %s ", (amt, amt, pr_oc_row[0][0], pr)) + sql("update `tabPurchase Taxes and Charges` set rate = %s, tax_amount = %s where name = %s and parent = %s ", (amt, amt, pr_oc_row[0][0], pr)) def reset_other_charges(self, pr_obj): diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt index f121cc95c5c..c8db02e6867 100644 --- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt +++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt @@ -176,8 +176,8 @@ 'doctype': u'DocField', 'fieldname': u'lc_pr_details', 'fieldtype': u'Table', - 'label': u'LC PR Details', - 'options': u'LC PR Detail' + 'label': u'Landed Cost Purchase Receipts', + 'options': u'Landed Cost Purchase Receipt' }, # DocField @@ -193,7 +193,7 @@ 'doctype': u'DocField', 'fieldname': u'landed_cost', 'fieldtype': u'Link', - 'label': u'Select Landed Cost Details Master', + 'label': u'Select Landed Cost Items Master', 'options': u'Landed Cost Master' }, @@ -212,8 +212,8 @@ 'doctype': u'DocField', 'fieldname': u'landed_cost_details', 'fieldtype': u'Table', - 'label': u'Landed Cost Details', - 'options': u'Landed Cost Detail' + 'label': u'Landed Cost Items', + 'options': u'Landed Cost Item' }, # DocField diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js index d3f4fb487d1..559f027d213 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.js +++ b/erpnext/stock/doctype/packing_slip/packing_slip.js @@ -21,7 +21,7 @@ cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['item_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) { return 'SELECT name, description FROM `tabItem` WHERE name IN ( \ - SELECT item_code FROM `tabDelivery Note Detail` dnd \ + SELECT item_code FROM `tabDelivery Note Item` dnd \ WHERE parent="' + doc.delivery_note + '" AND qty > packed_qty) AND %(key)s LIKE "%s" LIMIT 50'; } @@ -42,7 +42,7 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) { cur_frm.cscript.onload = function(doc, cdt, cdn) { if(doc.delivery_note) { - var ps_detail = getchildren('Packing Slip Detail', doc.name, 'item_details'); + var ps_detail = getchildren('Packing Slip Item', doc.name, 'item_details'); if(!(flt(ps_detail[0].net_weight) && cstr(ps_detail[0].weight_uom))) { cur_frm.cscript.update_item_details(doc); } @@ -85,7 +85,7 @@ cur_frm.cscript.validate_case_nos = function(doc) { cur_frm.cscript.validate_calculate_item_details = function(doc) { doc = locals[doc.doctype][doc.name]; - var ps_detail = getchildren('Packing Slip Detail', doc.name, 'item_details'); + var ps_detail = getchildren('Packing Slip Item', doc.name, 'item_details'); cur_frm.cscript.validate_duplicate_items(doc, ps_detail); cur_frm.cscript.calc_net_total_pkg(doc, ps_detail); diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 90a1d719bd1..74c80365687 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -72,7 +72,7 @@ class DocType: """ Check packed qty across packing slips and delivery note """ - # Get Delivery Note Details, Item Quantity Dict and No. of Cases for this Packing slip + # Get Delivery Note Items, Item Quantity Dict and No. of Cases for this Packing slip dn_details, ps_item_qty, no_of_cases = self.get_details_for_packing() for item in dn_details: @@ -84,7 +84,7 @@ class DocType: def get_details_for_packing(self): """ Returns - * 'Delivery Note Details' query result as a list of dict + * 'Delivery Note Items' query result as a list of dict * Item Quantity dict of current packing slip doc * No. of Cases of this packing slip """ @@ -96,7 +96,7 @@ class DocType: res = webnotes.conn.sql("""\ SELECT item_code, IFNULL(SUM(qty), 0) as qty, IFNULL(packed_qty, 0) as packed_qty, stock_uom - FROM `tabDelivery Note Detail` + FROM `tabDelivery Note Item` WHERE parent = "%s" AND item_code IN (%s) GROUP BY item_code""" % (self.doc.delivery_note, item_codes), as_dict=1) @@ -143,7 +143,7 @@ class DocType: if event not in ['submit', 'cancel']: raise Exception('update_packed_quantity can only be called on submit or cancel') - # Get Delivery Note Details, Item Quantity Dict and No. of Cases for this Packing slip + # Get Delivery Note Items, Item Quantity Dict and No. of Cases for this Packing slip dn_details, ps_item_qty, no_of_cases = self.get_details_for_packing() for item in dn_details: @@ -158,7 +158,7 @@ class DocType: Please try again or contact support@erpnext.com" % item['item_code'], raise_exception=1) webnotes.conn.sql("""\ - UPDATE `tabDelivery Note Detail` + UPDATE `tabDelivery Note Item` SET packed_qty = %s WHERE parent = %s AND item_code = %s""", (new_packed_qty, self.doc.delivery_note, item['item_code'])) @@ -166,7 +166,7 @@ class DocType: def update_item_details(self): """ - Fill empty columns in Packing Slip Detail + Fill empty columns in Packing Slip Item """ self.doc.from_case_no = self.get_recommended_case_no() diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.txt b/erpnext/stock/doctype/packing_slip/packing_slip.txt index 0a81695a6c2..e3801222b73 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.txt +++ b/erpnext/stock/doctype/packing_slip/packing_slip.txt @@ -126,7 +126,7 @@ 'doctype': u'DocField', 'fieldname': u'packing_slip_details', 'fieldtype': u'Section Break', - 'label': u'Packing Slip Details', + 'label': u'Packing Slip Items', 'permlevel': 0 }, @@ -235,7 +235,7 @@ 'fieldname': u'item_details', 'fieldtype': u'Table', 'label': u'Items', - 'options': u'Packing Slip Detail', + 'options': u'Packing Slip Item', 'permlevel': 0 }, diff --git a/erpnext/stock/doctype/ref_rate_detail/__init__.py b/erpnext/stock/doctype/packing_slip_item/__init__.py similarity index 100% rename from erpnext/stock/doctype/ref_rate_detail/__init__.py rename to erpnext/stock/doctype/packing_slip_item/__init__.py diff --git a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py similarity index 97% rename from erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py rename to erpnext/stock/doctype/packing_slip_item/packing_slip_item.py index 2b48ed03639..761c572683e 100644 --- a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py +++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py @@ -24,7 +24,7 @@ class DocType: res = webnotes.conn.sql("""\ SELECT item_name, SUM(IFNULL(qty, 0)) as total_qty, IFNULL(packed_qty, 0) as packed_qty, stock_uom - FROM `tabDelivery Note Detail` + FROM `tabDelivery Note Item` WHERE parent=%s AND item_code=%s GROUP BY item_code""", (delivery_note, self.doc.item_code), as_dict=1) diff --git a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.txt b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt similarity index 93% rename from erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.txt rename to erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt index 02f3902445f..66376a4be0e 100644 --- a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.txt +++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.txt @@ -1,4 +1,4 @@ -# DocType, Packing Slip Detail +# DocType, Packing Slip Item [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Packing Slip Detail', + 'parent': u'Packing Slip Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Packing Slip Detail + # DocType, Packing Slip Item { 'doctype': 'DocType', - 'name': u'Packing Slip Detail' + 'name': u'Packing Slip Item' }, # DocField diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js index 921eede2e97..eefd706ae4b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.tname = "Purchase Receipt Detail"; +cur_frm.cscript.tname = "Purchase Receipt Item"; cur_frm.cscript.fname = "purchase_receipt_details"; cur_frm.cscript.other_fname = "purchase_tax_details"; @@ -63,7 +63,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { if(doc.docstatus == 1){ - var ch = getchildren('Purchase Receipt Detail',doc.name,'purchase_receipt_details'); + var ch = getchildren('Purchase Receipt Item',doc.name,'purchase_receipt_details'); allow_billing = 0; for(var i in ch){ if(ch[i].qty > ch[i].billed_qty) allow_billing = 1; @@ -173,7 +173,7 @@ cur_frm.cscript.received_qty = function(doc, cdt, cdn) { 'stock_qty': 0, 'rejected_qty' : 0 } - set_multiple('Purchase Receipt Detail', cdn, ret, 'purchase_receipt_details'); + set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); cur_frm.cscript.calc_amount(doc, 2); } @@ -190,7 +190,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) { 'rejected_qty' : 0 } // => Set Qty = 0 and rejected_qty = 0 - set_multiple('Purchase Receipt Detail', cdn, ret, 'purchase_receipt_details'); + set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); cur_frm.cscript.calc_amount(doc, 2); // => Return return @@ -201,7 +201,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) { 'rejected_qty':flt(d.received_qty) - flt(d.qty) } // => Set Rejected Qty = Received Qty - Qty - set_multiple('Purchase Receipt Detail', cdn, ret, 'purchase_receipt_details'); + set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); // => Calculate Amount cur_frm.cscript.calc_amount(doc, 2); cur_frm.cscript.update_stock_qty(doc,cdt,cdn); @@ -220,7 +220,7 @@ cur_frm.cscript.rejected_qty = function(doc, cdt, cdn) { 'rejected_qty' : 0 } // => Set Qty = 0 and rejected_qty = 0 - set_multiple('Purchase Receipt Detail', cdn, ret, 'purchase_receipt_details'); + set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); cur_frm.cscript.calc_amount(doc, 2); // => Return return @@ -231,7 +231,7 @@ cur_frm.cscript.rejected_qty = function(doc, cdt, cdn) { 'qty':flt(d.received_qty) - flt(d.rejected_qty) } // => Set Qty = Received Qty - Rejected Qty - set_multiple('Purchase Receipt Detail', cdn, ret, 'purchase_receipt_details'); + set_multiple('Purchase Receipt Item', cdn, ret, 'purchase_receipt_details'); // Calculate Amount cur_frm.cscript.calc_amount(doc, 2); cur_frm.cscript.update_stock_qty(doc,cdt,cdn); @@ -250,7 +250,7 @@ cur_frm.fields_dict['purchase_order_no'].get_query = function(doc) { //--------------------------------- cur_frm.fields_dict.purchase_receipt_details.grid.get_field("qa_no").get_query = function(doc) { - return 'SELECT `tabQA Inspection Report`.name FROM `tabQA Inspection Report` WHERE `tabQA Inspection Report`.docstatus = 1 AND `tabQA Inspection Report`.%(key)s LIKE "%s"'; + return 'SELECT `tabQuality Inspection`.name FROM `tabQuality Inspection` WHERE `tabQuality Inspection`.docstatus = 1 AND `tabQuality Inspection`.%(key)s LIKE "%s"'; } // On Button Click Functions @@ -259,15 +259,15 @@ cur_frm.fields_dict.purchase_receipt_details.grid.get_field("qa_no").get_query = // ================================ Make Purchase Invoice ========================================== cur_frm.cscript['Make Purchase Invoice'] = function() { - n = createLocal('Payable Voucher'); + n = createLocal('Purchase Invoice'); $c('dt_map', args={ - 'docs':compress_doclist([locals['Payable Voucher'][n]]), + 'docs':compress_doclist([locals['Purchase Invoice'][n]]), 'from_doctype': cur_frm.doc.doctype, - 'to_doctype':'Payable Voucher', + 'to_doctype':'Purchase Invoice', 'from_docname': cur_frm.doc.name, - 'from_to_list':"[['Purchase Receipt','Payable Voucher'],['Purchase Receipt Detail','PV Detail'],['Purchase Tax Detail','Purchase Tax Detail']]" + 'from_to_list':"[['Purchase Receipt','Purchase Invoice'],['Purchase Receipt Item','Purchase Invoice Item'],['Purchase Taxes and Charges','Purchase Taxes and Charges']]" }, function(r,rt) { - loaddoc('Payable Voucher', n); + loaddoc('Purchase Invoice', n); } ); } @@ -289,7 +289,7 @@ cur_frm.pformat.purchase_order_no = function(doc, cdt, cdn){ out =''; - var cl = getchildren('Purchase Receipt Detail',doc.name,'purchase_receipt_details'); + var cl = getchildren('Purchase Receipt Item',doc.name,'purchase_receipt_details'); // outer table var out='
'; diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 88cfbe3db59..c7234948359 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -39,7 +39,7 @@ class DocType(TransactionBase): self.doc = doc self.doclist = doclist self.defaults = get_defaults() - self.tname = 'Purchase Receipt Detail' + self.tname = 'Purchase Receipt Item' self.fname = 'purchase_receipt_details' self.count = 0 @@ -96,7 +96,7 @@ class DocType(TransactionBase): # Pull Purchase Order def get_po_details(self): self.validate_prev_docname() - get_obj('DocType Mapper', 'Purchase Order-Purchase Receipt').dt_map('Purchase Order', 'Purchase Receipt', self.doc.purchase_order_no, self.doc, self.doclist, "[['Purchase Order','Purchase Receipt'],['PO Detail', 'Purchase Receipt Detail'],['Purchase Tax Detail','Purchase Tax Detail']]") + get_obj('DocType Mapper', 'Purchase Order-Purchase Receipt').dt_map('Purchase Order', 'Purchase Receipt', self.doc.purchase_order_no, self.doc, self.doclist, "[['Purchase Order','Purchase Receipt'],['Purchase Order Item', 'Purchase Receipt Item'],['Purchase Taxes and Charges','Purchase Taxes and Charges']]") # validate if PO has been pulled twice def validate_prev_docname(self): @@ -155,7 +155,7 @@ class DocType(TransactionBase): #check in manage account if purchase order required or not. # ==================================================================================== def po_required(self): - res = sql("select value from `tabSingles` where doctype = 'Manage Account' and field = 'po_required'") + res = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'po_required'") if res and res[0][0]== 'Yes': for d in getlist(self.doclist,'purchase_receipt_details'): if not d.prevdoc_docname: @@ -216,7 +216,7 @@ class DocType(TransactionBase): # Check If Prevdoc Doctype is Purchase Order if cstr(d.prevdoc_doctype) == 'Purchase Order': # get qty and pending_qty of prevdoc - curr_ref_qty = pc_obj.get_qty( d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, 'PO Detail', 'Purchase Order - Purchase Receipt', self.doc.name) + curr_ref_qty = pc_obj.get_qty( d.doctype, 'prevdoc_detail_docname', d.prevdoc_detail_docname, 'Purchase Order Item', 'Purchase Order - Purchase Receipt', self.doc.name) max_qty, qty, curr_qty = flt(curr_ref_qty.split('~~~')[1]), flt(curr_ref_qty.split('~~~')[0]), 0 if flt(qty) + flt(pr_qty) > flt(max_qty): @@ -267,7 +267,7 @@ class DocType(TransactionBase): ins_reqd = sql("select inspection_required from `tabItem` where name = %s", (d.item_code), as_dict = 1) ins_reqd = ins_reqd and ins_reqd[0]['inspection_required'] or 'No' if ins_reqd == 'Yes' and not d.qa_no: - msgprint("Item: " + d.item_code + " requires QA Inspection. Please enter QA No or report to authorized person to create QA Inspection Report") + msgprint("Item: " + d.item_code + " requires QA Inspection. Please enter QA No or report to authorized person to create Quality Inspection") # Check for Stopped status def check_for_stopped_status(self, pc_obj): @@ -304,7 +304,7 @@ class DocType(TransactionBase): #On Cancel #---------------------------------------------------------------------------------------------------- def check_next_docstatus(self): - submit_rv = sql("select t1.name from `tabPayable Voucher` t1,`tabPV Detail` t2 where t1.name = t2.parent and t2.purchase_receipt = '%s' and t1.docstatus = 1" % (self.doc.name)) + submit_rv = sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_receipt = '%s' and t1.docstatus = 1" % (self.doc.name)) if submit_rv: msgprint("Purchase Invoice : " + cstr(self.submit_rv[0][0]) + " has already been submitted !") raise Exception , "Validation Error." @@ -314,10 +314,10 @@ class DocType(TransactionBase): pc_obj = get_obj('Purchase Common') self.check_for_stopped_status(pc_obj) - # 1.Check if Payable Voucher has been submitted against current Purchase Order - # pc_obj.check_docstatus(check = 'Next', doctype = 'Payable Voucher', docname = self.doc.name, detail_doctype = 'PV Detail') + # 1.Check if Purchase Invoice has been submitted against current Purchase Order + # pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Invoice', docname = self.doc.name, detail_doctype = 'Purchase Invoice Item') - submitted = sql("select t1.name from `tabPayable Voucher` t1,`tabPV Detail` t2 where t1.name = t2.parent and t2.purchase_receipt = '%s' and t1.docstatus = 1" % self.doc.name) + submitted = sql("select t1.name from `tabPurchase Invoice` t1,`tabPurchase Invoice Item` t2 where t1.name = t2.parent and t2.purchase_receipt = '%s' and t1.docstatus = 1" % self.doc.name) if submitted: msgprint("Purchase Invoice : " + cstr(submitted[0][0]) + " has already been submitted !") raise Exception @@ -331,7 +331,7 @@ class DocType(TransactionBase): # 4.Update Bin self.update_stock(is_submit = 0) - # 5.Update Indents Pending Qty and accordingly it's Status + # 5.Update Purchase Requests Pending Qty and accordingly it's Status pc_obj.update_prevdoc_detail(self, is_submit = 0) # 6. Update last purchase rate @@ -365,13 +365,13 @@ class DocType(TransactionBase): self.add_bom(d) self.delete_irrelevant_raw_material() - #---------------calculate amt in PR Raw Material Detail------------- + #---------------calculate amt in Purchase Receipt Item Supplied------------- self.calculate_amount(d) def add_bom(self, d): #----- fetching default bom from Bill of Materials instead of Item Master -- - bom_det = sql("select t1.item, t2.item_code, t2.qty_consumed_per_unit, t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.description from `tabBill Of Materials` t1, `tabBOM Material` t2 where t2.parent = t1.name and t1.item = '%s' and ifnull(t1.is_default,0) = 1 and t1.docstatus = 1 and t2.docstatus =1" % d.item_code) + bom_det = sql("select t1.item, t2.item_code, t2.qty_consumed_per_unit, t2.moving_avg_rate, t2.value_as_per_mar, t2.stock_uom, t2.name, t2.description from `tabBOM` t1, `tabBOM Item` t2 where t2.parent = t1.name and t1.item = '%s' and ifnull(t1.is_default,0) = 1 and t1.docstatus = 1 and t2.docstatus =1" % d.item_code) if not bom_det: msgprint("No default BOM exists for item: %s" % d.item_code) raise Exception @@ -380,9 +380,9 @@ class DocType(TransactionBase): chgd_rqd_qty = [] for i in bom_det: - if i and not sql("select name from `tabPR Raw Material Detail` where reference_name = '%s' and bom_detail_no = '%s' and parent = '%s' " %(d.name, i[6], self.doc.name)): + if i and not sql("select name from `tabPurchase Receipt Item Supplied` where reference_name = '%s' and bom_detail_no = '%s' and parent = '%s' " %(d.name, i[6], self.doc.name)): - rm_child = addchild(self.doc, 'pr_raw_material_details', 'PR Raw Material Detail', 1, self.doclist) + rm_child = addchild(self.doc, 'pr_raw_material_details', 'Purchase Receipt Item Supplied', 1, self.doclist) rm_child.reference_name = d.name rm_child.bom_detail_no = i and i[6] or '' @@ -419,7 +419,7 @@ class DocType(TransactionBase): #-------------------------------------------------------------- def delete_irrelevant_raw_material(self): for d in getlist(self.doclist,'pr_raw_material_details'): - if not sql("select name from `tabPurchase Receipt Detail` where name = '%s' and parent = '%s' and item_code = '%s'" % (d.reference_name, self.doc.name, d.main_item_code)): + if not sql("select name from `tabPurchase Receipt Item` where name = '%s' and parent = '%s' and item_code = '%s'" % (d.reference_name, self.doc.name, d.main_item_code)): d.parent = 'old_par:'+self.doc.name d.save() diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt index 303046dc3ad..b447462b4ca 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -568,10 +568,10 @@ 'doctype': u'DocField', 'fieldname': u'purchase_receipt_details', 'fieldtype': u'Table', - 'label': u'Purchase Receipt Details', + 'label': u'Purchase Receipt Items', 'oldfieldname': u'purchase_receipt_details', 'oldfieldtype': u'Table', - 'options': u'Purchase Receipt Detail', + 'options': u'Purchase Receipt Item', 'permlevel': 0, 'print_hide': 0, 'reqd': 0 @@ -624,7 +624,7 @@ 'label': u'Purchase Other Charges', 'oldfieldname': u'purchase_other_charges', 'oldfieldtype': u'Link', - 'options': u'Purchase Other Charges', + 'options': u'Purchase Taxes and Charges Master', 'permlevel': 0, 'print_hide': 1 }, @@ -649,7 +649,7 @@ 'label': u'Purchase Tax Details', 'oldfieldname': u'purchase_tax_details', 'oldfieldtype': u'Table', - 'options': u'Purchase Tax Detail', + 'options': u'Purchase Taxes and Charges', 'permlevel': 0 }, @@ -853,7 +853,7 @@ 'label': u'Select Terms', 'oldfieldname': u'tc_name', 'oldfieldtype': u'Link', - 'options': u'Term', + 'options': u'Terms and Conditions', 'permlevel': 0, 'print_hide': 1 }, @@ -1147,11 +1147,11 @@ 'doctype': u'DocField', 'fieldname': u'pr_raw_material_details', 'fieldtype': u'Table', - 'label': u'PR Raw Material Details', + 'label': u'Purchase Receipt Item Supplieds', 'no_copy': 1, 'oldfieldname': u'pr_raw_material_details', 'oldfieldtype': u'Table', - 'options': u'PR Raw Material Detail', + 'options': u'Purchase Receipt Item Supplied', 'permlevel': 1, 'print_hide': 1 }, diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/__init__.py b/erpnext/stock/doctype/purchase_receipt_item/__init__.py similarity index 100% rename from erpnext/stock/doctype/sales_and_purchase_return_wizard/__init__.py rename to erpnext/stock/doctype/purchase_receipt_item/__init__.py diff --git a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt similarity index 98% rename from erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt rename to erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt index a0e0f5791f9..22c14c19dc7 100755 --- a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt @@ -1,4 +1,4 @@ -# DocType, Purchase Receipt Detail +# DocType, Purchase Receipt Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Purchase Receipt Detail', + 'parent': u'Purchase Receipt Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Purchase Receipt Detail + # DocType, Purchase Receipt Item { 'doctype': 'DocType', - 'name': u'Purchase Receipt Detail' + 'name': u'Purchase Receipt Item' }, # DocField @@ -370,7 +370,7 @@ 'no_copy': 1, 'oldfieldname': u'qa_no', 'oldfieldtype': u'Link', - 'options': u'QA Inspection Report', + 'options': u'Quality Inspection', 'permlevel': 0, 'print_hide': 1 }, @@ -508,7 +508,7 @@ 'fieldtype': u'Data', 'hidden': 1, 'in_filter': 1, - 'label': u'PO Detail No', + 'label': u'Purchase Order Item No', 'no_copy': 0, 'oldfieldname': u'prevdoc_detail_docname', 'oldfieldtype': u'Data', diff --git a/erpnext/stock/doctype/sales_bom_detail/__init__.py b/erpnext/stock/doctype/sales_and_purchase_return_tool/__init__.py similarity index 100% rename from erpnext/stock/doctype/sales_bom_detail/__init__.py rename to erpnext/stock/doctype/sales_and_purchase_return_tool/__init__.py diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js similarity index 95% rename from erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js rename to erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js index 2320f00f6a8..131e0126100 100644 --- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js +++ b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.js @@ -32,7 +32,7 @@ cur_frm.fields_dict.delivery_note_no.get_query = function(doc) { } cur_frm.fields_dict.sales_invoice_no.get_query = function(doc) { - return 'SELECT DISTINCT `tabReceivable Voucher`.name FROM `tabReceivable Voucher` WHERE `tabReceivable Voucher`.docstatus = 1 AND `tabReceivable Voucher`.%(key)s LIKE "%s" ORDER BY `tabReceivable Voucher`.name desc LIMIT 50'; + return 'SELECT DISTINCT `tabSales Invoice`.name FROM `tabSales Invoice` WHERE `tabSales Invoice`.docstatus = 1 AND `tabSales Invoice`.%(key)s LIKE "%s" ORDER BY `tabSales Invoice`.name desc LIMIT 50'; } cur_frm.fields_dict.purchase_receipt_no.get_query = function(doc) { @@ -89,7 +89,7 @@ cur_frm.cscript['Get Items'] = function(doc, cdt, cdn) { //------------------------------- cur_frm.cscript.clear_fields = function(doc) { doc.purchase_receipt_no, doc.delivery_note_no, doc.sales_invoice_no = '', '', ''; - var cl = getchildren('Return Detail', doc.name, 'return_details') + var cl = getchildren('Sales and Purchase Return Item', doc.name, 'return_details') if(cl.length) $c_obj(make_doclist(doc.doctype, doc.name),'clear_return_table','', function(r, rt) {refresh_field('return_details')}); refresh_many(['delivery_note_no', 'sales_invoice_no', 'purchase_receipt_no', 'return_details']); } @@ -97,7 +97,7 @@ cur_frm.cscript.clear_fields = function(doc) { // Make Stock Entry //------------------------------- cur_frm.cscript['Make Stock Entry'] = function(doc, cdt, cdn) { - var cl = getchildren('Return Detail', doc.name, 'return_details'); + var cl = getchildren('Sales and Purchase Return Item', doc.name, 'return_details'); if (!cl.length) msgprint("Item table can not be blank. Please click on 'Get Items'."); else if (!cur_frm.cscript.validate_returned_qty(cl)) { diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py similarity index 84% rename from erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py rename to erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py index 9b421d3e96e..fbeb4a51f4e 100644 --- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py +++ b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py @@ -42,11 +42,11 @@ class DocType : def pull_item_details(self): if self.doc.return_type == 'Sales Return': if self.doc.delivery_note_no: - det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.basic_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no) + det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.basic_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Item` t1, `tabDelivery Note Item` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no) elif self.doc.sales_invoice_no: - det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.basic_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no) + det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.basic_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabSales Invoice Item` t1, `tabSales Invoice` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no) elif self.doc.return_type == 'Purchase Return' and self.doc.purchase_receipt_no: - det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no) + det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Item` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no) self.doc.cust_supp = det and det[0][6] or '' self.doc.cust_supp_name = det and det[0][7] or '' @@ -59,7 +59,7 @@ class DocType : def create_item_table(self, det): self.doc.clear_table(self.doclist, 'return_details', 1) for i in det: - ch = addchild(self.doc, 'return_details', 'Return Detail', 1, self.doclist) + ch = addchild(self.doc, 'return_details', 'Sales and Purchase Return Item', 1, self.doclist) ch.detail_name = i and i[0] or '' ch.item_code = i and i[1] or '' ch.description = i and i[2] or '' diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.txt b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt similarity index 94% rename from erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.txt rename to erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt index 1db2830e0e9..c5d4d6d5054 100644 --- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.txt +++ b/erpnext/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.txt @@ -1,4 +1,4 @@ -# DocType, Sales and Purchase Return Wizard +# DocType, Sales and Purchase Return Tool [ # These values are common in all dictionaries @@ -31,7 +31,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Sales and Purchase Return Wizard', + 'parent': u'Sales and Purchase Return Tool', 'parentfield': u'fields', 'parenttype': u'DocType' }, @@ -40,16 +40,16 @@ { 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'Sales and Purchase Return Wizard', + 'parent': u'Sales and Purchase Return Tool', 'parentfield': u'permissions', 'parenttype': u'DocType', 'read': 1 }, - # DocType, Sales and Purchase Return Wizard + # DocType, Sales and Purchase Return Tool { 'doctype': 'DocType', - 'name': u'Sales and Purchase Return Wizard' + 'name': u'Sales and Purchase Return Tool' }, # DocPerm @@ -286,7 +286,7 @@ 'fieldtype': u'Link', 'hidden': 1, 'label': u'Sales Invoice No', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 0 }, @@ -356,11 +356,11 @@ 'fieldname': u'return_details', 'fieldtype': u'Table', 'hidden': 1, - 'label': u'Return Details', + 'label': u'Sales and Purchase Return Items', 'no_copy': 1, 'oldfieldname': u'return_details', 'oldfieldtype': u'Table', - 'options': u'Return Detail', + 'options': u'Sales and Purchase Return Item', 'permlevel': 1 }, diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.py b/erpnext/stock/doctype/sales_bom/sales_bom.py index 39fa2cda544..bfb5cee8f54 100644 --- a/erpnext/stock/doctype/sales_bom/sales_bom.py +++ b/erpnext/stock/doctype/sales_bom/sales_bom.py @@ -45,7 +45,7 @@ class DocType: # -------------- def get_rates(self): for d in getlist(self.doclist, "sales_bom_items"): - r = sql("select ref_rate from `tabRef Rate Detail` where price_list_name=%s and parent=%s and ref_currency = %s", (self.doc.price_list, d.item_code, self.doc.currency)) + r = sql("select ref_rate from `tabItem Price` where price_list_name=%s and parent=%s and ref_currency = %s", (self.doc.price_list, d.item_code, self.doc.currency)) d.rate = r and flt(r[0][0]) or 0.00 @@ -53,7 +53,7 @@ class DocType: # ----------------- def get_item_details(self, name): det = sql("select description, stock_uom from `tabItem` where name = '%s' " % cstr(name)) - rate = sql("select ref_rate from `tabRef Rate Detail` where price_list_name = %s and parent = %s and ref_currency = %s", (self.doc.price_list, name, self.doc.currency)) + rate = sql("select ref_rate from `tabItem Price` where price_list_name = %s and parent = %s and ref_currency = %s", (self.doc.price_list, name, self.doc.currency)) return {'description' : det and det[0][0] or '', 'uom': det and det[0][1] or '', 'rate': rate and flt(rate[0][0]) or 0.00} @@ -107,7 +107,7 @@ class DocType: msgprint("Please enter Currency.") raise Exception for d in getlist(self.doclist, "sales_bom_items"): - item_rate = sql("select ref_rate,ref_currency from `tabRef Rate Detail` where price_list_name=%s and parent=%s", (p, d.item_code)) + item_rate = sql("select ref_rate,ref_currency from `tabItem Price` where price_list_name=%s and parent=%s", (p, d.item_code)) if not item_rate: msgprint("Item %s does not have a rate for Price List %s. Did not update rates for this Price List" % (d.item_code, p)) raise Exception @@ -118,7 +118,7 @@ class DocType: count += 1 ref_rate += (flt(d.qty) * flt(item_rate[0][0])) - pld = addchild(i,"ref_rate_details", "Ref Rate Detail") + pld = addchild(i,"ref_rate_details", "Item Price") pld.price_list_name = p pld.ref_rate = flt(ref_rate) pld.ref_currency = currency @@ -136,7 +136,7 @@ class DocType: i.item_group = self.doc.item_group # clear old rates - sql("delete from `tabRef Rate Detail` where parent=%s", i.name) + sql("delete from `tabItem Price` where parent=%s", i.name) # update rates new_rates = {} @@ -193,14 +193,14 @@ class DocType: return # get all Sales BOM that have the first item - sbl = sql("select distinct parent from `tabSales BOM Detail` where item_code=%s", il[0].item_code) + sbl = sql("select distinct parent from `tabSales BOM Item` where item_code=%s", il[0].item_code) # check all siblings sub_items = [[d.item_code, flt(d.qty)] for d in il] for s in sbl: if not cstr(s[0]) == cstr(self.doc.name) : - t = sql("select item_code, qty from `tabSales BOM Detail` where parent=%s", s[0]) + t = sql("select item_code, qty from `tabSales BOM Item` where parent=%s", s[0]) t = [[d[0], flt(d[1])] for d in t] if self.has_same_items(sub_items, t): diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.txt b/erpnext/stock/doctype/sales_bom/sales_bom.txt index 6595def5df4..6eb726a9df6 100644 --- a/erpnext/stock/doctype/sales_bom/sales_bom.txt +++ b/erpnext/stock/doctype/sales_bom/sales_bom.txt @@ -242,7 +242,7 @@ 'label': u'Sales BOM Items', 'oldfieldname': u'sales_bom_items', 'oldfieldtype': u'Table', - 'options': u'Sales BOM Detail', + 'options': u'Sales BOM Item', 'permlevel': 0 }, @@ -278,7 +278,7 @@ 'fieldtype': u'Link', 'label': u'Amended From', 'no_copy': 1, - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 } diff --git a/erpnext/support/doctype/item_maintenance_detail/__init__.py b/erpnext/stock/doctype/sales_bom_item/__init__.py similarity index 100% rename from erpnext/support/doctype/item_maintenance_detail/__init__.py rename to erpnext/stock/doctype/sales_bom_item/__init__.py diff --git a/erpnext/stock/doctype/sales_bom_detail/sales_bom_detail.txt b/erpnext/stock/doctype/sales_bom_item/sales_bom_item.txt similarity index 94% rename from erpnext/stock/doctype/sales_bom_detail/sales_bom_detail.txt rename to erpnext/stock/doctype/sales_bom_item/sales_bom_item.txt index 3b1beb53aa3..8cf93f5702d 100644 --- a/erpnext/stock/doctype/sales_bom_detail/sales_bom_detail.txt +++ b/erpnext/stock/doctype/sales_bom_item/sales_bom_item.txt @@ -1,4 +1,4 @@ -# DocType, Sales BOM Detail +# DocType, Sales BOM Item [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Sales BOM Detail', + 'parent': u'Sales BOM Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Sales BOM Detail + # DocType, Sales BOM Item { 'doctype': 'DocType', - 'name': u'Sales BOM Detail' + 'name': u'Sales BOM Item' }, # DocField diff --git a/erpnext/stock/doctype/serial_no/serial_no.txt b/erpnext/stock/doctype/serial_no/serial_no.txt index 27134000311..aa0ea667c81 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.txt +++ b/erpnext/stock/doctype/serial_no/serial_no.txt @@ -433,7 +433,7 @@ 'in_filter': 1, 'label': u'Delivery Document Type', 'no_copy': 1, - 'options': u'\nDelivery Note\nReceivable Voucher\nStock Entry', + 'options': u'\nDelivery Note\nSales Invoice\nStock Entry', 'permlevel': 1 }, diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 96642d0dc2b..d7c2a13df7a 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -123,7 +123,7 @@ class DocType: if fg_item and bom_no: # re-calculate cost for production item from bom get_obj('BOM Control').calculate_cost(bom_no) - bom_obj = get_obj('Bill Of Materials', bom_no) + bom_obj = get_obj('BOM', bom_no) in_rate = flt(bom_obj.doc.total_cost) / (flt(bom_obj.doc.quantity) or 1) elif wh: in_rate = get_obj('Valuation Control').get_incoming_rate(dt, tm, item, wh, qty, serial_no) @@ -168,7 +168,7 @@ class DocType: # so no childs of SA items fl_bom_sa_items = sql(""" select item_code, ifnull(sum(qty_consumed_per_unit), 0) * '%s', description, stock_uom - from `tabBOM Material` + from `tabBOM Item` where parent = '%s' and docstatus < 2 group by item_code """ % (fg_qty, bom_no)) @@ -183,7 +183,7 @@ class DocType: from ( select distinct fb.name, fb.description, fb.item_code, fb.qty_consumed_per_unit, fb.stock_uom - from `tabFlat BOM Detail` fb,`tabItem` it + from `tabBOM Explosion Item` fb,`tabItem` it where it.name = fb.item_code and ifnull(it.is_pro_applicable, 'No') = 'No' and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2 and fb.parent=%s ) a @@ -251,7 +251,7 @@ class DocType: fg_item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]} elif self.doc.purpose == 'Other' and self.doc.bom_no: sw, tw = '', '' - item = sql("select item, description, uom from `tabBill Of Materials` where name = %s", self.doc.bom_no, as_dict=1) + item = sql("select item, description, uom from `tabBOM` where name = %s", self.doc.bom_no, as_dict=1) fg_item_dict = {item[0]['item'] : [self.doc.fg_completed_qty, item[0]['description'], item[0]['uom']]} if fg_item_dict: @@ -357,7 +357,7 @@ class DocType: def validate_bom_belongs_to_item(self): for d in getlist(self.doclist, 'mtn_details'): if d.bom_no and not webnotes.conn.sql("""\ - SELECT name FROM `tabBill Of Materials` + SELECT name FROM `tabBOM` WHERE item = %s and name = %s """, (d.item_code, d.bom_no)): msgprint("BOM %s does not belong to Item: %s at row %s" % (d.bom_no, d.item_code, d.idx), raise_exception=1) @@ -498,7 +498,7 @@ class DocType: def get_cust_values(self): - tbl = self.doc.delivery_note_no and 'Delivery Note' or 'Receivable Voucher' + tbl = self.doc.delivery_note_no and 'Delivery Note' or 'Sales Invoice' record_name = self.doc.delivery_note_no or self.doc.sales_invoice_no res = sql("select customer,customer_name, customer_address from `tab%s` where name = '%s'" % (tbl, record_name)) ret = { diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt index cccc6084864..475d2f266e9 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.txt +++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt @@ -301,7 +301,7 @@ 'fieldtype': u'Link', 'hidden': 1, 'label': u'Sales Invoice No', - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 0, 'print_hide': 1 }, @@ -466,7 +466,7 @@ 'fieldname': u'bom_no', 'fieldtype': u'Link', 'label': u'BOM No', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 0 }, diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt index 1c64c1e55a1..9b0170f511b 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.txt @@ -260,7 +260,7 @@ 'fieldname': u'bom_no', 'fieldtype': u'Link', 'label': u'BOM No.', - 'options': u'Bill Of Materials', + 'options': u'BOM', 'permlevel': 0 } ] \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index c9d23c69dd6..bb23226ee8c 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -83,9 +83,9 @@ class DocType: # Nobody can do SL Entries where posting date is before freezing date except authorized person #---------------------------------------------------------------------------------------------- def check_stock_frozen_date(self): - stock_frozen_upto = get_value('Manage Account', None, 'stock_frozen_upto') or '' + stock_frozen_upto = get_value('Global Defaults', None, 'stock_frozen_upto') or '' if stock_frozen_upto: - stock_auth_role = get_value('Manage Account', None,'stock_auth_role') + stock_auth_role = get_value('Global Defaults', None,'stock_auth_role') if getdate(self.doc.posting_date) <= getdate(stock_frozen_upto) and not stock_auth_role in webnotes.user.get_roles(): msgprint("You are not authorized to do / modify back dated stock entries before %s" % getdate(stock_frozen_upto).strftime('%d-%m-%Y'), raise_exception=1) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt index c77af1beb6a..c2fe30a87e0 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.txt @@ -180,7 +180,7 @@ 'fieldtype': u'Link', 'label': u'Amended From', 'no_copy': 1, - 'options': u'Receivable Voucher', + 'options': u'Sales Invoice', 'permlevel': 1, 'print_hide': 1 } diff --git a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt index 0e029cb474d..3cb03e023d0 100644 --- a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt +++ b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.txt @@ -12,11 +12,11 @@ # These values are common for all Search Criteria { - 'columns': 'Item\x01Item Name,Item\x01Item Group,Ref Rate Detail\x01Price List Name,Ref Rate Detail\x01Ref Rate,Ref Rate Detail\x01Currency', + 'columns': 'Item\x01Item Name,Item\x01Item Group,Item Price\x01Price List Name,Item Price\x01Ref Rate,Item Price\x01Currency', 'criteria_name': 'Itemwise Price List', - 'doc_type': 'Ref Rate Detail', + 'doc_type': 'Item Price', 'doctype': 'Search Criteria', - 'filters': "{'Item\x01Saved':1,'Ref Rate Detail\x01Price List Name':'','Ref Rate Detail\x01Currency':''}", + 'filters': "{'Item\x01Saved':1,'Item Price\x01Price List Name':'','Item Price\x01Currency':''}", 'module': 'Stock', 'name': '__common__', 'page_len': 50, diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py index 2645d50f92d..01e8418f49f 100644 --- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py +++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py @@ -73,7 +73,7 @@ col = [['Total Daily Consumption','Currency','150px',''] ,['Actual Quantity','Currency','150px',''] ,['Indented Quantity','Currency','150px',''] ,['Ordered Quantity','Currency','150px',''] - ,['Shortage To Indent','Currency','150px',''] + ,['Shortage To Purchase Request','Currency','150px',''] ,['MAR','Currency','100px',''] ,['LPR','Currency','100px','']] diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.txt b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.txt index 4b3e396cc0f..c0b6acfab80 100644 --- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.txt +++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.txt @@ -13,7 +13,7 @@ # These values are common for all Search Criteria { 'columns': 'Item\x01ID,Item\x01Item Name,Item\x01Description,Item\x01Lead Time Days', - 'criteria_name': 'Shortage To Indent', + 'criteria_name': 'Shortage To Purchase Request', 'doc_type': 'Item', 'doctype': 'Search Criteria', 'filters': "{'Item\x01Saved':1}", diff --git a/erpnext/support/DocType Mapper/Customer Issue-Maintenance Visit/Customer Issue-Maintenance Visit.txt b/erpnext/support/DocType Mapper/Customer Issue-Maintenance Visit/Customer Issue-Maintenance Visit.txt index 55060ea75f9..8bb3fa192ec 100644 --- a/erpnext/support/DocType Mapper/Customer Issue-Maintenance Visit/Customer Issue-Maintenance Visit.txt +++ b/erpnext/support/DocType Mapper/Customer Issue-Maintenance Visit/Customer Issue-Maintenance Visit.txt @@ -96,7 +96,7 @@ 'match_id': 1, 'reference_doctype_key': 'prevdoc_doctype', 'to_field': 'maintenance_visit_details', - 'to_table': 'Maintenance Visit Detail' + 'to_table': 'Maintenance Visit Purpose' }, # Table Mapper Detail diff --git a/erpnext/support/DocType Mapper/Sales Order-Maintenance Schedule/Sales Order-Maintenance Schedule.txt b/erpnext/support/DocType Mapper/Sales Order-Maintenance Schedule/Sales Order-Maintenance Schedule.txt index ccd0e60c9b0..b22ca541141 100644 --- a/erpnext/support/DocType Mapper/Sales Order-Maintenance Schedule/Sales Order-Maintenance Schedule.txt +++ b/erpnext/support/DocType Mapper/Sales Order-Maintenance Schedule/Sales Order-Maintenance Schedule.txt @@ -83,10 +83,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'sales_order_details', - 'from_table': 'Sales Order Detail', + 'from_table': 'Sales Order Item', 'match_id': 1, 'to_field': 'item_maintenance_detail', - 'to_table': 'Item Maintenance Detail', + 'to_table': 'Maintenance Schedule Item', 'validation_logic': 'docstatus =1' }, diff --git a/erpnext/support/DocType Mapper/Sales Order-Maintenance Visit/Sales Order-Maintenance Visit.txt b/erpnext/support/DocType Mapper/Sales Order-Maintenance Visit/Sales Order-Maintenance Visit.txt index e4bd45bd17b..6ef99b40d85 100644 --- a/erpnext/support/DocType Mapper/Sales Order-Maintenance Visit/Sales Order-Maintenance Visit.txt +++ b/erpnext/support/DocType Mapper/Sales Order-Maintenance Visit/Sales Order-Maintenance Visit.txt @@ -83,10 +83,10 @@ { 'doctype': 'Table Mapper Detail', 'from_field': 'sales_order_details', - 'from_table': 'Sales Order Detail', + 'from_table': 'Sales Order Item', 'match_id': 1, 'to_field': 'maintenance_visit_details', - 'to_table': 'Maintenance Visit Detail' + 'to_table': 'Maintenance Visit Purpose' }, # Table Mapper Detail diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js index 3890cb7097b..72d592e1377 100644 --- a/erpnext/support/doctype/customer_issue/customer_issue.js +++ b/erpnext/support/doctype/customer_issue/customer_issue.js @@ -74,7 +74,7 @@ cur_frm.cscript['Make Maintenance Visit'] = function(doc, cdt, cdn) { 'from_doctype':'Customer Issue', 'to_doctype':'Maintenance Visit', 'from_docname':doc.name, - 'from_to_list':"[['Customer Issue', 'Maintenance Visit'], ['Customer Issue', 'Maintenance Visit Detail']]" + 'from_to_list':"[['Customer Issue', 'Maintenance Visit'], ['Customer Issue', 'Maintenance Visit Purpose']]" } , function(r,rt) { loaddoc("Maintenance Visit", n); diff --git a/erpnext/support/doctype/customer_issue/customer_issue.py b/erpnext/support/doctype/customer_issue/customer_issue.py index af839cf09fe..096d68823fd 100644 --- a/erpnext/support/doctype/customer_issue/customer_issue.py +++ b/erpnext/support/doctype/customer_issue/customer_issue.py @@ -48,7 +48,7 @@ class DocType(TransactionBase): #check if maintenance schedule already generated #============================================ def check_maintenance_visit(self): - nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name) + nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name) nm = nm and nm[0][0] or '' if not nm: @@ -72,7 +72,7 @@ class DocType(TransactionBase): # raise Exception def on_cancel(self): - lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name)) + lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name)) if lst: lst1 = ','.join([x[0] for x in lst]) msgprint("Maintenance Visit No. "+lst1+" already created against this customer issue. So can not be Cancelled") diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js index 51853a61047..0113d1fab8c 100644 --- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js +++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js @@ -97,7 +97,7 @@ cur_frm.fields_dict['sales_order_no'].get_query = function(doc) { if(doc.customer) { cond = '`tabSales Order`.customer = "'+doc.customer+'" AND'; } - return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Detail`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Detail`.parent = `tabSales Order`.name AND `tabSales Order Detail`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); + return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Item`.parent = `tabSales Order`.name AND `tabSales Order Item`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); } cur_frm.cscript.periodicity = function(doc, cdt, cdn){ diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py index 30083dad583..9aee9ff184d 100644 --- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py @@ -44,7 +44,7 @@ class DocType(TransactionBase): def pull_sales_order_detail(self): self.doc.clear_table(self.doclist, 'item_maintenance_detail') self.doc.clear_table(self.doclist, 'maintenance_schedule_detail') - self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Schedule').dt_map('Sales Order', 'Maintenance Schedule', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Schedule'],['Sales Order Detail', 'Item Maintenance Detail']]") + self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Schedule').dt_map('Sales Order', 'Maintenance Schedule', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Schedule'],['Sales Order Item', 'Maintenance Schedule Item']]") #pull item details #------------------- @@ -213,7 +213,7 @@ class DocType(TransactionBase): def validate_sales_order(self): for d in getlist(self.doclist, 'item_maintenance_detail'): if d.prevdoc_docname: - chk = sql("select t1.name from `tabMaintenance Schedule` t1, `tabItem Maintenance Detail` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname) + chk = sql("select t1.name from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1", d.prevdoc_docname) if chk: msgprint("Maintenance Schedule against "+d.prevdoc_docname+" already exist") raise Exception diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt index 56469c3c175..4662ce92171 100644 --- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt +++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.txt @@ -355,10 +355,10 @@ 'doctype': u'DocField', 'fieldname': u'item_maintenance_detail', 'fieldtype': u'Table', - 'label': u'Item Maintenance Detail', + 'label': u'Maintenance Schedule Item', 'oldfieldname': u'item_maintenance_detail', 'oldfieldtype': u'Table', - 'options': u'Item Maintenance Detail', + 'options': u'Maintenance Schedule Item', 'permlevel': 0 }, diff --git a/erpnext/support/doctype/maintenance_visit_detail/__init__.py b/erpnext/support/doctype/maintenance_schedule_item/__init__.py similarity index 100% rename from erpnext/support/doctype/maintenance_visit_detail/__init__.py rename to erpnext/support/doctype/maintenance_schedule_item/__init__.py diff --git a/erpnext/support/doctype/item_maintenance_detail/item_maintenance_detail.txt b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt similarity index 95% rename from erpnext/support/doctype/item_maintenance_detail/item_maintenance_detail.txt rename to erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt index b6345d7af24..7e815f5eaf4 100644 --- a/erpnext/support/doctype/item_maintenance_detail/item_maintenance_detail.txt +++ b/erpnext/support/doctype/maintenance_schedule_item/maintenance_schedule_item.txt @@ -1,4 +1,4 @@ -# DocType, Item Maintenance Detail +# DocType, Maintenance Schedule Item [ # These values are common in all dictionaries @@ -29,15 +29,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Item Maintenance Detail', + 'parent': u'Maintenance Schedule Item', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Item Maintenance Detail + # DocType, Maintenance Schedule Item { 'doctype': 'DocType', - 'name': u'Item Maintenance Detail' + 'name': u'Maintenance Schedule Item' }, # DocField diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js index df976d12d78..d9d47c6d084 100644 --- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js +++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js @@ -110,8 +110,8 @@ cur_frm.fields_dict['sales_order_no'].get_query = function(doc) { if(doc.customer) { cond = '`tabSales Order`.customer = "'+doc.customer+'" AND'; } - //return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Detail` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); - return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Detail`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Detail`.parent = `tabSales Order`.name AND `tabSales Order Detail`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); + //return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); + return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Item`.parent = `tabSales Order`.name AND `tabSales Order Item`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); } cur_frm.fields_dict['customer_issue_no'].get_query = function(doc) { diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py index 902b92abdb4..1786afc743a 100644 --- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py +++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py @@ -59,10 +59,10 @@ class DocType(TransactionBase): self.doc.clear_table(self.doclist, 'maintenance_visit_details') if self.doc.sales_order_no: - self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Visit').dt_map('Sales Order', 'Maintenance Visit', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Visit'],['Sales Order Detail', 'Maintenance Visit Detail']]") + self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Visit').dt_map('Sales Order', 'Maintenance Visit', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Visit'],['Sales Order Item', 'Maintenance Visit Purpose']]") elif self.doc.customer_issue_no: - self.doclist = get_obj('DocType Mapper', 'Customer Issue-Maintenance Visit').dt_map('Customer Issue', 'Maintenance Visit', self.doc.customer_issue_no, self.doc, self.doclist, "[['Customer Issue', 'Maintenance Visit'],['Customer Issue', 'Maintenance Visit Detail']]") + self.doclist = get_obj('DocType Mapper', 'Customer Issue-Maintenance Visit').dt_map('Customer Issue', 'Maintenance Visit', self.doc.customer_issue_no, self.doc, self.doclist, "[['Customer Issue', 'Maintenance Visit'],['Customer Issue', 'Maintenance Visit Purpose']]") #validate reference value using doctype mapper #----------------------------------------------------- @@ -117,7 +117,7 @@ class DocType(TransactionBase): elif self.doc.completion_status == 'Partially Completed': status = 'Work In Progress' else: - nm = sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name)) + nm = sql("select t1.name, t1.mntc_date, t2.service_person, t2.work_done from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.completion_status = 'Partially Completed' and t2.prevdoc_docname = %s and t1.name!=%s and t1.docstatus = 1 order by t1.name desc limit 1", (d.prevdoc_docname, self.doc.name)) if nm: status = 'Work In Progress' @@ -141,7 +141,7 @@ class DocType(TransactionBase): check_for_doctype = d.prevdoc_doctype if check_for_docname: - check = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Detail` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time)) + check = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t1.name!=%s and t2.prevdoc_docname=%s and t1.docstatus = 1 and (t1.mntc_date > %s or (t1.mntc_date = %s and t1.mntc_time > %s))", (self.doc.name, check_for_docname, self.doc.mntc_date, self.doc.mntc_date, self.doc.mntc_time)) if check: check_lst = [x[0] for x in check] diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt b/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt index 8b39a1e650f..93ed6564656 100644 --- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt +++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.txt @@ -460,10 +460,10 @@ 'doctype': u'DocField', 'fieldname': u'maintenance_visit_details', 'fieldtype': u'Table', - 'label': u'Maintenance Visit Detail', + 'label': u'Maintenance Visit Purpose', 'oldfieldname': u'maintenance_visit_details', 'oldfieldtype': u'Table', - 'options': u'Maintenance Visit Detail', + 'options': u'Maintenance Visit Purpose', 'permlevel': 0 }, diff --git a/erpnext/utilities/doctype/receiver_detail/__init__.py b/erpnext/support/doctype/maintenance_visit_purpose/__init__.py similarity index 100% rename from erpnext/utilities/doctype/receiver_detail/__init__.py rename to erpnext/support/doctype/maintenance_visit_purpose/__init__.py diff --git a/erpnext/support/doctype/maintenance_visit_detail/maintenance_visit_detail.txt b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt similarity index 95% rename from erpnext/support/doctype/maintenance_visit_detail/maintenance_visit_detail.txt rename to erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt index cc63aa2a2a2..cd25bffb7d8 100644 --- a/erpnext/support/doctype/maintenance_visit_detail/maintenance_visit_detail.txt +++ b/erpnext/support/doctype/maintenance_visit_purpose/maintenance_visit_purpose.txt @@ -1,4 +1,4 @@ -# DocType, Maintenance Visit Detail +# DocType, Maintenance Visit Purpose [ # These values are common in all dictionaries @@ -27,15 +27,15 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'Maintenance Visit Detail', + 'parent': u'Maintenance Visit Purpose', 'parentfield': u'fields', 'parenttype': u'DocType' }, - # DocType, Maintenance Visit Detail + # DocType, Maintenance Visit Purpose { 'doctype': 'DocType', - 'name': u'Maintenance Visit Detail' + 'name': u'Maintenance Visit Purpose' }, # DocField diff --git a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt index d0c35787b8a..4687446f16c 100644 --- a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt +++ b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.txt @@ -12,11 +12,11 @@ # These values are common for all Search Criteria { - 'add_col': "SUM((`tabSales Order Detail`.`qty` - `tabSales Order Detail`.`billed_qty`) * `tabSales Order Detail`.`basic_rate`) AS 'Pending Amount'", + 'add_col': "SUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`billed_qty`) * `tabSales Order Item`.`basic_rate`) AS 'Pending Amount'", 'add_cond': "`tabSales Order`.status != 'Stopped'\n`tabSales Order`.order_type='Maintenance'", 'columns': 'Sales Order\x01ID,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order\x01Customer Address,Sales Order\x01Status,Sales Order\x01% Billed,Sales Order\x01Sales Order Date', 'criteria_name': 'Maintenance Orderwise Pending Amount To Bill', - 'doc_type': 'Sales Order Detail', + 'doc_type': 'Sales Order Item', 'doctype': 'Search Criteria', 'filters': "{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}", 'module': 'Support', diff --git a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py index e3063e9609c..696a25dcff4 100644 --- a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py +++ b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py @@ -50,10 +50,10 @@ class DocType: if d=='Lead': dt[d] = {'To follow up':sql("select count(name) from tabLead where status!='Converted' and docstatus=1")[0][0] or 0} - # if Enquiry + # if Opportunity elif d=='Enquiries': args = {} - args['Quotations to be sent'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabEnquiry`t2 where t1.enq_no!=t2.name and t2.docstatus=1")[0][0] or 0 + args['Quotations to be sent'] = sql("select count(distinct(t2.name)) from `tabQuotation`t1, `tabOpportunity`t2 where t1.enq_no!=t2.name and t2.docstatus=1")[0][0] or 0 args['To follow up'] = sql("select count(name) from `tabQuotation` where docstatus=0")[0][0] or 0 #Draft dt[d] = args @@ -69,16 +69,16 @@ class DocType: # if Invoice elif d=='Invoices': args = {} - args['To receive payment'] = sql("select count(name) from `tabReceivable Voucher` where docstatus=1 and due_date>now() and outstanding_amount!=0")[0][0] or 0 - args['Overdue'] = sql("select count(name) from `tabReceivable Voucher` where docstatus=1 and due_datenow() and outstanding_amount!=0")[0][0] or 0 + args['Overdue'] = sql("select count(name) from `tabSales Invoice` where docstatus=1 and due_date ifnull(t2.ordered_qty, 0), ifnull(t2.qty, 0) - ifnull(t2.ordered_qty, 0), 0) ) from `tabIndent` t1, `tabIndent Detail`t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) + ind_qty = sql("select sum(if( ifnull(t2.qty, 0) > ifnull(t2.ordered_qty, 0), ifnull(t2.qty, 0) - ifnull(t2.ordered_qty, 0), 0) ) from `tabPurchase Request` t1, `tabPurchase Request Item`t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) ind_qty = ind_qty and flt(ind_qty[0][0]) or 0 # get ordered_qty - ord_qty = sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.received_qty, 0), (ifnull(t2.qty, 0) - ifnull(t2.received_qty, 0)) * ifnull(t2.conversion_factor, 0) , 0) ) from `tabPurchase Order` t1, `tabPO Detail` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) + ord_qty = sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.received_qty, 0), (ifnull(t2.qty, 0) - ifnull(t2.received_qty, 0)) * ifnull(t2.conversion_factor, 0) , 0) ) from `tabPurchase Order` t1, `tabPurchase Order Item` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) ord_qty = ord_qty and flt(ord_qty[0][0]) or 0 # get reserved_qty - res_qty =sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.delivered_qty, 0), ifnull(t2.qty, 0) - ifnull(t2.delivered_qty, 0) , 0) ) from `tabSales Order` t1, `tabSales Order Detail` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.reserved_warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) + res_qty =sql("select sum(if ( ifnull(t2.qty, 0) > ifnull(t2.delivered_qty, 0), ifnull(t2.qty, 0) - ifnull(t2.delivered_qty, 0) , 0) ) from `tabSales Order` t1, `tabSales Order Item` t2 where t1.name = t2.parent and t1.docstatus = 1 and t2.reserved_warehouse = '%s' and t2.item_code = '%s' and status != 'Stopped'" % (wh, item)) res_qty = res_qty and flt(res_qty[0][0]) or 0 # get planned_qty diff --git a/erpnext/utilities/doctype/sms_control/sms_control.js b/erpnext/utilities/doctype/sms_control/sms_control.js index 42d961f5d0d..e28e9b28914 100644 --- a/erpnext/utilities/doctype/sms_control/sms_control.js +++ b/erpnext/utilities/doctype/sms_control/sms_control.js @@ -82,28 +82,28 @@ cur_frm.cscript['Send SMS'] = function(doc,dt,dn) { var sms_man = new SMSManager(); var default_msg = { 'Lead' : '', - 'Enquiry' : 'Your enquiry has been logged into the system. Ref No: ' + doc.name, + 'Opportunity' : 'Your enquiry has been logged into the system. Ref No: ' + doc.name, 'Quotation' : 'Quotation ' + doc.name + ' has been sent via email. Thanks!', 'Sales Order' : 'Sales Order ' + doc.name + ' has been created against ' + (doc.quotation_no ? ('Quote No:' + doc.quotation_no) : '') + (doc.po_no ? (' for your PO: ' + doc.po_no) : ''), 'Delivery Note' : 'Items has been delivered against delivery note: ' + doc.name + (doc.po_no ? (' for your PO: ' + doc.po_no) : ''), - 'Receivable Voucher': 'Invoice ' + doc.name + ' has been sent via email ' + 'Sales Invoice': 'Invoice ' + doc.name + ' has been sent via email ' + (doc.po_no ? (' for your PO: ' + doc.po_no) : ''), - 'Indent' : 'Indent ' + doc.name + ' has been raised in the system', + 'Purchase Request' : 'Purchase Request ' + doc.name + ' has been raised in the system', 'Purchase Order' : 'Purchase Order ' + doc.name + ' has been sent via email', 'Purchase Receipt' : 'Items has been received against purchase receipt: ' + doc.name } - if (in_list(['Quotation', 'Sales Order', 'Delivery Note', 'Receivable Voucher'], doc.doctype)) + if (in_list(['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice'], doc.doctype)) sms_man.show(doc.contact_person, 'customer', doc.customer, '', default_msg[doc.doctype]); else if (in_list(['Purchase Order', 'Purchase Receipt'], doc.doctype)) sms_man.show(doc.contact_person, 'supplier', doc.supplier, '', default_msg[doc.doctype]); else if (doc.doctype == 'Lead') sms_man.show('', '', '', doc.mobile_no, default_msg[doc.doctype]); - else if (doc.doctype == 'Enquiry') + else if (doc.doctype == 'Opportunity') sms_man.show('', '', '', doc.contact_no, default_msg[doc.doctype]); - else if (doc.doctype == 'Indent') + else if (doc.doctype == 'Purchase Request') sms_man.show('', '', '', '', default_msg[doc.doctype]); } diff --git a/erpnext/utilities/doctype/sms_control/sms_control.py b/erpnext/utilities/doctype/sms_control/sms_control.py index 9d112835578..f19ccf119d4 100644 --- a/erpnext/utilities/doctype/sms_control/sms_control.py +++ b/erpnext/utilities/doctype/sms_control/sms_control.py @@ -79,7 +79,7 @@ class DocType: def get_sender_name(self): "returns name as SMS sender" - sender_name = webnotes.conn.get_value('Manage Account', None, 'sms_sender_name') or 'ERPNXT' + sender_name = webnotes.conn.get_value('Global Defaults', None, 'sms_sender_name') or 'ERPNXT' if len(sender_name) > 6: msgprint(""" As per TRAI rule, sender name must be exactly 6 characters. diff --git a/erpnext/utilities/doctype/todo_item/__init__.py b/erpnext/utilities/doctype/sms_receiver/__init__.py similarity index 100% rename from erpnext/utilities/doctype/todo_item/__init__.py rename to erpnext/utilities/doctype/sms_receiver/__init__.py diff --git a/erpnext/utilities/doctype/receiver_detail/receiver_detail.txt b/erpnext/utilities/doctype/sms_receiver/sms_receiver.txt similarity index 91% rename from erpnext/utilities/doctype/receiver_detail/receiver_detail.txt rename to erpnext/utilities/doctype/sms_receiver/sms_receiver.txt index 196883b3638..a36b98ad6a5 100644 --- a/erpnext/utilities/doctype/receiver_detail/receiver_detail.txt +++ b/erpnext/utilities/doctype/sms_receiver/sms_receiver.txt @@ -1,4 +1,4 @@ -# DocType, Receiver Detail +# DocType, SMS Receiver [ # These values are common in all dictionaries @@ -28,16 +28,16 @@ 'fieldtype': u'Data', 'name': '__common__', 'oldfieldtype': u'Data', - 'parent': u'Receiver Detail', + 'parent': u'SMS Receiver', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 }, - # DocType, Receiver Detail + # DocType, SMS Receiver { 'doctype': 'DocType', - 'name': u'Receiver Detail' + 'name': u'SMS Receiver' }, # DocField diff --git a/erpnext/hr/doctype/kra_template/kra_template.js b/erpnext/utilities/doctype/todo/__init__.py similarity index 100% rename from erpnext/hr/doctype/kra_template/kra_template.js rename to erpnext/utilities/doctype/todo/__init__.py diff --git a/erpnext/utilities/doctype/todo_item/todo_item.txt b/erpnext/utilities/doctype/todo/todo.txt similarity index 96% rename from erpnext/utilities/doctype/todo_item/todo_item.txt rename to erpnext/utilities/doctype/todo/todo.txt index c7765f448c9..569e4be1d21 100644 --- a/erpnext/utilities/doctype/todo_item/todo_item.txt +++ b/erpnext/utilities/doctype/todo/todo.txt @@ -1,4 +1,4 @@ -# DocType, ToDo Item +# DocType, ToDo [ # These values are common in all dictionaries @@ -43,7 +43,7 @@ { 'doctype': u'DocField', 'name': '__common__', - 'parent': u'ToDo Item', + 'parent': u'ToDo', 'parentfield': u'fields', 'parenttype': u'DocType', 'permlevel': 0 @@ -54,7 +54,7 @@ 'create': 1, 'doctype': u'DocPerm', 'name': '__common__', - 'parent': u'ToDo Item', + 'parent': u'ToDo', 'parentfield': u'permissions', 'parenttype': u'DocType', 'permlevel': 0, @@ -63,10 +63,10 @@ 'write': 1 }, - # DocType, ToDo Item + # DocType, ToDo { 'doctype': 'DocType', - 'name': u'ToDo Item' + 'name': u'ToDo' }, # DocPerm diff --git a/erpnext/utilities/page/messages/messages.py b/erpnext/utilities/page/messages/messages.py index 3a407ddb553..3a27bca2575 100644 --- a/erpnext/utilities/page/messages/messages.py +++ b/erpnext/utilities/page/messages/messages.py @@ -25,19 +25,19 @@ def get_list(arg=None): if webnotes.form_dict['contact'] == webnotes.session['user']: # set all messages as read - webnotes.conn.sql("""UPDATE `tabComment Widget Record` + webnotes.conn.sql("""UPDATE `tabComment` set docstatus = 1 where comment_doctype in ('My Company', 'Message') and comment_docname = %s """, webnotes.user.name) # return messages - return webnotes.conn.sql("""select * from `tabComment Widget Record` + return webnotes.conn.sql("""select * from `tabComment` where (owner=%(contact)s or comment_docname=%(user)s) and comment_doctype in ('My Company', 'Message') order by creation desc limit %(limit_start)s, %(limit_page_length)s""", webnotes.form_dict, as_dict=1) else: - return webnotes.conn.sql("""select * from `tabComment Widget Record` + return webnotes.conn.sql("""select * from `tabComment` where (owner=%(contact)s and comment_docname=%(user)s) or (owner=%(user)s and comment_docname=%(contact)s) and comment_doctype in ('My Company', 'Message') @@ -63,7 +63,7 @@ def post(arg=None): arg = {} arg.update(webnotes.form_dict) from webnotes.model.doc import Document - d = Document('Comment Widget Record') + d = Document('Comment') d.comment = arg['txt'] d.comment_docname = arg['contact'] d.comment_doctype = 'Message' @@ -71,6 +71,6 @@ def post(arg=None): @webnotes.whitelist() def delete(arg=None): - webnotes.conn.sql("""delete from `tabComment Widget Record` where name=%s""", + webnotes.conn.sql("""delete from `tabComment` where name=%s""", webnotes.form_dict['name']); diff --git a/erpnext/utilities/page/todo/todo.py b/erpnext/utilities/page/todo/todo.py index 05d55fe4a81..73bd0b09572 100644 --- a/erpnext/utilities/page/todo/todo.py +++ b/erpnext/utilities/page/todo/todo.py @@ -22,7 +22,7 @@ def get(arg=None): """get todo list""" return webnotes.conn.sql("""select name, owner, description, date, priority, checked, reference_type, reference_name, assigned_by - from `tabToDo Item` where owner=%s + from `tabToDo` where owner=%s order by field(priority, 'High', 'Medium', 'Low') asc, date asc""", webnotes.session['user'], as_dict=1) @@ -30,7 +30,7 @@ def get(arg=None): def edit(arg=None): args = webnotes.form_dict - d = Document('ToDo Item', args.get('name') or None) + d = Document('ToDo', args.get('name') or None) d.description = args['description'] d.date = args['date'] d.priority = args['priority'] @@ -46,10 +46,10 @@ def edit(arg=None): @webnotes.whitelist() def delete(arg=None): name = webnotes.form_dict['name'] - d = Document('ToDo Item', name) + d = Document('ToDo', name) if d and d.name: notify_assignment(d) - webnotes.conn.sql("delete from `tabToDo Item` where name = %s", name) + webnotes.conn.sql("delete from `tabToDo` where name = %s", name) def notify_assignment(d): doc_type = d.reference_type diff --git a/erpnext/utilities/page/wip_monitor/wip_monitor.js b/erpnext/utilities/page/wip_monitor/wip_monitor.js index 9e7bdd06a79..fcfc96facee 100644 --- a/erpnext/utilities/page/wip_monitor/wip_monitor.js +++ b/erpnext/utilities/page/wip_monitor/wip_monitor.js @@ -39,7 +39,7 @@ WIP_Monitor.prototype.make_wip_dashboard = function(wip_dict) { var me = this; // list of doctypes which user can read - var can_read_dt = ['Lead', 'Enquiry', 'Sales Order', 'Receivable Voucher', 'Indent', 'Purchase Order', 'Payable Voucher', 'Delivery Note', 'Task', 'Serial No']; + var can_read_dt = ['Lead', 'Opportunity', 'Sales Order', 'Sales Invoice', 'Purchase Request', 'Purchase Order', 'Purchase Invoice', 'Delivery Note', 'Task', 'Serial No']; $i('wip_body').innerHTML = ''; this.tab = make_table('wip_body',1,0,'100%',[],{padding:'4px'}); @@ -70,7 +70,7 @@ WIP_Monitor.prototype.show_wip_dashboard = function(parent, head, report_dict) var report_dt // dictionary for labels to be displayed - var wip_lbl_map = {'Lead':'Lead', 'Enquiry':'Enquiries', 'Sales Order':'Sales Order', 'Receivable Voucher':'Invoices', 'Indent':'Indent', 'Purchase Order':'Purchase Order', 'Payable Voucher':'Bills', 'Delivery Note':'Delivery Note', 'Task':'Tasks', 'Serial No':'Maintenance'}; + var wip_lbl_map = {'Lead':'Lead', 'Opportunity':'Enquiries', 'Sales Order':'Sales Order', 'Sales Invoice':'Invoices', 'Purchase Request':'Purchase Request', 'Purchase Order':'Purchase Order', 'Purchase Invoice':'Bills', 'Delivery Note':'Delivery Note', 'Task':'Tasks', 'Serial No':'Maintenance'}; // header var h = $a(parent,'h3'); diff --git a/erpnext/website/doctype/blog/blog_page.js b/erpnext/website/doctype/blog/blog_page.js index d419a0b5e19..aa3f4c57b16 100644 --- a/erpnext/website/doctype/blog/blog_page.js +++ b/erpnext/website/doctype/blog/blog_page.js @@ -42,7 +42,7 @@ pscript['onload_{{ doc.name }}'] = function(wrapper) { wrapper.comment_list = new wn.ui.Listing({ parent: $(wrapper).find('.web-main-section').get(0), query: 'select comment, comment_by_fullname, modified\ - from `tabComment Widget Record` where comment_doctype="Page"\ + from `tabComment` where comment_doctype="Page"\ and comment_docname="{{ doc.name }}"', no_result_message: 'Be the first one to comment', render_row: function(parent, data) { diff --git a/js/all-app.js b/js/all-app.js index b9043aad79b..78ff3e18f29 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -2096,9 +2096,9 @@ CommentList.prototype.make_lst=function(){if(!this.lst){wn.require('lib/js/legac ifnull(t2.last_name,'')),''), '', \ DAYOFMONTH(t1.creation), MONTHNAME(t1.creation), YEAR(t1.creation), \ hour(t1.creation), minute(t1.creation), second(t1.creation) \ - from `tabComment Widget Record` t1, `tabProfile` t2 \ + from `tabComment` t1, `tabProfile` t2 \ where t1.comment_doctype = '%(dt)s' and t1.comment_docname = '%(dn)s' \ - and t1.comment_by = t2.name order by t1.creation desc",{dt:me.dt,dn:me.dn});this.query_max=repl("select count(name) from `tabComment Widget Record` where \ + and t1.comment_by = t2.name order by t1.creation desc",{dt:me.dt,dn:me.dn});this.query_max=repl("select count(name) from `tabComment` where \ comment_doctype='%(dt)s' and comment_docname='%(dn)s'",{'dt':me.dt,'dn':me.dn});} l.show_cell=function(cell,ri,ci,d){new CommentItem(cell,ri,ci,d,me)} this.lst=l;this.lst.make(this.lst_area);}} @@ -2278,7 +2278,7 @@ if(user_roles.indexOf("System Manager")!=-1){$('.navbar .modules').append('