Contract WIP
This commit is contained in:
@@ -27,163 +27,187 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h3 class="text-center mb-3"><?=$address->getCompanyOrName()?><?=($address->customer_number) ? " [".$address->customer_number."]" : ""?></h3>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
|
||||
<table class="table table-sm table-striped view-table">
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<td><?=$address->customer_number?></td>
|
||||
</tr><tr>
|
||||
<th>Firmenname</th>
|
||||
<td><?=nl2br($address->company)?></td>
|
||||
</tr><tr>
|
||||
<th>Vorname</th>
|
||||
<td><?=$address->firstname?></td>
|
||||
</tr><tr>
|
||||
<th>Nachname</th>
|
||||
<td><?=$address->lastname?></td>
|
||||
</tr><tr>
|
||||
<th>Straße</th>
|
||||
<td><?=$address->street?></td>
|
||||
</tr><tr>
|
||||
<th>PLZ / Ort</th>
|
||||
<td><?=$address->zip?> <?=$address->city?></td>
|
||||
</tr><tr>
|
||||
<th>Land</th>
|
||||
<td><?=$address->country?></td>
|
||||
</tr><tr>
|
||||
<th>Telefon</th>
|
||||
<td><?=$address->phone?></td>
|
||||
</tr><tr>
|
||||
<th>Mobil</th>
|
||||
<td><?=$address->mobile?></td>
|
||||
</tr><tr>
|
||||
<th>Fax</th>
|
||||
<td><?=$address->fax?></td>
|
||||
</tr><tr>
|
||||
<th>Email</th>
|
||||
<td><?=$address->email?></td>
|
||||
</tr><tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<th>Service PIN</th>
|
||||
<td><?=$address->spin?></td>
|
||||
</tr><tr>
|
||||
<th>Einwilligungen</th>
|
||||
<td>
|
||||
<p><i class="mr-1 fas <?=($address->allow_contact) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i> Informationen per Post/Email/Telefon</p>
|
||||
<p><i class="mr-1 fas <?=($address->allow_spin) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i>Auskunft mit Service PIN</p>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Rollen</th>
|
||||
<td>
|
||||
<?php if(is_array($address->types) && count($address->types)): ?>
|
||||
<?php foreach(TT_ROLES as $role): ?>
|
||||
<ul>
|
||||
<?php if(array_key_exists($role, $address->types)): ?>
|
||||
<li><?=__($role)?></li>
|
||||
<div class="card border-top-primary">
|
||||
<div class="card-body">
|
||||
<h3 class="text-center mb-3"><?=$address->getCompanyOrName()?><?=($address->customer_number) ? " [".$address->customer_number."]" : ""?></h3>
|
||||
|
||||
<table class="table table-sm table-striped view-table">
|
||||
<tr>
|
||||
<th>Kundennummer</th>
|
||||
<td><?=$address->customer_number?></td>
|
||||
</tr><tr>
|
||||
<th>Firmenname</th>
|
||||
<td><?=nl2br($address->company)?></td>
|
||||
</tr><tr>
|
||||
<th>Vorname</th>
|
||||
<td><?=$address->firstname?></td>
|
||||
</tr><tr>
|
||||
<th>Nachname</th>
|
||||
<td><?=$address->lastname?></td>
|
||||
</tr><tr>
|
||||
<th>Straße</th>
|
||||
<td><?=$address->street?></td>
|
||||
</tr><tr>
|
||||
<th>PLZ / Ort</th>
|
||||
<td><?=$address->zip?> <?=$address->city?></td>
|
||||
</tr><tr>
|
||||
<th>Land</th>
|
||||
<td><?=$address->country?></td>
|
||||
</tr><tr>
|
||||
<th>Telefon</th>
|
||||
<td><?=$address->phone?></td>
|
||||
</tr><tr>
|
||||
<th>Mobil</th>
|
||||
<td><?=$address->mobile?></td>
|
||||
</tr><tr>
|
||||
<th>Fax</th>
|
||||
<td><?=$address->fax?></td>
|
||||
</tr><tr>
|
||||
<th>Email</th>
|
||||
<td><?=$address->email?></td>
|
||||
</tr><tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<th>Service PIN</th>
|
||||
<td><?=$address->spin?></td>
|
||||
</tr><tr>
|
||||
<th>Einwilligungen</th>
|
||||
<td>
|
||||
<p><i class="mr-1 fas <?=($address->allow_contact) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i> Informationen per Post/Email/Telefon</p>
|
||||
<p><i class="mr-1 fas <?=($address->allow_spin) ? "fa-check text-success" : "fa-xmark-large text-danger"?>"></i>Auskunft mit Service PIN</p>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Rollen</th>
|
||||
<td>
|
||||
<?php if(is_array($address->types) && count($address->types)): ?>
|
||||
<?php foreach(TT_ROLES as $role): ?>
|
||||
<ul>
|
||||
<?php if(array_key_exists($role, $address->types)): ?>
|
||||
<li><?=__($role)?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Verrechnungsdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>UID</th>
|
||||
<td><?=$address->uid?></td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsart</th>
|
||||
<td><?=($address->billing_type == "sepa") ? "SEPA Bankeinzug" : "Rechnung"?></td>
|
||||
</tr><tr>
|
||||
<th>Rechnungsversand</th>
|
||||
<td><?=($address->billing_delivery == "paper") ? "POST" : "Email"?></td>
|
||||
</tr><tr>
|
||||
<th>Kreditinstitut</th>
|
||||
<td><?=$address->bank_account_bank?></td>
|
||||
</tr><tr>
|
||||
<th>Kontoinhaber</th>
|
||||
<td><?=$address->bank_account_owner?></td>
|
||||
</tr><tr>
|
||||
<th>IBAN</th>
|
||||
<td><?=$address->bank_account_iban?></td>
|
||||
</tr><tr>
|
||||
<th>BIC</th>
|
||||
<td><?=$address->bank_account_bic?></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>RTR Code</th>
|
||||
<td><?=$address->attributes['rtrcode']->value?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Verknüpfungen</h4>
|
||||
<?php if(is_array($address->links) && count($address->links)): ?>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table table-striped table-sm table-bordered">
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Firma</th>
|
||||
<th>Name</th>
|
||||
<th>Telefon</th>
|
||||
<th>Mobil</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->links)): ?>
|
||||
<?php foreach($address->links[$type] as $link): ?>
|
||||
<tr>
|
||||
<td class="font-weight-bold"><?=__($type)?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->company?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->getFullName()?></a></td>
|
||||
<td><?=$link->address->phone?></td>
|
||||
<td><?=$link->address->mobile?></td>
|
||||
<td><?=$link->address->email?></td>
|
||||
<td>
|
||||
<a class="mr-2" href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Verrechnungsdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>UID</th>
|
||||
<td><?=$address->uid?></td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsart</th>
|
||||
<td><?=($address->billing_type == "sepa") ? "SEPA Bankeinzug" : "Rechnung"?></td>
|
||||
</tr><tr>
|
||||
<th>Rechnungsversand</th>
|
||||
<td><?=($address->billing_delivery == "paper") ? "POST" : "Email"?></td>
|
||||
</tr><tr>
|
||||
<th>Kreditinstitut</th>
|
||||
<td><?=$address->bank_account_bank?></td>
|
||||
</tr><tr>
|
||||
<th>Kontoinhaber</th>
|
||||
<td><?=$address->bank_account_owner?></td>
|
||||
</tr><tr>
|
||||
<th>IBAN</th>
|
||||
<td><?=$address->bank_account_iban?></td>
|
||||
</tr><tr>
|
||||
<th>BIC</th>
|
||||
<td><?=$address->bank_account_bic?></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>RTR Code</th>
|
||||
<td><?=$address->attributes['rtrcode']->value?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4>Verknüpfungen</h4>
|
||||
<?php if(is_array($address->links) && count($address->links)): ?>
|
||||
<div class="card border-top-warning">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table table-striped table-sm table-bordered">
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Firma</th>
|
||||
<th>Name</th>
|
||||
<th>Telefon</th>
|
||||
<th>Mobil</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->links)): ?>
|
||||
<?php foreach($address->links[$type] as $link): ?>
|
||||
<tr>
|
||||
<td class="font-weight-bold"><?=__($type)?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->company?></a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><?=$link->address->getFullName()?></a></td>
|
||||
<td><?=$link->address->phone?></td>
|
||||
<td><?=$link->address->mobile?></td>
|
||||
<td><?=$link->address->email?></td>
|
||||
<td>
|
||||
<a class="mr-2" href="<?=self::getUrl("Address", "view", ["id" => $link->address_id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(is_array($address->linked_as) && count($address->linked_as)): ?>
|
||||
<h4>Verknüpft als</h4>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table-sm table-striped">
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->linked_as)): ?>
|
||||
<?php foreach($address->linked_as[$type] as $link): ?>
|
||||
<tr>
|
||||
<td><strong><?=__($type)?></strong> für:</td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ['id' => $link->origin_address_id])?>"><?=$link->origin->getCompanyOrName()?><?=($link->origin->customer_number) ? " [".$link->origin->customer_number."]" : ""?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(is_array($address->linked_as) && count($address->linked_as)): ?>
|
||||
<h4>Verknüpft als</h4>
|
||||
<div class="card">
|
||||
<div class="card-body" id="link-container">
|
||||
<table class="table-sm table-striped">
|
||||
<?php foreach(TT_ADDRESS_LINK_TYPES as $type): ?>
|
||||
<?php if(array_key_exists($type, $address->linked_as)): ?>
|
||||
<?php foreach($address->linked_as[$type] as $link): ?>
|
||||
<tr>
|
||||
<td><strong><?=__($type)?></strong> für:</td>
|
||||
<td><a href="<?=self::getUrl("Address", "view", ['id' => $link->origin_address_id])?>"><?=$link->origin->getCompanyOrName()?><?=($link->origin->customer_number) ? " [".$link->origin->customer_number."]" : ""?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
|
||||
<div class="card border-top-success">
|
||||
<div class="card-header">
|
||||
Aktive Produkte (Contracts)
|
||||
</div>
|
||||
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach($address->contracts as $contract): ?>
|
||||
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> [<?=$contract->matchcode?>]</a> (<?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : ""?>)</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
|
||||
<div class="card">
|
||||
<?php if(is_array($address->active_contracts) && count($address->active_contracts)): ?>
|
||||
<div class="card border-top-success">
|
||||
<div class="card-header">
|
||||
Verträge
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h4>Verträge</h4>
|
||||
|
||||
<table class="table table-striped table-sm table-bordered table-hover">
|
||||
<tr>
|
||||
@@ -194,9 +218,8 @@
|
||||
<th>Bestelldatum</th>
|
||||
<th>Fertigstellung</th>
|
||||
<th>Kündigung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($address->contracts as $contract): ?>
|
||||
<?php foreach($address->active_contracts as $contract): ?>
|
||||
<tr>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>">
|
||||
<a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>">
|
||||
@@ -213,9 +236,7 @@
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->order_date) ? date('d.m.Y', $contract->order_date) : ""?></td>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->finish_date) ? date('d.m.Y', $contract->finish_date) : ""?></td>
|
||||
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><?=($contract->cancel_date) ? date('d.m.Y', $contract->cancel_date) : ""?></td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Contract", "deleteLink", ["link_id" => $contract->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"><i class="fas fa-xmark-large"></i></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user