diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-07 19:40:00 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-07 19:40:00 +0000 |
commit | 81006c45d65087f078d6706831dd4b307b226e25 (patch) | |
tree | b69faf138820384f13823fea54e1016e8fc9dfce /LedgerSMB/Form.pm | |
parent | 6af6fc6b58e0aadba62dbd350b1135df737829db (diff) |
Fixing behaviour of 'months' and 'years' units in add_date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1156 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Form.pm')
-rw-r--r-- | LedgerSMB/Form.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index d50fd49f..bfdf7d7f 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1416,12 +1416,13 @@ sub add_date { my $whole = int( $diff / 12 ); $yy += $whole; - $mm = ( $diff % 12 ) + 1; + $mm = ( $diff % 12 ); + $mm = '12' if $mm == 0; $diff = 0; } if ( $unit eq 'years' ) { - $yy++; + $yy += $repeat; } $mm--; |