<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title></title>
<style>
@page{
size: A4 portrait;
margin-left: 2cm;
margin-top: 1cm;
margin-bottom: 0.6cm;
}
body{
position: relative;
margin: 0;
padding: 0;
font-size: 11pt;
line-height: 1.4;
font-family: sans-serif;
}
div.sender{
position: absolute;
top: 0;
right: 0;
max-width: 9cm;
max-height: 10cm;
overflow: hidden;
}
div.sender img{
max-width: 100%;
height: auto;
}
div.address{
position: absolute;
top: 5cm;
left: 0; /* Adressfenster 2cm von links, wie BODY margin */
width: 8.4cm;
height: 4cm;
/*background-color: #fafafa;*/
font-size: 11pt;
line-height: 1.3;
/*white-space: nowrap;*/
}
p.sender{
line-height: 1;
font-size: 7pt;
margin: 0;
height: .5cm;
}
.faltmarke{
position: absolute;
top: 9.5cm;
left: -2cm;
width: .6cm;
height: 1px;
background-color: black;
border: 0;
}
div.orderdetails{
margin-top: 10.5cm;
}
table.order{
border: 0;
padding: 0;
margin: 0;
background: transparent;
width: 100%;
border-collapse: collapse;
}
table.order td,
table.order th{
padding: 0 .5em .5em 0;
margin: 0;
text-align: left;
vertical-align: top;
border: 0;
}
table.order th.right{
text-align: right;
}
table.order th.price,
table.order td.price{
padding-right: 0;
padding-left: .5em;
text-align: right;
}
.section{
margin-top: 1cm;
}
</style>
<?php
$tc = new ShopTextController();
$basket = $model->Basket;
$basketPositions = $model->BasketPositions;
$settings = $model->Settings;
$account = $model->Account;
$shippingAddress = $model->ShippingAddress;
$billingAddress = $model->BillingAddress;
$options = $model->Options;
$optionLogoImage = $settings->ShopInvoiceLogoImage;
$logoImageUrl = is_null($optionLogoImage) ? '' : $settings->ShopInvoiceLogoImageUrl;
if (!function_exists('printnonempty')) {
function printnonempty($text = "", $suffix = ""){
if ( !empty(trim($text)) ){
return $text . $suffix;
}
}
}
?>
</head>
<body>
<div class="sender">
<?php if ($logoImageUrl!=='') { ?>
<img src="<?=$logoImageUrl?>" /><br />
<?php } ?>
<?= nl2br($settings->OwnerPostalAddressMultiLine) ?>
</div>
<div class="address">
<p class="sender"><?= $settings->OwnerPostalAddressSingleLine ?></p>
<?= printnonempty($billingAddress->CompanyName, '<br />') ?>
<?= printnonempty($billingAddress->Department, '<br />') ?>
<?= printnonempty($billingAddress->Salutation, ' ') ?>
<?= printnonempty($billingAddress->FirstName, ' ') ?>
<?= printnonempty($billingAddress->LastName, '<br />') ?>
<?= printnonempty($billingAddress->Street, '<br />') ?>
<?= printnonempty($billingAddress->Street2, '<br />') ?>
<?= printnonempty($billingAddress->Zip, ' ') ?>
<?= printnonempty($billingAddress->City, '<br />') ?>
<?= printnonempty($billingAddress->CountryLong) ?>
</div>
<hr class="faltmarke" />
<div class="orderdetails">
<p><b>Rechnung Nr. <?=$basket->InvoiceNumber?> vom <?=$basket->DateOrderedFormatted?></b></p>
<h3>Ihre Bestellung</h3>
<p class="section">
<b>Lieferadresse:</b><br />
<?= printnonempty($shippingAddress->CompanyName, '<br />') ?>
<?= printnonempty($shippingAddress->Department, '<br />') ?>
<?= printnonempty($shippingAddress->Salutation, ' ') ?>
<?= printnonempty($shippingAddress->FirstName, ' ') ?>
<?= printnonempty($shippingAddress->LastName, '<br />') ?>
<?= printnonempty($shippingAddress->Street, '<br />') ?>
<?= printnonempty($shippingAddress->Street2, '<br />') ?>
<?= printnonempty($shippingAddress->Zip, ' ') ?>
<?= printnonempty($shippingAddress->City, '<br />') ?>
<?= printnonempty($shippingAddress->CountryLong, '<br /><br />') ?>
<?= printnonempty($shippingAddress->Phone) ?>
</p>
<table class="order">
<tr>
<th>Menge</th>
<th>Artikel</th>
<th class="price">Einzelpreis</th>
<th class="price">Gesamtpreis</th>
</tr>
<?php foreach ($basketPositions as $position) { ?>
<tr>
<td><?= $position->Quantity ?></td>
<td><?= $position->ArticleOrVariantArticleNumber ?>: <?= $position->ArticleName ?><br /><?= $position->ArticleVariantInfo ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($position->Price) ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($position->TotalPrice) ?></td>
</tr>
<?php } ?>
<tr class="subtotal">
<td colspan="3"><?= $tc->Text('bezeichnung-zwischensumme') ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($basket->SubTotalPrice) ?></td>
</tr>
<?php if ( !empty($basket->DiscountCosts) ){ ?>
<tr class="discount">
<td colspan="3"><?= $tc->Text('bezeichnung-rabatt') ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($basket->DiscountCosts) ?></td>
</tr>
<?php } ?>
<tr>
<td colspan="3"><?= $tc->Text('bezeichnung-versandkosten') ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($basket->ShippingCosts) ?></td>
</tr>
<?php
$count = count($basket->VatFactors);
for ( $i = 0; $i < $count; $i++ )
{
$vatFactor = $basket->VatFactors[$i];
$vatCosts = $basket->VatCosts[$i];
if ( floatval($vatCosts) > 0 ) {
?>
<tr>
<td colspan="3">Einschließlich UmSt. <?= CurrencyHelper::FormatPercentage($vatFactor * 100) ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($vatCosts) ?></td>
</tr>
<?php
}
} ?>
<?php if( $basket->PaymentMethodCosts !== 0 ){ ?>
<tr class="paymentfee">
<td colspan="3"><?= $tc->Text('bezeichnung-gebuehr-zahlungsart') ?></td>
<td class="price"><?= CurrencyHelper::FormatMoney($basket->PaymentMethodCosts) ?></td>
</tr>
<?php } ?>
<tr>
<td colspan="3">Gesamtsumme</td>
<td class="price grandtotal"><b><?= CurrencyHelper::FormatMoney($basket->TotalPrice) ?></b></td>
</tr>
</table>
<p class="section">
Gewünschte Zahlungsweise: <?=$basket->PaymentMethodName?><br />
Gewünschte Versandart: <?=$basket->ShipmentCostName?>
</p>
<div>
<?php if( $basket->PaymentMethodType==ShopPaymentMethod::Invoice ){ ?>
<p>
Bitte überweisen Sie den Gesamtbetrag unter Angabe der Rechnungsnummer <b><?=$basket->InvoiceNumber?></b> als Verwendungszweck innerhalb von <?=$basket->PaymentMethodInvoiceDueDays?> Tagen auf folgendes Konto: <br />
<?=$basket->PaymentMethodInvoiceBankName?> IBAN: <?=$basket->PaymentMethodInvoiceIban?> BIC: <?=$basket->PaymentMethodInvoiceBic?>
</p>
<?php } else if ( $basket->PaymentMethodType==ShopPaymentMethod::Vorkasse ){ ?>
<p>
Bitte überweisen Sie den Gesamtbetrag unter Angabe der Rechnungsnummer <b><?=$basket->InvoiceNumber?></b> als Verwendungszweck auf das folgende Konto: <br />
<?=$basket->PaymentMethodInvoiceBankName?> IBAN: <?=$basket->PaymentMethodInvoiceIban?> BIC: <?=$basket->PaymentMethodInvoiceBic?>
</p>
<?php } else if ( $basket->PaymentMethodType==ShopPaymentMethod::Manual ){ ?>
<p>
<?=$basket->PaymentMethodPaymentInstructions?>
</p>
<?php } ?>
</div>
</div>
</body>
</html>