mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 23:33:43 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -240,7 +240,9 @@ class DocType:
|
||||
Adds common conditions in dictionary "args"
|
||||
"""
|
||||
start_date, end_date = self.get_start_end_dates()
|
||||
fiscal_start_date = webnotes.utils.get_defaults()['year_start_date']
|
||||
fiscal_year = webnotes.utils.get_defaults()['fiscal_year']
|
||||
fiscal_start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year,
|
||||
'year_start_date')
|
||||
|
||||
if 'new' in args['type']:
|
||||
args.update({
|
||||
|
||||
@@ -36,6 +36,10 @@ cur_frm.pformat.rounded_total_export = function(doc) {
|
||||
return '';
|
||||
}
|
||||
|
||||
cur_frm.pformat.in_words_export = function(doc) {
|
||||
return '';
|
||||
}
|
||||
|
||||
cur_frm.pformat.other_charges= function(doc){
|
||||
//function to make row of table
|
||||
var make_row = function(title,val,bold){
|
||||
@@ -89,7 +93,7 @@ cur_frm.pformat.other_charges= function(doc){
|
||||
out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1);
|
||||
}
|
||||
|
||||
if(doc.in_words_export){
|
||||
if(doc.in_words_export && !print_hide_dict['in_words_export']){
|
||||
out +='</table></td></tr>';
|
||||
out += '<tr><td colspan = "2">';
|
||||
out += '<table><tr><td style="width:25%;"><b>In Words</b></td>'
|
||||
|
||||
@@ -70,7 +70,10 @@ class DocType:
|
||||
ret.append(p)
|
||||
|
||||
# fields list
|
||||
fl = ['', 'owner'] + [l[0] for l in sql("select fieldname from tabDocField where parent=%s and fieldtype='Link' and ifnull(options,'')!=''", doctype)]
|
||||
fl = ['', 'owner'] + [l[0] for l in sql("""\
|
||||
select fieldname from tabDocField where parent=%s
|
||||
and ((fieldtype='Link' and ifnull(options,'')!='') or
|
||||
(fieldtype='Select') and lcase(ifnull(options,'')) like 'link:%%')""", doctype)]
|
||||
|
||||
return {'perms':ret, 'fields':fl}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user