WIP Contract/Billing/Invoice 2024-06-28
This commit is contained in:
@@ -33,8 +33,20 @@ $pagination_entity_name = "Billingrecords";
|
||||
<div class="row">
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_owner">Kundennummer</label>
|
||||
<input type="text" class="form-control" name="filter[customer_number]" id="filter_street" value="<?=(array_key_exists("customer_number", $filter)) ? $filter['customer_number'] : ""?>"/>
|
||||
<label class="form-label" for="filter_customer_number">Kundennummer</label>
|
||||
<input type="text" class="form-control" name="filter[customer_number]" id="filter_customer_number" value="<?=(array_key_exists("customer_number", $filter)) ? $filter['customer_number'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_customer">Kunde</label>
|
||||
<input type="text" class="form-control" name="filter[customer]" id="filter_customer" value="<?=(array_key_exists("customer", $filter)) ? $filter['customer'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_address">Adresse</label>
|
||||
<input type="text" class="form-control" name="filter[address]" id="filter_address" value="<?=(array_key_exists("address", $filter)) ? $filter['address'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_product">Produkt</label>
|
||||
<input type="text" class="form-control" name="filter[product]" id="filter_product" value="<?=(array_key_exists("product", $filter)) ? $filter['product'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_show_credit">Gutschriften</label>
|
||||
@@ -74,7 +86,7 @@ $pagination_entity_name = "Billingrecords";
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-outline-primary mb-2" href="<?=self::getUrl("Billing", "importContracts")?>">
|
||||
<i class="fas fa-fw fa-file-import"></i> Verrechenbare Contracts importieren
|
||||
<i class="fas fa-fw fa-file-import"></i> Aktuell verrechenbare Contracts neu importieren
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,23 +104,24 @@ $pagination_entity_name = "Billingrecords";
|
||||
<th>Vertragsinhaber</th>
|
||||
<th>Rechnungsadresse</th>
|
||||
<th>Kundennummer</th>
|
||||
<th>Einzug</th>
|
||||
<th>Zustellung</th>
|
||||
<th>Bankdaten</th>
|
||||
<th>Produkt</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Preis</th>
|
||||
<th>Preis Setup</th>
|
||||
<th>Zahlung</th>
|
||||
<th>Zustellung</th>
|
||||
<th>Bankdaten</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($billings as $billing): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("Contract", "view", ["contract_id" => $billing->contract_id])?>" target="_blank"><?=$billing->contract_id?></a></td>
|
||||
<td><?=$billing->start_date?> - <?=$billing->end_date?></td>
|
||||
<td><?=$billing->start_date?> -<br /><?=$billing->end_date?></td>
|
||||
<td>
|
||||
<?=$billing->contract->owner->getCompanyOrName()?><br />
|
||||
<?=$billing->contract->owner->street?><br />
|
||||
<?=$billing->contract->owner->zip?> <?=$billing->contract->owner->city?>
|
||||
<?=$billing->contract->owner->zip?> <?=$billing->contract->owner->city?><br />
|
||||
<?=$billing->contract->owner->country->name?>
|
||||
</td>
|
||||
<td>
|
||||
@@ -119,6 +132,17 @@ $pagination_entity_name = "Billingrecords";
|
||||
<?=$billing->country?>
|
||||
</td>
|
||||
<td><?=$billing->customer_number?></td>
|
||||
<td>
|
||||
<?=$billing->product_name?><?=($billing->matchcode) ? " (".$billing->matchcode.")" : ""?>
|
||||
<?php if($billing->product_info): ?>
|
||||
<div class="pl-2">
|
||||
<?=$billing->product_info?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=($billing->amount / (int)$billing->amount > 1) ? number_format($billing->amount,3,",",".") : (int)$billing->amount?></td>
|
||||
<td class="<?=($billing->price < 0) ? "text-danger" : ""?>">€ <?=number_format($billing->price,4,",",".")?></td>
|
||||
<td class="<?=($billing->price_setup < 0) ? "text-danger" : ""?>">€ <?=number_format($billing->price_setup,4,",",".")?></td>
|
||||
<td><?=($billing->billing_type == "sepa") ? "SEPA" : ""?></td>
|
||||
<td><?=($billing->billing_delivery == "email") ? "Email" : "Papier"?></td>
|
||||
<td>
|
||||
@@ -129,17 +153,7 @@ $pagination_entity_name = "Billingrecords";
|
||||
BIC: <?=$billing->bank_account_bic?><br />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$billing->product_name?><?=($billing->matchcode) ? " (".$billing->matchcode.")" : ""?>
|
||||
<?php if($billing->product_info): ?>
|
||||
<div class="pl-2">
|
||||
<?=$billing->product_info?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=number_format($billing->amount,3,",",".")?></td>
|
||||
<td>€ <?=number_format($billing->price,4,",",".")?></td>
|
||||
<td>€ <?=number_format($billing->price_setup,4,",",".")?></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -148,8 +148,9 @@
|
||||
<label class="col-lg-2 col-form-label" for="billing_period">Verrechnungsperiode</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="billing_period" id="billing_period" placeholder="Verrechnungsperiode">
|
||||
<option value="1" <?=($product->billing_period == 1) ? "selected='selected'" : ""?>>Monatlich</option>
|
||||
<option value="12" <?=($product->billing_period == 12) ? "selected='selected'" : ""?>>Jährlich</option>
|
||||
<option value="0" <?=($contract && $contract->billing_period == 0) ? "selected='selected'" : ""?>>Einmalig</option>
|
||||
<option value="1" <?=($contract && $contract->billing_period == 1) ? "selected='selected'" : ""?>>Monatlich</option>
|
||||
<option value="12" <?=($contract && $contract->billing_period == 12) ? "selected='selected'" : ""?>>Jährlich</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -131,15 +131,7 @@
|
||||
<td class="<?=($contract->isCancelled()) ? "canceled" : "" ?> <?=(!$contract->isFinished()) ? "not-finished" : "" ?> <?=($contract->price < 0) ? "text-danger" : ""?>">€ <?=number_format($contract->price,4,",",".")?></td>
|
||||
<td class="<?=($contract->isCancelled()) ? "canceled" : "" ?> <?=(!$contract->isFinished()) ? "not-finished" : "" ?> <?=($contract->price_setup < 0) ? "text-danger" : ""?>">€ <?=number_format($contract->price_setup,4,",",".")?></td>
|
||||
<td class="<?=($contract->isCancelled()) ? "canceled" : "" ?> <?=(!$contract->isFinished()) ? "not-finished" : "" ?>">
|
||||
<?php if($contract->billing_period == 1): ?>
|
||||
monatlich
|
||||
<?php elseif($contract->billing_period == 24): ?>
|
||||
biennal
|
||||
<?php elseif($contract->billing_period == 36): ?>
|
||||
triennal
|
||||
<?php elseif($contract->billing_period): ?>
|
||||
<?=(12 / $contract->billing_period)?>x Jährlich
|
||||
<?php endif; ?>
|
||||
<?=__($contract->billing_period, "billing_period")?>
|
||||
</td>
|
||||
<td class="text-monospace <?=(!$contract->isFinished()) ? "not-finished" : "" ?>"><?=($contract->finish_date) ? date('d.m.Y', $contract->finish_date) : ""?></td>
|
||||
<td class="text-monospace"><?=($contract->cancel_date) ? date('d.m.Y', $contract->cancel_date) : ""?></td>
|
||||
|
||||
@@ -136,12 +136,12 @@
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th>Vertragsinhaber:</th>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner_id])?>"><?=$contract->owner->getCompanyOrName()?> [<?=$contract->owner->customer_number?>]</a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner_id])?>"><?=$contract->owner->getCompanyOrName()?></a> [<?=$contract->owner->customer_number?>]</td>
|
||||
</tr>
|
||||
<?php if($contract->billingaddress_id): ?>
|
||||
<tr>
|
||||
<th>Rechnungsempfänger:</th>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->billingaddress_id])?>"><?=$contract->billingaddress->getCompanyOrName()?> [<?=$contract->billingaddress->customer_number?>]</a></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $contract->billingaddress_id])?>"><?=$contract->billingaddress->getCompanyOrName()?></a> [<?=$contract->billingaddress->customer_number?>]</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
@@ -160,22 +160,42 @@
|
||||
<th>Externes Produkt:</th>
|
||||
<td><?=($contract->product_external) ? "Ja" : "Nein"?></td>
|
||||
</tr><tr>
|
||||
<th>Setup Preis:</th>
|
||||
<td class="<?=($contract->price_setup < 0) ? "text-danger" : ""?>">€ <?=$contract->price_setup?></td>
|
||||
</tr><tr>
|
||||
<th>Preis Periodisch:</th>
|
||||
<td class="<?=($contract->price < 0) ? "text-danger" : ""?>">€ <?=$contract->price?></td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsperiode:</th>
|
||||
<td>
|
||||
<?=($contract->billing_period == 1) ? "Monatlich" : ""?>
|
||||
<?=($contract->billing_period == 12) ? "Jährlich" : ""?>
|
||||
<?=($contract->billing_period == 24) ? "Zweijährlich" : ""?>
|
||||
<?=($contract->billing_period == 36) ? "Dreijährlich" : ""?>
|
||||
</td>
|
||||
<th>Menge:</th>
|
||||
<td><?=(float)number_format($contract->amount, 3, ",", ".")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Preis Periodisch Netto:</th>
|
||||
<td class="<?=($contract->price < 0) ? "text-danger" : ""?>">€ <?=number_format(($contract->amount != 1) ? $contract->price * $contract->amount : $contract->price, 4, ",", ".")?></td>
|
||||
</tr><tr>
|
||||
<th>Preis Periodisch Brutto:</th>
|
||||
<td class="<?=($contract->price < 0) ? "text-danger" : ""?>">€
|
||||
<?php if($contract->price && $contract->vatrate): ?>
|
||||
<?php if($contract->amount != 1): ?>
|
||||
<?=number_format($contract->price + ($contract->price / 100) * $contract->vatrate, 4, ",", ".")?>
|
||||
<?php else: ?>
|
||||
<?=number_format(($contract->price + ($contract->price / 100) * $contract->vatrate) * $contract->amount, 4, ",", ".")?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsperiode:</th>
|
||||
<td>
|
||||
<?=__($contract->billing_period, "billing_period")?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Herstellungskosten:</th>
|
||||
<td class="<?=($contract->price_setup < 0) ? "text-danger" : ""?>">
|
||||
<?php if($contract->price_setup > 0): ?>
|
||||
Netto: € <?=number_format($contract->price_setup, 4, ",", ".")?><?=($contract->amount != 1) ? " (Gesamt: € ".number_format($contract->price_setup * $contract->amount, 4, ",", ".").")" : ""?><br />
|
||||
Brutto: € <?=($contract->price_setup && $contract->vatrate) ? number_format($contract->price_setup + ($contract->price_setup / 100) * $contract->vatrate, 4, ",", ".") : ""?><?=($contract->price_setup && $contract->vatrate && $contract->amount != 1) ? " (Gesamt: € ".number_format(($contract->price_setup + ($contract->price_setup / 100) * $contract->vatrate) * $contract->amount, 4, ",", ".").")" : ""?></td>
|
||||
<?php endif; ?>
|
||||
</tr><tr>
|
||||
<th>Verrechnungsstart Verzögerung:</th>
|
||||
<td><?=$contract->billing_delay?> Monate</td>
|
||||
<td>
|
||||
<?php if($contract->billing_delay): ?>
|
||||
<?=$contract->billing_delay?> Monate
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th></th>
|
||||
<td></td>
|
||||
@@ -205,14 +225,14 @@
|
||||
<td class="text-monospace"><?=date('d.m.Y H:i:s',$contract->edit)?> (<?=$contract->editor->name?>)</td>
|
||||
</tr><tr class="bg-white">
|
||||
<td colspan="2" class="text-center">
|
||||
<a href="<?=self::getUrl("Contractconfig", "edit", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-info">Konfiguration bearbeiten</button></a>
|
||||
<a href="<?=self::getUrl("Contractaccessletter", "view", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-success">Zugangsdaten anzeigen</button></a>
|
||||
<a href="<?=self::getUrl("Contractconfig", "edit", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-info"><i class="far fa-list-dropdown fa-fw"></i> Konfiguration bearbeiten</button></a>
|
||||
<a href="<?=self::getUrl("Contractaccessletter", "view", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-success"><i class="far fa-list-numeric fa-fw"></i> Zugangsdaten anzeigen</button></a>
|
||||
<?php if($contract->finish_date && $contract->finish_date < date('U')): ?>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary">Inhaberwechsel</button>
|
||||
<a href="<?=self::getUrl("Contract", "productchange", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-purple">Produkt-/Standortwechsel</button></a>
|
||||
<a href="<?=self::getUrl("Contract", "cancel", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-danger">Kündigen</button></a>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary"><i class="far fa-people-arrows fa-fw"></i> Inhaberwechsel</button>
|
||||
<a href="<?=self::getUrl("Contract", "productchange", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-purple"><i class="far fa-truck-container fa-fw"></i> Produkt-/Standortwechsel</button></a>
|
||||
<a href="<?=self::getUrl("Contract", "cancel", ["contract_id" => $contract->id])?>"><button type="button" class="btn btn-sm btn-outline-danger"><i class="far fa-axe fa-fw"></i> Kündigen</button></a>
|
||||
<?php else: ?>
|
||||
<a href="<?=self::getUrl("Contract", "finishContract", ['contract_id' => $contract->id])?>" onclick="if(!confirm('Jetzt fertigstellen und in Verrechnung geben?')) return false"><button type="button" class="btn btn-sm btn-success">Fertigstellen</button></a>
|
||||
<a href="<?=self::getUrl("Contract", "finishContract", ['contract_id' => $contract->id])?>" onclick="if(!confirm('Jetzt fertigstellen und in Verrechnung geben?')) return false"><button type="button" class="btn btn-sm btn-success"><i class="far fa-face-confused fa-fw"></i> Fertigstellen</button></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -276,6 +296,11 @@
|
||||
<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 == "contract_finished"): ?>
|
||||
<td><i class="fas fa-flag-checkered text-success pl-1"></i></td>
|
||||
<td style="width: 100%"><em>Vertag fertiggestellt</em>
|
||||
|
||||
</td>
|
||||
<?php elseif($j->type == "credit_created"): ?>
|
||||
<td><i class="far fa-money-bill-simple-wave text-secondary pl-1"></i></td>
|
||||
<td style="width: 100%"><em>Gutschrift-Vertrag <a href="<?=self::getUrl("Contract", "View", ["contract_id" => $j->value])?>"><?=$j->value?></a> erstellt</em>
|
||||
@@ -342,6 +367,8 @@
|
||||
<th>Kunde</th>
|
||||
<th>Contract ID</th>
|
||||
<th>Produkt</th>
|
||||
<th>Preis</th>
|
||||
<th>Preis Setup</th>
|
||||
<th>Bestelldatum</th>
|
||||
<th>Fertigstellung</th>
|
||||
<th>Kündigung</th>
|
||||
@@ -377,12 +404,14 @@
|
||||
<tr>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=__($link->type, "contract")?> <?=($link->type != "link") ? $direction : ""?></td>
|
||||
<td><a href="<?=self::getUrl("Address", "View", ["id" => $linkcontract->owner_id])?>"><?=$linkcontract->owner->getCompanyOrName()?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->id?></a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->id?></a></td>
|
||||
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->product_name?> [<?=$linkcontract->matchcode?>]</a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?>"><?=($linkcontract->cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?>"><a href="<?=self::getUrl("Contract", "View", ["contract_id" => $linkcontract->id])?>"><?=$linkcontract->product_name?> [<?=$linkcontract->matchcode?>]</a></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : "" ?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?> <?=($linkcontract->price < 0) ? "text-danger" : ""?>">€ <?=number_format($linkcontract->price,4,",",".")?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : "" ?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?> <?=($linkcontract->price_setup < 0) ? "text-danger" : ""?>">€ <?=number_format($linkcontract->price_setup,4,",",".")?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?>"><?=($linkcontract->order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?>"><?=($linkcontract->finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?></td>
|
||||
<td class="contract <?=($linkcontract->isCancelled()) ? "canceled" : ""?> <?=(!$linkcontract->isFinished()) ? "not-finished" : "" ?>"><?=($linkcontract->cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?></td>
|
||||
<td>
|
||||
<a href="<?=self::getUrl("Contract", "deleteLink", ["link_id" => $link->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>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod, "Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Billingrecords";
|
||||
?>
|
||||
<?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="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Rechnungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Rechnungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3">Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("Invoice")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_customer_number">Kundennummer</label>
|
||||
<input type="text" class="form-control" name="filter[customer_number]" id="filter_customer_number" value="<?=(array_key_exists("customer_number", $filter)) ? $filter['customer_number'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_customer">Kunde</label>
|
||||
<input type="text" class="form-control" name="filter[customer]" id="filter_customer" value="<?=(array_key_exists("customer", $filter)) ? $filter['customer'] : ""?>"/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_address">Adresse</label>
|
||||
<input type="text" class="form-control" name="filter[address]" id="filter_address" value="<?=(array_key_exists("address", $filter)) ? $filter['address'] : ""?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("Invoice")?>?resetFilter=1">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 class="header-title">Rechnungen</h4>
|
||||
<!--button type="submit" class="btn btn-primary"><i class="fas fa-fw fa-check"></i> Markierte Elemente als Contract übernehmen</button-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<tr>
|
||||
<th>Rechungsnummer</th>
|
||||
<th>Rechnungsdatum</th>
|
||||
<th>Kundennummer</th>
|
||||
<th>Rechnungsadresse</th>
|
||||
<th>Netto</th>
|
||||
<th>Ust.</th>
|
||||
<th>Brutto</th>
|
||||
<th>Zahlung</th>
|
||||
<th>Zustellung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($invoices as $invoice): ?>
|
||||
<?php $total = $invoice->total + $invoice->total_setup; ?>
|
||||
<?php $total_gross = $invoice->total_gross + $invoice->total_setup_gross; ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("Invoice", "downloadInvoice", ["id" => $invoice->id])?>"><i class="fas fa-download fa-fw"></i> <?=$invoice->invoice_number?></a></td>
|
||||
<td><?=date("d.m.Y", $invoice->invoice_date)?></td>
|
||||
<td><?=$invoice->customer_number?></td>
|
||||
<td>
|
||||
<?=($invoice->company) ? $invoice->company."<br />" : ""?>
|
||||
<?=($invoice->firstname || $invoice->lastname) ? $invoice->firstname." ".$invoice->lastname."<br />" : ""?>
|
||||
<?=$invoice->street?><br />
|
||||
<?=$invoice->zip?> <?=$invoice->city?><br />
|
||||
<?=$invoice->country?>
|
||||
</td>
|
||||
<td class="<?=($total < 0) ? "text-danger" : ""?>">€ <?=number_format($total,2,",",".")?></td>
|
||||
<td class="<?=($invoice->total_vat < 0) ? "text-danger" : ""?>">€ <?=number_format($invoice->total_vat,2,",",".")?></td>
|
||||
<td class="<?=($total_gross < 0) ? "text-danger" : ""?>">€ <?=number_format($total_gross,2,",",".")?></td>
|
||||
<td><?=($invoice->billing_type == "sepa") ? "SEPA" : "Überweisung"?></td>
|
||||
<td><?=($invoice->billing_delivery == "email") ? "Email" : "Papier"?></td>
|
||||
<td><a href="<?=self::getUrl("Invoice", "downloadInvoice", ["id" => $invoice->id])?>"><i class="fas fa-download fa-fw"></i></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $ressourcePathPrefix
|
||||
* @var Invoice $invoice
|
||||
* @var float $vat
|
||||
*/
|
||||
$net_total = $invoice->total + $invoice->total_setup;
|
||||
$gross_total = $invoice->total_gross + $invoice->total_setup_gross;
|
||||
$is_credit = $net_total < 0;
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Xinon Billing - Rechnung <?=$invoice->invoice_number?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<link href="<?=$ressourcePathPrefix?>css/sknx_print.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table id="adressen">
|
||||
<tr>
|
||||
<td class="left">
|
||||
|
||||
<div class="adresse">
|
||||
<div><?=$invoice->company?><br />
|
||||
<?php if($invoice->firstname && $invoice->lastname): ?><?=$invoice->firstname?> <?=$invoice->lastname?><br /><?php endif; ?>
|
||||
<?=nl2br($invoice->street)?><br />
|
||||
<?=$invoice->zip?> <?=$invoice->city?><br />
|
||||
<?php if($invoice->country != "Österreich"):?><?=$invoice->country?><br /><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div style="height:40pt;"></div>
|
||||
<h2><?php if($is_credit):?>Gutschrift<?php else: ?>Rechnung<?php endif; ?> <?=$invoice->invoice_number?></h2>
|
||||
<div><b><?php if($is_credit):?>Belegdatum<?php else: ?>Rechnungsdatum<?php endif; ?>: <?=date("d.m.Y",$invoice->invoice_date)?></b>
|
||||
<?php if($invoice->uid): ?><br />Ihre UID: <?=$invoice->uid?><?php endif; ?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class="right">
|
||||
|
||||
<div class="adresse header_sknx">
|
||||
<div>
|
||||
<div><img src="<?=$ressourcePathPrefix?>assets/images/xinon-dark.png" style="width:100%;" /></div>
|
||||
<div><b>Xinon GmbH</b></div>
|
||||
<div>Fladnitz im Raabtal 150<br />
|
||||
A-8322 Studenzen<br />
|
||||
<br />
|
||||
Tel +43 3115 40800<br />
|
||||
office@xinon.at - https://xinon.at/<br />
|
||||
UID: ATU68711968<br />
|
||||
FB: FN 416556 h<br />
|
||||
<br />
|
||||
Bankverbindung:<br />
|
||||
Steiermärkische Bank und Sparkassen AG<br />
|
||||
BIC: STSPAT2GXXX<br />
|
||||
IBAN: AT84 2081 5000 4007 9121
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<div style="height:28pt;"></div>
|
||||
|
||||
<div id="rechnungspositionen">
|
||||
|
||||
<?php if(is_array($invoice->positions) && count($invoice->positions)): ?>
|
||||
|
||||
<table class="position">
|
||||
<tr class="head dontsplit">
|
||||
<th class="name">Bezeichnung</th>
|
||||
<th class="preis">Einzelpreis</th>
|
||||
<th class="menge">Menge</th>
|
||||
<th class="preis">Gesamtpreis</th>
|
||||
<th class="preis">Ust.</th>
|
||||
<th class="preis">Gesamt Brutto</th>
|
||||
</tr>
|
||||
<?php $i=0; ?>
|
||||
<?php foreach($invoice->positions as $p): ?>
|
||||
<?php
|
||||
$start_date = new DateTime($p->start_date);
|
||||
$end_date = new DateTime($p->end_date);
|
||||
$amount = (float) number_format($p->amount, 3, ",", ".");
|
||||
$price = number_format($p->price, 2, ",",".");
|
||||
$price_total = number_format($p->price_total, 2, ",",".");
|
||||
$price_gross = number_format($p->price_gross, 2, ",",".");
|
||||
$vatrate = number_format($p->vatrate, 2, ",",".");
|
||||
?>
|
||||
<tr class="<?=($i%2 == 0) ? "even" : "odd" ?> one-position">
|
||||
<td class="name">
|
||||
<span class="product-name"><?=$p->product_name?></span>
|
||||
<?php if($start_date->format("d.m.Y") != $end_date->format("d.m.Y")): ?>
|
||||
(<?=$start_date->format("d.m.Y")?> - <?=$end_date->format("d.m.Y")?>)
|
||||
<?php endif; ?>
|
||||
<?=($p->matchcode) ? "<div class='pl-2'>".$p->matchcode."</div>" : ""?>
|
||||
<?=($p->product_info) ? "<div class='pl-2'>".nl2br($p->product_info)."</div>" : ""?>
|
||||
</td>
|
||||
<td class="preis"><?=$price?> €</td>
|
||||
<td class="preis"><?=$amount?></td>
|
||||
<td class="preis"><?=$price_total?> €</td>
|
||||
<td class="preis"><?=$vatrate?>%</td>
|
||||
<td class="preis"><?=$price_gross?> €</td>
|
||||
</tr>
|
||||
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="height:40pt;"></div>
|
||||
|
||||
<table id="total">
|
||||
<?php if(!$reversecharge): ?>
|
||||
<tr class="netto">
|
||||
<th>Gesamtbetrag Netto:</th>
|
||||
<td><?=number_format($net_total, 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php foreach($vat as $vatrate => $vat_total): ?>
|
||||
<?php if($vat_total != 0 && $vatrate > 0): ?>
|
||||
<tr class="ust">
|
||||
<th>+ Umsatzsteuer <?=$vatrate?>%:</th>
|
||||
<td><?=number_format($vat_total, 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<tr class="brutto">
|
||||
<?php if($reversecharge): ?>
|
||||
<th>Gesamtbetrag:</th>
|
||||
<?php else: ?>
|
||||
<th>Gesamtbetrag Brutto:</th>
|
||||
<?php endif; ?>
|
||||
<td><?=number_format($gross_total, 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<?php if($reversecharge): ?>
|
||||
<p style="font-weight:bold;">Hinweis: Die Umsatzsteuerschuld geht auf den Leistungsempfänger über (Reverse Charge)</p>
|
||||
<?php endif; ?>
|
||||
<?php if($is_credit): ?>
|
||||
<p>Gutschrift! Bitte nicht überweisen.</p>
|
||||
<?php else: ?>
|
||||
Ohne Abzug zu bezahlen bis <?=(new DateTime("@".$invoice->invoice_date))->modify("+14 days")->format("d.m.Y")?>.<br />
|
||||
Bitte geben Sie als Verwendungszweck unbedingt die Rechnungsnummer an, nur so können wir Ihre Zahlung eindeutig zuordnen
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -218,6 +218,12 @@
|
||||
<label for="can_order" class="form-check-label">Bestellung</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" class="form-check-input" name="can[Billing]" id="can_billing" value="1" <?=$user && $user->can("Billing") ? "checked='checked'" : ""?> />
|
||||
<label for="can_billing" class="form-check-label">Verrechnung</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="card-title mb-3 mt-3">Zusatzberechtigungen</h4>
|
||||
|
||||
+13
-1
@@ -67,7 +67,7 @@
|
||||
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Hersteller</a></li>
|
||||
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Typen</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-fw fa-router text-info "></i> Devices</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-fw fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-fw fa-users text-info"></i> Benutzer</a></li>
|
||||
<li class="has-sub-submenu font-weight-bold mt-1 mobile-hide"><a>Grundstammdaten</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->is(["Admin"]) || ($me->is("netowner") && $me->hasGwrNetworks())): ?>
|
||||
@@ -86,6 +86,18 @@
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu mobile-hide">
|
||||
<a href="#">
|
||||
<i class="fas fa-fw fa-money-from-bracket"></i>Verrechnung <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Contract")?>"><i class="far fa-fw fa-id-card text-info"></i> Contracts</a></li>
|
||||
<li class="has-sub-submenu"><a href="<?=self::getUrl("Contract", "AdvancedSearch")?>"><i class="far fa-fw fa-question-circle text-info"></i> Erweiterte Suche</a></li>
|
||||
<?php if($me->is(["Admin"]) && $me->can("Billing")): ?><li><a href="<?=self::getUrl("Billing")?>"><i class="far fa-fw fa-cash-register text-info"></i> Verrechnung</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","pipeplanner","pipeworker","lineworker"])): ?>
|
||||
<li class="has-submenu mobile-hide">
|
||||
|
||||
Reference in New Issue
Block a user