changed fieldname from charge to taxes
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
index 5dbe9f6..45f7e90 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2014-01-20 17:49:04",
+ "modified": "2014-01-28 18:46:48",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -324,16 +324,16 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money",
"read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "purchase_other_charges",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Master",
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 1292507..5c092cf 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -215,7 +215,7 @@
# fetch charges
if self.doc.charge and not len(self.doclist.get({"parentfield": "other_charges"})):
- self.set_taxes("other_charges", "charge")
+ self.set_taxes("other_charges", "taxes_and_charges")
def get_customer_account(self):
"""Get Account Head to which amount needs to be Debited based on Customer"""
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
index a3be27d..49cc213 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:05",
"docstatus": 0,
- "modified": "2014-01-20 17:49:20",
+ "modified": "2014-01-28 18:43:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -376,9 +376,9 @@
},
{
"doctype": "DocField",
- "fieldname": "charge",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master",
@@ -1231,6 +1231,7 @@
"write": 1
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Customer"
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index d01627a..1556634 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -241,9 +241,9 @@
}
},
- purchase_other_charges: function() {
+ taxes_and_charges: function() {
var me = this;
- if(this.frm.doc.purchase_other_charges) {
+ if(this.frm.doc.taxes_and_charges) {
return this.frm.call({
doc: this.frm.doc,
method: "get_purchase_tax_details",
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt
index 2790e41..bce007c 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.txt
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2014-01-20 17:49:08",
+ "modified": "2014-01-28 18:49:03",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -299,7 +299,7 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money",
"print_hide": 0
@@ -307,9 +307,9 @@
{
"description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
"doctype": "DocField",
- "fieldname": "purchase_other_charges",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"no_copy": 0,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
@@ -699,6 +699,7 @@
"write": 1
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Supplier"
diff --git a/erpnext/buying/doctype/supplier/supplier.txt b/erpnext/buying/doctype/supplier/supplier.txt
index 5c305f5..a5d100f 100644
--- a/erpnext/buying/doctype/supplier/supplier.txt
+++ b/erpnext/buying/doctype/supplier/supplier.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:11",
"docstatus": 0,
- "modified": "2014-01-20 17:49:29",
+ "modified": "2014-01-28 19:05:55",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -159,6 +159,14 @@
},
{
"doctype": "DocField",
+ "fieldname": "default_currency",
+ "fieldtype": "Link",
+ "label": "Default Currency",
+ "no_copy": 1,
+ "options": "Currency"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "default_price_list",
"fieldtype": "Link",
"label": "Price List",
@@ -166,11 +174,10 @@
},
{
"doctype": "DocField",
- "fieldname": "default_currency",
+ "fieldname": "default_taxes_and_charges",
"fieldtype": "Link",
- "label": "Default Currency",
- "no_copy": 1,
- "options": "Currency"
+ "label": "Taxes and Charges",
+ "options": "Purchase Taxes and Charges Master"
},
{
"doctype": "DocField",
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
index e1441e5..324bd41 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:45",
"docstatus": 0,
- "modified": "2014-01-20 17:49:29",
+ "modified": "2014-01-28 18:50:58",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -290,16 +290,16 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money"
},
{
"description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
"doctype": "DocField",
- "fieldname": "purchase_other_charges",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Purchase Taxes and Charges",
+ "label": "Taxes and Charges",
"no_copy": 1,
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index 83b5909..f7b1e27 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -38,7 +38,7 @@
self.set_missing_item_details(get_item_details)
if self.doc.fields.get("__islocal"):
- self.set_taxes("purchase_tax_details", "purchase_other_charges")
+ self.set_taxes("purchase_tax_details", "taxes_and_charges")
def set_supplier_from_item_default(self):
if self.meta.get_field("supplier") and not self.doc.supplier:
@@ -59,7 +59,7 @@
def get_purchase_tax_details(self):
self.doclist = self.doc.clear_table(self.doclist, "purchase_tax_details")
- self.set_taxes("purchase_tax_details", "purchase_other_charges")
+ self.set_taxes("purchase_tax_details", "taxes_and_charges")
def validate_stock_or_nonstock_items(self):
if not self.get_stock_items():
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 52dcaaa..2c1f078 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -30,7 +30,7 @@
self.set_missing_lead_customer_details()
self.set_price_list_and_item_details()
if self.doc.fields.get("__islocal"):
- self.set_taxes("other_charges", "charge")
+ self.set_taxes("other_charges", "taxes_and_charges")
def set_missing_lead_customer_details(self):
if self.doc.customer:
@@ -52,7 +52,7 @@
def get_other_charges(self):
self.doclist = self.doc.clear_table(self.doclist, "other_charges")
- self.set_taxes("other_charges", "charge")
+ self.set_taxes("other_charges", "taxes_and_charges")
def apply_shipping_rule(self):
if self.doc.shipping_rule:
diff --git a/erpnext/selling/doctype/customer/customer.txt b/erpnext/selling/doctype/customer/customer.txt
index 6eabaf0..c6c0e9f 100644
--- a/erpnext/selling/doctype/customer/customer.txt
+++ b/erpnext/selling/doctype/customer/customer.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-06-11 14:26:44",
"docstatus": 0,
- "modified": "2014-01-20 17:48:32",
+ "modified": "2014-01-28 19:06:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -26,6 +26,7 @@
"parenttype": "DocType"
},
{
+ "cancel": 0,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Customer",
@@ -254,6 +255,14 @@
},
{
"doctype": "DocField",
+ "fieldname": "default_taxes_and_charges",
+ "fieldtype": "Link",
+ "label": "Taxes and Charges",
+ "options": "Sales Taxes and Charges Master",
+ "permlevel": 0
+ },
+ {
+ "doctype": "DocField",
"fieldname": "credit_days",
"fieldtype": "Int",
"label": "Credit Days",
@@ -343,7 +352,6 @@
},
{
"amend": 0,
- "cancel": 0,
"create": 1,
"delete": 0,
"doctype": "DocPerm",
@@ -363,7 +371,6 @@
},
{
"amend": 0,
- "cancel": 0,
"create": 1,
"delete": 1,
"doctype": "DocPerm",
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index f12a2a7..6cf538d 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
- "modified": "2014-01-20 17:49:16",
+ "modified": "2014-01-28 18:50:17",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -373,17 +373,17 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money",
"read_only": 0
},
{
"doctype": "DocField",
- "fieldname": "charge",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
"hidden": 0,
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master",
diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt
index d187f67..01c2817 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.txt
+++ b/erpnext/selling/doctype/sales_order/sales_order.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-06-18 12:39:59",
"docstatus": 0,
- "modified": "2014-01-20 17:49:23",
+ "modified": "2014-01-28 18:47:42",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -398,16 +398,16 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money",
"print_hide": 0
},
{
"doctype": "DocField",
- "fieldname": "charge",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master",
@@ -928,11 +928,13 @@
"write": 1
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Accounts User"
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Customer"
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 1baaf7b..a9ed2b7 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -518,7 +518,7 @@
}
},
- charge: function() {
+ taxes_and_charges: function() {
var me = this;
if(this.frm.doc.charge) {
return this.frm.call({
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 63b62d6..a20723d 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:09",
"docstatus": 0,
- "modified": "2014-01-20 17:48:35",
+ "modified": "2014-01-28 18:51:42",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -402,7 +402,7 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money",
"read_only": 0
@@ -410,9 +410,9 @@
{
"description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.",
"doctype": "DocField",
- "fieldname": "charge",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Tax Master",
+ "label": "Taxes and Charges",
"oldfieldname": "charge",
"oldfieldtype": "Link",
"options": "Sales Taxes and Charges Master",
@@ -1071,6 +1071,7 @@
"write": 0
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Customer"
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 960bb21..e1ba362 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-21 16:16:39",
"docstatus": 0,
- "modified": "2014-01-20 17:49:12",
+ "modified": "2014-01-28 18:52:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -329,16 +329,16 @@
"doctype": "DocField",
"fieldname": "taxes",
"fieldtype": "Section Break",
- "label": "Taxes",
+ "label": "Taxes and Charges",
"oldfieldtype": "Section Break",
"options": "icon-money"
},
{
"description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
"doctype": "DocField",
- "fieldname": "purchase_other_charges",
+ "fieldname": "taxes_and_charges",
"fieldtype": "Link",
- "label": "Purchase Taxes and Charges",
+ "label": "Taxes and Charges",
"oldfieldname": "purchase_other_charges",
"oldfieldtype": "Link",
"options": "Purchase Taxes and Charges Master",
@@ -836,6 +836,7 @@
"write": 1
},
{
+ "cancel": 0,
"delete": 0,
"doctype": "DocPerm",
"role": "Supplier"
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 2c6357a..a1ff0f8 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -64,7 +64,7 @@
out[f] = customer.fields.get(f)
# fields prepended with default in Customer doctype
- for f in ['sales_partner', 'commission_rate', 'currency', 'price_list']:
+ for f in ['sales_partner', 'commission_rate', 'currency', 'price_list', 'taxes_and_charges']:
if customer.fields.get("default_" + f):
out[f] = customer.fields.get("default_" + f)
@@ -128,6 +128,11 @@
out["supplier_name"] = supplier.supplier_name
if supplier.default_currency:
out["currency"] = supplier.default_currency
+
+ # fields prepended with default in Customer doctype
+ for f in ['currency', 'taxes_and_charges']:
+ if supplier.fields.get("default_" + f):
+ out[f] = supplier.fields.get("default_" + f)
out["buying_price_list"] = self.get_user_default_price_list("buying_price_list") or \
supplier.default_price_list or self.doc.buying_price_list