forked from momo/invoiceplane-template
add check for user_company field, keep defaulting
to user_name. To use this, set the "Company" field in the user profile
This commit is contained in:
parent
222a5de94b
commit
a4b218089c
27
momo.php
27
momo.php
|
@ -104,9 +104,15 @@ footer .notes {
|
||||||
|
|
||||||
<div id="client">
|
<div id="client">
|
||||||
<div id="sichtfenster-absender">
|
<div id="sichtfenster-absender">
|
||||||
<?php
|
<?php if ($invoice->user_company !== ""): ?>
|
||||||
echo htmlsc($invoice->user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
<?php
|
||||||
?>
|
echo htmlsc($invoice->user_company) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
||||||
|
?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php
|
||||||
|
echo htmlsc($invoice->user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
||||||
|
?>
|
||||||
|
<?php endif; ?>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -159,7 +165,13 @@ footer .notes {
|
||||||
<!-- client is extracted due to absolute position -->
|
<!-- client is extracted due to absolute position -->
|
||||||
|
|
||||||
<div id="company">
|
<div id="company">
|
||||||
<div><b><?php _htmlsc($invoice->user_name); ?></b></div>
|
<div><b>
|
||||||
|
<?php if ($invoice->user_company !== "") : ?>
|
||||||
|
<?php _htmlsc($invoice->user_company); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php _htmlsc($invoice->user_name); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</b></div>
|
||||||
<?php if ($invoice->user_vat_id) {
|
<?php if ($invoice->user_vat_id) {
|
||||||
echo '<div>' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '</div>';
|
echo '<div>' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '</div>';
|
||||||
}
|
}
|
||||||
|
@ -384,7 +396,12 @@ footer .notes {
|
||||||
<?php if (!$isPaid): ?>
|
<?php if (!$isPaid): ?>
|
||||||
<p>
|
<p>
|
||||||
Bitte überweisen Sie den Rechnungsbetrag innerhalb von <?php echo (-1 * $invoice->days_overdue); ?> Tagen auf untenstehendes Konto:<br />
|
Bitte überweisen Sie den Rechnungsbetrag innerhalb von <?php echo (-1 * $invoice->days_overdue); ?> Tagen auf untenstehendes Konto:<br />
|
||||||
Inhaber: <?php echo $invoice->user_name; ?><br />
|
Inhaber:
|
||||||
|
<?php if ($invoice->user_company !== "") : ?>
|
||||||
|
<?php echo $invoice->user_company; ?><br />
|
||||||
|
<?php else: ?>
|
||||||
|
<?php echo $invoice->user_name; ?><br />
|
||||||
|
<?php endif; ?>
|
||||||
IBAN: <?php echo $invoice->user_iban; ?><br />
|
IBAN: <?php echo $invoice->user_iban; ?><br />
|
||||||
<?php echo invoice_qrcode($invoice->invoice_id); ?>
|
<?php echo invoice_qrcode($invoice->invoice_id); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue