update for warehouse
This commit is contained in:
134
Layout/default/WarehouseShippingNote/PDF_MAIN.php
Normal file
134
Layout/default/WarehouseShippingNote/PDF_MAIN.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $ressourcePathPrefix
|
||||
* @var WarehouseShippingNoteModel $shippingNote
|
||||
* @var Array $positions
|
||||
* @var Array $textElements
|
||||
*/
|
||||
|
||||
$this->setReturnValue(['filename' => $shippingNote->id . ".pdf"]);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lieferschein</title>
|
||||
<meta charset="utf-8" />
|
||||
<!-- <link href="-->
|
||||
<?php //= self::getResourcePath() ?><!--assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />-->
|
||||
|
||||
<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">Ihr XINON Lieferschein vom <?=date("d.m.Y", $shippingNote->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">Position</th>
|
||||
<th style="text-align: right;padding-right: 4pt">Menge</th>
|
||||
<th style="text-align: right;padding-right: 4pt">EH</th>
|
||||
<th style="text-align: center">Artikel</th>
|
||||
<?php if($showPrices): ?>
|
||||
<th style="text-align: right;padding-right: 4pt">Preis</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $i = 0; foreach($positions as $p):?>
|
||||
|
||||
<tr class="position <?=($i%2 == 0) ? "even" : "uneven" ?>">
|
||||
<td style="text-align: center;"><?= $i + 1 ?></td>
|
||||
<td style="text-align: right;padding-right: 8pt"><?=$p["amount"]?> </td>
|
||||
<td style="text-align: right;padding-right: 8pt"><?=$p["articleUnit"]?> </td>
|
||||
<td style="text-align: center;"><b><?=$p["articleTitle"]?></b></td>
|
||||
<?php if($showPrices): ?>
|
||||
<td style="text-align: right;padding-right: 8pt"><?=number_format(
|
||||
$p["price"] * $p["amount"], 2, ",", ".")?> €</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr class="<?=($i%2 == 0) ? "even" : "uneven" ?>">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
<td style="text-align: center;"><?= $p["articleDescription"] ?></td>
|
||||
<?php if($showPrices): ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $i++; endforeach;?>
|
||||
</table>
|
||||
|
||||
<?php if($textElements !== null): ?>
|
||||
<div style="margin-top: 20pt;">
|
||||
<?php foreach($textElements as $textElement): ?>
|
||||
<p><?=$textElement?></p>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user