Merge branch 'navupdate' of github.com:webnotes/erpnext into navupdate
Conflicts: version.num
This commit is contained in:
commit
48ca42beb9
@ -152,11 +152,15 @@ class DocType:
|
||||
amt = flt(self.doc.debit) - flt(self.doc.credit)
|
||||
if det[0][2] == 'Credit': amt = -amt
|
||||
|
||||
debit = cancel and -1 * flt(self.doc.credit) or flt(self.doc.debit)
|
||||
credit = cancel and -1 * flt(self.doc.debit) or flt(self.doc.credit)
|
||||
|
||||
if cancel:
|
||||
debit = -1 * flt(self.doc.credit)
|
||||
credit = -1 * flt(self.doc.debit)
|
||||
else:
|
||||
debit = flt(self.doc.debit)
|
||||
credit = flt(self.doc.credit)
|
||||
|
||||
self.create_new_balances(det)
|
||||
|
||||
|
||||
# build dict
|
||||
p = {
|
||||
'debit': self.doc.is_opening=='No' and flt(debit) or 0
|
||||
@ -197,7 +201,7 @@ class DocType:
|
||||
and ifnull(a.is_pl_account, 'No') = 'No'
|
||||
and ab.period = ab.fiscal_year
|
||||
and fy.name = ab.fiscal_year
|
||||
and fy.year_start_date > %(posting_date)s""" % p)
|
||||
and fy.year_start_date > '%(posting_date)s'""" % p)
|
||||
|
||||
# Update balance for all period for future years
|
||||
sql("""update `tabAccount Balance` ab, `tabAccount` a, `tabFiscal Year` fy
|
||||
@ -209,7 +213,7 @@ class DocType:
|
||||
and ab.account = a.name
|
||||
and ifnull(a.is_pl_account, 'No') = 'No'
|
||||
and fy.name = ab.fiscal_year
|
||||
and fy.year_start_date > %(posting_date)s""" % p)
|
||||
and fy.year_start_date > '%(posting_date)s'""" % p)
|
||||
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
$(wrapper).find('[href*="List/"]').each(function() {
|
||||
var href = $(this).attr('href');
|
||||
var dt = href.split('/')[1];
|
||||
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
@ -41,7 +41,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
// reports
|
||||
$(wrapper).find('[data-doctype]').each(function() {
|
||||
var dt = $(this).attr('data-doctype');
|
||||
if(wn.boot.profile.can_read.indexOf(dt)==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(dt)==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
@ -51,7 +51,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
$(wrapper).find('[href*="Form/"]').each(function() {
|
||||
var href = $(this).attr('href');
|
||||
var dt = href.split('/')[1];
|
||||
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
|
@ -2253,7 +2253,7 @@ $(document).bind('startup',function(){erpnext.startup.start();});
|
||||
* erpnext/startup/js/modules.js
|
||||
*/
|
||||
wn.provide('erpnext.module_page');erpnext.module_page.setup_page=function(module,wrapper){erpnext.module_page.hide_links(wrapper);erpnext.module_page.make_list(module,wrapper);$(wrapper).find("a[title]").tooltip({delay:{show:500,hide:100}});}
|
||||
erpnext.module_page.hide_links=function(wrapper){$(wrapper).find('[href*="List/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[data-doctype]').each(function(){var dt=$(this).attr('data-doctype');if(wn.boot.profile.can_read.indexOf(dt)==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[href*="Form/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});}
|
||||
erpnext.module_page.hide_links=function(wrapper){$(wrapper).find('[href*="List/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[data-doctype]').each(function(){var dt=$(this).attr('data-doctype');if(wn.boot.profile.all_read.indexOf(dt)==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});$(wrapper).find('[href*="Form/"]').each(function(){var href=$(this).attr('href');var dt=href.split('/')[1];if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1){var txt=$(this).text();$(this).parent().css('color','#999').html(txt);}});}
|
||||
erpnext.module_page.make_list=function(module,wrapper){wrapper.list=new wn.widgets.Listing({parent:$(wrapper).find('.reports-list').get(0),method:'utilities.get_report_list',render_row:function(row,data){if(!data.parent_doc_type)data.parent_doc_type=data.doc_type;$(row).html(repl('<a href="#!Report/%(doc_type)s/%(criteria_name)s" \
|
||||
data-doctype="%(parent_doc_type)s">\
|
||||
%(criteria_name)s</a>',data))},args:{module:module},no_refresh:true,callback:function(r){erpnext.module_page.hide_links(wrapper)}});wrapper.list.run();}
|
||||
|
@ -1 +1 @@
|
||||
787
|
||||
787
|
||||
|
Loading…
x
Reference in New Issue
Block a user