From e1c0244de7d919a750ef6571596aa5e9867ea84f Mon Sep 17 00:00:00 2001 From: tetragon Date: Tue, 9 Oct 2007 14:55:27 +0000 Subject: Add links to account GL reports in the balance sheet git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1726 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/RP.pm | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/RP.pm b/LedgerSMB/RP.pm index 922de64c..c46ee788 100644 --- a/LedgerSMB/RP.pm +++ b/LedgerSMB/RP.pm @@ -539,15 +539,18 @@ sub balance_sheet { foreach $key ( sort keys %{ $form->{$category} } ) { - $str = ( $form->{l_heading} ) ? $form->{padding} : ""; +## $str = ( $form->{l_heading} ) ? $form->{padding} : ""; + $str = ""; if ( $form->{$category}{$key}{charttype} eq "A" ) { $str .= ( $form->{l_accno} ) ? "$form->{$category}{$key}{accno} - $form->{$category}{$key}{description}" : "$form->{$category}{$key}{description}"; + $str = {account => $form->{$category}{$key}{accno}, text => $str}; + $str->{gifi_account} = 1 if $form->{accounttype} eq 'gifi'; } - if ( $form->{$category}{$key}{charttype} eq "H" ) { + elsif ( $form->{$category}{$key}{charttype} eq "H" ) { if ( $account{$category}{subtotal} && $form->{l_subtotal} ) { @@ -555,7 +558,10 @@ sub balance_sheet { $dash = "- "; push( @{ $form->{"$account{$category}{label}_account"} }, -"$str$form->{bold}$account{$category}{subdescription}$form->{endbold}" + { + text => "$account{$category}{subdescription}", + subtotal => 1 + }, ); push( @{ $form->{"$account{$category}{label}_this_period"} }, @@ -585,8 +591,10 @@ sub balance_sheet { } } - $str = -"$form->{bold}$form->{$category}{$key}{description}$form->{endbold}"; + $str = { + text => "$form->{$category}{$key}{description}", + heading => 1 + }; $account{$category}{subthis} = $form->{$category}{$key}{this}; $account{$category}{sublast} = $form->{$category}{$key}{last}; @@ -637,11 +645,14 @@ sub balance_sheet { } } - $str = ( $form->{l_heading} ) ? $form->{padding} : ""; + #$str = ( $form->{l_heading} ) ? $form->{padding} : ""; + $str = ""; if ( $account{$category}{subtotal} && $form->{l_subtotal} ) { push( - @{ $form->{"$account{$category}{label}_account"} }, -"$str$form->{bold}$account{$category}{subdescription}$form->{endbold}" + @{ $form->{"$account{$category}{label}_account"} }, { + text => "$account{$category}{subdescription}", + subtotal => 1, + }, ); push( @{ $form->{"$account{$category}{label}_this_period"} }, -- cgit v1.2.3