update invoice template
This commit is contained in:
parent
76010ab8af
commit
9ac724b207
1 changed files with 254 additions and 267 deletions
|
|
@ -1,282 +1,269 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/default/css/style.css">
|
||||
<!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/default/css/style.css">
|
||||
<style>
|
||||
body {
|
||||
color: #555;
|
||||
font-size: 1em;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
}
|
||||
table {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.color-l { color: #aaa; }
|
||||
.color-n { color: #888; }
|
||||
.color-d { color: #555; }
|
||||
.border-bottom-l {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #aaa;
|
||||
}
|
||||
.border-bottom-n {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
}
|
||||
.border-bottom-d {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #555;
|
||||
}
|
||||
.border-top-l {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #aaa;
|
||||
}
|
||||
.border-top-n {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
}
|
||||
.border-top-d {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #555;
|
||||
}
|
||||
.background-l { background-color: #eee; }
|
||||
header table {
|
||||
width:100%;
|
||||
padding: 0;
|
||||
}
|
||||
.company-details,
|
||||
.company-details h3,
|
||||
.company-details p,
|
||||
.invoice-details {
|
||||
text-align: right;
|
||||
}
|
||||
.company-name,
|
||||
.invoice-id {
|
||||
color: #333 !important;
|
||||
}
|
||||
.invoice-details td {
|
||||
padding: 0.2em 0.3em;
|
||||
}
|
||||
.invoice-items td,
|
||||
.invoice-items th {
|
||||
padding: 0.2em 0.4em 0.4em;
|
||||
}
|
||||
.seperator {
|
||||
height: 25px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.amount-summary {
|
||||
margin-right: -5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:70%">
|
||||
<div style="display: block; height: 2cm"></div>
|
||||
<div class="invoice-to">
|
||||
<p><b><?php echo lang('bill_to'); ?>:</b></p>
|
||||
<p><?php echo $custom_fields['client']['anrede'] ?><br/>
|
||||
<?php echo $invoice->client_name; ?><br/>
|
||||
<?php if ($invoice->client_address_1) {
|
||||
echo $invoice->client_address_1 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_address_2) {
|
||||
echo $invoice->client_address_2 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_zip) {
|
||||
echo $invoice->client_zip . ' ';
|
||||
} ?>
|
||||
<?php if ($invoice->client_city) {
|
||||
echo $invoice->client_city . '<br/><br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_phone) { ?>
|
||||
<abbr>Tel: </abbr><?php echo $invoice->client_phone; ?><br/>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right" style="width:30%;">
|
||||
<div class="company-details">
|
||||
<?php echo invoice_logo_pdf(); ?>
|
||||
<?php echo $invoice->user_name; ?>
|
||||
<p class="text-right">
|
||||
<?php if ($invoice->user_address_1) {
|
||||
echo $invoice->user_address_1 . '<br/>';
|
||||
}?>
|
||||
<?php if ($invoice->user_address_2) {
|
||||
echo $invoice->user_address_2 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->user_zip) {
|
||||
echo $invoice->user_zip . ' ';
|
||||
} ?>
|
||||
|
||||
<?php if ($invoice->user_city) {
|
||||
echo $invoice->user_city . '<br/><br/>';
|
||||
} ?>
|
||||
|
||||
<style>
|
||||
body {
|
||||
color: #555;
|
||||
font-size: 1em;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
}
|
||||
table {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
<?php if ($invoice->user_tax_code) {
|
||||
echo '<div>' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '</div>';
|
||||
} ?>
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
<?php if ($invoice->user_phone) {
|
||||
?><abbr>Tel: </abbr><?php echo $invoice->user_phone; ?><br><?php
|
||||
} ?>
|
||||
</p>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="invoice-details">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('invoice_date'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo date_from_mysql($invoice->invoice_date_created, TRUE); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('due_date'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo date_from_mysql($invoice->invoice_date_due, TRUE); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('amount_due'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo format_currency($invoice->invoice_balance); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</header>
|
||||
<main>
|
||||
|
||||
.color-l { color: #aaa; }
|
||||
.color-n { color: #888; }
|
||||
.color-d { color: #555; }
|
||||
|
||||
.border-bottom-l {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #aaa;
|
||||
}
|
||||
.border-bottom-n {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
}
|
||||
.border-bottom-d {
|
||||
border-bottom-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.border-top-l {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #aaa;
|
||||
}
|
||||
.border-top-n {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #888;
|
||||
}
|
||||
.border-top-d {
|
||||
border-top-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.background-l { background-color: #eee; }
|
||||
|
||||
#header table {
|
||||
width:100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.company-details,
|
||||
.company-details h3,
|
||||
.company-details p,
|
||||
.invoice-details {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.company-name,
|
||||
.invoice-id {
|
||||
color: #333 !important;
|
||||
}
|
||||
.invoice-details td {
|
||||
padding: 0.2em 0.3em;
|
||||
}
|
||||
.invoice-items td,
|
||||
.invoice-items th {
|
||||
padding: 0.2em 0.4em 0.4em;
|
||||
}
|
||||
|
||||
.seperator {
|
||||
height: 25px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.amount-summary {
|
||||
margin-right: -5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:70%">
|
||||
<div style="display: block; height: 2cm"></div>
|
||||
|
||||
<div class="invoice-to">
|
||||
<p><b><?php echo lang('bill_to'); ?>:</b></p>
|
||||
<p><?php echo $custom_fields['client']['anrede'] ?><br/>
|
||||
<?php echo $invoice->client_name; ?><br/>
|
||||
<?php if ($invoice->client_address_1) {
|
||||
echo $invoice->client_address_1 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_address_2) {
|
||||
echo $invoice->client_address_2 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_zip) {
|
||||
echo $invoice->client_zip . ' ';
|
||||
} ?>
|
||||
<?php if ($invoice->client_city) {
|
||||
echo $invoice->client_city . '<br/><br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->client_phone) { ?>
|
||||
<abbr>Tel: </abbr><?php echo $invoice->client_phone; ?><br/>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="text-right" style="width:30%;">
|
||||
<div class="company-details">
|
||||
<?php echo invoice_logo_pdf(); ?>
|
||||
<?php echo $invoice->user_name; ?>
|
||||
<p class="text-right">
|
||||
<?php if ($invoice->user_address_1) {
|
||||
echo $invoice->user_address_1 . '<br/>';
|
||||
}?>
|
||||
<?php if ($invoice->user_address_2) {
|
||||
echo $invoice->user_address_2 . '<br/>';
|
||||
} ?>
|
||||
<?php if ($invoice->user_zip) {
|
||||
echo $invoice->user_zip . ' ';
|
||||
} ?>
|
||||
|
||||
<?php if ($invoice->user_city) {
|
||||
echo $invoice->user_city . '<br/><br/>';
|
||||
} ?>
|
||||
|
||||
<?php if ($invoice->user_tax_code) {
|
||||
echo '<div>' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '</div>';
|
||||
} ?>
|
||||
|
||||
<?php if ($invoice->user_phone) {
|
||||
?><abbr>Tel: </abbr><?php echo $invoice->user_phone; ?><br><?php
|
||||
} ?>
|
||||
</p>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="invoice-details">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('invoice_date'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo date_from_mysql($invoice->invoice_date_created, TRUE); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('due_date'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo date_from_mysql($invoice->invoice_date_due, TRUE); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
<?php echo lang('amount_due'); ?>:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo format_currency($invoice->invoice_balance); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<h2 class="invoice-id"><?php echo lang('invoice'); ?> Nr. <?php echo $invoice->invoice_number; ?></h2>
|
||||
Leistungszeitraum: <?php echo $custom_fields['invoice']['leistung_von'] ?> bis <?php echo $custom_fields['invoice']['leistung_bis'] ?><br/>
|
||||
Leistungsort: <?php echo $custom_fields['invoice']['leistung_ort'] ?><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div class="invoice-items">
|
||||
<table class="table table-striped" style="width: 100%;">
|
||||
<thead>
|
||||
<tr class="border-bottom-d">
|
||||
<th class="color-d"><?php echo lang('item'); ?></th>
|
||||
<th class="color-d text-left"><?php echo lang('description'); ?></th>
|
||||
<th class="text-right color-d">Menge</th>
|
||||
<th class="text-right color-d">EP</th>
|
||||
<th class="text-right color-d">Gesamt</th>
|
||||
<div class="invoice-items">
|
||||
<table class="table table-striped" style="width: 100%;">
|
||||
<thead>
|
||||
<tr class="border-bottom-d">
|
||||
<th class="color-d"><?php echo lang('item'); ?></th>
|
||||
<th class="color-d text-left"><?php echo lang('description'); ?></th>
|
||||
<th class="text-right color-d">Menge</th>
|
||||
<th class="text-right color-d">EP</th>
|
||||
<th class="text-right color-d">Gesamt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$linecounter = 0;
|
||||
foreach ($items as $item) { ?>
|
||||
<tr class="<?php echo ($linecounter % 2 ? 'background-l' : '')?>">
|
||||
<td><?php echo $item->item_name; ?></td>
|
||||
<td><?php echo nl2br($item->item_description); ?></td>
|
||||
<td class="text-right">
|
||||
<?php echo format_amount($item->item_quantity); ?>
|
||||
<?php if ($item->item_product_unit) : ?>
|
||||
<small><?php _htmlsc($item->item_product_unit); ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<?php echo format_currency($item->item_price); ?>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<?php echo format_currency($item->item_subtotal); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$linecounter = 0;
|
||||
foreach ($items as $item) { ?>
|
||||
<tr class="<?php echo ($linecounter % 2 ? 'background-l' : '')?>">
|
||||
<td><?php echo $item->item_name; ?></td>
|
||||
<td><?php echo nl2br($item->item_description); ?></td>
|
||||
<td class="text-right">
|
||||
<?php echo format_amount($item->item_quantity); ?>
|
||||
<?php if ($item->item_product_unit) : ?>
|
||||
<small><?php _htmlsc($item->item_product_unit); ?></small>
|
||||
<?php endif; ?>
|
||||
<?php $linecounter++; ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
<table class="amount-summary" style="width: 40%;">
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
Nettosumme:
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<?php echo format_currency($item->item_price); ?>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<?php echo format_currency($item->item_subtotal); ?>
|
||||
<td class="text-right color-n">
|
||||
<?php echo format_currency($invoice->invoice_item_subtotal); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $linecounter++; ?>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
0% MwSt:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
0,00 €
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom-width: 1px; border-style: solid;">
|
||||
<td class="text-right color-d">
|
||||
<b>Gesamtbetrag:</b>
|
||||
</td>
|
||||
<td class="text-right color-d">
|
||||
<b><?php echo format_currency($invoice->invoice_balance) ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
<table class="amount-summary" style="width: 40%;">
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
Nettosumme:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
<?php echo format_currency($invoice->invoice_item_subtotal); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right color-n">
|
||||
0% MwSt:
|
||||
</td>
|
||||
<td class="text-right color-n">
|
||||
0,00 €
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border-bottom-width: 1px; border-style: solid;">
|
||||
<td class="text-right color-d">
|
||||
<b>Gesamtbetrag:</b>
|
||||
</td>
|
||||
<td class="text-right color-d">
|
||||
<b><?php echo format_currency($invoice->invoice_balance) ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ($invoice->invoice_terms) { ?>
|
||||
<h4><?php echo lang('terms'); ?></h4>
|
||||
<p><?php echo nl2br($invoice->invoice_terms); ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<footer>
|
||||
<?php if ($invoice->invoice_terms) : ?>
|
||||
<div class="notes">
|
||||
<b><?php _trans('terms'); ?></b><br/>
|
||||
<?php echo nl2br(htmlsc($invoice->invoice_terms)); ?>
|
||||
</div>
|
||||
</body>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue