set as default button in fiscal year

This commit is contained in:
Nabin Hait 2013-01-09 14:44:24 +05:30
parent 0f61b476a2
commit f8c6531c3d
4 changed files with 102 additions and 69 deletions

View File

@ -1,3 +1,31 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// 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.refresh = function(doc, dt, dn) { cur_frm.cscript.refresh = function(doc, dt, dn) {
cur_frm.toggle_enable('year_start_date', doc.__islocal) cur_frm.toggle_enable('year_start_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default);
cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'");
} else cur_frm.set_intro("");
}
cur_frm.cscript.set_as_default = function() {
wn.call({
doc: cur_frm.doc,
method: "set_as_default"
});
} }

View File

@ -16,7 +16,18 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes import webnotes
from webnotes import msgprint, _
class DocType: class DocType:
def __init__(self, d, dl): def __init__(self, d, dl):
self.doc, self.doclist = d, dl self.doc, self.doclist = d, dl
def set_as_default(self):
webnotes.conn.set_value("Global Defaults", None, "current_fiscal_year", self.doc.name)
webnotes.get_obj("Global Defaults").on_update()
# clear cache
webnotes.clear_cache()
msgprint(self.doc.name + _(""" is now the default Fiscal Year. \
Please refresh your browser for the change to take effect."""))

View File

@ -65,6 +65,9 @@ class DocType:
webnotes.conn.set_default('year_end_date', \ webnotes.conn.set_default('year_end_date', \
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d')) get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
# clear cache
webnotes.clear_cache()
def validate_session_expiry(self): def validate_session_expiry(self):
if self.doc.session_expiry: if self.doc.session_expiry:
parts = self.doc.session_expiry.split(":") parts = self.doc.session_expiry.split(":")

View File

@ -2,9 +2,9 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-11-28 11:26:21", "creation": "2012-12-03 17:26:43",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-12-03 17:10:41" "modified": "2013-01-09 12:52:30"
}, },
{ {
"is_submittable": 1, "is_submittable": 1,
@ -19,6 +19,7 @@
"doctype": "DocType" "doctype": "DocType"
}, },
{ {
"read_only": 0,
"name": "__common__", "name": "__common__",
"parent": "Delivery Note", "parent": "Delivery Note",
"doctype": "DocField", "doctype": "DocField",
@ -38,10 +39,10 @@
"doctype": "DocType" "doctype": "DocType"
}, },
{ {
"print_width": "50%",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"trigger": "Client",
"fieldname": "column_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
@ -51,7 +52,6 @@
"description": "To manage multiple series please go to Setup > Manage Series", "description": "To manage multiple series please go to Setup > Manage Series",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Select", "oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Series", "label": "Series",
"oldfieldname": "naming_series", "oldfieldname": "naming_series",
@ -68,7 +68,6 @@
"label": "Customer", "label": "Customer",
"oldfieldname": "customer", "oldfieldname": "customer",
"permlevel": 0, "permlevel": 0,
"trigger": "Client",
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"search_index": 1, "search_index": 1,
@ -86,6 +85,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"depends_on": "customer",
"doctype": "DocField", "doctype": "DocField",
"label": "Select Shipping Address", "label": "Select Shipping Address",
"options": "Address", "options": "Address",
@ -136,11 +136,11 @@
}, },
{ {
"print_hide": 0, "print_hide": 0,
"permlevel": 0,
"description": "The date at which current entry will get or has actually executed.", "description": "The date at which current entry will get or has actually executed.",
"width": "100px", "print_width": "100px",
"default": "Today", "default": "Today",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Posting Date", "label": "Posting Date",
"oldfieldname": "posting_date", "oldfieldname": "posting_date",
@ -150,7 +150,7 @@
"search_index": 1, "search_index": 1,
"reqd": 1, "reqd": 1,
"in_filter": 1, "in_filter": 1,
"permlevel": 0 "width": "100px"
}, },
{ {
"print_hide": 1, "print_hide": 1,
@ -176,6 +176,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "100px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"doctype": "DocField", "doctype": "DocField",
@ -189,9 +190,9 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "100px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "P.O. Date", "label": "P.O. Date",
"oldfieldname": "po_date", "oldfieldname": "po_date",
@ -204,7 +205,6 @@
}, },
{ {
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Items", "label": "Items",
"fieldname": "items", "fieldname": "items",
@ -215,7 +215,6 @@
"print_hide": 0, "print_hide": 0,
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Table", "oldfieldtype": "Table",
"colour": "White:FFF",
"allow_on_submit": 1, "allow_on_submit": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Delivery Note Items", "label": "Delivery Note Items",
@ -248,6 +247,7 @@
}, },
{ {
"print_hide": 0, "print_hide": 0,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
@ -263,7 +263,6 @@
"oldfieldtype": "Button", "oldfieldtype": "Button",
"doctype": "DocField", "doctype": "DocField",
"label": "Re-Calculate Values", "label": "Re-Calculate Values",
"trigger": "Client",
"fieldname": "recalculate_values", "fieldname": "recalculate_values",
"fieldtype": "Button", "fieldtype": "Button",
"permlevel": 0 "permlevel": 0
@ -279,7 +278,6 @@
"description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.", "description": "You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Sales Order No", "label": "Sales Order No",
"oldfieldname": "sales_order_no", "oldfieldname": "sales_order_no",
@ -316,12 +314,10 @@
"print_hide": 1, "print_hide": 1,
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List", "label": "Price List",
"oldfieldname": "price_list_name", "oldfieldname": "price_list_name",
"permlevel": 0, "permlevel": 0,
"trigger": "Client",
"fieldname": "price_list_name", "fieldname": "price_list_name",
"fieldtype": "Select", "fieldtype": "Select",
"reqd": 1, "reqd": 1,
@ -330,7 +326,6 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "Select the currency in which price list is maintained", "description": "Select the currency in which price list is maintained",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency", "label": "Price List Currency",
"options": "link:Currency", "options": "link:Currency",
@ -342,7 +337,6 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "Rate at which Price list currency is converted to company's base currency", "description": "Rate at which Price list currency is converted to company's base currency",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency Conversion Rate", "label": "Price List Currency Conversion Rate",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",
@ -351,6 +345,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "column_break2", "fieldname": "column_break2",
@ -361,7 +356,6 @@
"print_hide": 1, "print_hide": 1,
"description": "Customer's Currency", "description": "Customer's Currency",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Currency", "label": "Currency",
"oldfieldname": "currency", "oldfieldname": "currency",
@ -376,7 +370,6 @@
"description": "Rate at which customer's currency is converted to company's base currency", "description": "Rate at which customer's currency is converted to company's base currency",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Conversion Rate", "label": "Conversion Rate",
"oldfieldname": "conversion_rate", "oldfieldname": "conversion_rate",
@ -388,7 +381,6 @@
}, },
{ {
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Taxes", "label": "Taxes",
"fieldname": "taxes", "fieldname": "taxes",
@ -399,7 +391,6 @@
"print_hide": 1, "print_hide": 1,
"description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.", "description": "If you have created a standard template in Sales Taxes and Charges Master, select one and click on the button below.",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Taxes and Charges", "label": "Taxes and Charges",
"oldfieldname": "charge", "oldfieldname": "charge",
@ -413,7 +404,6 @@
"oldfieldtype": "Button", "oldfieldtype": "Button",
"doctype": "DocField", "doctype": "DocField",
"label": "Get Taxes and Charges", "label": "Get Taxes and Charges",
"trigger": "Client",
"fieldname": "get_charges", "fieldname": "get_charges",
"fieldtype": "Button", "fieldtype": "Button",
"permlevel": 0 "permlevel": 0
@ -431,6 +421,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "150px",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
"label": "Taxes and Charges Total", "label": "Taxes and Charges Total",
@ -445,7 +436,6 @@
"oldfieldtype": "Button", "oldfieldtype": "Button",
"doctype": "DocField", "doctype": "DocField",
"label": "Calculate Charges", "label": "Calculate Charges",
"trigger": "Client",
"fieldname": "calculate_charges", "fieldname": "calculate_charges",
"fieldtype": "Button", "fieldtype": "Button",
"permlevel": 0 "permlevel": 0
@ -461,7 +451,6 @@
{ {
"print_hide": 0, "print_hide": 0,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Totals", "label": "Totals",
"fieldname": "totals", "fieldname": "totals",
@ -470,6 +459,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
@ -483,6 +473,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
@ -496,9 +487,9 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "In Words will be visible once you save the Delivery Note.", "description": "In Words will be visible once you save the Delivery Note.",
"print_width": "200px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "In Words", "label": "In Words",
"oldfieldname": "in_words", "oldfieldname": "in_words",
@ -516,6 +507,7 @@
}, },
{ {
"print_hide": 0, "print_hide": 0,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
@ -529,6 +521,7 @@
}, },
{ {
"print_hide": 0, "print_hide": 0,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
@ -542,9 +535,9 @@
{ {
"print_hide": 0, "print_hide": 0,
"description": "In Words (Export) will be visible once you save the Delivery Note.", "description": "In Words (Export) will be visible once you save the Delivery Note.",
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "In Words (Export)", "label": "In Words (Export)",
"oldfieldname": "in_words_export", "oldfieldname": "in_words_export",
@ -575,19 +568,16 @@
{ {
"print_hide": 1, "print_hide": 1,
"oldfieldtype": "Button", "oldfieldtype": "Button",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Get Terms and Conditions", "label": "Get Terms and Conditions",
"trigger": "Server", "options": "get_tc_details",
"fieldname": "get_terms", "fieldname": "get_terms",
"fieldtype": "Button", "fieldtype": "Button",
"options": "get_tc_details",
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1, "print_hide": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Terms and Conditions HTML", "label": "Terms and Conditions HTML",
"options": "You can add Terms and Notes that will be printed in the Transaction", "options": "You can add Terms and Notes that will be printed in the Transaction",
@ -597,7 +587,6 @@
}, },
{ {
"oldfieldtype": "Text Editor", "oldfieldtype": "Text Editor",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Terms and Conditions Details", "label": "Terms and Conditions Details",
"oldfieldname": "terms", "oldfieldname": "terms",
@ -615,6 +604,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "column_break4", "fieldname": "column_break4",
@ -623,20 +613,20 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Transporter Name", "label": "Transporter Name",
"oldfieldname": "transporter_name", "oldfieldname": "transporter_name",
"width": "150px", "width": "150px",
"trigger": "Client",
"fieldname": "transporter_name", "fieldname": "transporter_name",
"fieldtype": "Data", "fieldtype": "Data",
"reqd": 0, "reqd": 0,
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "col_break34", "fieldname": "col_break34",
@ -646,9 +636,9 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "Transporter lorry number", "description": "Transporter lorry number",
"print_width": "100px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "LR No", "label": "LR No",
"oldfieldname": "lr_no", "oldfieldname": "lr_no",
@ -660,18 +650,18 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"permlevel": 0,
"description": "Date on which lorry started from your warehouse", "description": "Date on which lorry started from your warehouse",
"width": "100px", "print_width": "100px",
"default": "Today", "default": "Today",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "LR Date", "label": "LR Date",
"oldfieldname": "lr_date", "oldfieldname": "lr_date",
"no_copy": 0, "no_copy": 0,
"fieldname": "lr_date", "fieldname": "lr_date",
"fieldtype": "Date", "fieldtype": "Date",
"permlevel": 0 "width": "100px"
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@ -681,6 +671,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "col_break20", "fieldname": "col_break20",
@ -698,6 +689,7 @@
"in_filter": 1 "in_filter": 1
}, },
{ {
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "col_break21", "fieldname": "col_break21",
@ -709,12 +701,12 @@
"search_index": 1, "search_index": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Territory", "label": "Territory",
"options": "Territory", "permlevel": 0,
"fieldname": "territory", "fieldname": "territory",
"fieldtype": "Link", "fieldtype": "Link",
"reqd": 1, "reqd": 1,
"hidden": 0, "hidden": 0,
"permlevel": 0, "options": "Territory",
"in_filter": 1 "in_filter": 1
}, },
{ {
@ -732,7 +724,6 @@
"print_hide": 1, "print_hide": 1,
"description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.", "description": "Filling in Additional Information about the Delivery Note will help you analyze your data better.",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "More Info", "label": "More Info",
"fieldname": "more_info", "fieldname": "more_info",
@ -742,8 +733,8 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "Time at which items were delivered from warehouse", "description": "Time at which items were delivered from warehouse",
"print_width": "100px",
"oldfieldtype": "Time", "oldfieldtype": "Time",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Posting Time", "label": "Posting Time",
"oldfieldname": "posting_time", "oldfieldname": "posting_time",
@ -758,24 +749,25 @@
{ {
"print_hide": 1, "print_hide": 1,
"permlevel": 1, "permlevel": 1,
"width": "150px", "print_width": "150px",
"default": "Draft", "default": "Draft",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"doctype": "DocField", "doctype": "DocField",
"label": "Status", "label": "Status",
"oldfieldname": "status", "oldfieldname": "status",
"no_copy": 1, "no_copy": 1,
"options": "\nDraft\nSubmitted\nCancelled",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"search_index": 1, "search_index": 1,
"reqd": 1, "reqd": 1,
"options": "\nDraft\nSubmitted\nCancelled", "width": "150px",
"in_filter": 1 "in_filter": 1
}, },
{ {
"print_hide": 1, "print_hide": 1,
"allow_on_submit": 1,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"allow_on_submit": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Letter Head", "label": "Letter Head",
"oldfieldname": "letter_head", "oldfieldname": "letter_head",
@ -788,13 +780,11 @@
"print_hide": 1, "print_hide": 1,
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 1, "allow_on_submit": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Select Print Heading", "label": "Select Print Heading",
"oldfieldname": "select_print_heading", "oldfieldname": "select_print_heading",
"permlevel": 0, "permlevel": 0,
"trigger": "Client",
"fieldname": "select_print_heading", "fieldname": "select_print_heading",
"fieldtype": "Link", "fieldtype": "Link",
"options": "Print Heading", "options": "Print Heading",
@ -803,12 +793,10 @@
{ {
"description": "Track this Delivery Note against any Project", "description": "Track this Delivery Note against any Project",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Project Name", "label": "Project Name",
"oldfieldname": "project_name", "oldfieldname": "project_name",
"permlevel": 0, "permlevel": 0,
"trigger": "Client",
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"search_index": 1, "search_index": 1,
@ -829,7 +817,6 @@
{ {
"print_hide": 1, "print_hide": 1,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Campaign", "label": "Campaign",
"oldfieldname": "campaign", "oldfieldname": "campaign",
@ -841,18 +828,18 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"allow_on_submit": 1,
"oldfieldtype": "Check", "oldfieldtype": "Check",
"allow_on_submit": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Print Without Amount", "label": "Print Without Amount",
"oldfieldname": "print_without_amount", "oldfieldname": "print_without_amount",
"trigger": "Client",
"fieldname": "print_without_amount", "fieldname": "print_without_amount",
"fieldtype": "Check", "fieldtype": "Check",
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "50%",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
@ -866,7 +853,6 @@
"description": "% of materials billed against this Delivery Note", "description": "% of materials billed against this Delivery Note",
"no_copy": 1, "no_copy": 1,
"search_index": 1, "search_index": 1,
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "% Amount Billed", "label": "% Amount Billed",
"oldfieldname": "per_billed", "oldfieldname": "per_billed",
@ -893,7 +879,6 @@
"description": "% of materials delivered against this Delivery Note", "description": "% of materials delivered against this Delivery Note",
"no_copy": 1, "no_copy": 1,
"search_index": 1, "search_index": 1,
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "% Installed", "label": "% Installed",
"oldfieldname": "per_installed", "oldfieldname": "per_installed",
@ -914,9 +899,10 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"allow_on_submit": 0, "print_width": "150px",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"allow_on_submit": 0,
"doctype": "DocField", "doctype": "DocField",
"label": "Amended From", "label": "Amended From",
"oldfieldname": "amended_from", "oldfieldname": "amended_from",
@ -928,6 +914,7 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "The date at which current entry is corrected in the system.", "description": "The date at which current entry is corrected in the system.",
"print_width": "100px",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Date", "oldfieldtype": "Date",
"doctype": "DocField", "doctype": "DocField",
@ -943,7 +930,6 @@
"description": "Required only for sample item.", "description": "Required only for sample item.",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "To Warehouse", "label": "To Warehouse",
"oldfieldname": "to_warehouse", "oldfieldname": "to_warehouse",
@ -956,7 +942,6 @@
{ {
"print_hide": 1, "print_hide": 1,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Excise Page Number", "label": "Excise Page Number",
"oldfieldname": "excise_page", "oldfieldname": "excise_page",
@ -977,9 +962,9 @@
{ {
"print_hide": 1, "print_hide": 1,
"description": "Select the relevant company name if you have multiple companies", "description": "Select the relevant company name if you have multiple companies",
"print_width": "150px",
"permlevel": 0, "permlevel": 0,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Company", "label": "Company",
"oldfieldname": "company", "oldfieldname": "company",
@ -993,6 +978,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "150px",
"permlevel": 0, "permlevel": 0,
"oldfieldtype": "Select", "oldfieldtype": "Select",
"doctype": "DocField", "doctype": "DocField",
@ -1010,7 +996,6 @@
"print_hide": 1, "print_hide": 1,
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "Data", "oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Cancel Reason", "label": "Cancel Reason",
"oldfieldname": "cancel_reason", "oldfieldname": "cancel_reason",
@ -1043,7 +1028,6 @@
{ {
"print_hide": 1, "print_hide": 1,
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Sales Team", "label": "Sales Team",
"fieldname": "sales_team_section_break", "fieldname": "sales_team_section_break",
@ -1052,6 +1036,7 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "column_break6", "fieldname": "column_break6",
@ -1061,19 +1046,20 @@
{ {
"print_hide": 1, "print_hide": 1,
"permlevel": 0, "permlevel": 0,
"print_width": "150px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Link", "oldfieldtype": "Link",
"doctype": "DocField", "doctype": "DocField",
"label": "Sales Partner", "label": "Sales Partner",
"oldfieldname": "sales_partner", "oldfieldname": "sales_partner",
"width": "150px", "width": "150px",
"trigger": "Client",
"fieldname": "sales_partner", "fieldname": "sales_partner",
"fieldtype": "Link", "fieldtype": "Link",
"options": "Sales Partner" "options": "Sales Partner"
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "50%",
"doctype": "DocField", "doctype": "DocField",
"width": "50%", "width": "50%",
"fieldname": "column_break7", "fieldname": "column_break7",
@ -1082,13 +1068,13 @@
}, },
{ {
"print_hide": 1, "print_hide": 1,
"print_width": "100px",
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"doctype": "DocField", "doctype": "DocField",
"label": "Commission Rate (%)", "label": "Commission Rate (%)",
"oldfieldname": "commission_rate", "oldfieldname": "commission_rate",
"width": "100px", "width": "100px",
"trigger": "Client",
"fieldname": "commission_rate", "fieldname": "commission_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"permlevel": 0 "permlevel": 0
@ -1097,11 +1083,9 @@
"print_hide": 1, "print_hide": 1,
"no_copy": 0, "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField", "doctype": "DocField",
"label": "Total Commission", "label": "Total Commission",
"oldfieldname": "total_commission", "oldfieldname": "total_commission",
"trigger": "Client",
"fieldname": "total_commission", "fieldname": "total_commission",
"fieldtype": "Currency", "fieldtype": "Currency",
"permlevel": 0 "permlevel": 0
@ -1145,8 +1129,12 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"amend": 0,
"create": 0,
"doctype": "DocPerm", "doctype": "DocPerm",
"submit": 0,
"role": "Accounts User", "role": "Accounts User",
"cancel": 0,
"permlevel": 1 "permlevel": 1
}, },
{ {
@ -1157,8 +1145,7 @@
"write": 1, "write": 1,
"role": "Sales User", "role": "Sales User",
"cancel": 1, "cancel": 1,
"permlevel": 0, "permlevel": 0
"match": ""
}, },
{ {
"amend": 0, "amend": 0,
@ -1173,13 +1160,17 @@
{ {
"doctype": "DocPerm", "doctype": "DocPerm",
"role": "Customer", "role": "Customer",
"match": "customer_name", "permlevel": 0,
"permlevel": 0 "match": "customer_name"
}, },
{ {
"write": 1, "amend": 0,
"create": 0,
"doctype": "DocPerm", "doctype": "DocPerm",
"submit": 0,
"write": 1,
"role": "All", "role": "All",
"cancel": 0,
"permlevel": 2 "permlevel": 2
}, },
{ {