From: Jan Büren Date: Wed, 14 Nov 2018 08:09:36 +0000 (+0100) Subject: Implementiert #357 Auftrag schliessen, falls einmalig wiederkehrende Rechnung inaktiv X-Git-Tag: release-3.5.4~219 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6253364050628b600aa84c3c47df15afa2a4e7cb;p=kivitendo-erp.git Implementiert #357 Auftrag schliessen, falls einmalig wiederkehrende Rechnung inaktiv Die Generierung einer periodische Rechnung mit der Periode einmalig sollte auch den Quell-Auftrag schliessen. --- diff --git a/SL/DB/PeriodicInvoicesConfig.pm b/SL/DB/PeriodicInvoicesConfig.pm index 081be3577..dd70206e2 100644 --- a/SL/DB/PeriodicInvoicesConfig.pm +++ b/SL/DB/PeriodicInvoicesConfig.pm @@ -141,6 +141,7 @@ sub disable_one_time_config { if ($self->periodicity eq 'o') { _log_msg("setting inactive\n"); $self->active(0); + $self->order->update_attributes(closed => 1); $self->save; return $self->order->ordnumber; } @@ -256,7 +257,9 @@ the last invoice in that particular order value cycle. =item C Sets the state of the periodic_invoices_configs to inactive -(active => false) if the periodicity is (one time). +(active => false) and closes the source order (closed => true) +if the periodicity is (one time). + Returns undef if the periodicity is not 'one time' otherwise the order number of the deactivated periodic order.