X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/efeb61e04032ded4fdc9719a4bf5a031c4a042d1..f1d33e8c42f2da428be80a6909335cf88689c1b3:/SL/DB/PeriodicInvoicesConfig.pm diff --git a/SL/DB/PeriodicInvoicesConfig.pm b/SL/DB/PeriodicInvoicesConfig.pm index 14fa5786a..081be3577 100644 --- a/SL/DB/PeriodicInvoicesConfig.pm +++ b/SL/DB/PeriodicInvoicesConfig.pm @@ -96,6 +96,10 @@ sub calculate_invoice_dates { $start_date = max($start_date, $params{start_date}) if $params{start_date}; $end_date = min($end_date, $params{end_date}) if $params{end_date}; + if ($self->periodicity eq 'o') { + return ($cur_date >= $start_date) && ($cur_date <= $end_date) ? ($cur_date) : (); + } + my @dates; while ($cur_date <= $end_date) { @@ -255,6 +259,7 @@ Sets the state of the periodic_invoices_configs to inactive (active => false) if the periodicity is (one time). Returns undef if the periodicity is not 'one time' otherwise the order number of the deactivated periodic order. + =back =head1 BUGS