diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index b36f838f..8ba7eaed 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1423,12 +1423,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--; |