Updated Warehouse
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $ressourcePathPrefix
|
||||
* @var WarehouseOrderModel $order
|
||||
* @var Array $positions
|
||||
* @var Array $textElements
|
||||
*/
|
||||
$this->setReturnValue(['filename' => $order["id"] . ".pdf"]);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bestellung</title>
|
||||
<meta charset="utf-8" />
|
||||
<style>
|
||||
body {
|
||||
margin-top: 0;
|
||||
/*padding-top: 20pt;*/
|
||||
font-family: "Open Sans", sans-serif, Verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.uneven {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
|
||||
table tr td:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.additionalRow td:first-child {
|
||||
text-align: left;
|
||||
padding-left: 20pt;
|
||||
}
|
||||
|
||||
th {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
#invoiceTable tr *:nth-child(5),
|
||||
#invoiceTable tr *:nth-child(4),
|
||||
#invoiceTable tr *:nth-child(3) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#invoiceTable tr *:not(:first-child) {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
#invoiceTable tr td {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
tr.position td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tr.position td:first-child {
|
||||
vertical-align: middle !important;
|
||||
padding-left: 4pt;
|
||||
}
|
||||
|
||||
#invoiceTable tr td:first-child {
|
||||
max-width: 200pt;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<!--
|
||||
TODO: enable option for showing prices
|
||||
vertauschen
|
||||
Die gelieferte Ware bleibt bis zur vollständigen Bezahlung in unserem Eigentum.
|
||||
-->
|
||||
<h2 style="text-align: center;color: #005384">XINON Lieferantenbestellung vom <?=date("d.m.Y", $order["create"])?></h2>
|
||||
|
||||
<table style="border-collapse: collapse; width: 100%;" id="invoiceTable">
|
||||
<tr style="font-weight: bold; border-bottom: 1px solid black;" class="uneven">
|
||||
<th style="text-align: center;padding-right: 6pt">Position</th>
|
||||
<th style="text-align: center;padding-right: 6pt">Artikel</th>
|
||||
<th style="text-align: center;padding-right: 6pt">Art.-Nr. Lieferant</th>
|
||||
<th style="text-align: right">Menge</th>
|
||||
<th style="text-align: right">Einzelpreis</th>
|
||||
<th style="text-align: right;padding-right: 8pt">Gesamtpreis</th>
|
||||
</tr>
|
||||
<?php $i = 0; foreach($order['positions'] as $p):?>
|
||||
|
||||
<tr class="position <?=($i%2 == 0) ? "even" : "uneven" ?>">
|
||||
<td style="text-align: center;"><?= $i + 1 ?></td>
|
||||
<td style="text-align: left;padding-right: 8pt"><?=$p["articleName"]?></td>
|
||||
<td style="text-align: center;padding-right: 8pt"><?=$p["distributorArticleNumber"]?></td>
|
||||
<td style="text-align: right"><?=$p["amount"]?></td>
|
||||
<td style="text-align: right"><?=number_format($p["buyPrice"], 2, ",", ".")?> €</td>
|
||||
<td style="text-align: right;padding-right: 8pt"><?=number_format($p["amount"] * $p["buyPrice"], 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach;?>
|
||||
<!-- display a grey like header sum with top border to differentiate 2nd last td = Summe , last td is the calculated value both bold-->
|
||||
|
||||
<tr class="uneven">
|
||||
<?php
|
||||
$sum = 0;
|
||||
foreach($order['positions'] as $p){
|
||||
$sum += $p["amount"] * $p["buyPrice"];
|
||||
}
|
||||
?>
|
||||
<td colspan="5" style="text-align: right;border-top: 1px solid black;font-weight: bold
|
||||
;border-bottom: 1px solid black;
|
||||
">Summe</td>
|
||||
<td style="text-align: right;border-top: 1px solid black;font-weight: bold
|
||||
;border-bottom: 1px solid black;
|
||||
"><?=number_format($sum, 2, ",", ".")?> €</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<h3>Anmerkungen</h3>
|
||||
<p>
|
||||
<?=$order["note"]?>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user