mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
minor changes
This commit is contained in:
@@ -751,7 +751,7 @@ def notify_errors(inv, customer, owner):
|
|||||||
message = webnotes.get_template("template/emails/recurring_invoice_failed.html").render({
|
message = webnotes.get_template("template/emails/recurring_invoice_failed.html").render({
|
||||||
"name": inv,
|
"name": inv,
|
||||||
"customer": customer
|
"customer": customer
|
||||||
})
|
}))
|
||||||
|
|
||||||
assign_task_to_owner(inv, "Recurring Invoice Failed", recipients)
|
assign_task_to_owner(inv, "Recurring Invoice Failed", recipients)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
{% include 'setup/doctype/contact_control/contact_control.js' %};
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc,dt,dn){
|
cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||||
cur_frm.cscript.load_defaults(doc, dt, dn);
|
cur_frm.cscript.load_defaults(doc, dt, dn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,8 +27,8 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
|||||||
}else{
|
}else{
|
||||||
unhide_field(['address_html','contact_html']);
|
unhide_field(['address_html','contact_html']);
|
||||||
// make lists
|
// make lists
|
||||||
cur_frm.cscript.make_address(doc,dt,dn);
|
cur_frm.cscript.make_address(doc, dt, dn);
|
||||||
cur_frm.cscript.make_contact(doc,dt,dn);
|
cur_frm.cscript.make_contact(doc, dt, dn);
|
||||||
|
|
||||||
cur_frm.communication_view = new wn.views.CommunicationList({
|
cur_frm.communication_view = new wn.views.CommunicationList({
|
||||||
parent: cur_frm.fields_dict.communication_html.wrapper,
|
parent: cur_frm.fields_dict.communication_html.wrapper,
|
||||||
@@ -67,7 +67,7 @@ cur_frm.cscript.setup_dashboard = function(doc) {
|
|||||||
}
|
}
|
||||||
cur_frm.dashboard.set_badge_count(r.message);
|
cur_frm.dashboard.set_badge_count(r.message);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.make_address = function() {
|
cur_frm.cscript.make_address = function() {
|
||||||
@@ -104,7 +104,6 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
// note: render_contact_row is defined in contact_control.js
|
// note: render_contact_row is defined in contact_control.js
|
||||||
}
|
}
|
||||||
cur_frm.contact_list.run();
|
cur_frm.contact_list.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
||||||
@@ -113,7 +112,6 @@ cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cur_frm.fields_dict.lead_name.get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict.lead_name.get_query = function(doc, cdt, cdn) {
|
||||||
return{
|
return{
|
||||||
query: "erpnext.controllers.queries.lead_query"
|
query: "erpnext.controllers.queries.lead_query"
|
||||||
|
|||||||
@@ -1,32 +1,21 @@
|
|||||||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
// common partner functions
|
cur_frm.cscript.get_states=function(doc, dt, dn) {
|
||||||
// =========================
|
return $c('runserverobj', args={'method': 'check_state', 'docs':wn.model.compress(make_doclist(doc.doctype, doc.name))},
|
||||||
|
function(r, rt) {
|
||||||
|
if(r.message)
|
||||||
// get sates on country trigger
|
set_field_options('state', r.message);
|
||||||
// -----------------------------
|
}
|
||||||
cur_frm.cscript.get_states=function(doc,dt,dn){
|
);
|
||||||
return $c('runserverobj', args={'method':'check_state', 'docs':wn.model.compress(make_doclist(doc.doctype, doc.name))},
|
|
||||||
function(r,rt){
|
|
||||||
if(r.message) {
|
|
||||||
set_field_options('state', r.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.country = function(doc, dt, dn) {
|
cur_frm.cscript.country = function(doc, dt, dn) {
|
||||||
cur_frm.cscript.get_states(doc, dt, dn);
|
cur_frm.cscript.get_states(doc, dt, dn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(cur_frm.fields_dict['territory']) {
|
||||||
// get query select Territory
|
cur_frm.fields_dict['territory'].get_query = function(doc, dt, dn) {
|
||||||
// ---------------------------
|
|
||||||
if(cur_frm.fields_dict['territory']){
|
|
||||||
cur_frm.fields_dict['territory'].get_query = function(doc,dt,dn) {
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
'is_group': "No"
|
'is_group': "No"
|
||||||
@@ -132,14 +121,12 @@ cur_frm.cscript.render_row_in_wrapper = function(wrapper, data, doctype) {
|
|||||||
|
|
||||||
// show delete
|
// show delete
|
||||||
var $delete_doc = $wrapper.find('a.delete');
|
var $delete_doc = $wrapper.find('a.delete');
|
||||||
if (wn.model.can_delete(doctype)) {
|
if (wn.model.can_delete(doctype))
|
||||||
$delete_doc.toggle(true);
|
$delete_doc.toggle(true);
|
||||||
} else {
|
else
|
||||||
$delete_doc.toggle(false);
|
$delete_doc.toggle(false);
|
||||||
}
|
|
||||||
$delete_doc.css({
|
$delete_doc.css({ 'padding-left': '0px' });
|
||||||
'padding-left': '0px'
|
|
||||||
});
|
|
||||||
|
|
||||||
$delete_doc.click(function() {
|
$delete_doc.click(function() {
|
||||||
cur_frm.cscript.delete_doc(doctype, data.name);
|
cur_frm.cscript.delete_doc(doctype, data.name);
|
||||||
@@ -197,4 +184,3 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user