mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-25 13:03:02 +00:00
fixes related to --> clear locals and then sync locals when whole doclist is passed
This commit is contained in:
@@ -55,7 +55,7 @@ cur_frm.cscript.make_history_list = function(parent,doc){
|
||||
// get sates on country trigger
|
||||
// -----------------------------
|
||||
cur_frm.cscript.get_states=function(doc,dt,dn){
|
||||
$c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
|
||||
$c('runserverobj', args={'method':'check_state', 'docs':compress_doclist(make_doclist(doc.doctype, doc.name))},
|
||||
function(r,rt){
|
||||
if(r.message) {
|
||||
set_field_options('state', r.message);
|
||||
|
||||
@@ -19,7 +19,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn){
|
||||
var callback = function(r, rt){
|
||||
set_field_options('select_doc_for_series', r.message);
|
||||
}
|
||||
$c_obj([doc],'get_transactions','',callback);
|
||||
$c_obj(make_doclist(doc.doctype, doc.name),'get_transactions','',callback);
|
||||
cur_frm.cscript.refresh();
|
||||
// add page head
|
||||
//var ph = new PageHeader(cur_frm.fields_dict['head_html'].wrapper, 'Setup Series', 'Set prefix for numbering series on your transactions');
|
||||
@@ -36,5 +36,5 @@ cur_frm.cscript.select_doc_for_series = function(doc, cdt, cdn) {
|
||||
refresh_field('set_options');
|
||||
}
|
||||
|
||||
$c_obj([doc],'get_options','',callback)
|
||||
$c_obj(make_doclist(doc.doctype, doc.name),'get_options','',callback)
|
||||
}
|
||||
|
||||
@@ -32,6 +32,6 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.cscript.clear_prices = function(doc, cdt, cdn) {
|
||||
if(confirm("This action will clear all rates for '"+ doc.name +"' from the Item Master and cannot be un-done. Are you sure you want to continue?")) {
|
||||
$c_obj([doc], 'clear_prices', '', function(r, rt) { });
|
||||
$c_obj(make_doclist(doc.doctype, doc.name), 'clear_prices', '', function(r, rt) { });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ cur_frm.cscript.onload = function(){
|
||||
}
|
||||
cur_frm.cscript.country = function(doc, cdt, cdn) {
|
||||
var mydoc=doc;
|
||||
$c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
|
||||
$c('runserverobj', args={'method':'check_state', 'docs':compress_doclist(make_doclist(doc.doctype, doc.name))},
|
||||
function(r,rt){
|
||||
if(r.message) {
|
||||
var doc = locals[mydoc.doctype][mydoc.name];
|
||||
|
||||
Reference in New Issue
Block a user