mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
[buying] started cleanup, [mapper] started rewrite
This commit is contained in:
@@ -21,6 +21,8 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
|
||||
// read only if any stock ledger entry exists
|
||||
|
||||
cur_frm.cscript.make_dashboard()
|
||||
|
||||
cur_frm.toggle_display("naming_series", sys_defaults.item_naming_by=="Naming Series"
|
||||
&& doc.__islocal)
|
||||
cur_frm.toggle_display("item_code", sys_defaults.item_naming_by!="Naming Series"
|
||||
@@ -36,6 +38,12 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.cscript.make_dashboard = function() {
|
||||
cur_frm.dashboard.reset();
|
||||
if(doc.__islocal)
|
||||
return;
|
||||
}
|
||||
|
||||
cur_frm.cscript.item_code = function(doc) {
|
||||
if(!doc.item_name) cur_frm.set_value("item_name", doc.item_code);
|
||||
if(!doc.description) cur_frm.set_value("description", doc.item_code);
|
||||
|
||||
@@ -24,6 +24,16 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
||||
refresh: function(doc) {
|
||||
this._super();
|
||||
|
||||
// dashboard
|
||||
cur_frm.dashboard.reset();
|
||||
if(doc.docstatus===1) {
|
||||
if(doc.status==="Stopped") {
|
||||
cur_frm.dashboard.set_headline_alert(wn._("Stopped"), "alert-danger", "icon-stop")
|
||||
}
|
||||
cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% "
|
||||
+ wn._("Fulfilled"), cint(doc.per_ordered));
|
||||
}
|
||||
|
||||
if(doc.docstatus == 1 && doc.status != 'Stopped'){
|
||||
if(doc.material_request_type === "Purchase")
|
||||
cur_frm.add_custom_button("Make Supplier Quotation", cur_frm.cscript.make_supplier_quotation);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 14:48:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-11 16:16:36",
|
||||
"modified": "2013-07-04 10:24:53",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -44,6 +44,13 @@
|
||||
"doctype": "DocType",
|
||||
"name": "Material Request"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "type_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Type",
|
||||
"options": "icon-pushpin"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "material_request_type",
|
||||
@@ -76,7 +83,8 @@
|
||||
"fieldname": "items",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Items",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-shopping-cart"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -92,8 +100,7 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break1",
|
||||
"fieldtype": "Section Break",
|
||||
"options": "Simple"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -131,12 +138,12 @@
|
||||
},
|
||||
{
|
||||
"default": "Give additional details about the indent.",
|
||||
"description": "Filing in Additional Information about the Material Request will help you analyze your data better.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "more_info",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "More Info",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-file-text"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -287,7 +294,8 @@
|
||||
"fieldname": "terms_section_break",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Terms and Conditions",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"options": "icon-legal"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
||||
Reference in New Issue
Block a user