[cleanup] [stock entry] [sales order]

This commit is contained in:
Rushabh Mehta
2013-07-03 18:32:29 +05:30
parent 9a04b19160
commit bcff7dce8e
13 changed files with 299 additions and 236 deletions

View File

@@ -25,8 +25,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign");
} else if(doc.status=="Opportunity Lost") {
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign");
} else {
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-info", "icon-exclamation-sign");
}
}

View File

@@ -43,8 +43,6 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-success", "icon-ok-sign");
} else if(doc.status==="Order Lost") {
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-danger", "icon-exclamation-sign");
} else {
cur_frm.dashboard.set_headline_alert(wn._(doc.status), "alert-info", "icon-exclamation-sign");
}
}

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
"modified": "2013-07-03 11:54:11",
"modified": "2013-07-03 16:12:44",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -237,7 +237,7 @@
"fieldname": "section_break0",
"fieldtype": "Section Break",
"label": "Price List and Currency",
"options": "icon-globe",
"options": "icon-tag",
"read_only": 0
},
{

View File

@@ -29,9 +29,16 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
refresh: function(doc, dt, dn) {
this._super();
this.frm.dashboard.reset();
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + wn._("% Delivered"),
doc.per_delivered);
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + wn._("% Billed"),
doc.per_billed);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
// delivery note
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
@@ -56,6 +63,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
} else {
// un-stop
cur_frm.dashboard.set_headline_alert("Stopped", "alert-danger", "icon-stop");
cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
}
}

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-18 12:39:59",
"docstatus": 0,
"modified": "2013-06-27 11:31:02",
"modified": "2013-07-03 16:12:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -39,6 +39,13 @@
"doctype": "DocType",
"name": "Sales Order"
},
{
"doctype": "DocField",
"fieldname": "customer_section",
"fieldtype": "Section Break",
"label": "Customer",
"options": "icon-user"
},
{
"doctype": "DocField",
"fieldname": "column_break0",
@@ -86,38 +93,34 @@
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "address_display",
"fieldtype": "Small Text",
"hidden": 0,
"hidden": 1,
"label": "Address",
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_display",
"fieldtype": "Small Text",
"hidden": 0,
"hidden": 1,
"label": "Contact",
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_mobile",
"fieldtype": "Text",
"hidden": 0,
"hidden": 1,
"label": "Mobile No",
"read_only": 1
},
{
"depends_on": "customer",
"doctype": "DocField",
"fieldname": "contact_email",
"fieldtype": "Text",
"hidden": 0,
"hidden": 1,
"label": "Contact Email",
"print_hide": 1,
"read_only": 1
@@ -252,7 +255,8 @@
"doctype": "DocField",
"fieldname": "sec_break45",
"fieldtype": "Section Break",
"label": "Price List and Currency"
"label": "Price List and Currency",
"options": "icon-tag"
},
{
"description": "Customer's currency",
@@ -323,7 +327,8 @@
"fieldname": "items",
"fieldtype": "Section Break",
"label": "Items",
"oldfieldtype": "Section Break"
"oldfieldtype": "Section Break",
"options": "icon-shopping-cart"
},
{
"allow_on_submit": 1,
@@ -345,6 +350,7 @@
"hidden": 0,
"label": "Packing List",
"oldfieldtype": "Section Break",
"options": "icon-suitcase",
"print_hide": 1
},
{
@@ -444,6 +450,7 @@
"fieldtype": "Section Break",
"label": "Taxes",
"oldfieldtype": "Section Break",
"options": "icon-money",
"print_hide": 0
},
{
@@ -537,6 +544,7 @@
"fieldtype": "Section Break",
"label": "Totals",
"oldfieldtype": "Section Break",
"options": "icon-money",
"print_hide": 1
},
{
@@ -626,6 +634,7 @@
"fieldtype": "Section Break",
"label": "Terms and Conditions",
"oldfieldtype": "Section Break",
"options": "icon-legal",
"print_hide": 0
},
{
@@ -671,7 +680,8 @@
"doctype": "DocField",
"fieldname": "contact_info",
"fieldtype": "Section Break",
"label": "Contact Info"
"label": "Contact Info",
"options": "icon-bullhorn"
},
{
"doctype": "DocField",
@@ -734,6 +744,7 @@
"fieldtype": "Section Break",
"label": "More Info",
"oldfieldtype": "Section Break",
"options": "icon-file-text",
"print_hide": 1
},
{
@@ -904,6 +915,7 @@
"fieldtype": "Section Break",
"label": "Sales Team",
"oldfieldtype": "Section Break",
"options": "icon-group",
"print_hide": 1
},
{
@@ -951,7 +963,6 @@
"doctype": "DocField",
"fieldname": "section_break1",
"fieldtype": "Section Break",
"options": "Simple",
"print_hide": 1
},
{