[selling/buying] [fixes] fixes in client side code, server side code, print formats

This commit is contained in:
Anand Doshi
2013-05-28 17:23:36 +05:30
parent a3d8494c77
commit 923d41dfd2
37 changed files with 352 additions and 324 deletions

View File

@@ -51,6 +51,18 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
this.frm.toggle_reqd("lead", this.frm.doc.quotation_to == "Lead");
this.frm.toggle_reqd("customer", this.frm.doc.quotation_to == "Customer");
},
validate_company_and_party: function(party_field) {
if(this.frm.doc.quotation_to == "Lead") {
return true;
} else if(!this.frm.doc.quotation_to) {
msgprint(wn._("Please select a value for" + " " + wn.meta.get_label(this.frm.doc.doctype,
"quotation_to", this.frm.doc.name)));
return false;
} else {
return this._super(party_field);
}
},
});
// for backward compatibility: combine new and previous states

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-05-22 12:10:46",
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
"modified": "2013-05-22 16:55:07",
"modified": "2013-05-28 14:50:59",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -78,6 +78,7 @@
"reqd": 1
},
{
"depends_on": "eval:doc.quotation_to == \"Customer\"",
"doctype": "DocField",
"fieldname": "customer",
"fieldtype": "Link",
@@ -92,6 +93,7 @@
"search_index": 1
},
{
"depends_on": "eval:doc.quotation_to == \"Lead\"",
"doctype": "DocField",
"fieldname": "lead",
"fieldtype": "Link",
@@ -105,19 +107,21 @@
"read_only": 0
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_name",
"fieldtype": "Data",
"hidden": 1,
"hidden": 0,
"in_list_view": 1,
"label": "Customer Name",
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 1,
"hidden": 0,
"in_filter": 0,
"label": "Address",
"oldfieldname": "customer_address",
@@ -128,29 +132,32 @@
"search_index": 0
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 1,
"hidden": 0,
"in_filter": 0,
"label": "Contact",
"print_hide": 0,
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
"hidden": 1,
"hidden": 0,
"label": "Mobile No",
"print_hide": 0,
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
"hidden": 1,
"hidden": 0,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -614,6 +621,7 @@
"read_only": 0
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "col_break98",
"fieldtype": "Column Break",
@@ -667,6 +675,7 @@
"search_index": 0
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "customer_group",
"fieldtype": "Link",
@@ -837,19 +846,6 @@
"read_only": 1,
"width": "150px"
},
{
"description": "The date at which current entry is corrected in the system.",
"doctype": "DocField",
"fieldname": "amendment_date",
"fieldtype": "Date",
"label": "Amendment Date",
"no_copy": 1,
"oldfieldname": "amendment_date",
"oldfieldtype": "Date",
"print_hide": 1,
"read_only": 0,
"width": "100px"
},
{
"doctype": "DocField",
"fieldname": "communication_history",
@@ -886,23 +882,28 @@
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"role": "Sales User",
"role": "Sales Manager",
"submit": 1,
"write": 1
},
{
"doctype": "DocPerm",
"role": "Customer"
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"role": "Sales Manager",
"role": "Sales User",
"submit": 1,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"role": "Customer",
"submit": 0,
"write": 0
},
{
"amend": 1,
"cancel": 1,