281 lines
14 KiB
PHP
281 lines
14 KiB
PHP
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);"><?=MFAPPNAME_SLUG?></a></li>
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);">Personen & Firmen</a></li>
|
|
<li class="breadcrumb-item active"><?=$address->getCompanyOrName()?> [<?=$address->customer_number?>]</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Personen & Firmen</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<a href="<?=self::getUrl("Address","Index", ['filter' => $filter, 's' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
|
|
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 'filter' => $filter, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-8">
|
|
|
|
<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; ?>
|
|
</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>FIBU</h4></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Ist primäres Verrechnungskonto</th>
|
|
<td><?=($address->fibu_primary_account) ? "<i class='fas fa-check text-success' title='Primäres Verrechnungskonto'></i>" : "<i class='fas fa-xmark text-danger'></i>"?></td>
|
|
</tr><tr>
|
|
<th>Verrechnungskonto</th>
|
|
<td><?=$address->fibu_account_number?></td>
|
|
</tr><tr>
|
|
<th>Lieferantenkonto</th>
|
|
<td><?=$address->fibu_supplier_number?></td>
|
|
</tr><tr>
|
|
<th>Zahlungsziel Lieferant</th>
|
|
<td><?=$address->fibu_supplier_due?></td>
|
|
</tr><tr>
|
|
<th>Lieferant Skontotage</th>
|
|
<td><?=$address->fibu_supplier_skonto?></td>
|
|
</tr><tr>
|
|
<th>Lieferant Skonto %</th>
|
|
<td><?=$address->fibu_supplier_skonto_rate?></td>
|
|
</tr><tr>
|
|
<th>Lieferant Zahlsperre</th>
|
|
<td><?=($address->fibu_supplier_paymentblock) ? "<i class='fas fa-xmark text-danger'></i> Automatische Zahlungen gesperrt" : "Nicht gesperrt"?></td>
|
|
</tr><tr>
|
|
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
|
</tr><tr>
|
|
<th>RTR Code</th>
|
|
<td><?=(is_array($address->attributes) && array_key_exists("rtrcode", $address->attributes)) ? $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>
|
|
</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) ? "[".$contract->matchcode."]" : ""?></a> <span class='text-secondary'><?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : "in Herstellung"?></span></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<?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">
|
|
|
|
<table class="table table-striped table-sm table-bordered table-hover">
|
|
<tr>
|
|
<th>Rolle</th>
|
|
<th>Contract ID</th>
|
|
<th>Produkt</th>
|
|
<th>Matchcode</th>
|
|
<th>Bestelldatum</th>
|
|
<th>Fertigstellung</th>
|
|
<th>Kündigung</th>
|
|
</tr>
|
|
<?php foreach($address->active_contracts as $contract): ?>
|
|
<tr>
|
|
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>">
|
|
<a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>">
|
|
<?php if($contract->owner_id == $address->id): ?>
|
|
Vertragsinhaber
|
|
<?php elseif($contract->billingaddress_id == $address->id): ?>
|
|
Rechnungsempfänger
|
|
<?php endif; ?>
|
|
</a>
|
|
</td>
|
|
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->id?></a></td>
|
|
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?></a></td>
|
|
<td class="contract <?=($contract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->matchcode?></a></td>
|
|
<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>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<a href="<?=self::getUrl("Address","Index", ['filter' => $filter, 's' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
|
|
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 'filter' => $filter, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|