changed fieldname from charge to taxes
This commit is contained in:
parent
a7ab20ec78
commit
2ced3b07d4
@ -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",
|
||||
|
@ -215,7 +215,7 @@ class DocType(SellingController):
|
||||
|
||||
# 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"""
|
||||
|
@ -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"
|
||||
|
@ -241,9 +241,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
},
|
||||
|
||||
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",
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
},
|
||||
@ -157,6 +157,14 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_currency",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Currency",
|
||||
"no_copy": 1,
|
||||
"options": "Currency"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_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",
|
||||
|
@ -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",
|
||||
|
@ -38,7 +38,7 @@ class BuyingController(StockController):
|
||||
|
||||
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 @@ class BuyingController(StockController):
|
||||
|
||||
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():
|
||||
|
@ -30,7 +30,7 @@ class SellingController(StockController):
|
||||
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 @@ class SellingController(StockController):
|
||||
|
||||
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:
|
||||
|
@ -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",
|
||||
@ -252,6 +253,14 @@
|
||||
"options": "Price List",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"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",
|
||||
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
|
@ -518,7 +518,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
},
|
||||
|
||||
charge: function() {
|
||||
taxes_and_charges: function() {
|
||||
var me = this;
|
||||
if(this.frm.doc.charge) {
|
||||
return this.frm.call({
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -64,7 +64,7 @@ class TransactionBase(StatusUpdater):
|
||||
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 @@ class TransactionBase(StatusUpdater):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user