- if ($form->{accno} || $form->{gifi_accno}) {
- @columns = grep !/(accno|gifi_accno)/, @columns;
- push @columns, "balance";
- $form->{l_balance} = "Y";
-
- }
-
- $form->{l_credit_accno} = "Y";
- $form->{l_debit_accno} = "Y";
- $form->{l_credit_tax} = "Y";
- $form->{l_debit_tax} = "Y";
- $form->{l_credit_tax_accno} = "Y";
- $form->{l_debit_tax_accno} = "Y";
- $form->{l_accno} = "N";
- foreach $item (@columns) {
- if ($form->{"l_$item"} eq "Y") {
- push @column_index, $item;
-
- # add column to href and callback
- $callback .= "&l_$item=Y";
- $href .= "&l_$item=Y";
- }
- }
-
- if ($form->{l_subtotal} eq 'Y') {
- $callback .= "&l_subtotal=Y";
- $href .= "&l_subtotal=Y";
- }
-
- $callback .= "&category=$form->{category}";
- $href .= "&category=$form->{category}";
-
- $column_header{id} =
- "<th><a class=listheading href=$href&sort=id>"
- . $locale->text('ID')
- . "</a></th>";
- $column_header{transdate} =
- "<th><a class=listheading href=$href&sort=transdate>"
- . $locale->text('Date')
- . "</a></th>";
- $column_header{reference} =
- "<th><a class=listheading href=$href&sort=reference>"
- . $locale->text('Reference')
- . "</a></th>";
- $column_header{source} =
- "<th><a class=listheading href=$href&sort=source>"
- . $locale->text('Source')
- . "</a></th>";
- $column_header{description} =
- "<th><a class=listheading href=$href&sort=description>"
- . $locale->text('Description')
- . "</a></th>";
- $column_header{notes} =
- "<th class=listheading>" . $locale->text('Notes') . "</th>";
- $column_header{debit} =
- "<th class=listheading>" . $locale->text('Debit') . "</th>";
- $column_header{debit_accno} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Debit Account')
- . "</a></th>";
- $column_header{credit} =
- "<th class=listheading>" . $locale->text('Credit') . "</th>";
- $column_header{credit_accno} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Credit Account')
- . "</a></th>";
- $column_header{debit_tax} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Debit Tax')
- . "</a></th>";
- $column_header{debit_tax_accno} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Debit Tax Account')
- . "</a></th>";
- $column_header{credit_tax} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Credit Tax')
- . "</a></th>";
- $column_header{credit_tax_accno} =
- "<th><a class=listheading href=$href&sort=accno>"
- . $locale->text('Credit Tax Account')
- . "</a></th>";
- $column_header{gifi_accno} =
- "<th><a class=listheading href=$href&sort=gifi_accno>"
- . $locale->text('GIFI')
- . "</a></th>";
- $column_header{balance} = "<th>" . $locale->text('Balance') . "</th>";