X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fgl_trial_balance.php;h=f14d833a6fc66d69fd689d002f16f2b386778f02;hb=26a68fbe32618927202e24d79c8172d5fcf22929;hp=0dd1dcfa0327ef8f740b374d8c0acf89b2d70724;hpb=8c7f32852c8ac0f8ec2ecb78fe86c3ed71587ba0;p=fa-stable.git diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 0dd1dcfa..f14d833a 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -60,6 +60,7 @@ function gl_inquiry_controls() dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); check_cells(_("No zero values"), 'NoZero', null); check_cells(_("Only balances"), 'Balance', null); + check_cells(_("Group totals only"), 'GroupTotalOnly', null); submit_cells('Show',_("Show"),'','', 'default'); end_row(); end_table(); @@ -100,9 +101,12 @@ function display_trial_balance($type, $typename) //Print Type Title if it has atleast one non-zero account if (!$printtitle) { - start_row("class='inquirybg' style='font-weight:bold'"); - label_cell(_("Group")." - ".$type ." - ".$typename, "colspan=8"); - end_row(); + if (!check_value('GroupTotalOnly')) + { + start_row("class='inquirybg' style='font-weight:bold'"); + label_cell(_("Group")." - ".$type ." - ".$typename, "colspan=8"); + end_row(); + } $printtitle = 1; } @@ -120,27 +124,35 @@ function display_trial_balance($type, $typename) $tot = get_balance($account["account_code"], $_POST['Dimension'], $_POST['Dimension2'], $begin, $_POST['TransToDate'], false, true); if (check_value("NoZero") && !$prev['balance'] && !$curr['balance'] && !$tot['balance']) continue; - alt_table_row_color($k); + if (!check_value('GroupTotalOnly')) + { + alt_table_row_color($k); - $url = "" . $account["account_code"] . ""; + $url = "" . $account["account_code"] . ""; - label_cell($url); - label_cell($account["account_name"]); + label_cell($url); + label_cell($account["account_name"]); + } if (check_value('Balance')) { - display_debit_or_credit_cells($prev['balance']); - display_debit_or_credit_cells($curr['balance']); - display_debit_or_credit_cells($tot['balance']); - + if (!check_value('GroupTotalOnly')) + { + display_debit_or_credit_cells($prev['balance']); + display_debit_or_credit_cells($curr['balance']); + display_debit_or_credit_cells($tot['balance']); + } } else { - amount_cell($prev['debit']-$offset); - amount_cell($prev['credit']-$offset); - amount_cell($curr['debit']); - amount_cell($curr['credit']); - amount_cell($tot['debit']-$offset); - amount_cell($tot['credit']-$offset); + if (!check_value('GroupTotalOnly')) + { + amount_cell($prev['debit']-$offset); + amount_cell($prev['credit']-$offset); + amount_cell($curr['debit']); + amount_cell($curr['credit']); + amount_cell($tot['debit']-$offset); + amount_cell($tot['credit']-$offset); + } $pdeb += $prev['debit']; $pcre += $prev['credit']; $cdeb += $curr['debit']; @@ -171,7 +183,11 @@ function display_trial_balance($type, $typename) } start_row("class='inquirybg' style='font-weight:bold'"); - label_cell(_("Total") ." - ".$typename, "colspan=2"); + if (!check_value('GroupTotalOnly')) + label_cell(_("Total") ." - ".$typename, "colspan=2"); + else + label_cell(" - ".$typename, "colspan=2"); + if (!check_value('Balance')) {