Updated WarehouseShippingNote
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
if (!isset($vueViewName)) {
|
||||
die("vueViewName is not set");
|
||||
}
|
||||
@@ -10,13 +9,29 @@ if (!isset($mfLayoutPackage)) {
|
||||
|
||||
$additionalCSS = $additionalCSS ?? [];
|
||||
$additionalJS = $additionalJS ?? [];
|
||||
|
||||
$vueViewPath = BASEDIR . "/public/js/pages/$vueViewName";
|
||||
$additionalJS = [
|
||||
"bundler.php",
|
||||
"js/pages/" . $vueViewName . "/" . $vueViewName . ".js",
|
||||
...$additionalJS,
|
||||
];
|
||||
|
||||
if (is_dir($vueViewPath)) {
|
||||
$files = scandir($vueViewPath);
|
||||
foreach ($files as $file) {
|
||||
if ($file === '.' || $file === '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$fileExtension = pathinfo($file, PATHINFO_EXTENSION);
|
||||
if ($fileExtension === 'css') {
|
||||
$additionalCSS[] = "js/pages/$vueViewName/$file";
|
||||
} else if ($fileExtension === 'js') {
|
||||
$additionalJS[] = "js/pages/$vueViewName/$file";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$additionalCSS = [
|
||||
...$additionalCSS,
|
||||
'plugins/daterangepicker/daterangepicker.css',
|
||||
|
||||
@@ -4,9 +4,14 @@
|
||||
* @var WarehouseShippingNoteModel $shippingNote
|
||||
* @var Array $positions
|
||||
* @var Array $textElements
|
||||
* @var bool $showPrices
|
||||
*/
|
||||
|
||||
$this->setReturnValue(['filename' => $shippingNote->id . ".pdf"]);
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -87,11 +92,15 @@ TODO: enable option for showing prices
|
||||
-->
|
||||
<h2 style="text-align: center;color: #005384">Ihr XINON Lieferschein vom <?=date("d.m.Y", $shippingNote->create)?></h2>
|
||||
|
||||
<p>
|
||||
<?= $shippingNote->note ?>
|
||||
</p>
|
||||
|
||||
<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: left;padding-right: 4pt">Einheit</th>
|
||||
<th style="text-align: center">Artikel</th>
|
||||
<?php if($showPrices): ?>
|
||||
<th style="text-align: right;padding-right: 4pt">Preis</th>
|
||||
@@ -102,7 +111,7 @@ TODO: enable option for showing prices
|
||||
<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: left;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(
|
||||
@@ -130,5 +139,14 @@ TODO: enable option for showing prices
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if(isset($shippingNote->signature) && $shippingNote->signature !== ''): ?>
|
||||
<div style="margin-top: 20pt;">
|
||||
<img src="<?=$shippingNote->signature?>" style="width: 200pt;" alt="Unterschrift konnte nicht geladen werden"/>
|
||||
<div>Unterschrieben am: <?=date("d.m.Y", strtotime($shippingNote->signatureDate))?></div>
|
||||
<div>Unterschrieben von: <?=$shippingNote->signatureName?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user