293 lines
9.9 KiB
PHP
Executable file
293 lines
9.9 KiB
PHP
Executable file
<!DOCTYPE html>
|
|
<html lang="<?php _trans('cldr'); ?>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><?php _trans('invoice'); ?></title>
|
|
<link rel="stylesheet"
|
|
href="<?php echo base_url(); ?>assets/<?php echo get_setting('system_theme', 'invoiceplane'); ?>/css/templates.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/core/css/custom-pdf.css">
|
|
<style>
|
|
.highlight {
|
|
color: #050582;
|
|
}
|
|
.logo {
|
|
width: 200px;
|
|
float: right;
|
|
}
|
|
.company {
|
|
font-size: 0.8rem;
|
|
}
|
|
.invoice-details table {
|
|
width: 200px;
|
|
}
|
|
.client {
|
|
margin-top: 6rem;
|
|
}
|
|
.client small.sender {
|
|
color: #408236;
|
|
font-size: 0.7rem;
|
|
}
|
|
.client .client_address {
|
|
margin-top: 0.4rem;
|
|
}
|
|
table.footer th, table.footer td {
|
|
vertical-align: top;
|
|
color: #408236;
|
|
font-size: 0.8rem;
|
|
}
|
|
table.footer td.first-child {
|
|
width: 180px;
|
|
}
|
|
hr.footer {
|
|
color: #408236;
|
|
}
|
|
h1.invoice-title {
|
|
color: #3a3a3a;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header class="clearfix">
|
|
|
|
<div id="logo" class="logo">
|
|
<?php echo invoice_logo_pdf(); ?>
|
|
</div>
|
|
|
|
<div id="client" class="client">
|
|
<small class="sender">Heinrich GmbH • Blumenstraße 16-18 • 75233 Tiefenbronn</small>
|
|
<div class="client_address">
|
|
<b>per Email: info@test.de</b><br>
|
|
<?php if ($invoice->client_title) {
|
|
echo $invoice->client_title . '<br>';
|
|
} ?>
|
|
<?php if ($invoice->client_name) {
|
|
echo $invoice->client_name;
|
|
} ?>
|
|
<?php if ($invoice->client_surname) {
|
|
echo $invoice->client_surname;
|
|
} ?>
|
|
</div>
|
|
<?php if ($invoice->client_vat_id) {
|
|
echo '<div>' . trans('vat_id_short') . ': ' . $invoice->client_vat_id . '</div>';
|
|
}
|
|
if ($invoice->client_tax_code) {
|
|
echo '<div>' . trans('tax_code_short') . ': ' . $invoice->client_tax_code . '</div>';
|
|
}
|
|
if ($invoice->client_address_1) {
|
|
echo '<div>' . htmlsc($invoice->client_address_1) . '</div>';
|
|
}
|
|
if ($invoice->client_address_2) {
|
|
echo '<div>' . htmlsc($invoice->client_address_2) . '</div>';
|
|
}
|
|
|
|
echo '<br/>';
|
|
|
|
if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) {
|
|
echo '<div>';
|
|
if ($invoice->client_zip) {
|
|
echo htmlsc($invoice->client_zip) . ' ';
|
|
}
|
|
if ($invoice->client_city) {
|
|
echo htmlsc($invoice->client_city);
|
|
}
|
|
echo '</div>';
|
|
} ?>
|
|
|
|
</div>
|
|
<div id="company" class="company">
|
|
<?php if ($invoice->user_address_1) {
|
|
echo '<div>' . htmlsc($invoice->user_address_1) . '</div>';
|
|
}
|
|
if ($invoice->user_address_2) {
|
|
echo '<div>' . htmlsc($invoice->user_address_2) . '</div>';
|
|
}
|
|
if ($invoice->user_city || $invoice->user_state || $invoice->user_zip) {
|
|
echo '<div>';
|
|
if ($invoice->user_zip) {
|
|
echo htmlsc($invoice->user_zip) . ' ';
|
|
}
|
|
if ($invoice->user_city) {
|
|
echo htmlsc($invoice->user_city);
|
|
}
|
|
echo '</div>';
|
|
}
|
|
if ($invoice->user_country) {
|
|
echo '<div>' . get_country_name(trans('cldr'), $invoice->user_country) . '</div>';
|
|
}
|
|
|
|
if ($invoice->user_vat_id) {
|
|
echo '<div>' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '</div>';
|
|
}
|
|
if ($invoice->user_tax_code) {
|
|
echo '<div>' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '</div>';
|
|
}
|
|
|
|
if ($invoice->user_phone) {
|
|
echo '<div>' . trans('phone_abbr') . ': ' . htmlsc($invoice->user_phone) . '</div>';
|
|
}
|
|
if ($invoice->user_fax) {
|
|
echo '<div>' . trans('fax_abbr') . ': ' . htmlsc($invoice->user_fax) . '</div>';
|
|
}
|
|
if ($invoice->user_email) {
|
|
echo '<div class="highlight">' . htmlsc($invoice->user_email) . '</div>';
|
|
}
|
|
if ($invoice->user_web) {
|
|
echo '<div class="highlight">' . htmlsc($invoice->user_web) . '</div>';
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<div class="invoice-details clearfix">
|
|
<table>
|
|
<tr>
|
|
<td>Rechnung Nr.:</td>
|
|
<td><?php echo $invoice->invoice_number; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=2><small>(Bitte bei Zahlungen immer angeben.)</small></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php echo trans('invoice_date') . ':'; ?></td>
|
|
<td><?php echo date_from_mysql($invoice->invoice_date_created, true); ?></td>
|
|
</tr>
|
|
<?php if ($payment_method): ?>
|
|
<tr>
|
|
<td><?php echo trans('payment_method') . ': '; ?></td>
|
|
<td><?php _htmlsc($payment_method->payment_method_name); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</table>
|
|
</div>
|
|
|
|
<h1 class="invoice-title"><?php echo trans('invoice') ?></h1>
|
|
|
|
<table class="item-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="item-name"><?php _trans('item'); ?></th>
|
|
<th class="item-desc"><?php _trans('description'); ?></th>
|
|
<th class="item-amount text-right"><?php _trans('qty'); ?></th>
|
|
<th class="item-price text-right"><?php _trans('price'); ?></th>
|
|
<?php if ($show_item_discounts) : ?>
|
|
<th class="item-discount text-right"><?php _trans('discount'); ?></th>
|
|
<?php endif; ?>
|
|
<th class="item-total text-right">Gesamt</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
foreach ($items as $item) { ?>
|
|
<tr>
|
|
<td><?php _htmlsc($item->item_name); ?></td>
|
|
<td><?php echo nl2br(htmlsc($item->item_description)); ?></td>
|
|
<td class="text-right">
|
|
<?php echo format_amount($item->item_quantity); ?>
|
|
<?php if ($item->item_product_unit) : ?>
|
|
<br>
|
|
<small><?php _htmlsc($item->item_product_unit); ?></small>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td class="text-right">
|
|
<?php echo format_currency($item->item_price); ?>
|
|
</td>
|
|
<?php if ($show_item_discounts) : ?>
|
|
<td class="text-right">
|
|
<?php echo format_currency($item->item_discount); ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
<td class="text-right">
|
|
<?php echo format_currency($item->item_total); ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
|
|
</tbody>
|
|
<tbody class="invoice-sums">
|
|
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
Nettosumme
|
|
</td>
|
|
<td class="text-right"><?php echo format_currency($invoice->invoice_item_subtotal); ?></td>
|
|
</tr>
|
|
|
|
<?php if ($invoice->invoice_item_tax_total > 0) { ?>
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
<?php _trans('item_tax'); ?>
|
|
</td>
|
|
<td class="text-right">
|
|
<?php echo format_currency($invoice->invoice_item_tax_total); ?>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
|
|
<?php foreach ($invoice_tax_rates as $invoice_tax_rate) : ?>
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
<?php echo htmlsc($invoice_tax_rate->invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?>
|
|
</td>
|
|
<td class="text-right">
|
|
<?php echo format_currency($invoice_tax_rate->invoice_tax_rate_amount); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach ?>
|
|
|
|
<?php if ($invoice->invoice_discount_percent != '0.00') : ?>
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
<?php _trans('discount'); ?>
|
|
</td>
|
|
<td class="text-right">
|
|
<?php echo format_amount($invoice->invoice_discount_percent); ?>%
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($invoice->invoice_discount_amount != '0.00') : ?>
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
<?php _trans('discount'); ?>
|
|
</td>
|
|
<td class="text-right">
|
|
<?php echo format_currency($invoice->invoice_discount_amount); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
0% MwSt
|
|
</td>
|
|
<td class="text-right">
|
|
0,00€
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td <?php echo($show_item_discounts ? 'colspan="5"' : 'colspan="4"'); ?> class="text-right">
|
|
<b>Gesamtbetrag</b>
|
|
</td>
|
|
<td class="text-right">
|
|
<b><?php echo format_currency($invoice->invoice_balance); ?></b>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</main>
|
|
|
|
<footer class="footer">
|
|
<?php if ($invoice->invoice_terms) : ?>
|
|
<div class="notes">
|
|
<b><?php _trans('terms'); ?></b><br/>
|
|
<?php echo nl2br(htmlsc($invoice->invoice_terms)); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</footer>
|
|
|
|
</body>
|
|
</html>
|