summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LedgerSMB/Form.pm5
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--;