[search criteria] [cleanup] removed search criteria folders and files

This commit is contained in:
Anand Doshi
2013-06-11 15:04:37 +05:30
parent 5c069050d5
commit 618edee8b7
250 changed files with 0 additions and 8147 deletions

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,25 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.hide_all_filters();
this.mytabs.items['Select Columns'].hide();
this.mytabs.items['More Filters'].hide()
this.filter_fields_dict['Serial No'+FILTER_SEP +'Territory'].df.filter_hide = 0;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Item Group'].df.filter_hide = 0;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Territory'].df.in_first_page = 1;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Item Group'].df.in_first_page = 1;
}

View File

@@ -1,87 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ADD NEW COLUMNS
from __future__ import unicode_literals
row_list = [['Item Group','Data','150px',''],
['Out of AMC','Int','150px',''],
['Under AMC','Int','150px',''],
['Out of Warranty','Int','150px',''],
['Under Warranty','Int','150px',''],
['Total','Int','150px','']
]
for r in row_list:
colnames.append(r[0])
coltypes.append(r[1])
colwidths.append(r[2])
coloptions.append(r[3])
col_idx[r[0]] = len(colnames)-1
#ADD VALUES TO THE COLUMN
out=[]
oa,ua,ow,uw,sum=0,0,0,0,0
nowdate = nowdate()
for r in res:
cc = r[col_idx['Territory']]
item_groups = sql("select distinct item_group from `tabSerial No` where territory = '%s' and item_group like '%%%s'" %(cc,filter_values.get('item_group')))
for col in range(len(colnames)-1): # this would make all first row blank. just for look
r.append('')
out.append(r)
# Add Totals for each Territory
# -----------------------------
det = sql("select COUNT(CASE WHEN amc_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN amc_expiry_date <= '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date <= '%s' THEN name ELSE NULL END) from `tabSerial No` where territory = '%s' and item_group like '%%%s'" %(nowdate,nowdate,nowdate,nowdate,cc,filter_values.get('item_group')))
r[col_idx['Item Group']] = ''
r[col_idx['Out of AMC']] = cstr(det[0][0])
r[col_idx['Under AMC']] = cstr(det[0][1])
r[col_idx['Out of Warranty']] = cstr(det[0][2])
r[col_idx['Under Warranty']] = cstr(det[0][3])
tot = cint(det[0][0]) + cint(det[0][1]) + cint(det[0][2]) + cint(det[0][3])
r[col_idx['Total']] = cstr(tot)
oa += cint(det[0][0])
ua += cint(det[0][1])
ow += cint(det[0][2])
uw += cint(det[0][3])
sum += tot
# Add Brand Details belonging to Territory
# ----------------------------------------
for br in item_groups:
br_det = sql("select COUNT(CASE WHEN amc_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN amc_expiry_date <= '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date > '%s' THEN name ELSE NULL END), COUNT(CASE WHEN warranty_expiry_date <= '%s' THEN name ELSE NULL END) from `tabSerial No` where territory = '%s' and item_group = '%s'"%(nowdate,nowdate,nowdate,nowdate,cc,br[0]))
t_row = ['' for i in range(len(colnames))]
t_row[col_idx['Item Group']] = br[0]
t_row[col_idx['Out of AMC']] = cint(br_det[0][0])
t_row[col_idx['Under AMC']] = cint(br_det[0][1])
t_row[col_idx['Out of Warranty']] = cint(br_det[0][2])
t_row[col_idx['Under Warranty']] = cint(br_det[0][3])
tot = cint(br_det[0][0]) + cint(br_det[0][1]) + cint(br_det[0][2])+ cint(br_det[0][3])
t_row[col_idx['Total']] = tot
out.append(t_row)
#ADD NEW ROW
# ----------
newrow=['','TOTAL',oa,ua,ow,uw,sum]
out.append(newrow)
res=out

View File

@@ -1,28 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:50",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:50"
},
{
"module": "Support",
"standard": "Yes",
"sort_order": "ASC",
"filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':''}",
"doc_type": "Serial No",
"name": "__common__",
"add_cond": "`tabSerial No`.`territory` is not null\n`tabSerial No`.`territory` != ''\n`tabSerial No`.`status` not in ('In Store', 'Scrapped')",
"doctype": "Search Criteria",
"sort_by": "`tabSerial No`.`cost_center`",
"group_by": "`tabSerial No`.`cost_center`",
"page_len": 50,
"criteria_name": "AMC Summary",
"columns": "Serial No\u0001Territory"
},
{
"name": "amc_summary",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,23 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Status'].df.in_first_page = 1;
this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Allocated To'].df.in_first_page = 1;
this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
}
this.mytabs.items['Select Columns'].hide()

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "Support",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Customer Issue\u0001Saved':1,'Customer Issue\u0001Submitted':1,'Customer Issue\u0001Status':'','Customer Issue\u0001Fiscal Year':''}",
"doctype": "Search Criteria",
"doc_type": "Customer Issue",
"name": "__common__",
"sort_by": "`tabCustomer Issue`.`name`",
"page_len": 50,
"criteria_name": "Customer Issues",
"columns": "Customer Issue\u0001ID,Customer Issue\u0001Status,Customer Issue\u0001Complaint Date,Customer Issue\u0001Complaint,Customer Issue\u0001Item Code,Customer Issue\u0001Item Name,Customer Issue\u0001Allocated To,Customer Issue\u0001Allocated On,Customer Issue\u0001Resolved By,Customer Issue\u0001Resolution Date,Customer Issue\u0001Customer Name,Customer Issue\u0001Fiscal Year"
},
{
"name": "customer_issues",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,20 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
}

View File

@@ -1,29 +0,0 @@
[
{
"owner": "ashwini@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"add_col": "SUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`billed_qty`) * `tabSales Order Item`.`basic_rate`) AS 'Pending Amount'",
"parent_doc_type": "Sales Order",
"module": "Support",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Sales Order\u0001Saved':1,'Sales Order\u0001Submitted':1,'Sales Order\u0001Status':'','Sales Order\u0001Fiscal Year':''}",
"doc_type": "Sales Order Item",
"name": "__common__",
"add_cond": "`tabSales Order`.status != 'Stopped'\n`tabSales Order`.order_type='Maintenance'",
"doctype": "Search Criteria",
"sort_by": "`tabSales Order`.`name`",
"page_len": 50,
"criteria_name": "Maintenance Orderwise Pending Amount To Bill",
"columns": "Sales Order\u0001ID,Sales Order\u0001Customer,Sales Order\u0001Customer Name,Sales Order\u0001Customer Address,Sales Order\u0001Status,Sales Order\u0001% Billed,Sales Order\u0001Sales Order Date"
},
{
"name": "maintenance_orderwise_pending_amount_to_bill",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,29 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'From Scheduled Date'].df.in_first_page = 1;
this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'To Scheduled Date'].df.in_first_page = 1;
this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'Incharge Name'].df.in_first_page = 1;
this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Customer'].df.in_first_page = 1;
this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Customer Name'].df.in_first_page = 1;
this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Sales Order No'].df.in_first_page = 1;
//this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Status'].df.in_first_page = 0;
this.filter_fields_dict['Maintenance Schedule'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
}
this.mytabs.items['Select Columns'].hide()

View File

@@ -1,27 +0,0 @@
[
{
"owner": "nabin@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"parent_doc_type": "Maintenance Schedule",
"module": "Support",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Maintenance Schedule\u0001Submitted':1,'Maintenance Schedule\u0001Status':''}",
"doc_type": "Maintenance Schedule Detail",
"name": "__common__",
"doctype": "Search Criteria",
"sort_by": "`tabMaintenance Schedule Detail`.`item_code`",
"page_len": 50,
"criteria_name": "Maintenance Schedule Details",
"columns": "Maintenance Schedule Detail\u0001Item Code,Maintenance Schedule Detail\u0001Item Name,Maintenance Schedule Detail\u0001Serial No,Maintenance Schedule Detail\u0001Incharge Name,Maintenance Schedule Detail\u0001Scheduled Date,Maintenance Schedule\u0001Customer Name,Maintenance Schedule\u0001Address,Maintenance Schedule\u0001Sales Order No"
},
{
"name": "maintenance_schedule_details",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,25 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//this.mytabs.items['Select Columns'].hide();
report.customize_filters = function() {
this.filter_fields_dict['Serial No'+FILTER_SEP +'Status'].df.in_first_page = 0;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Customer'].df.in_first_page = 1;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Customer Name'].df.in_first_page = 1;
this.filter_fields_dict['Serial No'+FILTER_SEP +'Maintenance Status'].df.in_first_page = 1;
}

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:53",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:53"
},
{
"module": "Support",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':'','Serial No\u0001Maintenance Status':''}",
"doctype": "Search Criteria",
"doc_type": "Serial No",
"name": "__common__",
"sort_by": "`tabSerial No`.`name`",
"page_len": 50,
"criteria_name": "Warranty/AMC Expiry Details",
"columns": "Serial No\u0001ID,Serial No\u0001Item Code,Serial No\u0001Description,Serial No\u0001Status,Serial No\u0001Item Group,Serial No\u0001Purchase Receipt No,Serial No\u0001Delivery Note No,Serial No\u0001Customer,Serial No\u0001Customer Name,Serial No\u0001AMC Expiry Date,Serial No\u0001Warranty Expiry Date"
},
{
"name": "warranty-amc_expiry_details",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.hide_all_filters();
this.mytabs.items['Select Columns'].hide();
this.mytabs.items['More Filters'].hide();
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Item Group',ignore:1,parent:'Serial No',in_first_page:1, report_default:'Item Group'});
}
report.aftertableprint = function(t) {
$yt(t,'*',1,{whiteSpace:'pre'});
}

View File

@@ -1,54 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
opt = filter_values.get('based_on')
opt_dict = {'Territory':'territory', 'Item Group':'item_group'}
# ADD NEW COLUMNS
row_list = [[opt,'Data','150px',''],
['Out of AMC','Int','150px',''],
['Under AMC','Int','150px',''],
['Out of Warranty','Int','150px',''],
['Under Warranty','Int','150px',''],
['Total','Int','150px','']]
for r in row_list:
colnames.append(r[0])
coltypes.append(r[1])
colwidths.append(r[2])
coloptions.append(r[3])
col_idx[r[0]] = len(colnames)-1
#ADD VALUES TO THE COLUMN
out=[]
oa,ua,ow,uw,sum=0,0,0,0,0
nowdate = nowdate()
for r in res:
lft_rgt = sql("select lft, rgt from `tab%s` where name = '%s'" % (opt,r[col_idx[opt]].strip()))
det = sql("select COUNT(CASE WHEN t1.amc_expiry_date < '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.amc_expiry_date >= '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.warranty_expiry_date < '%s' THEN t1.name ELSE NULL END), COUNT(CASE WHEN t1.warranty_expiry_date >= '%s' THEN t1.name ELSE NULL END) from `tabSerial No` t1, `tab%s` t2 where t1.%s = t2.name and t2.lft>= '%s' and t2. rgt <= '%s' and t1.status = 'Delivered' and ifnull(item_group,'')!='' and ifnull(territory,'')!=''" %(nowdate,nowdate,nowdate,nowdate,opt, opt_dict[opt], lft_rgt[0][0], lft_rgt[0][1]))
r.append(cint(det[0][0]))
r.append(cint(det[0][1]))
r.append(cint(det[0][2]))
r.append(cint(det[0][3]))
tot = cint(det[0][0]) + cint(det[0][1]) + cint(det[0][2]) + cint(det[0][3])
r.append(tot)
out.append(r)

View File

@@ -1 +0,0 @@
SELECT CONCAT(REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM `tab%(based_on)s` AS node,`tab%(based_on)s` AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.docstatus !=2 GROUP BY node.name ORDER BY node.lft

View File

@@ -1,25 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:53",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:53"
},
{
"module": "Support",
"sort_order": "DESC",
"filters": "{'Serial No\u0001Saved':1,'Serial No\u0001Status':''}",
"standard": "Yes",
"doc_type": "Serial No",
"name": "__common__",
"doctype": "Search Criteria",
"sort_by": "name",
"page_len": 50,
"criteria_name": "Warranty/AMC Summary"
},
{
"name": "warranty-amc_summary",
"doctype": "Search Criteria"
}
]