Commit 16add60c authored by onny's avatar onny
Browse files

adapted to custom theme

parent fd7808f8
......@@ -21,6 +21,10 @@
text-align: right;
}
.text-left {
text-align: left;
}
.color-l { color: #aaa; }
.color-n { color: #888; }
.color-d { color: #555; }
......@@ -88,6 +92,10 @@
margin-bottom: 15px;
}
.amount-summary {
margin-right: -5px;
}
</style>
</head>
......@@ -99,26 +107,23 @@
<div style="display: block; height: 2cm"></div>
<div class="invoice-to">
<p><?php echo lang('bill_to'); ?>:</p>
<p><b><?php echo $invoice->client_name; ?></b><br/>
<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_city) {
echo $invoice->client_city . ' ';
} ?>
<?php if ($invoice->client_zip) {
echo $invoice->client_zip . '<br/>';
echo $invoice->client_zip . ' ';
} ?>
<?php if ($invoice->client_state) {
echo $invoice->client_state . '<br/>';
<?php if ($invoice->client_city) {
echo $invoice->client_city . '<br/><br/>';
} ?>
<?php if ($invoice->client_phone) { ?>
<abbr>P:</abbr><?php echo $invoice->client_phone; ?><br/>
<abbr>Tel: </abbr><?php echo $invoice->client_phone; ?><br/>
<?php } ?>
</p>
</div>
......@@ -128,9 +133,7 @@
<td class="text-right" style="width:30%;">
<div class="company-details">
<?php echo invoice_logo_pdf(); ?>
<h3 class="company-name text-right">
<?php echo $invoice->user_name; ?>
</h3>
<p class="text-right">
<?php if ($invoice->user_address_1) {
echo $invoice->user_address_1 . '<br/>';
......@@ -138,21 +141,20 @@
<?php if ($invoice->user_address_2) {
echo $invoice->user_address_2 . '<br/>';
} ?>
<?php if ($invoice->user_city) {
echo $invoice->user_city . ' ';
} ?>
<?php if ($invoice->user_zip) {
echo $invoice->user_zip . '<br/>';
echo $invoice->user_zip . ' ';
} ?>
<?php if ($invoice->user_state) {
echo $invoice->user_state . '<br/>';
<?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>P:</abbr><?php echo $invoice->user_phone; ?><br><?php
} ?>
<?php if ($invoice->user_fax) {
?><abbr>F:</abbr><?php echo $invoice->user_fax; ?><?php
?><abbr>Tel: </abbr><?php echo $invoice->user_phone; ?><br><?php
} ?>
</p>
</div>
......@@ -162,7 +164,7 @@
<tbody>
<tr>
<td class="text-right color-n">
<?php echo lang('invoice_date'); ?>: &nbsp;
<?php echo lang('invoice_date'); ?>:
</td>
<td class="text-right color-n">
<?php echo date_from_mysql($invoice->invoice_date_created, TRUE); ?>
......@@ -170,7 +172,7 @@
</tr>
<tr>
<td class="text-right color-n">
<?php echo lang('due_date'); ?>: &nbsp;
<?php echo lang('due_date'); ?>:
</td>
<td class="text-right color-n">
<?php echo date_from_mysql($invoice->invoice_date_due, TRUE); ?>
......@@ -178,7 +180,7 @@
</tr>
<tr>
<td class="text-right color-n">
<?php echo lang('amount_due'); ?>: &nbsp;
<?php echo lang('amount_due'); ?>:
</td>
<td class="text-right color-n">
<?php echo format_currency($invoice->invoice_balance); ?>
......@@ -194,7 +196,9 @@
</div>
<br/>
<h2 class="invoice-id"><?php echo lang('invoice'); ?> <?php echo $invoice->invoice_number; ?></h2>
<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/>
<div class="invoice-items">
......@@ -202,10 +206,10 @@
<thead>
<tr class="border-bottom-d">
<th class="color-d"><?php echo lang('item'); ?></th>
<th class="color-d"><?php echo lang('description'); ?></th>
<th class="text-right color-d"><?php echo lang('qty'); ?></th>
<th class="text-right color-d"><?php echo lang('price'); ?></th>
<th class="text-right color-d"><?php echo lang('total'); ?></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>
......@@ -213,11 +217,14 @@
<?php
$linecounter = 0;
foreach ($items as $item) { ?>
<tr class="border-bottom-n <?php echo ($linecounter % 2 ? 'background-l' : '')?>">
<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); ?>
......@@ -231,59 +238,30 @@
</tbody>
</table>
<br/>
<table>
<tr>
<td class="text-right">
<table class="amount-summary">
<table class="amount-summary" style="width: 40%;">
<tr>
<td class="text-right color-n">
<?php echo lang('subtotal'); ?>:
Nettosumme:
</td>
<td class="text-right color-n">
<?php echo format_currency($invoice->invoice_item_subtotal); ?>
</td>
</tr>
<?php if ($invoice->invoice_item_tax_total > 0) { ?>
<tr>
<td class="text-right color-n">
<?php echo lang('item_tax'); ?>
</td>
<td class="text-right color-n">
<?php echo format_currency($invoice->invoice_item_tax_total); ?>
</td>
</tr>
<?php } ?>
<?php foreach ($invoice_tax_rates as $invoice_tax_rate) : ?>
<tr>
<td class="text-right color-n">
<?php echo $invoice_tax_rate->invoice_tax_rate_name . ' ' . $invoice_tax_rate->invoice_tax_rate_percent; ?>%
</td>
<td class="text-right color-n">
<?php echo format_currency($invoice_tax_rate->invoice_tax_rate_amount); ?>
</td>
</tr>
<?php endforeach ?>
<tr class="border-top-l amount-total">
<td class="text-right color-d">
<?php echo lang('total'); ?>:
</td>
<td class="text-right color-d">
<?php echo format_currency($invoice->invoice_total); ?>
</td>
</tr>
<tr>
<td class="text-right color-d">
<?php echo lang('paid'); ?>:
<td class="text-right color-n">
0% MwSt:
</td>
<td class="text-right color-d">
<?php echo format_currency($invoice->invoice_paid) ?>
<td class="text-right color-n">
0,00 €
</td>
</tr>
<tr>
<tr style="border-bottom-width: 1px; border-style: solid;">
<td class="text-right color-d">
<b><?php echo lang('balance'); ?>:</b>
<b>Gesamtbetrag:</b>
</td>
<td class="text-right color-d">
<b><?php echo format_currency($invoice->invoice_balance) ?></b>
......@@ -294,7 +272,6 @@
</tr>
</table>
<div class="seperator border-bottom-l"></div>
<?php if ($invoice->invoice_terms) { ?>
<h4><?php echo lang('terms'); ?></h4>
<p><?php echo nl2br($invoice->invoice_terms); ?></p>
......@@ -302,4 +279,4 @@
</div>
</body>
</html>
\ No newline at end of file
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment