| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /tmp/sc/ |
Upload File : |
<?php
/* Smarty version 3.1.30, created on 2026-06-27 05:56:50
from "/var/www/clients/client1/web17/web/includes/templates/templates/booking/_invoice.tpl" */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.30',
'unifunc' => 'content_6a3f4a028f8814_44212812',
'has_nocache_code' => false,
'file_dependency' =>
array (
'759c1d20d5426c052a7b0abdb0cac0754e2ffa59' =>
array (
0 => '/var/www/clients/client1/web17/web/includes/templates/templates/booking/_invoice.tpl',
1 => 1781844083,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6a3f4a028f8814_44212812 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_modifier_date_format')) require_once '/var/www/clients/client1/web17/web/includes/plugins/smarty-3.1.30/plugins/modifier.date_format.php';
?>
<?php $_smarty_tpl->_assignInScope('inv', $_smarty_tpl->tpl_vars['booking']->value->invoice);
?>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center flex-wrap gap-2">
<div class="d-flex align-items-center gap-2">
<span class="fw-bold">Rechnung <?php if (!empty($_smarty_tpl->tpl_vars['inv']->value->invoice_no)) {
echo htmlspecialchars($_smarty_tpl->tpl_vars['inv']->value->invoice_no, ENT_QUOTES, 'UTF-8', true);
} else { ?><span class="text-muted">(Entwurf)</span><?php }?></span>
<?php if ($_smarty_tpl->tpl_vars['isStorno']->value) {?><span class="badge bg-danger">storniert</span>
<?php } elseif ($_smarty_tpl->tpl_vars['isAida']->value) {?><span class="badge bg-success">bezahlt (AIDA)</span>
<?php } elseif ($_smarty_tpl->tpl_vars['inv']->value->invoice_payment == 0) {?><span class="badge bg-danger">offen</span>
<?php } elseif ($_smarty_tpl->tpl_vars['inv']->value->invoice_payment == 4) {?><span class="badge bg-warning text-dark">Nachkontrolle</span>
<?php } else { ?><span class="badge bg-success">bezahlt</span><?php }?>
</div>
<div class="d-flex align-items-center gap-2">
<?php if (!empty($_smarty_tpl->tpl_vars['inv']->value->invoice_no) && !$_smarty_tpl->tpl_vars['isAida']->value) {?>
<a class="btn btn-sm btn-outline-secondary iframe-modal" href="<?php echo @constant('SITE_URL');?>
/file.php?token=YIz8HqUPWQ7cwcVHE57O&invoice=<?php echo $_smarty_tpl->tpl_vars['inv']->value->invoice_id;?>
&type=inv&show=1" data-size="lg" data-headline="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['inv']->value->invoice_no, ENT_QUOTES, 'UTF-8', true);?>
.pdf" data-bs-toggle="modal" data-bs-target="#fileModal"><i class="material-icons sm">picture_as_pdf</i> Rechnung anzeigen</a>
<?php }?>
<?php if (!$_smarty_tpl->tpl_vars['isStorno']->value && !$_smarty_tpl->tpl_vars['isAida']->value) {?>
<button type="button" class="btn btn-sm btn-outline-primary admin-modal" data-bs-toggle="modal" data-bs-target="#confirmationModal" data-json="<?php echo htmlspecialchars(json_encode(array('invoice_id'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_id,'products'=>$_smarty_tpl->tpl_vars['data']->value->product($_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_id,'true'))));?>
" data-template="invoice/positions.tpl" data-headline="Produkt hinzufügen"><i class="material-icons sm">add</i> Produkt hinzufügen</button>
<button type="button" class="btn btn-sm btn-primary admin-modal" data-bs-toggle="modal" data-bs-target="#confirmationModal" data-json="<?php echo htmlspecialchars(json_encode(array('invoice_id'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_id,'price'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->full_price)));?>
" data-template="invoice/payment.tpl" data-headline="Zahlung erfassen"><i class="material-icons sm">payments</i> Zahlung erfassen</button>
<?php }?>
<div class="dropdown">
<button type="button" class="btn btn-sm btn-light border dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="material-icons sm">more_horiz</i></button>
<ul class="dropdown-menu dropdown-menu-end">
<?php if (!empty($_smarty_tpl->tpl_vars['booking']->value->bookings)) {?>
<li><a class="dropdown-item iframe-modal" href="<?php echo @constant('SITE_URL');?>
/file.php?token=YIz8HqUPWQ7cwcVHE57O&invoice=<?php echo $_smarty_tpl->tpl_vars['inv']->value->invoice_id;?>
&show=1" data-size="lg" data-headline="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['booking']->value->bookings[0]->booking_no, ENT_QUOTES, 'UTF-8', true);?>
.pdf" data-bs-toggle="modal" data-bs-target="#fileModal"><i class="material-icons sm">picture_as_pdf</i> Buchungsbestätigung</a></li>
<?php }?>
</ul>
</div>
</div>
</div>
<div class="card-body py-2 border-bottom">
<div class="row g-2 small">
<div class="col-6 col-md-3"><span class="text-muted d-block">Rechnungsdatum</span><?php echo (($tmp = @$_smarty_tpl->tpl_vars['inv']->value->invoice_datum)===null||$tmp==='' ? '—' : $tmp);?>
</div>
<div class="col-6 col-md-5"><span class="text-muted d-block">Kunde</span><?php if ($_smarty_tpl->tpl_vars['cust']->value->customer_gender == 3) {
echo htmlspecialchars($_smarty_tpl->tpl_vars['cust']->value->customer_name, ENT_QUOTES, 'UTF-8', true);
} else {
echo htmlspecialchars($_smarty_tpl->tpl_vars['cust']->value->customer_firstname, ENT_QUOTES, 'UTF-8', true);?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['cust']->value->customer_lastname, ENT_QUOTES, 'UTF-8', true);
}?></div>
<div class="col-6 col-md-4">
<span class="text-muted d-block">Zahlungsstatus</span>
<?php if (!$_smarty_tpl->tpl_vars['isStorno']->value && !$_smarty_tpl->tpl_vars['isAida']->value && $_smarty_tpl->tpl_vars['inv']->value->invoice_payment > 0) {?>
<a href="#" class="admin-modal text-decoration-none" data-bs-toggle="modal" data-bs-target="#confirmationModal" data-json="<?php ob_start();
echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['booking']->value->invoice->payment_datum,"%Y-%m-%d");
$_prefixVariable1=ob_get_clean();
echo htmlspecialchars(json_encode(array('invoice_id'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_id,'price'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->full_price,'content'=>array('payment_type'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_payment,'payment_date'=>$_prefixVariable1,'invoice_coupon'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->invoice_coupon,'payment_value'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->payment_value,'payment_notice'=>$_smarty_tpl->tpl_vars['booking']->value->invoice->payment_notice))));?>
" data-template="invoice/payment.tpl" data-headline="Zahlung bearbeiten" title="Zahlung bearbeiten"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['inv']->value->payment, ENT_QUOTES, 'UTF-8', true);?>
<i class="material-icons sm">edit</i></a>
<?php } else { ?>
<?php echo htmlspecialchars((($tmp = @$_smarty_tpl->tpl_vars['inv']->value->payment)===null||$tmp==='' ? '—' : $tmp), ENT_QUOTES, 'UTF-8', true);?>
<?php }?>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table align-middle mb-0">
<thead>
<tr>
<th>Produkt</th>
<th>Beschreibung</th>
<th class="text-center">Menge</th>
<th class="text-end">Einzelpreis</th>
<th class="text-end">Gesamtpreis</th>
<th class="text-end"></th>
</tr>
</thead>
<tbody>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['booking']->value->products, 'product');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['product']->value) {
?>
<tr>
<td class="fw-bold"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value->invoice_pos_title, ENT_QUOTES, 'UTF-8', true);?>
</td>
<td class="text-muted small"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value->invoice_pos_description, ENT_QUOTES, 'UTF-8', true);?>
</td>
<td class="text-center"><?php echo $_smarty_tpl->tpl_vars['product']->value->invoice_pos_quantity;?>
</td>
<td class="text-end text-nowrap"><?php echo number_format(($_smarty_tpl->tpl_vars['product']->value->invoice_pos_price*1.19),2,",",".");?>
€</td>
<td class="text-end text-nowrap fw-bold"><?php echo number_format(($_smarty_tpl->tpl_vars['product']->value->invoice_pos_price*1.19*$_smarty_tpl->tpl_vars['product']->value->invoice_pos_quantity),2,",",".");?>
€</td>
<td class="text-end text-nowrap">
<?php if (!$_smarty_tpl->tpl_vars['isStorno']->value && !$_smarty_tpl->tpl_vars['isAida']->value) {?>
<button class="btn btn-sm btn-outline-secondary admin-modal" data-bs-toggle="modal" data-bs-target="#confirmationModal" data-json="<?php echo htmlspecialchars(json_encode($_smarty_tpl->tpl_vars['product']->value));?>
" data-template="invoice/positions.tpl" data-headline="<?php echo $_smarty_tpl->tpl_vars['product']->value->invoice_pos_title;?>
bearbeiten"><i class="material-icons sm">edit</i></button>
<button class="btn btn-sm btn-outline-danger confirmation-modal" data-bs-toggle="modal" data-bs-target="#confirmationModal" data-headline="Artikel entfernen?" data-content="Möchten Sie den Artikel [b]<?php echo $_smarty_tpl->tpl_vars['product']->value->invoice_pos_title;?>
[/b] wirklich von dieser Rechnung entfernen?" data-json="<?php echo htmlspecialchars(json_encode((array("mysql"=>array("table"=>"pacim_invoice_pos","where"=>"invoice_pos_id = ".((string)$_smarty_tpl->tpl_vars['product']->value->invoice_pos_id)),"delete"=>1))));?>
"><i class="material-icons sm">delete_outline</i></button>
<?php }?>
</td>
</tr>
<?php
}
} else {
?>
<tr><td colspan="6" class="text-center text-muted py-4">Keine Positionen vorhanden.</td></tr>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
?>
</tbody>
<tfoot>
<tr>
<th colspan="4" class="text-end">Gesamtsumme</th>
<th class="text-end text-nowrap"><?php echo number_format($_smarty_tpl->tpl_vars['inv']->value->full_price,2,",",".");?>
€</th>
<th></th>
</tr>
<?php if ($_smarty_tpl->tpl_vars['inv']->value->payment_value) {?>
<tr>
<td colspan="4" class="text-end text-muted">Bezahlt</td>
<td class="text-end text-nowrap text-success"><?php echo number_format($_smarty_tpl->tpl_vars['inv']->value->payment_value,2,",",".");?>
€</td>
<td></td>
</tr>
<?php if (!$_smarty_tpl->tpl_vars['isAida']->value && !$_smarty_tpl->tpl_vars['isStorno']->value && ($_smarty_tpl->tpl_vars['inv']->value->full_price-$_smarty_tpl->tpl_vars['inv']->value->payment_value) > 0.001) {?>
<tr>
<td colspan="4" class="text-end text-muted">Offen</td>
<td class="text-end text-nowrap text-danger fw-bold"><?php echo number_format(($_smarty_tpl->tpl_vars['inv']->value->full_price-$_smarty_tpl->tpl_vars['inv']->value->payment_value),2,",",".");?>
€</td>
<td></td>
</tr>
<?php }?>
<?php }?>
</tfoot>
</table>
</div>
</div>
<?php }
}