WIP 2024-07-22
This commit is contained in:
@@ -48,6 +48,7 @@ class ContractTrigger_Finished {
|
||||
$now->setTime(2,0,0);
|
||||
|
||||
$cancel_date = clone($now);
|
||||
$cancel_date->modify("-1 day");
|
||||
$cancel_date->setTime(23,59,59);
|
||||
|
||||
$origin = $link->origin;
|
||||
@@ -74,7 +75,7 @@ class ContractTrigger_Finished {
|
||||
// verlinkten Contract kündigen (wenn nicht schon gekündigt)
|
||||
if ($old_link->change_action == "cancel" && !$old_link->origin->cancel_date) {
|
||||
$old_link->origin->update([
|
||||
'cancel_date' => $now->getTimestamp(),
|
||||
'cancel_date' => $cancel_date->getTimestamp(),
|
||||
'cancel_date_by' => $this->me->id,
|
||||
'edit_by' => $this->me->id
|
||||
]);
|
||||
@@ -100,7 +101,7 @@ class ContractTrigger_Finished {
|
||||
// verlinkten Contract kündigen (wenn nicht schon gekündigt)
|
||||
if ($old_link->change_action == "cancel" && !$old_link->contract->cancel_date) {
|
||||
$old_link->contract->update([
|
||||
'cancel_date' => $now->getTimestamp(),
|
||||
'cancel_date' => $cancel_date->getTimestamp(),
|
||||
'cancel_date_by' => $this->me->id,
|
||||
'edit_by' => $this->me->id
|
||||
]);
|
||||
@@ -126,7 +127,7 @@ class ContractTrigger_Finished {
|
||||
// Alte Gutschrift kündigen und neue anlegen
|
||||
//var_dump($old_credit->contract);
|
||||
$old_credit->contract->update([
|
||||
'cancel_date' => $now->getTimestamp(),
|
||||
'cancel_date' => $cancel_date->getTimestamp(),
|
||||
'cancel_date_by' => $this->me->id,
|
||||
'edit_by' => $this->me->id
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user