field arrangement in sales cycle

This commit is contained in:
Nabin Hait 2012-05-01 11:37:13 +05:30
parent 45850fe496
commit 2ade43a647
10 changed files with 1163 additions and 1015 deletions

View File

@ -90,6 +90,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
}
erpnext.hide_naming_series();
}
@ -103,9 +105,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) {
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
'get_default_customer_address', '', callback);
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name',
'address_display','contact_display','contact_mobile','contact_email','territory',
'customer_group']);
if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@ -141,7 +141,7 @@ cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){
cur_frm.cscript.lead = function(doc, cdt, cdn) {
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory', 'organization']);
if(doc.lead) unhide_field('territory');
}
@ -183,10 +183,10 @@ cur_frm.cscript.pull_enquiry_detail = function(doc,cdt,cdn){
doc.quotation_to = r.message;
if(doc.quotation_to == 'Lead') {
unhide_field(['lead','lead_name','address_display','contact_mobile','contact_email','territory']);
unhide_field('lead');
}
else if(doc.quotation_to == 'Customer') {
unhide_field(['customer','customer_address','contact_person','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
unhide_field(['customer','customer_address','contact_person','territory','customer_group']);
}
refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']);
}

View File

@ -65,10 +65,6 @@ class DocType(TransactionBase):
def get_contact_details(self):
return get_obj('Sales Common').get_contact_details(self,0)
# Clear Quotation Items
# -----------------------
def clear_quotation_details(self):
self.doc.clear_table(self.doclist, 'quotation_details')
# QUOTATION DETAILS TRIGGER FUNCTIONS

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-04-02 16:02:08',
'creation': '2012-04-30 18:40:10',
'docstatus': 0,
'modified': '2012-04-30 15:41:16',
'modified': '2012-04-30 20:30:45',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -51,7 +51,8 @@
'name': '__common__',
'parent': u'Quotation',
'parentfield': u'permissions',
'parenttype': u'DocType'
'parenttype': u'DocType',
'read': 1
},
# DocType, Quotation
@ -60,13 +61,6 @@
'name': u'Quotation'
},
# DocPerm
{
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'user print'
},
# DocPerm
{
'amend': 0,
@ -74,7 +68,6 @@
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'read': 1,
'role': u'Sales Manager',
'submit': 0,
'write': 0
@ -87,7 +80,6 @@
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'read': 1,
'role': u'Sales Manager',
'submit': 1,
'write': 1
@ -100,7 +92,6 @@
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'read': 1,
'role': u'Sales User',
'submit': 1,
'write': 1
@ -113,7 +104,6 @@
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'read': 1,
'role': u'Sales User',
'submit': 0,
'write': 0
@ -124,7 +114,6 @@
'doctype': u'DocPerm',
'match': u'customer_name',
'permlevel': 0,
'read': 1,
'role': u'Customer'
},
@ -135,7 +124,6 @@
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'read': 1,
'role': u'Maintenance Manager',
'submit': 1,
'write': 1
@ -145,7 +133,6 @@
{
'doctype': u'DocPerm',
'permlevel': 1,
'read': 1,
'role': u'Maintenance Manager'
},
@ -156,7 +143,6 @@
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'read': 1,
'role': u'Maintenance User',
'submit': 1,
'write': 1
@ -166,7 +152,6 @@
{
'doctype': u'DocPerm',
'permlevel': 1,
'read': 1,
'role': u'Maintenance User'
},
@ -244,39 +229,6 @@
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Contact Person',
'oldfieldname': u'contact_person',
'oldfieldtype': u'Link',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
@ -297,19 +249,22 @@
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:doc.lead',
'doctype': u'DocField',
'fieldname': u'lead_name',
'fieldtype': u'Text',
'hidden': 1,
'in_filter': 0,
'label': u'Lead Name',
'permlevel': 1
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'customer_name',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Customer Name',
'permlevel': 1
},
@ -320,7 +275,7 @@
'doctype': u'DocField',
'fieldname': u'address_display',
'fieldtype': u'Small Text',
'hidden': 0,
'hidden': 1,
'in_filter': 0,
'label': u'Address',
'oldfieldname': u'customer_address',
@ -337,6 +292,7 @@
'doctype': u'DocField',
'fieldname': u'contact_display',
'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0,
'label': u'Contact',
'permlevel': 1,
@ -349,7 +305,7 @@
'doctype': u'DocField',
'fieldname': u'contact_mobile',
'fieldtype': u'Text',
'hidden': 0,
'hidden': 1,
'label': u'Mobile No',
'permlevel': 1,
'print_hide': 0
@ -361,6 +317,7 @@
'doctype': u'DocField',
'fieldname': u'contact_email',
'fieldtype': u'Text',
'hidden': 1,
'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
@ -413,91 +370,6 @@
'search_index': 0
},
# DocField
{
'allow_on_submit': 0,
'colour': u'White:FFF',
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Select',
'options': u'\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Data',
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Will be fetched from Customer',
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'customer_group',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Customer Group',
'oldfieldname': u'customer_group',
'oldfieldtype': u'Link',
'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
@ -526,13 +398,102 @@
'width': u'40px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'sec_break23',
'fieldtype': u'Section Break',
'options': u'Simple',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break34',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'net_total',
'fieldtype': u'Currency',
'label': u'Net Total*',
'no_copy': 0,
'oldfieldname': u'net_total',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'recalculate_values',
'fieldtype': u'Button',
'label': u'Re-Calculate Values',
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break35',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'description': u"To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ",
'doctype': u'DocField',
'fieldname': u'enq_no',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Opportunity No',
'no_copy': 0,
'oldfieldname': u'enq_no',
'oldfieldtype': u'Link',
'options': u'Opportunity',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'pull_enquiry_detail',
'fieldtype': u'Button',
'hidden': 0,
'label': u'Pull Opportunity Detail',
'no_copy': 0,
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'section_break0',
'fieldtype': u'Section Break',
'options': u'Simple',
'label': u'Price List and Currency',
'permlevel': 0
},
@ -630,80 +591,6 @@
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'description': u"To create Quotation against Opportunity, Select Opportunity No. and click on 'Pull Opportunity Details' ",
'doctype': u'DocField',
'fieldname': u'enq_no',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Opportunity No',
'no_copy': 0,
'oldfieldname': u'enq_no',
'oldfieldtype': u'Link',
'options': u'Opportunity',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
'search_index': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'pull_enquiry_detail',
'fieldtype': u'Button',
'hidden': 0,
'label': u'Pull Opportunity Detail',
'no_copy': 0,
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'clear_table',
'fieldtype': u'Button',
'label': u'Clear Table',
'oldfieldtype': u'Button',
'options': u'clear_quotation_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'recalculate_values',
'fieldtype': u'Button',
'label': u'Re-Calculate Values',
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'net_total',
'fieldtype': u'Currency',
'label': u'Net Total*',
'no_copy': 0,
'oldfieldname': u'net_total',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
@ -966,6 +853,102 @@
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_section',
'fieldtype': u'Section Break',
'label': u'Contact Info',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break98',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Contact Person',
'oldfieldname': u'contact_person',
'oldfieldtype': u'Link',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break99',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Will be fetched from Customer',
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'customer_group',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Customer Group',
'oldfieldname': u'customer_group',
'oldfieldtype': u'Link',
'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
@ -1120,6 +1103,26 @@
'width': u'50%'
},
# DocField
{
'allow_on_submit': 0,
'colour': u'White:FFF',
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Select',
'options': u'\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
'allow_on_submit': 1,
@ -1190,6 +1193,35 @@
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Data',
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',

View File

@ -58,10 +58,10 @@ cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
//==================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
erpnext.hide_naming_series();
if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
@ -97,7 +97,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.customer = function(doc,dt,dn) {
var callback = function(r,rt) {
var callback2 = function(r, rt) {
if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
if(doc.customer) unhide_field(['customer_address', 'contact_person', 'territory','customer_group','shipping_address']);
cur_frm.refresh();
cur_frm.cscript.price_list_name(doc, dt, dn);
@ -138,7 +138,7 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
if(r.message){
doc.quotation_no = r.message;
if(doc.quotation_no) {
unhide_field(['quotation_date','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
unhide_field(['quotation_date','customer_address','contact_person','territory','customer_group','shipping_address']);
if(doc.customer) get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0);
}
cur_frm.refresh();

View File

@ -84,12 +84,6 @@ class DocType(TransactionBase):
def get_comm_rate(self, sales_partner):
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
# Clear Sales Order Items Table
# --------------------------------
def clear_sales_order_details(self):
self.doc.clear_table(self.doclist, 'sales_order_details')
# SALES ORDER DETAILS TRIGGER FUNCTIONS
# ================================================================================
# Get Item Details

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-04-11 13:18:19',
'creation': '2012-04-13 11:56:28',
'docstatus': 0,
'modified': '2012-04-13 11:32:08',
'modified': '2012-04-30 20:07:31',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -30,7 +30,7 @@
'show_in_menu': 0,
'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
'tag_fields': u'delivery_status,billing_status',
'version': 633
'version': 1
},
# These values are common for all DocField
@ -220,36 +220,12 @@
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Contact Person',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_name',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Name',
'permlevel': 1
},
@ -259,6 +235,7 @@
'doctype': u'DocField',
'fieldname': u'address_display',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Address',
'permlevel': 1
},
@ -268,6 +245,7 @@
'doctype': u'DocField',
'fieldname': u'contact_display',
'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Contact',
'permlevel': 1
},
@ -277,6 +255,7 @@
'doctype': u'DocField',
'fieldname': u'contact_mobile',
'fieldtype': u'Text',
'hidden': 1,
'label': u'Mobile No',
'permlevel': 1
},
@ -286,39 +265,26 @@
'doctype': u'DocField',
'fieldname': u'contact_email',
'fieldtype': u'Text',
'hidden': 1,
'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'Category of customer as entered in Customer master',
'default': u'Sales',
'doctype': u'DocField',
'fieldname': u'customer_group',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Customer Group',
'options': u'Customer Group',
'fieldname': u'order_type',
'fieldtype': u'Select',
'label': u'Order Type',
'oldfieldname': u'order_type',
'oldfieldtype': u'Select',
'options': u'\nSales\nMaintenance',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1
'reqd': 1
},
# DocField
@ -350,22 +316,6 @@
'width': u'160px'
},
# DocField
{
'colour': u'White:FFF',
'default': u'Sales',
'doctype': u'DocField',
'fieldname': u'order_type',
'fieldtype': u'Select',
'label': u'Order Type',
'oldfieldname': u'order_type',
'oldfieldtype': u'Select',
'options': u'\nSales\nMaintenance',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
},
# DocField
{
'colour': u'White:FFF',
@ -385,134 +335,6 @@
'width': u'160px'
},
# DocField
{
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Select',
'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Track this Sales Order against any Project',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Project Name',
'oldfieldname': u'project_name',
'oldfieldtype': u'Link',
'options': u'Project',
'permlevel': 0,
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials delivered against this Sales Order',
'doctype': u'DocField',
'fieldname': u'per_delivered',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'% Delivered',
'no_copy': 1,
'oldfieldname': u'per_delivered',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials billed against this Sales Order',
'doctype': u'DocField',
'fieldname': u'per_billed',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'% Amount Billed',
'no_copy': 1,
'oldfieldname': u'per_billed',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'shipping_address',
'fieldtype': u'Small Text',
'in_filter': 0,
'label': u'Shipping Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'shipping_address_name',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Shipping Address Name',
'options': u'Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
@ -558,6 +380,134 @@
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'sales_order_details',
'fieldtype': u'Table',
'label': u'Sales Order Items',
'oldfieldname': u'sales_order_details',
'oldfieldtype': u'Table',
'options': u'Sales Order Item',
'permlevel': 0,
'print_hide': 0,
'width': u'40px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'section_break0',
'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break20',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'net_total',
'fieldtype': u'Currency',
'label': u'Net Total*',
'oldfieldname': u'net_total',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'recalculate_values',
'fieldtype': u'Button',
'label': u'Re-Calculate Values',
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break_21',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Quotation no against which this Sales Order is made ',
'doctype': u'DocField',
'fieldname': u'quotation_no',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Quotation No',
'no_copy': 0,
'oldfieldname': u'quotation_no',
'oldfieldtype': u'Link',
'options': u'Quotation',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:doc.quotation_no',
'doctype': u'DocField',
'fieldname': u'quotation_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Quotation Date',
'no_copy': 0,
'oldfieldname': u'quotation_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'pull_quotation_details',
'fieldtype': u'Button',
'label': u'Pull Quotation Items',
'oldfieldtype': u'Button',
'options': u'pull_quotation_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'sec_break45',
'fieldtype': u'Section Break',
'label': u'Price List and Currency',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
@ -646,119 +596,6 @@
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Quotation no against which this Sales Order is made ',
'doctype': u'DocField',
'fieldname': u'quotation_no',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Quotation No',
'no_copy': 0,
'oldfieldname': u'quotation_no',
'oldfieldtype': u'Link',
'options': u'Quotation',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
'trigger': u'Client',
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:doc.quotation_no',
'doctype': u'DocField',
'fieldname': u'quotation_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Quotation Date',
'no_copy': 0,
'oldfieldname': u'quotation_date',
'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'pull_quotation_details',
'fieldtype': u'Button',
'label': u'Pull Quotation Items',
'oldfieldtype': u'Button',
'options': u'pull_quotation_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'section_break0',
'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'sales_order_details',
'fieldtype': u'Table',
'label': u'Sales Order Items',
'oldfieldname': u'sales_order_details',
'oldfieldtype': u'Table',
'options': u'Sales Order Item',
'permlevel': 0,
'print_hide': 0,
'width': u'40px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'clear_table',
'fieldtype': u'Button',
'label': u'Clear Table',
'oldfieldtype': u'Button',
'options': u'clear_sales_order_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'recalculate_values',
'fieldtype': u'Button',
'label': u'Re-Calculate Values',
'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
'search_index': 0,
'trigger': u'Client'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'net_total',
'fieldtype': u'Currency',
'label': u'Net Total*',
'oldfieldname': u'net_total',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
@ -1011,6 +848,112 @@
'print_hide': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_info',
'fieldtype': u'Section Break',
'label': u'Contact Info',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break45',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Contact Person',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break46',
'fieldtype': u'Column Break',
'permlevel': 0,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'description': u'Category of customer as entered in Customer master',
'doctype': u'DocField',
'fieldname': u'customer_group',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Customer Group',
'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'shipping_address_name',
'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
'label': u'Shipping Address Name',
'options': u'Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'shipping_address',
'fieldtype': u'Small Text',
'in_filter': 0,
'label': u'Shipping Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
@ -1084,26 +1027,33 @@
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break5',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'fieldname': u'amended_from',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'50%'
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'source',
'fieldtype': u'Select',
'label': u'Source',
'oldfieldname': u'source',
'oldfieldtype': u'Select',
'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
'print_hide': 1,
'width': u'100px'
},
# DocField
@ -1143,6 +1093,119 @@
'width': u'150px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'doctype': u'DocField',
'fieldname': u'cancel_reason',
'fieldtype': u'Data',
'label': u'Cancel Reason',
'no_column': 0,
'no_copy': 1,
'oldfieldname': u'cancel_reason',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'column_break5',
'fieldtype': u'Column Break',
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'source',
'fieldtype': u'Select',
'label': u'Source',
'oldfieldname': u'source',
'oldfieldtype': u'Select',
'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'Track this Sales Order against any Project',
'doctype': u'DocField',
'fieldname': u'project_name',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Project Name',
'oldfieldname': u'project_name',
'oldfieldtype': u'Link',
'options': u'Project',
'permlevel': 0,
'search_index': 1,
'trigger': u'Client'
},
# DocField
{
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Select',
'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials delivered against this Sales Order',
'doctype': u'DocField',
'fieldname': u'per_delivered',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'% Delivered',
'no_copy': 1,
'oldfieldname': u'per_delivered',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'description': u'% of materials billed against this Sales Order',
'doctype': u'DocField',
'fieldname': u'per_billed',
'fieldtype': u'Currency',
'in_filter': 1,
'label': u'% Amount Billed',
'no_copy': 1,
'oldfieldname': u'per_billed',
'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
@ -1171,22 +1234,6 @@
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',
'depends_on': u'eval:!doc.__islocal',
'doctype': u'DocField',
'fieldname': u'cancel_reason',
'fieldtype': u'Data',
'label': u'Cancel Reason',
'no_column': 0,
'no_copy': 1,
'oldfieldname': u'cancel_reason',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
'colour': u'White:FFF',

View File

@ -55,6 +55,7 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// ================================================================================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
erpnext.hide_naming_series();
if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
@ -77,7 +78,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
var callback = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname];
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']);
cur_frm.refresh();
cur_frm.cscript.price_list_name(doc, dt, dn);
}
@ -113,7 +114,7 @@ cur_frm.cscript.get_items = function(doc,dt,dn) {
if(r.message){
doc.sales_order_no = r.message;
if(doc.sales_order_no) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
unhide_field(['customer_address','contact_person','territory','customer_group']);
}
refresh_many(['delivery_note_details','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
}

File diff suppressed because it is too large Load Diff

View File

@ -2233,11 +2233,11 @@ if(wn.boot.startup_code){eval(wn.boot.startup_code);}}else{wn.boot.profile.allow
if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Ahem! Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
(and remove this annoying banner). \
</div>',{expiry_string:expiry_string}));}else if(diff<0){$('header').append(repl('<div class="expiry-info"> \
Ahem! This ERPNext subscription <b>has expired</b> and should be deleted. \
This ERPNext subscription <b>has expired</b> and should be deleted. \
</div>',{expiry_string:expiry_string}));}}}
erpnext.set_about();$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
@ -2254,7 +2254,7 @@ erpnext.set_user_background=function(src){set_style(repl('#body_div { background
$(document).bind('startup',function(){erpnext.startup.start();});erpnext.send_message=function(opts){if(opts.btn){$(opts.btn).start_working();}
wn.call({method:'website.send_message',args:opts,callback:function(r){if(opts.btn){$(opts.btn).done_working();}
if(opts.callback)opts.callback(r)}});}
erpnext.hide_naming_series=function(){console.log(1);if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
/*
* erpnext/startup/js/modules.js
*/

View File

@ -844,11 +844,11 @@ if(wn.boot.startup_code){eval(wn.boot.startup_code);}}else{wn.boot.profile.allow
if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
Ahem! Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
Please renew your subscription to continue using ERPNext \
(and remove this annoying banner). \
</div>',{expiry_string:expiry_string}));}else if(diff<0){$('header').append(repl('<div class="expiry-info"> \
Ahem! This ERPNext subscription <b>has expired</b> and should be deleted. \
This ERPNext subscription <b>has expired</b> and should be deleted. \
</div>',{expiry_string:expiry_string}));}}}
erpnext.set_about();$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
@ -865,7 +865,7 @@ erpnext.set_user_background=function(src){set_style(repl('#body_div { background
$(document).bind('startup',function(){erpnext.startup.start();});erpnext.send_message=function(opts){if(opts.btn){$(opts.btn).start_working();}
wn.call({method:'website.send_message',args:opts,callback:function(r){if(opts.btn){$(opts.btn).done_working();}
if(opts.callback)opts.callback(r)}});}
erpnext.hide_naming_series=function(){console.log(1);if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
/*
* erpnext/website/js/topbar.js
*/