Updated Warehouse
This commit is contained in:
@@ -17,10 +17,8 @@
|
||||
}
|
||||
|
||||
.customer-details {
|
||||
vertical-align: bottom;
|
||||
vertical-align: top;
|
||||
font-size: 14px;
|
||||
padding-left: 30pt;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.invoice-details {
|
||||
@@ -58,8 +56,8 @@
|
||||
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td class="customer-details" style="float: left">
|
||||
<h3>Lieferant</h3>
|
||||
<td class="customer-details">
|
||||
<h3>{{ addressLine_header }}</h3>
|
||||
<div>{{ addressLine_1 }}</div>
|
||||
<div>{{ addressLine_2 }}</div>
|
||||
<div>{{ addressLine_3 }}</div>
|
||||
@@ -67,8 +65,15 @@
|
||||
<div style="margin-bottom: 12pt"></div>
|
||||
<div>{{ externalReference }}</div>
|
||||
</td>
|
||||
<td class="customer-details" align="top">
|
||||
<h3>Rechnungsadresse</h3>
|
||||
<td class="customer-details">
|
||||
<h3>{{ shippingAddressLine_header }}</h3>
|
||||
<div>{{ shippingAddressLine_1 }}</div>
|
||||
<div>{{ shippingAddressLine_2 }}</div>
|
||||
<div>{{ shippingAddressLine_3 }}</div>
|
||||
<div>{{ shippingAddressLine_4 }}</div>
|
||||
</td>
|
||||
<td class="customer-details">
|
||||
<h3>{{ billingAddressLine_header }}</h3>
|
||||
<div>{{ billingAddressLine_1 }}</div>
|
||||
<div>{{ billingAddressLine_2 }}</div>
|
||||
<div>{{ billingAddressLine_3 }}</div>
|
||||
@@ -76,12 +81,6 @@
|
||||
<div>{{ billingAddressLine_5 }}</div>
|
||||
<div>{{ billingAddressLine_6 }}</div>
|
||||
</td>
|
||||
<td class="customer-details" style="float: right">
|
||||
<div>{{ shippingAddressLine_1 }}</div>
|
||||
<div>{{ shippingAddressLine_2 }}</div>
|
||||
<div>{{ shippingAddressLine_3 }}</div>
|
||||
<div>{{ shippingAddressLine_4 }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -6,13 +6,51 @@
|
||||
* @var Array $textElements
|
||||
*/
|
||||
$this->setReturnValue(['filename' => $order["id"] . ".pdf"]);
|
||||
|
||||
|
||||
$texts = [
|
||||
'EN' => [
|
||||
'header' => 'XINON Supplier Order from ' . date("d.m.Y", $order["create"]),
|
||||
'sum' => 'Sum',
|
||||
'vat' => '20% VAT',
|
||||
'total' => 'Total',
|
||||
'taxFree' => 'Please provide tax-free delivery according to § 6a UStG (Austrian Sales tax law).<br>Our VAT ID number: ATU68711968. Delivery to Austria.',
|
||||
'orderConfirmation' => 'Please send the order confirmation to office@xinon.at',
|
||||
'table' => [
|
||||
'pos' => 'POS',
|
||||
'article' => 'Article',
|
||||
'articleNumber' => 'Dist. art. nr.',
|
||||
'amount' => 'Amount',
|
||||
'unitPrice' => 'Unit price',
|
||||
'totalPrice' => 'Total price'
|
||||
]
|
||||
],
|
||||
'DE' => [
|
||||
'header' => 'XINON Lieferantenbestellung vom ' . date("d.m.Y", $order["create"]),
|
||||
'sum' => 'Summe',
|
||||
'vat' => '20% MwSt',
|
||||
'total' => 'Gesamt',
|
||||
'taxFree' => 'Bitte um steuerfreie Lieferung gemäß § 6a UStG.<br> Unsere UID-Nr.: ATU68711968. Lieferung nach Österreich.',
|
||||
'orderConfirmation' => 'Wir bitten um Zusendung der Auftragsbestätigung für die Bestellung an office@xinon.at.',
|
||||
'table' => [
|
||||
'pos' => 'POS',
|
||||
'article' => 'Artikel',
|
||||
'articleNumber' => 'Art.-Nr. Lieferant',
|
||||
'amount' => 'Menge',
|
||||
'unitPrice' => 'Einzelpreis',
|
||||
'totalPrice' => 'Gesamtpreis'
|
||||
]
|
||||
]];
|
||||
|
||||
$text = $texts[in_array($distributorCountryText, ["Österreich", "Deutschland", "Schweiz"]) ? "DE" : "EN"];
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bestellung</title>
|
||||
<meta charset="utf-8" />
|
||||
<title><?= $text['header'] ?></title>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
body {
|
||||
margin-top: 0;
|
||||
@@ -76,58 +114,78 @@ $this->setReturnValue(['filename' => $order["id"] . ".pdf"]);
|
||||
</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>
|
||||
<h2 style="text-align: center;color: #005384"><?= $text['header'] ?></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>
|
||||
<th style="text-align: center;padding-right: 6pt"><?= $text['table']['pos'] ?></th>
|
||||
<th style="text-align: center;padding-right: 6pt"><?= $text['table']['article'] ?></th>
|
||||
<th style="text-align: center;padding-right: 6pt"><?= $text['table']['articleNumber'] ?></th>
|
||||
<th style="text-align: right"><?= $text['table']['amount'] ?></th>
|
||||
<th style="text-align: right"><?= $text['table']['unitPrice'] ?></th>
|
||||
<th style="text-align: right;padding-right: 8pt"><?= $text['table']['totalPrice'] ?></th>
|
||||
</tr>
|
||||
<?php $i = 0; foreach($order['positions'] as $p):?>
|
||||
<?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="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>
|
||||
|
||||
<tr class="<?= ($i % 2 == 0) ? "even" : "uneven" ?>">
|
||||
<td></td>
|
||||
<td style="text-align: left;max-width: 200px"><?= $p["articleDescription"] ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
<tr class="uneven">
|
||||
<?php
|
||||
$sum = 0;
|
||||
foreach($order['positions'] as $p){
|
||||
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>
|
||||
"><?= $text['sum'] ?>
|
||||
</td>
|
||||
<td style="text-align: right;border-top: 1px solid black;font-weight: bold
|
||||
;border-bottom: 1px solid black;
|
||||
"><?=number_format($sum, 2, ",", ".")?> €</td>
|
||||
"><?= number_format($sum, 2, ",", ".") ?> €
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($distributorCountryText === "Österreich"): ?>
|
||||
<tr style="font-weight: bold; border-bottom: 1px solid black; background-color: #ebebeb;">
|
||||
<td colspan="5" style="text-align: right;font-weight: bold;">20% MwSt</td>
|
||||
<td style="text-align: right;font-weight: bold;"><?= number_format($sum * 0.2, 2, ",", ".") ?> €</td>
|
||||
</tr>
|
||||
<tr class="uneven" style="font-weight: bold; border-bottom: 3px double black; background-color: #ebebeb;">
|
||||
<td colspan="5" style="text-align: right;font-weight: bold;"><?= $text['total'] ?></td>
|
||||
<td style="text-align: right;font-weight: bold;"><?= number_format($sum * 1.2, 2, ",", ".") ?> €</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<h3>Anmerkungen</h3>
|
||||
<p>
|
||||
<?=$order["note"]?>
|
||||
</p>
|
||||
<?php if ($distributorCountryText !== "Österreich"): ?>
|
||||
<?= $text['taxFree'] ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $text['orderConfirmation'] ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -61,6 +61,8 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-draggable-next@2.1.0"></script>
|
||||
<script type="text/javascript">
|
||||
baseurl = '<?=self::getResourcePath()?>';
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user