Changed format for ticket system Cancel Notifcation
This commit is contained in:
@@ -24,16 +24,26 @@ e-Mail: <?=$owner->email?>
|
||||
|
||||
Kundennummer: <?=$owner->customer_number?>
|
||||
|
||||
Kunde: <?=str_replace(["\n", "\r"], "", $owner->getCompanyOrName())?>
|
||||
|
||||
<?=$url_prefix?><?=self::getUrl("Address", "view", ["id" => $owner->id])?>
|
||||
|
||||
|
||||
### Gekündigte Produkte:
|
||||
|
||||
Kunde: [<?=$url_prefix?><?=self::getUrl("Address", "view", ["id" => $owner->id])?>](<?=str_replace(["\n", "\r"], "", $owner->getCompanyOrName())?>)
|
||||
<?=date("d.m.Y", $contract->cancel_date)?>: <?=$contract->product_name?>
|
||||
|
||||
<?=$contract->matchcode?>
|
||||
|
||||
<?=($url_prefix)?><?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>
|
||||
|
||||
| Produkt | Matchcode | Kündigungsdatum |
|
||||
------------------------------------------
|
||||
[<?=($url_prefix)?><?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>](<?=$contract->product_name?>) | <?=$contract->matchcode?> | <?=date("d.m.Y", $contract->cancel_date)?> |
|
||||
|
||||
<?php foreach($linked_contracts as $link): ?>
|
||||
[<?=$url_prefix?><?=self::getUrl("Contract", "view", ["contract_id" => $link->id])?>](<?=$link->product_name?>) | <?=$link->matchcode?> | <?=date("d.m.Y", $link->cancel_date)?> |
|
||||
<?=date("d.m.Y", $link->cancel_date)?>: <?=$link->product_name?>
|
||||
|
||||
<?=$link->matchcode?>
|
||||
|
||||
<?=$url_prefix?><?=self::getUrl("Contract", "view", ["contract_id" => $link->id])?>
|
||||
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -214,12 +214,13 @@ class ContractController extends mfBaseController
|
||||
continue;
|
||||
}
|
||||
|
||||
$linked_contracts[] = $link_contract;
|
||||
|
||||
$link_contract->cancel_date = $cancel_date->getTimestamp();
|
||||
if(!$link_contract->save()) {
|
||||
$this->layout()->setFlash("Fehler beim Speichern von verlinktem Vertrag", "warning");
|
||||
}
|
||||
|
||||
if($link_contract->owner_id != $contract->owner_id) continue;
|
||||
$linked_contracts[] = $link_contract;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user