[minor] material request and newsletter list
This commit is contained in:
parent
da5cfb1630
commit
fea22de3e8
@ -1,5 +1,5 @@
|
|||||||
frappe.listview_settings['Newsletter'] = {
|
frappe.listview_settings['Newsletter'] = {
|
||||||
add_fields: ["subject", "send_to_type", "email_sent"],
|
add_fields: ["subject", "email_sent"],
|
||||||
get_indicator: function(doc) {
|
get_indicator: function(doc) {
|
||||||
if(doc.email_sent) {
|
if(doc.email_sent) {
|
||||||
return [__("Sent"), "green", "email_sent,=,Yes"];
|
return [__("Sent"), "green", "email_sent,=,Yes"];
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-03-18 08:07:24.748431",
|
"modified": "2015-03-23 04:47:36.505462",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Newsletter List Subscriber",
|
"name": "Newsletter List Subscriber",
|
||||||
@ -105,5 +105,6 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC",
|
||||||
|
"title_field": "email"
|
||||||
}
|
}
|
||||||
@ -5,6 +5,16 @@
|
|||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils.js");
|
frappe.require("assets/erpnext/js/utils.js");
|
||||||
|
|
||||||
|
frappe.ui.form.on("Material Request Item", {
|
||||||
|
"qty": function(frm, doctype, name) {
|
||||||
|
var d = locals[doctype][name];
|
||||||
|
if (flt(d.qty) < flt(d.min_order_qty)) {
|
||||||
|
alert(__("Warning: Material Requested Qty is less than Minimum Order Qty"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.extend({
|
erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.extend({
|
||||||
onload: function(doc) {
|
onload: function(doc) {
|
||||||
this._super();
|
this._super();
|
||||||
@ -53,7 +63,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
cur_frm.add_custom_button(__('Stop'),
|
cur_frm.add_custom_button(__('Stop'),
|
||||||
cur_frm.cscript['Stop Material Request'], "icon-exclamation", "btn-default");
|
cur_frm.cscript['Stop Material Request'], "icon-exclamation", "btn-default");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,12 +173,6 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
// for backward compatibility: combine new and previous states
|
// for backward compatibility: combine new and previous states
|
||||||
$.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur_frm}));
|
$.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur_frm}));
|
||||||
|
|
||||||
cur_frm.cscript.qty = function(cdt, cdn) {
|
|
||||||
var d = locals[cdt][cdn];
|
|
||||||
if (flt(d.qty) < flt(d.min_order_qty))
|
|
||||||
alert(__("Warning: Material Requested Qty is less than Minimum Order Qty"));
|
|
||||||
};
|
|
||||||
|
|
||||||
cur_frm.cscript['Stop Material Request'] = function() {
|
cur_frm.cscript['Stop Material Request'] = function() {
|
||||||
var doc = cur_frm.doc;
|
var doc = cur_frm.doc;
|
||||||
var check = confirm(__("Do you really want to STOP this Material Request?"));
|
var check = confirm(__("Do you really want to STOP this Material Request?"));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user