PreorderBilling: Added optional pdf format for invoice detail file
This commit is contained in:
@@ -185,8 +185,11 @@ $pagination_entity_name = "Rechnungen";
|
||||
<i class="fas fa-fw fa-mail" title="per Email versendet am <?=date("d.m.Y H:i", $invoice->date_delivered)?>"></i>
|
||||
<?php endif; ?>
|
||||
<?php if($invoice->csv): ?>
|
||||
<a class="ml-2" href="<?=self::getUrl("PreorderBillingInvoice", "downloadCsv", ["id" => $invoice->id])?>">
|
||||
<i class="fas fa-fw fa-file-csv" title="CSV-Datei herunterladen"></i>
|
||||
<a class="ml-2" href="<?=self::getUrl("PreorderBillingInvoice", "downloadDetailCsv", ["id" => $invoice->id])?>">
|
||||
<i class="far fa-fw fa-file-csv" title="Rechnungsgetails als CSV-Datei herunterladen"></i>
|
||||
</a>
|
||||
<a class="ml-1" href="<?=self::getUrl("PreorderBillingInvoice", "downloadDetailPdf", ["id" => $invoice->id])?>">
|
||||
<i class="far fa-fw fa-file-pdf text-danger" title="Rechnungsgetails als PDF-Datei herunterladen"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Invoice Detail</title>
|
||||
<meta charset="utf-8" />
|
||||
<style>
|
||||
body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding-top: 0;
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
font-size: 9px;
|
||||
}
|
||||
.separator {
|
||||
margin-top: 48px;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
#topSpacer {
|
||||
margin-bottom: 32px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
border: 1px solid #aaa;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.data-table tbody td,
|
||||
.data-table tbody th {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.data-table tbody tr.even td {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.data-table tbody tr {
|
||||
border-top: 1px dashed #aaa;
|
||||
border-bottom: 1px dashed #aaa;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
.data-table tbody tr.top {
|
||||
page-break-after: avoid !important;
|
||||
}
|
||||
.data-table tbody tr.bottom {
|
||||
page-break-before: avoid !important;
|
||||
}
|
||||
|
||||
.data-table tbody tr.top td,
|
||||
.data-table tbody tr.top th {
|
||||
border-top: 1px dashed #aaa;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.data-table tbody tr.bottom td {
|
||||
border-bottom: 1px dashed #aaa;
|
||||
border-top: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
.data-table tbody tr.bottom th {
|
||||
border-bottom: 1px solid #aaa;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.border-right {
|
||||
border-right: 1px dotted #ddd;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Detailblatt zu Rechnung <?=$rechnum?></h1>
|
||||
|
||||
<div>Netzbetreiber: <strong><?=$netzbetreiber?></strong></div>
|
||||
|
||||
<table class="data-table">
|
||||
<tr class="top">
|
||||
<th class="align-left">Rechnungsnummer</th>
|
||||
<th class="align-left">Bestelldatum</th>
|
||||
<th class="align-left" colspan="6">Netzgebiet</th>
|
||||
</tr>
|
||||
<tr class="bottom">
|
||||
<th class="align-left">Rechnungsdatum</th>
|
||||
<th class="align-left">Extref</th>
|
||||
<th class="align-left">OAID</th>
|
||||
<th class="align-left">Periode Von</th>
|
||||
<th class="align-left">Periode Bis</th>
|
||||
<th class="align-right">Artikelnummer</th>
|
||||
<th class="align-left">Produkt</th>
|
||||
<th class="align-right">Preis Netto</th>
|
||||
</tr>
|
||||
<?php $i=0; foreach($positions as $position): ?>
|
||||
<tr class="top <?=$i%2==0 ? "even" : "odd"?>">
|
||||
<td class="align-left"><?=$position["rechnum"]?></td>
|
||||
<td class="align-left"><?=$position["bestdatum"]?></td>
|
||||
<td class="align-left" colspan="6"><?=$position["netzgebiet"]?></td>
|
||||
</tr>
|
||||
<tr class="bottom <?=$i%2==0 ? "even" : "odd"?>">
|
||||
<td class="align-left"><?=$position["rechdatum"]?></td>
|
||||
<td class="align-left"><?=$position["extref"]?></td>
|
||||
<td class="align-left"><?=$position["oaid"]?></td>
|
||||
<td class="align-left"><?=$position["von"]?></td>
|
||||
<td class="align-left"><?=$position["bis"]?></td>
|
||||
<td class="align-right"><?=$position["artnum"]?></td>
|
||||
<td class="align-left"><?=$position["produkt"]?></td>
|
||||
<td class="align-right"><?=$position["netto"]?></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user