mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 18:01:41 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import webnotes
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_report_list(arg=None):
|
||||
def get_sc_list(arg=None):
|
||||
"""return list of reports for the given module module"""
|
||||
webnotes.response['values'] = webnotes.conn.sql("""select
|
||||
distinct criteria_name, doc_type, parent_doc_type
|
||||
@@ -26,4 +26,16 @@ def get_report_list(arg=None):
|
||||
and docstatus in (0, NULL)
|
||||
and ifnull(disabled, 0) = 0
|
||||
order by criteria_name
|
||||
limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_report_list():
|
||||
"""return list on new style reports for modules"""
|
||||
webnotes.response['values'] = webnotes.conn.sql("""select
|
||||
distinct tabReport.name, tabReport.ref_doctype
|
||||
from `tabReport`, `tabDocType`
|
||||
where tabDocType.module='%(module)s'
|
||||
and tabDocType.name = tabReport.ref_doctype
|
||||
and tabReport.docstatus in (0, NULL)
|
||||
order by tabReport.name
|
||||
limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
|
||||
@@ -20,17 +20,17 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
var route = wn.get_route();
|
||||
if(route[1]=='Supplier') {
|
||||
var supplier = locals.Supplier[route[2]]
|
||||
var supplier = wn.container.page.frm.doc;
|
||||
doc.supplier = supplier.name;
|
||||
doc.supplier_name = supplier.supplier_name;
|
||||
doc.address_type = 'Office';
|
||||
} else if(route[1]=='Customer') {
|
||||
var customer = locals.Customer[route[2]]
|
||||
var customer = wn.container.page.frm.doc;
|
||||
doc.customer = customer.name;
|
||||
doc.customer_name = customer.customer_name;
|
||||
doc.address_type = 'Office';
|
||||
} else if(route[1]=='Sales Partner') {
|
||||
var sp = locals['Sales Partner'][route[2]];
|
||||
var sp = wn.container.page.frm.doc;
|
||||
doc.sales_partner = sp.name;
|
||||
doc.address_type = 'Office';
|
||||
}
|
||||
|
||||
@@ -21,18 +21,18 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
|
||||
var route = wn.get_route();
|
||||
if(route[1]=='Supplier') {
|
||||
var supplier = locals.Supplier[route[2]]
|
||||
var supplier = wn.container.page.frm.doc;
|
||||
doc.supplier = supplier.name;
|
||||
doc.supplier_name = supplier.supplier_name;
|
||||
} else if(route[1]=='Customer') {
|
||||
var customer = locals.Customer[route[2]];
|
||||
var customer = wn.container.page.frm.doc;
|
||||
doc.customer = customer.name;
|
||||
doc.customer_name = customer.customer_name;
|
||||
if(customer.customer_type == 'Individual') {
|
||||
doc.first_name = customer.customer_name;
|
||||
}
|
||||
} else if(route[1]=='Sales Partner') {
|
||||
var sp = locals['Sales Partner'][route[2]];
|
||||
var sp = wn.container.page.frm.doc;
|
||||
doc.sales_partner = sp.name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user