Merge branch 'shf_rename' of github.com:webnotes/erpnext into cms

This commit is contained in:
Rushabh Mehta 2012-05-08 11:02:58 +05:30
commit c22d9e03e7
7 changed files with 99 additions and 89 deletions

View File

@ -4,7 +4,7 @@ WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
AND `tabGL Entry`.`account` LIKE '%(account)s%%'
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
AND ((ifnull(`tabGL Entry`.voucher_type,'') = 'Payable Voucher' and `tabGL Entry`.credit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND ((ifnull(`tabGL Entry`.voucher_type,'') = 'Purchase Invoice' and `tabGL Entry`.credit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND `tabGL Entry`.`is_cancelled` = 'No'
AND `tabAccount`.master_type = 'Supplier'
AND `tabAccount`.name = `tabGL Entry`.account

View File

@ -4,7 +4,7 @@ WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
AND `tabGL Entry`.`account` LIKE '%(account)s%%'
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
AND ((`tabGL Entry`.voucher_type = 'Receivable Voucher' and `tabGL Entry`.debit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND ((`tabGL Entry`.voucher_type = 'Sales Invoice' and `tabGL Entry`.debit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND `tabGL Entry`.`is_cancelled` = 'No'
AND `tabAccount`.master_type = 'Customer'
AND `tabAccount`.name = `tabGL Entry`.account

View File

@ -18,7 +18,7 @@ report.customize_filters = function() {
this.hide_all_filters();
filter_list = ['Debit To', 'From Posting Date', 'To Posting Date']
for(var i=0;i<filter_list.length;i++)
this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
this.filter_fields_dict['Sales Invoice'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Item'].df.filter_hide = 0;
this.filter_fields_dict['Sales Invoice Item'+FILTER_SEP +'Item Group'].df.filter_hide = 0;

View File

@ -58,6 +58,10 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if (doc.per_billed < 100) cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
}
if(wn.boot.control_panel.country == 'India') {
unhide_field(['challan_no', 'challan_date']);
}
}

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-04-13 11:56:36',
'creation': '2012-05-07 16:44:47',
'docstatus': 0,
'modified': '2012-05-01 14:34:43',
'modified': '2012-05-07 16:54:34',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -56,54 +56,6 @@
'name': u'Purchase Receipt'
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Manager',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material User',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 1,
@ -139,6 +91,54 @@
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material Manager',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Material User',
'submit': 0,
'write': 0
},
# DocPerm
{
'amend': 1,
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Material User',
'submit': 1,
'write': 1
},
# DocField
{
'colour': u'White:FFF',
@ -296,6 +296,40 @@
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'challan_no',
'fieldtype': u'Data',
'hidden': 1,
'label': u'Challan No',
'no_copy': 1,
'oldfieldname': u'challan_no',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'challan_date',
'fieldtype': u'Date',
'hidden': 1,
'label': u'Challan Date',
'no_copy': 1,
'oldfieldname': u'challan_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
@ -1112,38 +1146,6 @@
'width': u'50%'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'challan_no',
'fieldtype': u'Data',
'label': u'Challan No',
'no_copy': 1,
'oldfieldname': u'challan_no',
'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'challan_date',
'fieldtype': u'Date',
'label': u'Challan Date',
'no_copy': 1,
'oldfieldname': u'challan_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
'width': u'100px'
},
# DocField
{
'colour': u'White:FFF',

View File

@ -49,8 +49,9 @@ class DocType:
def convert_into_list(self, data, submit = 1):
"""Convert csv data into list"""
count = 2
count = 1
for s in data:
count += 1
if count == 2: continue
# validate
if (submit and len(s) != 4) or (not submit and len(s) != 6):
@ -60,7 +61,6 @@ class DocType:
self.validate_warehouse(s[1], count)
self.data.append(s)
count += 1
if not self.validated:
raise Exception

View File

@ -2110,7 +2110,11 @@ this.prepare_col_heads(this.flist);var table=me.make_print_table(this.flist);thi
_e.email_as_field='email_id';_e.email_as_dt='Contact';_e.email_as_in='email_id,contact_name';sendmail=function(emailto,emailfrom,cc,subject,message,fmt,with_attachments){var fn=function(html){$c('webnotes.utils.email_lib.send_form',{'sendto':emailto,'sendfrom':emailfrom?emailfrom:'','cc':cc?cc:'','subject':subject,'message':replace_newlines(message),'body':html,'full_domain':wn.urllib.get_base_url(),'with_attachments':with_attachments?1:0,'dt':cur_frm.doctype,'dn':cur_frm.docname},function(r,rtxt){});}
_p.build(fmt,fn);}
_e.make=function(){var d=new Dialog(440,440,"Send Email");var email_go=function(){var emailfrom=d.widgets['From'].value;var emailto=d.widgets['To'].value;if(!emailfrom)
emailfrom=user_email;var email_list=emailto.split(/[,|;]/);var valid=1;for(var i=0;i<email_list.length;i++){if(!validate_email(email_list[i])){msgprint('error:'+email_list[i]+' is not a valid email id');valid=0;}}
emailfrom=user_email;emailto=emailto.replace(/ /g,"")
var email_list=emailto.split(/[,|;]/);var valid=1;console.log(email_list)
for(var i=0;i<email_list.length;i++){console.log(email_list[i]);console.log(!email_list[i]);if(!email_list[i]){email_list.splice(i,1);}else if(!validate_email(email_list[i])){msgprint('error:'+email_list[i]+' is not a valid email id');valid=0;}}
emailto=email_list.join(",")
console.log(emailto)
if(emailfrom&&!validate_email(emailfrom)){msgprint('error:'+emailfrom+' is not a valid email id. To change the default please click on Profile on the top right of the screen and change it.');return;}
if(!valid)return;var cc=emailfrom;if(!emailfrom){emailfrom=wn.control_panel.auto_email_id;cc='';}
sendmail(emailto,emailfrom,emailfrom,d.widgets['Subject'].value,d.widgets['Message'].value,sel_val(cur_frm.print_sel),d.widgets['Send With Attachments'].checked);_e.dialog.hide();}
@ -2335,4 +2339,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');});});