[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2493] trunk
- Subject: SF.net SVN: ledger-smb:[2493] trunk
- From: ..hidden..
- Date: Fri, 13 Mar 2009 20:20:09 +0000
Revision: 2493
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2493&view=rev
Author: einhverfr
Date: 2009-03-13 20:20:09 +0000 (Fri, 13 Mar 2009)
Log Message:
-----------
Account number added to gl header when chart_id is provided
Modified Paths:
--------------
trunk/LedgerSMB/GL.pm
trunk/bin/gl.pl
Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm 2009-03-13 17:29:10 UTC (rev 2492)
+++ trunk/LedgerSMB/GL.pm 2009-03-13 20:20:09 UTC (rev 2493)
@@ -233,10 +233,15 @@
my $sth;
my $var;
my $null;
+ if ($form->{chart_id}){
+ my $sth = $dbh->prepare('SELECT id, accno, description FROM chart WHERE id = ?');
+ $sth->execute($form->{chart_id});
+ ($form->{chart_id}, $form->{chart_accno}, $form->{chart_description}) = $sth->fetchrow_array();
+ }
if ($form->{accno} and !$form->{chart_id}){
- my $sth = $dbh->prepare('SELECT id FROM chart WHERE accno = ?');
+ my $sth = $dbh->prepare('SELECT id, accno, description FROM chart WHERE accno = ?');
$sth->execute($form->{accno});
- ($form->{chart_id}) = $sth->fetchrow_array();
+ ($form->{chart_id}, $form->{chart_accno}, $form->{chart_description}) = $sth->fetchrow_array();
delete $form->{accno};
}
Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl 2009-03-13 17:29:10 UTC (rev 2492)
+++ trunk/bin/gl.pl 2009-03-13 20:20:09 UTC (rev 2493)
@@ -512,9 +512,11 @@
'E' => $locale->text('Expense'),
);
my @options;
-
- $form->{title} = $locale->text('General Ledger');
-
+ if ($form->{chart_accno}){
+ $form->{title} = $locale->text('General Ledger: [_1]', $form->{chart_accno});
+ } else {
+ $form->{title} = $locale->text('General Ledger');
+ }
$ml = ( $form->{category} =~ /(A|E)/ ) ? -1 : 1;
if (defined $form->{category} and $form->{category} ne 'X' ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.