X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=gl%2Finquiry%2Fbalance_sheet.php;h=01dc3c1e328c1c9db42636bfb9352b2131a15b18;hb=50339ff6ffe3cbb2a6237cc6a922a98481c7a41f;hp=eafb4855c020dab506f1d5d45bb82b9b41faef1d;hpb=46c5f7a65a7659a44ae8254c63152074363d3987;p=fa-stable.git
diff --git a/gl/inquiry/balance_sheet.php b/gl/inquiry/balance_sheet.php
index eafb4855..01dc3c1e 100644
--- a/gl/inquiry/balance_sheet.php
+++ b/gl/inquiry/balance_sheet.php
@@ -57,28 +57,27 @@ function display_type ($type, $typename, $from, $to, $convert, $dimension, $dime
//Get Accounts directly under this group/type
$result = get_gl_accounts(null, null, $type);
- while ($account=db_fetch($result))
- {
- $prev_balance = get_gl_balance_from_to("", $from, $account["account_code"], $dimension, $dimension2);
- $curr_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2);
- if (!$prev_balance && !$curr_balance)
- continue;
-
- if ($drilldown && $levelptr == 0)
- {
- $url = "" . $account['account_code']
- ." ". $account['account_name'] ."";
-
- start_row("class='stockmankobg'");
- label_cell($url);
- amount_cell(($curr_balance + $prev_balance) * $convert);
- end_row();
- }
-
- $acctstotal += $curr_balance + $prev_balance;
- }
+ while ($account=db_fetch($result))
+ {
+ $net_balance = get_gl_trans_from_to("", $to, $account["account_code"], $dimension, $dimension2);
+ if (!$net_balance)
+ continue;
+
+ if ($drilldown && $levelptr == 0)
+ {
+ $url = "" . $account['account_code']
+ ." ". $account['account_name'] ."";
+
+ start_row("class='stockmankobg'");
+ label_cell($url);
+ amount_cell(($net_balance) * $convert);
+ end_row();
+ }
+
+ $acctstotal += $net_balance;
+ }
$levelptr = 1;
@@ -109,7 +108,7 @@ function display_type ($type, $typename, $from, $to, $convert, $dimension, $dime
{
$url = "" . $typename ."";
+ . "&AccGrp=" . $type ."'>" . $type . " " . $typename ."";
alt_table_row_color($k);
label_cell($url);
@@ -192,7 +191,7 @@ function display_balance_sheet()
{
$url = "" . $accounttype['name'] ."";
+ . "&AccGrp=" . $accounttype['id'] ."'>" . $accounttype['id']." ".$accounttype['name'] ."";
alt_table_row_color($k);
label_cell($url);
amount_cell($TypeTotal * $convert);
@@ -250,7 +249,7 @@ function display_balance_sheet()
$convert = get_class_type_convert($class["ctype"]);
//Print Class Name
- table_section_title(get_account_type_name($_POST["AccGrp"]));
+ table_section_title($_POST["AccGrp"]. " " . get_account_type_name($_POST["AccGrp"]));
$classclose = display_type($accounttype["id"], $accounttype["name"], $from, $to,
$convert, $dimension, $dimension2, $drilldown, $path_to_root);