Contractqueue: commit to Contract finished

This commit is contained in:
Frank Schubert
2024-04-18 22:58:37 +02:00
parent b9f270fb10
commit e388c6e066
12 changed files with 932 additions and 721 deletions

View File

@@ -29,12 +29,17 @@
<div class="card border-top-success">
<div class="card-body">
<?php if(!$contract->finish_date || $contract->finish_date > date('U')): ?>
<?php if(!$contract->isFinished()): ?>
<h2 class="text-center mb-3 text-secondary">In Herstellung</h2>
<?php endif; ?>
<?php if($contract->isCancelled()): ?>
<h2 class="text-center mb-3 text-danger">GEKÜNDIGT</h2>
<?php endif; ?>
<?php if(str_contains(strtolower($contract->sla->name), "residential")): ?>
<h2 class="text-center mb-3 text-danger">Privatprodukt</h2>
<?php else: ?>
<h2 class="text-center mb-3 text-primary">Businessprodukt</h2>
<?php endif; ?>
<h3 class="text-center mb-3 <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=$contract->product_name?> [<?=$contract->id?>]</h3>
<table class="table table-sm table-striped view-table">
@@ -232,7 +237,13 @@
<td style="white-space: nowrap" class="text-monospace"><?=date("d.m.Y H:i", $j->create)?> (<?=$j->creator?>)</td>
<?php if($j->type == "text" || $j->type == "phone"):?>
<td><i class="fas <?=($j->type == "text") ? "fa-align-left bg-success" : "fa-phone bg-success"?> text-white p-1"></i></td>
<td>
<?php if($j->type == "text"): ?>
<i class="fas fa-align-left bg-warning text-white p-1" title="Kommentar"></i>
<?php else: ?>
<i class="fas fa-phone bg-warning text-white p-1" title="Anruf"></i>
<?php endif; ?>
</td>
<?php if(strlen($j->text) > 120): ?>
<td style="width: 100%" class="pointer" onclick="toggleTruncatedJournalText(<?=$j->id?>)">
<span id="truncated-<?=$j->id?>"><i class="fas fa-caret-right"></i> <?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 120)?></span>
@@ -246,7 +257,7 @@
</td>
<?php elseif($j->type == "file"): ?>
<td><i class="fas fa-download bg-primary text-white p-1"></i></td>
<td><i class="fas fa-download bg-primary text-white p-1" title="Dateiupload"></i></td>
<td style="width: 100%">
<?php if($j->text): ?>
<?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 128)?><br />
@@ -262,7 +273,7 @@
<?php elseif($j->value == "import"): ?>
<em>Vertrag importiert: <?=nl2br(htmlentities($j->text))?>
<?php elseif($j->value == "order"): ?>
<em>Vertrag aus Bestellung #<a href="<?=self::getUrl("Order", "edit", ["id" => $contract->orderproduct->order_id])?>"><?=$contract->orderproduct->order_id?></a> erstellt
<em>Vertrag aus Bestellung <a href="<?=self::getUrl("Order", "edit", ["id" => $contract->orderproduct->order_id])?>">#<?=$contract->orderproduct->order_id?></a> erstellt
<?php endif; ?>
</td>
<?php elseif($j->type == "credit_created"): ?>
@@ -344,7 +355,7 @@
$direction = "von";
$linkcontract = $link->origin;
if($link->type == "credit") {
$direction = "";
$direction = "zu";
//continue;
}
} else {
@@ -356,7 +367,7 @@
$direction = "nach";
}
if($link->type == "credit") {
$direction = "zu";
$direction = "";
//continue;
}