rename dt first cut
diff --git a/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt b/erpnext/accounts/DocType Label/Payable Voucher/Payable Voucher.txt
index d12b2d2..fca0efe 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 459e4b8..80aa5d1 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 88%
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 7a4544f..d4b7b45 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 79%
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 e88f452..cdcd24d 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 85%
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 159b5bb..5949efe 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 86%
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 ffc748b..f620ec6 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 88%
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 d076d9f..f31e5da 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 fac3831..1909477 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 eeeea70..7fcf199 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 72d0175..4a4df3c 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 8664b38..82eeaf0 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'<html>\n<head>\n<!--Other charges function-->\n<script>\nvar make_row = function(title,val,bold){\nvar bstart = \'<b>\'; var bend = \'</b>\';\nreturn \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n +\'</tr>\'\n}\nvar make_row1 = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n \n return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n +\'</tr>\'\n}\n\nfunction get_letter_head() {\n // add letter head\n var cp = wn.boot.control_panel;\n if(doc.letter_head)\n var lh= cstr(_p.letter_heads[doc.letter_head]);\n else if(cp.letter_head)\n var lh= cp.letter_head;\n else \n var lh= \'\';\n \n return lh;\n}\n\nfunction get_tax_details(){\n var cl = getchildren(\'RV Tax Detail\',doc.name,\'other_charges\');\n var out = \'\';\n\n out += \'<div><table style="float: right;">\';\n for(var i=0;i<cl.length;i++){\n if(cl[i].tax_amount) {\n out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n }\n }\n out += make_row1(\'TOTAL\',doc.currency + " " + fmt_money(convert_rate(doc.grand_total)),1);\n out +=\'</table></div>\';\n return out;\n}\n\nfunction convert_rate(val){ \n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n}\n</script>\n<style>\n table, td, tr, div, span {\n font-family: courier new;\n line-height: 200%;\n }\n</style>\n</head>\n\n<body>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n <td align="left">NO: <script>doc.name</script></td>\n <td align="right">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n</tr>\n<tr>\n <td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n<script>\nvar t = print_table(\'Receivable Voucher\', doc.name, \'entries\', \'RV Detail\',\n [\'description\',\'qty\',\'export_rate\',\'export_amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'],\n [\'35%\',\'20%\',\'20%\',\'25%\']);\nif(t.appendChild) { // single\n out = t.innerHTML.replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n} else { //multiple\n out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n for(var i=0;i<t.length;i++) {\n if(i==0) {\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'</table>\';\n}\nout;\n</script>\n</div>\n<!--Tax table-->\n<div><script>get_tax_details();</script></div><br />\n<table style="font-family:courier new;">\n <tr><td><b><script>doc.terms</script></b></td></tr>\n <tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n <tr><td> </td></tr>\n <tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>\n',
+ 'html': u'<html>\n<head>\n<!--Other charges function-->\n<script>\nvar make_row = function(title,val,bold){\nvar bstart = \'<b>\'; var bend = \'</b>\';\nreturn \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n +\'</tr>\'\n}\nvar make_row1 = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n \n return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n +\'</tr>\'\n}\n\nfunction get_letter_head() {\n // add letter head\n var cp = wn.boot.control_panel;\n if(doc.letter_head)\n var lh= cstr(_p.letter_heads[doc.letter_head]);\n else if(cp.letter_head)\n var lh= cp.letter_head;\n else \n var lh= \'\';\n \n return lh;\n}\n\nfunction get_tax_details(){\n var cl = getchildren(\'Sales Taxes and Charges\',doc.name,\'other_charges\');\n var out = \'\';\n\n out += \'<div><table style="float: right;">\';\n for(var i=0;i<cl.length;i++){\n if(cl[i].tax_amount) {\n out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n }\n }\n out += make_row1(\'TOTAL\',doc.currency + " " + fmt_money(convert_rate(doc.grand_total)),1);\n out +=\'</table></div>\';\n return out;\n}\n\nfunction convert_rate(val){ \n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n}\n</script>\n<style>\n table, td, tr, div, span {\n font-family: courier new;\n line-height: 200%;\n }\n</style>\n</head>\n\n<body>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n <td align="left">NO: <script>doc.name</script></td>\n <td align="right">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n</tr>\n<tr>\n <td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n<script>\nvar t = print_table(\'Sales Invoice\', doc.name, \'entries\', \'Sales Invoice Item\',\n [\'description\',\'qty\',\'export_rate\',\'export_amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'],\n [\'35%\',\'20%\',\'20%\',\'25%\']);\nif(t.appendChild) { // single\n out = t.innerHTML.replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n} else { //multiple\n out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n for(var i=0;i<t.length;i++) {\n if(i==0) {\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'</table>\';\n}\nout;\n</script>\n</div>\n<!--Tax table-->\n<div><script>get_tax_details();</script></div><br />\n<table style="font-family:courier new;">\n <tr><td><b><script>doc.terms</script></b></td></tr>\n <tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n <tr><td> </td></tr>\n <tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>\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 510e922..8238600 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\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Georgia", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Georgia", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Georgia", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Georgia", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Sales Invoice\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'Sales Invoice Item\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'Sales Taxes and Charges\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\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 3c44fc7..7d58d65 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\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Helvetica", "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Helvetica", "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style="height:15px"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class=\'imp-details\'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\' class=\'imp-details\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Helvetica", "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Helvetica", "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Sales Invoice\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'Sales Invoice Item\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'Sales Taxes and Charges\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style="height:15px"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class=\'imp-details\'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\' class=\'imp-details\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\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 b91f5cd..354e65f 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\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Sales Invoice\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'Sales Invoice Item\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'Sales Taxes and Charges\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
'module': u'Accounts',
'name': '__common__',
'standard': u'Yes'
diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py
index 9df7240..6934003 100644
--- a/erpnext/accounts/__init__.py
+++ b/erpnext/accounts/__init__.py
@@ -72,9 +72,9 @@
}, { ... }, ...]
"""
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 @@
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 @@
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 e3c1977..f11ec0c 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -223,7 +223,7 @@
# ==================================================================
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/advance_allocation_detail/__init__.py b/erpnext/accounts/doctype/advance_allocation_detail/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/accounts/doctype/advance_allocation_detail/__init__.py
+++ /dev/null
diff --git a/erpnext/accounts/doctype/c_form/c_form.js b/erpnext/accounts/doctype/c_form/c_form.js
index 82adf29..4fb3227 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 367b27a..943cef2 100644
--- a/erpnext/accounts/doctype/c_form/c_form.py
+++ b/erpnext/accounts/doctype/c_form/c_form.py
@@ -39,9 +39,9 @@
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 @@
""" 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 @@
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 db53ef7..367d8c1 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 84a1c05..f894fae 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
@@ -178,8 +178,8 @@
# ====================================================================================
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 @@
# 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 62e239c..41a8a04 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 fa98441..2ff5a1f 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -297,7 +297,7 @@
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 @@
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 @@
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 @@
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 @@
# 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 @@
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 49b0593..11ab2c2 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.py
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py
@@ -114,9 +114,9 @@
#----------------------------------------------------------------------------------------------
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 @@
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 @@
#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 76d7fdb..0888a95 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 771f026..ca3205c 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('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 @@
}
}
-// 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_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 @@
});
}
-// ***************** 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 a5b2abf..02f4841 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
@@ -53,9 +53,9 @@
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 @@
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 @@
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 @@
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 @@
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 8360d13..c7b6d1a 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 1453528..c728003 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.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 e2d06cc..c4f3e12 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/ledger_balance_export/__init__.py b/erpnext/accounts/doctype/multi_ledger_report/__init__.py
similarity index 100%
rename from erpnext/accounts/doctype/ledger_balance_export/__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 1f83e96..0ef7a5d 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_adjustment_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_adjustment_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 0d76a9d..20d618b 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/payable_voucher/__init__.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/__init__.py
similarity index 100%
rename from erpnext/accounts/doctype/payable_voucher/__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 96%
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 0ab0e05..848cc76 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 @@
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 @@
#--------------------------------------------------
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 93%
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 0e5bb4d..5a95ba8 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 c5aa935..d990b18 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 @@
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 @@
"""
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 @@
# test data
#---------------
rv1 = Document(fielddata={
- 'doctype':'Receivable Voucher',
+ 'doctype':'Sales Invoice',
'docstatus':1,
'debit_to':'cust1 - c1',
'grand_total': 100,
@@ -126,17 +126,17 @@
})]
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 @@
'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/purchase_tax_detail/__init__.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool_detail/__init__.py
similarity index 100%
copy from erpnext/accounts/doctype/purchase_tax_detail/__init__.py
copy 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 90%
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 9c2e426..5291057 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 45caca5..43742ac 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.py
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.py
@@ -39,7 +39,7 @@
#--------------------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 2931617..5167842 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/purchase_tax_detail/__init__.py b/erpnext/accounts/doctype/purchase_invoice/__init__.py
similarity index 100%
rename from erpnext/accounts/doctype/purchase_tax_detail/__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 6dc8f99..da8d2ac 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 94%
rename from erpnext/accounts/doctype/payable_voucher/payable_voucher.js
rename to erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 057abca..f3b3d8a 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 <http://www.gnu.org/licenses/>.
-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 @@
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.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 @@
$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.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 @@
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 @@
}
-// ================== 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.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.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 @@
// ------------------
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 92%
rename from erpnext/accounts/doctype/payable_voucher/payable_voucher.py
rename to erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index d930583..54078d9 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -37,7 +37,7 @@
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 @@
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 @@
# 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 @@
# ---------------------------------------------------------------------
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 @@
# 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 @@
# 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 @@
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 @@
#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 @@
#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 @@
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 d264b0d..08efc81 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/purchase_tax_detail/__init__.py b/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py
similarity index 100%
copy from erpnext/accounts/doctype/purchase_tax_detail/__init__.py
copy 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 93%
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 5cc99d2..586ae1c 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/purchase_tax_detail/__init__.py b/erpnext/accounts/doctype/purchase_invoice_item/__init__.py
similarity index 100%
copy from erpnext/accounts/doctype/purchase_tax_detail/__init__.py
copy 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 96%
rename from erpnext/accounts/doctype/pv_detail/pv_detail.txt
rename to erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.txt
index 77b8218..213f350 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%
copy from erpnext/accounts/doctype/purchase_tax_detail/__init__.py
copy 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 95%
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 d4cd669..74fd697 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/pv_detail/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/accounts/doctype/pv_detail/__init__.py
+++ /dev/null
diff --git a/erpnext/accounts/doctype/receivable_voucher/__init__.py b/erpnext/accounts/doctype/receivable_voucher/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/accounts/doctype/receivable_voucher/__init__.py
+++ /dev/null
diff --git a/erpnext/accounts/doctype/rv_detail/__init__.py b/erpnext/accounts/doctype/rv_detail/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/accounts/doctype/rv_detail/__init__.py
+++ /dev/null
diff --git a/erpnext/accounts/doctype/rv_tax_detail/__init__.py b/erpnext/accounts/doctype/rv_tax_detail/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/accounts/doctype/rv_tax_detail/__init__.py
+++ /dev/null
diff --git a/erpnext/accounts/doctype/ledger_detail/__init__.py b/erpnext/accounts/doctype/sales_invoice/__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/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 ebedd51..f3548f0 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 6db3b52..7201f3d 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 <http://www.gnu.org/licenses/>.
-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.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 @@
'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.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.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.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.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 94%
rename from erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
rename to erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index b0d1e53..848e120 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -36,7 +36,7 @@
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 @@
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 @@
# 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 @@
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 @@
# 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 @@
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 @@
'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 @@
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 97%
rename from erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
rename to erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
index 330ce97..01d502e 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/internal_reconciliation/__init__.py b/erpnext/accounts/doctype/sales_invoice_advance/__init__.py
similarity index 100%
rename from erpnext/accounts/doctype/internal_reconciliation/__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 91%
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 794470b..5725246 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/ir_payment_detail/__init__.py b/erpnext/accounts/doctype/sales_invoice_item/__init__.py
similarity index 100%
rename from erpnext/accounts/doctype/ir_payment_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 97%
rename from erpnext/accounts/doctype/rv_detail/rv_detail.txt
rename to erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.txt
index aa4c8e5..acb1d95 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/internal_reconciliation/__init__.py b/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py
similarity index 100%
copy from erpnext/accounts/doctype/internal_reconciliation/__init__.py
copy 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 6dbdc40..b8c8a5e 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 fae4dd9..89f1301 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.js
+++ b/erpnext/accounts/doctype/tds_control/tds_control.js
@@ -25,14 +25,14 @@
# 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 @@
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 @@
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 be1945d..ccbee7c 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.py
+++ b/erpnext/accounts/doctype/tds_control/tds_control.py
@@ -44,14 +44,14 @@
# 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 @@
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 @@
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 cf97426..0885c3f 100644
--- a/erpnext/accounts/doctype/tds_payment/tds_payment.py
+++ b/erpnext/accounts/doctype/tds_payment/tds_payment.py
@@ -77,7 +77,7 @@
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 f4da7e8..1f19537 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 @@
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 cbb622f..2ace21c 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 @@
# 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 @@
# 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 @@
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 08c8bc3..8d701ec 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 efc2ec3..60df6c8 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 @@
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 5a5f4b4..6cd71fe 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 @@
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 @@
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 @@
# 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 eb24630..272327b 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 34f1f97..1b60cef 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 b80e239..806738c 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 411c4aa..dfa58a6 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 @@
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 c0f6e61..f08fe5c 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 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 ecd5057..0270357 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 @@
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<filter_list.length;i++)
- this.filter_fields_dict['Payable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
+ this.filter_fields_dict['Purchase Invoice'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
- this.filter_fields_dict['PV Detail'+FILTER_SEP +'Item'].df.filter_hide = 0;
+ this.filter_fields_dict['Purchase Invoice Item'+FILTER_SEP +'Item'].df.filter_hide = 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['PV Detail'+FILTER_SEP +'Item'].df.in_first_page = 1;
+ 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 Invoice Item'+FILTER_SEP +'Item'].df.in_first_page = 1;
- 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/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt
index e6b1983..29004ea 100644
--- a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt
+++ b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.txt
@@ -12,18 +12,18 @@
# These values are common for all Search Criteria
{
- 'columns': 'Payable Voucher\x01ID,Payable Voucher\x01Credit To,Payable Voucher\x01Company,PV Detail\x01Item,PV Detail\x01Item Name,PV Detail\x01Expense Head,PV Detail\x01Cost Center,PV Detail\x01Qty,PV Detail\x01Rate (Default Curr.),PV Detail\x01Amount (Default Curr.)',
+ 'columns': 'Purchase Invoice\x01ID,Purchase Invoice\x01Credit To,Purchase Invoice\x01Company,Purchase Invoice Item\x01Item,Purchase Invoice Item\x01Item Name,Purchase Invoice Item\x01Expense Head,Purchase Invoice Item\x01Cost Center,Purchase Invoice Item\x01Qty,Purchase Invoice Item\x01Rate (Default Curr.),Purchase Invoice Item\x01Amount (Default Curr.)',
'criteria_name': 'Itemwise Purchase Register',
'description': 'Itemwise Purchase Register',
'dis_filters': 'fiscal_year',
- 'doc_type': 'PV Detail',
+ 'doc_type': 'Purchase Invoice Item',
'doctype': 'Search Criteria',
- 'filters': "{'Payable Voucher\x01Submitted':1,'Payable Voucher\x01Is Opening':'No','Payable Voucher\x01Company':'','Payable Voucher\x01Fiscal Year':''}",
+ 'filters': "{'Purchase Invoice\x01Submitted':1,'Purchase Invoice\x01Is Opening':'No','Purchase Invoice\x01Company':'','Purchase Invoice\x01Fiscal Year':''}",
'module': 'Accounts',
'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/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
index d243717..2fb1213 100755
--- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
@@ -18,18 +18,18 @@
this.hide_all_filters();
filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date']
for(var i=0;i<filter_list.length;i++)
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
+ this.filter_fields_dict['Sales Invoice'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
- this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item'].df.filter_hide = 0;
- this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item Group'].df.filter_hide = 0;
- this.filter_fields_dict['RV Detail'+FILTER_SEP +'Brand Name'].df.filter_hide = 0;
- this.filter_fields_dict['RV Detail'+FILTER_SEP +'Cost Center'].df.filter_hide = 0;
+ this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Item'].df.filter_hide = 0;
+ this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Item Group'].df.filter_hide = 0;
+ this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Brand Name'].df.filter_hide = 0;
+ this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Cost Center'].df.filter_hide = 0;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
- this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item'].df.in_first_page = 1;
+ this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'From Posting Date'].df.in_first_page = 1;
+ this.filter_fields_dict['Sales Invoice'+FILTER_SEP +'To Posting Date'].df.in_first_page = 1;
+ this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Item'].df.in_first_page = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Company'].df['report_default']=sys_defaults.company
+ 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
}
diff --git a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt
index 24882e6..82eee4d 100644
--- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt
+++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.txt
@@ -12,16 +12,16 @@
# These values are common for all Search Criteria
{
- 'columns': 'RV Detail\x01Item,RV Detail\x01Item Name,RV Detail\x01Item Group,Receivable Voucher\x01ID,Receivable Voucher\x01Voucher Date,Receivable Voucher\x01Posting Date,Receivable Voucher\x01Debit To,RV Detail\x01Cost Center,Receivable Voucher\x01Territory,RV Detail\x01Income Account,RV Detail\x01Qty,RV Detail\x01Basic Rate*,RV Detail\x01Amount*',
+ 'columns': 'Sales Invoice Item\x01Item,Sales Invoice Item\x01Item Name,Sales Invoice Item\x01Item Group,Sales Invoice\x01ID,Sales Invoice\x01Voucher Date,Sales Invoice\x01Posting Date,Sales Invoice\x01Debit To,Sales Invoice Item\x01Cost Center,Sales Invoice\x01Territory,Sales Invoice Item\x01Income Account,Sales Invoice Item\x01Qty,Sales Invoice Item\x01Basic Rate*,Sales Invoice Item\x01Amount*',
'criteria_name': 'Itemwise Sales Register',
- 'doc_type': 'RV Detail',
+ 'doc_type': 'Sales Invoice Item',
'doctype': 'Search Criteria',
- 'filters': "{'Receivable Voucher\x01Submitted':1,'Receivable Voucher\x01From Posting Date\x01lower':'','Receivable Voucher\x01To Posting Date\x01upper':'','Receivable Voucher\x01Is Opening':'','Receivable Voucher\x01Company':'','Receivable Voucher\x01Fiscal Year':''}",
+ 'filters': "{'Sales Invoice\x01Submitted':1,'Sales Invoice\x01From Posting Date\x01lower':'','Sales Invoice\x01To Posting Date\x01upper':'','Sales Invoice\x01Is Opening':'','Sales Invoice\x01Company':'','Sales Invoice\x01Fiscal Year':''}",
'module': 'Accounts',
'name': '__common__',
'page_len': 50,
- 'parent_doc_type': 'Receivable Voucher',
- 'sort_by': '`tabRV Detail`.`income_account`',
+ 'parent_doc_type': 'Sales Invoice',
+ 'sort_by': '`tabSales Invoice Item`.`income_account`',
'sort_order': 'DESC',
'standard': 'Yes'
},
diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.js b/erpnext/accounts/search_criteria/payment_report/payment_report.js
index 6571b69..04ea91e 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.js
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.js
@@ -29,7 +29,7 @@
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:'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',ignore : 1, parent:'Purchase 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/payment_report/payment_report.py b/erpnext/accounts/search_criteria/payment_report/payment_report.py
index cc025ba..404b883 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.py
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.py
@@ -66,7 +66,7 @@
for r in res:
if r[col_idx['Against Payable']]:
- dt=sql("select date(modified), aging_date from `tabPayable Voucher` where name='%s'"%r[col_idx['Against Payable']])
+ dt=sql("select date(modified), aging_date from `tabPurchase Invoice` where name='%s'"%r[col_idx['Against Payable']])
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/payment_report/payment_report.txt b/erpnext/accounts/search_criteria/payment_report/payment_report.txt
index 1059e8b..1421025 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.txt
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.txt
@@ -16,7 +16,7 @@
'criteria_name': 'Payment Report',
'doc_type': 'Journal Voucher Detail',
'doctype': 'Search Criteria',
- 'filters': "{'Journal Voucher\x01Submitted':1,'Journal Voucher\x01Voucher Type':'','Journal Voucher\x01Is Opening':'','Journal Voucher\x01Company':'','Journal Voucher\x01TDS Applicable':'','Journal Voucher\x01TDS Category':'','GL Entry\x01Range 1':'30','GL Entry\x01Range 2':'45','GL Entry\x01Range 3':'60','GL Entry\x01Range 4':'90','Receivable Voucher\x01Aging Based On':'','Payable Voucher\x01Aging Based On':''}",
+ 'filters': "{'Journal Voucher\x01Submitted':1,'Journal Voucher\x01Voucher Type':'','Journal Voucher\x01Is Opening':'','Journal Voucher\x01Company':'','Journal Voucher\x01TDS Applicable':'','Journal Voucher\x01TDS Category':'','GL Entry\x01Range 1':'30','GL Entry\x01Range 2':'45','GL Entry\x01Range 3':'60','GL Entry\x01Range 4':'90','Sales Invoice\x01Aging Based On':'','Purchase Invoice\x01Aging Based On':''}",
'module': 'Accounts',
'name': '__common__',
'parent_doc_type': 'Journal Voucher',
diff --git a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
index eb61af4..0601a62 100644
--- a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
+++ b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
@@ -16,8 +16,8 @@
# add expense head columns
expense_acc = [c[0] for c in sql("""select distinct expense_head
- from `tabPV Detail`
- where parenttype='Payable Voucher'
+ from `tabPurchase Invoice Item`
+ where parenttype='Purchase Invoice'
and docstatus=1
order by expense_head asc""")]
@@ -31,8 +31,8 @@
# Add tax head columns
tax_acc = [c[0] for c in sql("""select distinct account_head
- from `tabPurchase Tax Detail`
- where parenttype = 'Payable Voucher'
+ from `tabPurchase Taxes and Charges`
+ where parenttype = 'Purchase Invoice'
and add_deduct_tax = 'Add'
and category in ('For Total', 'For Both')
and docstatus=1
@@ -56,8 +56,8 @@
for r in res:
#Get amounts for expense heads
exp_head_amount = sql("""select expense_head, sum(amount)
- from `tabPV Detail`
- where parent = %s and parenttype='Payable Voucher'
+ from `tabPurchase Invoice Item`
+ where parent = %s and parenttype='Purchase Invoice'
group by expense_head""", (r[col_idx['ID']],))
#convert the result to dictionary for easy retrieval
@@ -84,9 +84,9 @@
#Get tax for account heads
acc_head_tax = sql("""select account_head, tax_amount
- from `tabPurchase Tax Detail`
+ from `tabPurchase Taxes and Charges`
where parent = '%s'
- and parenttype = 'Payable Voucher'
+ and parenttype = 'Purchase Invoice'
and add_deduct_tax = 'Add'
and category in ('For Total', 'For Both')""" %(r[col_idx['ID']],))
diff --git a/erpnext/accounts/search_criteria/purchase_register/purchase_register.txt b/erpnext/accounts/search_criteria/purchase_register/purchase_register.txt
index 4ae2751..f8a60af 100644
--- a/erpnext/accounts/search_criteria/purchase_register/purchase_register.txt
+++ b/erpnext/accounts/search_criteria/purchase_register/purchase_register.txt
@@ -12,12 +12,12 @@
# These values are common for all Search Criteria
{
- 'add_cond': "`tabPayable Voucher`.is_opening != 'Yes'\n`tabPayable Voucher`.name not like 'OP/%'",
- 'columns': 'Payable Voucher\x01ID,Payable Voucher\x01Voucher Date,Payable Voucher\x01Posting Date,Payable Voucher\x01Credit To,Payable Voucher\x01Expense Head',
+ 'add_cond': "`tabPurchase Invoice`.is_opening != 'Yes'\n`tabPurchase Invoice`.name not like 'OP/%'",
+ 'columns': 'Purchase Invoice\x01ID,Purchase Invoice\x01Voucher Date,Purchase Invoice\x01Posting Date,Purchase Invoice\x01Credit To,Purchase Invoice\x01Expense Head',
'criteria_name': 'Purchase Register',
- 'doc_type': 'Payable Voucher',
+ 'doc_type': 'Purchase Invoice',
'doctype': 'Search Criteria',
- 'filters': "{'Payable Voucher\x01Submitted':1}",
+ 'filters': "{'Purchase Invoice\x01Submitted':1}",
'module': 'Accounts',
'name': '__common__',
'standard': 'Yes'
diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.js b/erpnext/accounts/search_criteria/sales_register/sales_register.js
index 669d76d..5a09713 100644
--- a/erpnext/accounts/search_criteria/sales_register/sales_register.js
+++ b/erpnext/accounts/search_criteria/sales_register/sales_register.js
@@ -16,17 +16,17 @@
report.customize_filters = function() {
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'ID'].df.filter_hide = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Owner'].df.filter_hide = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Saved'].df.filter_hide = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Submitted'].df.filter_hide = 1;
- this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Cancelled'].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 +'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 8bb6903..9fdfb00 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 @@
#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 @@
#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 c780fbd..fcdaf37 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 41ead1c..9489630 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 @@
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 @@
// 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 @@
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 4dbfb52..43dd954 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 <http://www.gnu.org/licenses/>.
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 c152c79..3d1ed07 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'
},