diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-07 21:22:11 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-07 21:22:11 +0000 |
commit | 58c8dd2a4a6f7b4f5e914c3f83ba8b90c52fc732 (patch) | |
tree | f0ecf37616bc977db9998d83a7034b6021bc9d82 /LedgerSMB | |
parent | a817c72bd69c85273951b11814669eb64ef633b5 (diff) |
Scope fixing and a bugfix for $form->add_date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1161 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/Form.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 47b25a6e..423da27d 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1383,6 +1383,9 @@ sub add_date { my $diff = 0; my $spc = $myconfig->{dateformat}; + my $yy; + my $mm; + my $dd; $spc =~ s/\w//g; $spc = substr( $spc, 0, 1 ); @@ -1406,7 +1409,7 @@ sub add_date { else { # ISO - ( $yy, $mm, $dd ) =~ /(....)(..)(..)/; + ( $yy, $mm, $dd ) = ($date =~ /(....)(..)(..)/); } if ( $unit eq 'days' ) { @@ -1423,7 +1426,7 @@ sub add_date { my $whole = int( $diff / 12 ); $yy += $whole; - $mm = ( $diff % 12 ); + $mm = ( $diff % 12 ); $mm = '12' if $mm == 0; $yy-- if $mm == 12; $diff = 0; |