[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1156] trunk/LedgerSMB/Form.pm
- Subject: SF.net SVN: ledger-smb: [1156] trunk/LedgerSMB/Form.pm
- From: ..hidden..
- Date: Mon, 07 May 2007 12:41:20 -0700
Revision: 1156
http://svn.sourceforge.net/ledger-smb/?rev=1156&view=rev
Author: tetragon
Date: 2007-05-07 12:40:00 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Fixing behaviour of 'months' and 'years' units in add_date
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2007-05-07 18:53:29 UTC (rev 1155)
+++ trunk/LedgerSMB/Form.pm 2007-05-07 19:40:00 UTC (rev 1156)
@@ -1416,12 +1416,13 @@
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--;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.