moved directory structure

This commit is contained in:
Rushabh Mehta
2012-09-24 19:13:42 +05:30
parent e47a6779e9
commit 2fa2f7178d
1637 changed files with 47 additions and 11450 deletions

View File

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

View File

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

View File

@@ -0,0 +1,32 @@
// 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.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Delivery Note Item'});
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Customer'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
}

View File

@@ -0,0 +1,35 @@
# Search Criteria, projectwise_delivered_qty_and_costs
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
# These values are common for all Search Criteria
{
'add_cond': u'IFNULL(`tabDelivery Note`.`project_name`,"")!=""',
'columns': u'Delivery Note\x01ID,Delivery Note\x01Project Name,Delivery Note\x01Customer,Delivery Note\x01Customer Name,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note\x01Posting Date,Delivery Note\x01% Billed,Delivery Note Item\x01Amount*',
'criteria_name': u'Projectwise Delivered Qty and Costs',
'doc_type': u'Delivery Note Item',
'doctype': 'Search Criteria',
'filters': u"{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'Submitted','Delivery Note\x01Fiscal Year':''}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'parent_doc_type': u'Delivery Note',
'sort_by': u'`tabDelivery Note`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, projectwise_delivered_qty_and_costs
{
'doctype': 'Search Criteria',
'name': u'projectwise_delivered_qty_and_costs'
}
]

View File

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

View File

@@ -0,0 +1,31 @@
// 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.add_filter({fieldname:'item_code', label:'Item Code', fieldtype:'Link', options:'Item',ignore : 1,parent:'Sales Order Item'});
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer Name'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
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

@@ -0,0 +1,36 @@
# Search Criteria, projectwise_pending_qty_and_costs
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
# These values are common for all Search Criteria
{
'add_col': u"SUM(`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`) AS 'Pending Qty'\nSUM((`tabSales Order Item`.`qty` - `tabSales Order Item`.`delivered_qty`)* `tabSales Order Item`.basic_rate) AS 'Pending Amount'",
'add_cond': u'`tabSales Order Item`.`qty` > `tabSales Order Item`.`delivered_qty`\nIFNULL(`tabSales Order`.`project_name`,"")!=""\n`tabSales Order`.order_type = \'Sales\'',
'columns': u'Sales Order\x01ID,Sales Order\x01Project Name,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date',
'criteria_name': u'Projectwise Pending Qty and Costs',
'doc_type': u'Sales Order Item',
'doctype': 'Search Criteria',
'filters': u"{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'Submitted','Sales Order\x01Fiscal Year':''}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'parent_doc_type': u'Sales Order',
'sort_by': u'`tabSales Order`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, projectwise_pending_qty_and_costs
{
'doctype': 'Search Criteria',
'name': u'projectwise_pending_qty_and_costs'
}
]

View File

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

View File

@@ -0,0 +1,108 @@
// 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() {
//hide all filters
//------------------------------------------------
this.hide_all_filters();
//add filters
//------------------------------------------------
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Purchase Order'+NEWLINE+'Purchase Invoice'+NEWLINE+'Purchase Receipt',report_default:'Purchase Order',ignore : 1,parent:'Purchase Order', single_select:1});
this.add_filter({fieldname:'purchase_order', label:'Purchase Order', fieldtype:'Link', options:'Purchase Order', ignore : 1, parent:'Purchase Order'});
this.add_filter({fieldname:'purchase_receipt', label:'Purchase Receipt',fieldtype:'Link', options:'Purchase Receipt',ignore : 1, parent:'Purchase Order'});
this.add_filter({fieldname:'purchase_invoice', label:'Purchase Invoice',fieldtype:'Link', options:'Purchase Invoice',ignore : 1, parent:'Purchase Order'});
//unhide filters
//------------------------------------------------
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
//move filter field in first page
//------------------------------------------------
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Based On'].df.in_first_page = 1;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Order'].df.in_first_page = 1;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Invoice'].df.in_first_page = 1;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Purchase Receipt'].df.in_first_page = 1;
// default values
//------------------------------------------------
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
}
//hide select columns field
//------------------------------------------------
this.mytabs.items['Select Columns'].hide();
report.get_query = function() {
//get filter values
based_on = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Based On'].get_value();
purchase_order = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Order'].get_value();
purchase_invoice = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Invoice'].get_value();
purchase_receipt = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Purchase Receipt'].get_value();
project_name = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Project Name'].get_value();
company = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Company'].get_value();
fy = this.filter_fields_dict['Purchase Order'+FILTER_SEP+'Fiscal Year'].get_value();
// make query based on transaction
//-------------------------------------------------------------------------------------------
var cond = '';
//for purchase order
if(based_on == 'Purchase Order'){
if(purchase_order) cond += ' AND `tabPurchase Order`.name = "'+purchase_order+'"';
if(project_name) cond += ' AND `tabPurchase Order`.project_name = "'+project_name+'"';
if(company) cond += ' AND `tabPurchase Order`.company = "'+company+'"';
if(fy !='') cond += ' AND `tabPurchase Order`.fiscal_year = "'+fy+'"';
var q = 'SELECT DISTINCT `tabPurchase Order`.name, `tabPurchase Order`.status, `tabPurchase Order`.project_name, `tabPurchase Order`.supplier,`tabPurchase Order`.supplier_name,`tabPurchase Order`.per_received, `tabPurchase Order`.per_billed, `tabPurchase Order`.grand_total FROM `tabPurchase Order` WHERE IFNULL(`tabPurchase Order`.project_name,"") != ""'+cond+' AND `tabPurchase Order`.docstatus != 2';
return q;
}
//for purchase receipt
else if(based_on == 'Purchase Receipt'){
if(purchase_order) cond += ' t2.purchase_order = "'+purchase_order+'" AND ';
if(purchase_receipt) cond += ' t1.name = "'+purchase_receipt+'" AND ';
if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
if(company) cond += ' t1.company = "'+company+'" AND ';
if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND ';
var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.supplier, t1.supplier_name,t1.grand_total FROM `tabPurchase Receipt` t1, `tabPurchase Receipt Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
return q;
}
//for purchase invoice
else if(based_on == 'Purchase Invoice'){
if(purchase_order) cond += ' t2.purchase_order = "'+purchase_order+'" AND ';
if(purchase_receipt) cond += ' t2.purchase_receipt = "'+purchase_receipt+'" AND';
if(purchase_invoice) cond += ' t1.name = "'+purchase_invoice+'" AND';
if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
if(company) cond += ' t1.company = "'+company+'" AND ';
if(fy !='') cond += ' t1.fiscal_year = "'+fy+'" AND ';
var q = 'SELECT DISTINCT t1.name , t1.credit_to , t1.project_name, t1.supplier, t1.supplier_name , t1.grand_total FROM `tabPurchase Invoice` t1, `tabPurchase Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
return q;
}
}

View File

@@ -0,0 +1,40 @@
# 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
based_on = filter_values.get('based_on')
# make default columns
#for r in res:
col = []
if based_on == 'Purchase Order':
col = [['Purchase Order ID','Link','Purchase Order'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['% Received','Data',''],['% Billed','Data',''],['Grand Total','Currency','']]
elif based_on == 'Purchase Invoice':
col = [['Purchase Receipt ID','Link','Purchase Invoice'],['Status','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']]
elif based_on == 'Purchase Receipt':
col = [['Purchase Invoice ID','Link','Purchase Receipt'],['Credit To','Data',''],['Project Name','Link','Project'],['Supplier','Link','Supplier'],['Supplier Name','Data',''],['Grand Total','Currency','']]
for c in col:
colnames.append(c[0])
coltypes.append(c[1])
coloptions.append(c[2])
l = (len(c[0])*9)
if l < 150 : col_width = '150px'
else: col_width = '%spx'%(l)
colwidths.append(col_width)
col_idx[c[0]] = len(colnames)-1

View File

@@ -0,0 +1,31 @@
# Search Criteria, projectwise_purchase_details
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
# These values are common for all Search Criteria
{
'criteria_name': u'Projectwise Purchase Details',
'doc_type': u'Purchase Order',
'doctype': 'Search Criteria',
'filters': u"{'Purchase Order\x01Status':'','Purchase Order\x01Fiscal Year':''}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, projectwise_purchase_details
{
'doctype': 'Search Criteria',
'name': u'projectwise_purchase_details'
}
]

View File

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

View File

@@ -0,0 +1,112 @@
// 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() {
//hide all filters
//------------------------------------------------
this.hide_all_filters();
//add filters
//------------------------------------------------
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Sales Invoice',report_default:'Sales Order',ignore : 1,parent:'Sales Order', single_select:1});
this.add_filter({fieldname:'sales_order', label:'Sales Order', fieldtype:'Link', options:'Sales Order', ignore : 1, parent:'Sales Order'});
this.add_filter({fieldname:'delivery_note', label:'Delivery Note', fieldtype:'Link', options:'Delivery Note',ignore : 1, parent:'Sales Order'});
this.add_filter({fieldname:'sales_invoice', label:'Sales Invoice',fieldtype:'Link', options:'Sales Invoice',ignore : 1, parent:'Sales Order'});
//unhide filters
//------------------------------------------------
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
//move filter field in first page
//------------------------------------------------
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Based On'].df.in_first_page = 1;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Order'].df.in_first_page = 1;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Delivery Note'].df.in_first_page = 1;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Invoice'].df.in_first_page = 1;
// default values
//------------------------------------------------
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;
}
//hide select columns field
//------------------------------------------------
//this.mytabs.items['Select Columns'].hide();
report.get_query = function() {
//get filter values
based_on = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Based On'].get_value();
sales_order = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Sales Order'].get_value();
delivery_note = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Delivery Note'].get_value();
sales_invoice = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Sales Invoice'].get_value();
project_name = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Project Name'].get_value();
company = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Company'].get_value();
fy = this.filter_fields_dict['Sales Order'+FILTER_SEP+'Fiscal Year'].get_value();
// make query based on transaction
//-------------------------------------------------------------------------------------------
var cond = '';
//for sales order
if(based_on == 'Sales Order'){
if(sales_order) cond += ' AND `tabSales Order`.name = "'+sales_order+'"';
if(project_name) cond += ' AND `tabSales Order`.project_name = "'+project_name+'"';
if(company) cond += ' AND `tabSales Order`.company = "'+company+'"';
if(fy) cond += ' AND `tabSales Order`.fiscal_year = "'+fy+'"';
var q = 'SELECT DISTINCT `tabSales Order`.name, `tabSales Order`.order_type, `tabSales Order`.status, `tabSales Order`.project_name, `tabSales Order`.customer,`tabSales Order`.customer_name,`tabSales Order`.per_delivered, `tabSales Order`.per_billed, `tabSales Order`.grand_total FROM `tabSales Order` WHERE IFNULL(`tabSales Order`.project_name,"") != ""'+cond+' AND `tabSales Order`.docstatus != 2';
return q;
}
//for delivery note
else if(based_on == 'Delivery Note'){
if(sales_order) cond += ' t1.name = t2.parent AND t2.prevdoc_docname = "'+sales_order+'" AND ';
if(delivery_note) cond += ' t1.name = "'+delivery_note+'" AND ';
if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
if(company) cond += ' t1.company = "'+company+'" AND ';
if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND ';
var q = 'SELECT DISTINCT t1.name, t1.status, t1.project_name, t1.customer, t1.customer_name, t1.per_billed, t1.per_installed, t1.grand_total FROM `tabDelivery Note` t1, `tabDelivery Note Item` t2 WHERE '+cond+' IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2';
return q;
}
//for sales invoice
else if(based_on == 'Sales Invoice'){
if(sales_order) cond += ' t2.sales_order = "'+sales_order+'" AND ';
if(delivery_note) cond += ' t2.delivery_note = "'+delivery_note+'" AND ';
if(sales_invoice) cond += ' t1.name = "'+sales_invoice+'" AND ';
if(project_name) cond += ' t1.project_name = "'+project_name+'" AND ';
if(company) cond += ' t1.company = "'+company+'" AND ';
if(fy) cond += ' t1.fiscal_year = "'+fy+'" AND ';
var q = 'SELECT DISTINCT t1.name , t1.debit_to , t1.project_name , t1.customer , t1.customer_name , t1.grand_total FROM `tabSales Invoice` t1, `tabSales Invoice Item` t2 WHERE '+cond +'IFNULL(t1.project_name,"") !="" AND t1.docstatus != 2 AND t1.name = t2.parent';
return q;
}
}

View File

@@ -0,0 +1,37 @@
# 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
based_on = filter_values.get('based_on')
cols=[]
if based_on == 'Sales Order':
cols = [['Sales Order No','Link','150px','Sales Order'], ['Order Type','Data','100px',''], ['Status','Data','100px',''], ['Project Name','Link','150px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['% Delivered','Currency','100px',''], ['% Billed','Currency','100px',''], ['Grand Total','Currency','150px','']]
elif based_on == 'Delivery Note':
cols = [['Delivery Note No','Link','150px','Delivery Note'], ['Status','Data','100px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['% Installed','Currency','100px',''], ['% Billed','Currency','100px',''], ['Grand Total','Currency','150px','']]
elif based_on == 'Sales Invoice':
cols = [['Sales Invoice No','Link','150px','Sales Invoice'], ['Debit To','Data','150px',''], ['Project Name','Link','200px','Project'], ['Customer','Link','150px','Customer'], ['Customer Name','Data','200px',''], ['Grand Total','Currency','150px','']]
for c in cols:
colnames.append(c[0])
coltypes.append(c[1])
colwidths.append(c[2])
coloptions.append(c[3])
col_idx[c[0]] = len(colnames)-1

View File

@@ -0,0 +1,31 @@
# Search Criteria, projectwise_sales_details
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
# These values are common for all Search Criteria
{
'criteria_name': u'Projectwise Sales Details',
'doc_type': u'Sales Order',
'doctype': 'Search Criteria',
'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':''}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, projectwise_sales_details
{
'doctype': 'Search Criteria',
'name': u'projectwise_sales_details'
}
]

View File

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

View File

@@ -0,0 +1,34 @@
# Search Criteria, projectwise_sales_orders
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},
# These values are common for all Search Criteria
{
'add_cond': u"ifnull(`tabSales Order`.project_name ,'') != ''",
'columns': u'Sales Order\x01ID,Sales Order\x01Status,Sales Order\x01Project Name,Sales Order\x01Customer,Sales Order\x01Sales Order Date,Sales Order\x01Expected Delivery Date,Sales Order\x01Quotation No,Sales Order\x01% Delivered,Sales Order\x01% Billed,Sales Order\x01Grand Total*',
'criteria_name': u'Projectwise Sales Orders',
'doc_type': u'Sales Order',
'doctype': 'Search Criteria',
'filters': u"{'Sales Order\x01Saved':1,'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'sort_by': u'`tabSales Order`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, projectwise_sales_orders
{
'doctype': 'Search Criteria',
'name': u'projectwise_sales_orders'
}
]

View File

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

View File

@@ -0,0 +1,23 @@
// 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['Timesheet Detail'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Task Id'].df.in_first_page = 1;
this.filter_fields_dict['Timesheet'+FILTER_SEP +'Timesheet by'].df.filter_hide = 1;
}
//this.mytabs.items['Select Columns'].hide()

View File

@@ -0,0 +1,34 @@
# Search Criteria, timesheet_report
[
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:53',
'docstatus': 0,
'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},
# These values are common for all Search Criteria
{
'columns': u'Timesheet\x01ID,Timesheet\x01Timesheet Date,Timesheet\x01Timesheet by,Timesheet Detail\x01Project Name,Timesheet Detail\x01Task Id,Timesheet Detail\x01Task Name,Timesheet Detail\x01Actual Start Time,Timesheet Detail\x01Actual End Time,Timesheet Detail\x01Total Hours (Actual)',
'criteria_name': u'Timesheet Report',
'doc_type': u'Timesheet Detail',
'doctype': 'Search Criteria',
'filters': u"{'Timesheet\x01Saved':1,'Timesheet\x01Submitted':1}",
'module': u'Projects',
'name': '__common__',
'page_len': 50,
'parent_doc_type': u'Timesheet',
'sort_by': u'`tabTimesheet`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, timesheet_report
{
'doctype': 'Search Criteria',
'name': u'timesheet_report'
}
]