Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
8a91e691ab
@ -22,7 +22,7 @@ report.customize_filters = function() {
|
|||||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
||||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
|
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
|
||||||
|
|
||||||
this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Purchase Invoice', report_default:'Aging Date'});
|
this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Purchase Invoice', report_default:'Aging Date'});
|
||||||
this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:30});
|
this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:30});
|
||||||
this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:45});
|
this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:45});
|
||||||
this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:60});
|
this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry', report_default:60});
|
||||||
|
@ -40,7 +40,6 @@ for r in range(len(range_list)-1):
|
|||||||
# Add columns
|
# Add columns
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
data = [['Aging Date','Date','80px',''],
|
data = [['Aging Date','Date','80px',''],
|
||||||
['Transaction Date','Date','80px',''],
|
|
||||||
['Account','Data','120px',''],
|
['Account','Data','120px',''],
|
||||||
['Against Voucher Type','Data','120px',''],
|
['Against Voucher Type','Data','120px',''],
|
||||||
['Against Voucher','Data','120px',''],
|
['Against Voucher','Data','120px',''],
|
||||||
@ -97,12 +96,14 @@ for t in sql("select name, due_date, bill_no, bill_date from `tabPurchase Invoic
|
|||||||
pv_outside_period = [d[0] for d in sql("select distinct name from `tabPurchase Invoice` where (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (from_date, to_date))]
|
pv_outside_period = [d[0] for d in sql("select distinct name from `tabPurchase Invoice` where (posting_date < '%s' or posting_date > '%s') and docstatus = 1" % (from_date, to_date))]
|
||||||
|
|
||||||
|
|
||||||
|
from webnotes.utils import nowdate
|
||||||
|
|
||||||
out = []
|
out = []
|
||||||
total_booking_amt, total_outstanding_amt = 0,0
|
total_booking_amt, total_outstanding_amt = 0,0
|
||||||
|
|
||||||
for r in res:
|
for r in res:
|
||||||
outstanding_amt, due_date, bill_no, bill_date, cond = 0, '','','', ''
|
outstanding_amt, due_date, bill_no, bill_date, cond = 0, '','','', ''
|
||||||
booking_amt = r.pop(8)
|
booking_amt = r.pop(7)
|
||||||
|
|
||||||
# supplier type
|
# supplier type
|
||||||
r.append(supp_type_dict.get(r[col_idx['Account']], ''))
|
r.append(supp_type_dict.get(r[col_idx['Account']], ''))
|
||||||
@ -141,6 +142,8 @@ for r in res:
|
|||||||
# split into date ranges
|
# split into date ranges
|
||||||
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above= 0
|
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above= 0
|
||||||
if r[col_idx[aging_based_on]]:
|
if r[col_idx[aging_based_on]]:
|
||||||
|
if getdate(to_date) > getdate(nowdate()):
|
||||||
|
to_date = nowdate()
|
||||||
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
||||||
if diff < cint(filter_values['range_1']):
|
if diff < cint(filter_values['range_1']):
|
||||||
val_l1 = outstanding_amt
|
val_l1 = outstanding_amt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SELECT DISTINCT `tabGL Entry`.`Aging_date`,`tabGL Entry`.`transaction_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
|
SELECT DISTINCT `tabGL Entry`.`Aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
|
||||||
FROM `tabGL Entry`,`tabAccount`
|
FROM `tabGL Entry`,`tabAccount`
|
||||||
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
|
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
|
||||||
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
|
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-04-03 12:49:50',
|
u'creation': '2012-05-14 18:05:41',
|
||||||
'docstatus': 0,
|
u'docstatus': 0,
|
||||||
'modified': '2012-04-03 12:49:50',
|
u'modified': '2012-10-17 10:51:41',
|
||||||
'modified_by': u'Administrator',
|
u'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
u'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all Search Criteria
|
# These values are common for all Search Criteria
|
||||||
@ -15,10 +15,11 @@
|
|||||||
'columns': u'GL Entry\x01Posting Date,GL Entry\x01Account,GL Entry\x01Against Voucher,GL Entry\x01Voucher No',
|
'columns': u'GL Entry\x01Posting Date,GL Entry\x01Account,GL Entry\x01Against Voucher,GL Entry\x01Voucher No',
|
||||||
'criteria_name': u'Accounts Payable',
|
'criteria_name': u'Accounts Payable',
|
||||||
'doc_type': u'GL Entry',
|
'doc_type': u'GL Entry',
|
||||||
'doctype': 'Search Criteria',
|
u'doctype': u'Search Criteria',
|
||||||
'filters': u"{'GL Entry\x01Is Cancelled':'','GL Entry\x01Fiscal Year':'','GL Entry\x01Company':'','Purchase Invoice\x01Aging Based On':'Posting Date','GL Entry\x01Range 1':'30','GL Entry\x01Range 2':'45','GL Entry\x01Range 3':'60','GL Entry\x01Range 4':'90'}",
|
'filters': u'{"GL Entry\\u0001Voucher Type":[""],"GL Entry\\u0001Is Cancelled":[""],"GL Entry\\u0001Is Opening":[""],"GL Entry\\u0001Fiscal Year":[""],"Purchase Invoice\\u0001Aging Based On":["Aging Date"],"GL Entry\\u0001Range 1":"30","GL Entry\\u0001Range 2":"45","GL Entry\\u0001Range 3":"60","GL Entry\\u0001Range 4":"90"}',
|
||||||
'module': u'Accounts',
|
'module': u'Accounts',
|
||||||
'name': '__common__',
|
u'name': u'__common__',
|
||||||
|
'page_len': 50,
|
||||||
'sort_by': u'`tabGL Entry`.`name`',
|
'sort_by': u'`tabGL Entry`.`name`',
|
||||||
'sort_order': u'DESC',
|
'sort_order': u'DESC',
|
||||||
'standard': u'Yes'
|
'standard': u'Yes'
|
||||||
@ -26,7 +27,7 @@
|
|||||||
|
|
||||||
# Search Criteria, accounts_payable
|
# Search Criteria, accounts_payable
|
||||||
{
|
{
|
||||||
'doctype': 'Search Criteria',
|
u'doctype': u'Search Criteria',
|
||||||
'name': u'accounts_payable'
|
u'name': u'accounts_payable'
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -22,7 +22,7 @@ report.customize_filters = function() {
|
|||||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
||||||
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
|
this.filter_fields_dict['GL Entry'+FILTER_SEP +'Account'].df.filter_hide = 0;
|
||||||
|
|
||||||
this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Transaction Date'+NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Sales Invoice', report_default:'Aging Date'});
|
this.add_filter({fieldname:'aging_based_on', label:'Aging Based On', fieldtype:'Select', options:NEWLINE+'Aging Date'+NEWLINE+'Due Date',ignore : 1, parent:'Sales Invoice', report_default:'Aging Date'});
|
||||||
this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
this.add_filter({fieldname:'range_1', label:'Range 1', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
||||||
this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
this.add_filter({fieldname:'range_2', label:'Range 2', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
||||||
this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
this.add_filter({fieldname:'range_3', label:'Range 3', fieldtype:'Data', ignore : 1, parent:'GL Entry'});
|
||||||
@ -34,5 +34,3 @@ report.customize_filters = function() {
|
|||||||
|
|
||||||
this.dt.set_no_limit(1);
|
this.dt.set_no_limit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.mytabs.items['Select Columns'].hide()
|
|
@ -39,8 +39,7 @@ for r in range(len(range_list)-1):
|
|||||||
|
|
||||||
# Add columns
|
# Add columns
|
||||||
# -----------
|
# -----------
|
||||||
data = [['Transaction Date','Date','80px',''],
|
data = [['Aging Date','Date','80px',''],
|
||||||
['Aging Date','Date','80px',''],
|
|
||||||
['Account','Data','120px',''],
|
['Account','Data','120px',''],
|
||||||
['Against Voucher Type','Data','120px',''],
|
['Against Voucher Type','Data','120px',''],
|
||||||
['Against Voucher','Data','120px',''],
|
['Against Voucher','Data','120px',''],
|
||||||
@ -77,6 +76,7 @@ if len(res) > 2000 and from_export == 0:
|
|||||||
# main loop starts here
|
# main loop starts here
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
|
from webnotes.utils import nowdate
|
||||||
out = []
|
out = []
|
||||||
total_opening_amt,total_outstanding_amt = 0,0
|
total_opening_amt,total_outstanding_amt = 0,0
|
||||||
for r in res:
|
for r in res:
|
||||||
@ -118,6 +118,8 @@ for r in res:
|
|||||||
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above = 0
|
val_l1 = val_l2 = val_l3 = val_l4 = val_l5_above = 0
|
||||||
diff = 0
|
diff = 0
|
||||||
if r[col_idx[aging_based_on]]:
|
if r[col_idx[aging_based_on]]:
|
||||||
|
if getdate(to_date) > getdate(nowdate()):
|
||||||
|
to_date = nowdate()
|
||||||
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
diff = (getdate(to_date) - getdate(r[col_idx[aging_based_on]])).days
|
||||||
if diff < cint(filter_values['range_1']):
|
if diff < cint(filter_values['range_1']):
|
||||||
val_l1 = outstanding_amt
|
val_l1 = outstanding_amt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SELECT `tabGL Entry`.`transaction_date`,`tabGL Entry`.`aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.remarks
|
SELECT `tabGL Entry`.`aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.remarks
|
||||||
FROM `tabGL Entry`,`tabAccount`
|
FROM `tabGL Entry`,`tabAccount`
|
||||||
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
|
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
|
||||||
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
|
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
|
||||||
|
Loading…
Reference in New Issue
Block a user