Merge branch 'shf_rename'

Conflicts:
	public/js/all-app.js
	public/js/all-web.js
This commit is contained in:
Anand Doshi 2012-05-18 11:52:31 +05:30
commit d643d367ca
18 changed files with 149 additions and 134 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,13 +19,14 @@ for r in res:
if not sal_slips_ids == '': sal_slips_ids +=","
sal_slips_ids+="'%s'"%r[col_idx['ID']]
earn_heads =[i[0] for i in sql("select distinct e_type from `tabSalary Slip Earning` where parent in (%s)"%sal_slips_ids)]
ded_heads =[i[0] for i in sql("select distinct d_type from `tabSalary Slip Deduction` where parent in (%s)"%sal_slips_ids)]
earn_heads, ded_heads = [], []
if res:
earn_heads =[i[0] for i in sql("select distinct e_type from `tabSalary Slip Earning` where parent in (%s)"%sal_slips_ids)]
ded_heads =[i[0] for i in sql("select distinct d_type from `tabSalary Slip Deduction` where parent in (%s)"%sal_slips_ids)]
col=[]
for e in earn_heads:
l = (len(e)*9)
l = (len(cstr(e))*9)
if l < 150 :
col_width = '150px'
else:
@ -35,9 +36,8 @@ for e in earn_heads:
col.append(['Arrear Amount','Currency','150px',''])
col.append(['Encashment Amount','Currency','170px',''])
col.append(['Gross Pay','Currency','150px',''])
for d in ded_heads:
l = (len(d)*9)
l = (len(cstr(d))*9)
if l < 150 : col_width = '150px'
else: col_width = '%spx'%(l)
col.append([d,'Currency',col_width,''])
@ -54,7 +54,6 @@ for c in col:
grand_tot = 0
for r in res:
for i in range(6,len(colnames)):
if colnames[i] not in ('Arrear Amount','Encashment Amount','Net Pay','Gross Pay','Total Deduction'):
amt = sql("select e_modified_amount from `tabSalary Slip Earning` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
@ -65,7 +64,6 @@ for r in res:
else:
fld_nm = cstr(colnames[i]).lower().replace(' ','_')
errprint(fld_nm)
tot = sql("select %s from `tabSalary Slip` where name ='%s'"%(fld_nm,r[0]))
tot = tot and flt(tot[0][0]) or 0
if colnames[i] == 'Net Pay':
@ -75,4 +73,4 @@ for r in res:
gt_row = ['' for i in range(len(colnames))]
gt_row[col_idx['Employee Name']] = '<b>Grand Totals</b>'
gt_row[col_idx['Net Pay']-1] = fmt_money(grand_tot)
res.append(gt_row)
res.append(gt_row)

View File

@ -0,0 +1,8 @@
def execute():
import webnotes
from webnotes.model import delete_doc
delete_doc("Search Criteria", "sales_order_pending_items1")
webnotes.conn.sql("update `tabSearch Criteria` set module = 'Selling' where module = 'CRM'")
from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'sales_order_pending_items')

View File

@ -362,5 +362,10 @@ patch_list = [
'patch_file': 'std_pf_readonly',
'description': 'Make standard print formats readonly for system manager'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_so_pending_items',
'description': 'reload so pending items'
},
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,37 +1,37 @@
# Search Criteria, sales_order_pending_items
[
# These values are common in all dictionaries
{
'add_col': '(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) AS "Qty To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0)) AS "Qty To Bill"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Bill"',
'add_cond': '(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0) > 0 or `tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0) > 0)\n`tabSales Order`.status != "Stopped"',
'add_tab': None,
'columns': 'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order\x01Customer Name,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Description,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty',
'creation': '2011-05-09 11:04:19',
'criteria_name': 'Sales Order Pending Items',
'custom_query': '',
'description': 'Sales Order Pending Items',
'dis_filters': None,
'disabled': None,
'doc_type': 'Sales Order Item',
'creation': '2012-05-14 14:54:44',
'docstatus': 0,
'modified': '2012-05-18 11:15:00',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'add_col': u'(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) AS "Qty To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Deliver"\n(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0))*`tabSales Order Item`.basic_rate AS "Amount To Bill"',
'add_cond': u'(`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0) > 0 or `tabSales Order Item`.qty - ifnull(`tabSales Order Item`.billed_qty, 0) > 0)\n`tabSales Order`.status != "Stopped"',
'columns': u'Sales Order\x01ID,Sales Order\x01Sales Order Date,Sales Order\x01Customer,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Description,Sales Order Item\x01Quantity,Sales Order Item\x01Delivered Qty',
'criteria_name': u'Sales Order Pending Items',
'description': u'Sales Order Pending Items',
'doc_type': u'Sales Order Item',
'doctype': 'Search Criteria',
'filters': "{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}",
'graph_series': None,
'graph_values': None,
'group_by': None,
'idx': None,
'modified': '2011-05-09 11:08:05',
'modified_by': 'Administrator',
'module': 'CRM',
'name': 'sales_order_pending_items',
'owner': 'Administrator',
'filters': u'{"Sales Order\\u0001Submitted":1,"Sales Order\\u0001Fiscal Year":[],"Sales Order\\u0001Status":[]}',
'module': u'Selling',
'name': '__common__',
'page_len': 50,
'parent': None,
'parent_doc_type': 'Sales Order',
'parentfield': None,
'parenttype': None,
'report_script': None,
'server_script': None,
'sort_by': '`tabSales Order`.`name`',
'sort_order': 'DESC',
'standard': 'Yes'
'parent_doc_type': u'Sales Order',
'sort_by': u'`tabSales Order`.`name`',
'sort_order': u'DESC',
'standard': u'Yes'
},
# Search Criteria, sales_order_pending_items
{
'doctype': 'Search Criteria',
'name': u'sales_order_pending_items'
}
]
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -272,6 +272,8 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
<div class="show_filters well">\
<div class="filter_area"></div>\
<div>\
<button class="btn btn-small btn-info search-btn">\
<i class="icon-refresh icon-white"></i> Search</button>\
<button class="btn btn-small add-filter-btn">\
<i class="icon-plus"></i> Add Filter</button>\
</div>\
@ -318,7 +320,7 @@ if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:funct
/*
* lib/js/wn/ui/filters.js
*/
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('js/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('js/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});this.$w.find('.search-btn').bind('click',function(){me.listobj.run();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
this.add_filter();},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').toggle(true);}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
values.push(f.get_value());})
return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
@ -2334,4 +2336,4 @@ msgprint('Grid "'+fort+'" does not exists');}}}}})
* conf.js
*/
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2'});}
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});

View File

@ -159,6 +159,8 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
<div class="show_filters well">\
<div class="filter_area"></div>\
<div>\
<button class="btn btn-small btn-info search-btn">\
<i class="icon-refresh icon-white"></i> Search</button>\
<button class="btn btn-small add-filter-btn">\
<i class="icon-plus"></i> Add Filter</button>\
</div>\
@ -205,7 +207,7 @@ if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:funct
/*
* lib/js/wn/ui/filters.js
*/
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('js/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('js/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});this.$w.find('.search-btn').bind('click',function(){me.listobj.run();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
this.add_filter();},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').toggle(true);}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
values.push(f.get_value());})
return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
@ -735,4 +737,4 @@ erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide
* conf.js
*/
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(wn.app,{name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2'});}
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html((wn.boot.website_settings.brand_html||'erpnext')+' <i class="icon-home icon-white navbar-icon-home" ></i>').css('max-width','200px').css('overflow','hidden').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});