mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Fixes in financial analytics
This commit is contained in:
@@ -206,11 +206,11 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
|
|||||||
if(me.pl_or_bs=='Balance Sheet') {
|
if(me.pl_or_bs=='Balance Sheet') {
|
||||||
$.each(me.data, function(i, ac) {
|
$.each(me.data, function(i, ac) {
|
||||||
if((ac.rgt - ac.lft)==1 && ac.report_type=='Balance Sheet') {
|
if((ac.rgt - ac.lft)==1 && ac.report_type=='Balance Sheet') {
|
||||||
var opening = 0;
|
var opening = flt(ac["opening_dr"]) - flt(ac["opening_cr"]);
|
||||||
//if(opening) throw opening;
|
//if(opening) throw opening;
|
||||||
$.each(me.columns, function(i, col) {
|
$.each(me.columns, function(i, col) {
|
||||||
if(col.formatter==me.currency_formatter) {
|
if(col.formatter==me.currency_formatter) {
|
||||||
if(col.balance_type=="Dr") {
|
if(col.balance_type=="Dr" && !in_list(["opening_dr", "opening_cr"], col.field)) {
|
||||||
opening = opening + flt(ac[col.date + "_dr"]) -
|
opening = opening + flt(ac[col.date + "_dr"]) -
|
||||||
flt(ac[col.date + "_cr"]);
|
flt(ac[col.date + "_cr"]);
|
||||||
me.set_debit_or_credit(ac, col.date, opening);
|
me.set_debit_or_credit(ac, col.date, opening);
|
||||||
|
|||||||
Reference in New Issue
Block a user