| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/dijon/components/com_djcatalog2/themes/default/pdf/ |
Upload File : |
<?php
/**
* @package DJ-Catalog2
* @copyright Copyright (C) 2010 Blue Constant Media LTD, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://design-joomla.eu
* @author email contact@design-joomla.eu
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Uri\Uri;
$params = ComponentHelper::getParams('com_djcatalog2');
$logo = trim((string)$params->get('cart_company_logo', ''));
/*$logoBase = false;
if ($logo != '' && File::exists(JPATH_ROOT.'/'.$logo)) {
$imgType = pathinfo(JPATH_ROOT.'/'.$logo, PATHINFO_EXTENSION);
$imgData = file_get_contents(JPATH_ROOT.'/'.$logo);
$dataUri = 'data:image/' . $imgType . ';base64,' . base64_encode($imgData);
$logoBase = '<img alt="logo" src="'.$dataUri.'" />';
}*/
?>
<br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" width="40%"><?php
/*if ($logoBase) {
echo $logoBase;
}*/
if ($logo) {
echo '<img alt="logo" src="'.Uri::root(false).$logo.'" />';
}
?></td>
<td align="right">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php echo Text::_('COM_DJCATALOG2_ORDER_NUMBER')?>:
</td>
<td>
<?php echo $data->order_number; ?>
</td>
</tr>
<tr>
<td>
<?php echo Text::_('COM_DJCATALOG2_ORDER_PAYMENT_METHOD')?>:
</td>
<td>
<?php echo $data->payment_method; ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<table cellpadding="10" cellspacing="0" width="100%">
<tr>
<td width="50%" align="left" style="border-bottom: 1px solid #666666;"><h2><?php echo Text::_('COM_DJCATALOG2_INVOICE_SELLER') ?></h2>
<?php echo $params->get('cart_invoice_header');?>
</td>
<td align="left" style="border-bottom: 1px solid #666666;"><h2><?php echo Text::_('COM_DJCATALOG2_INVOICE_BUYER') ?></h2>
<p><?php
if (!empty($data->companyname)) {
echo '<strong>'.$data->company.'</strong>';
} else {
echo '<strong>'.$data->firstname.' '.$data->lastname.'</strong>';
}
?>
<br />
<?php echo $data->postcode.', '.$data->city; ?>
<br />
<?php echo $data->address; ?>
<br />
<?php echo $data->country; ?>
<?php
if (!empty($data->vat_id)) {
echo '<br />'.Text::_('COM_DJCATALOG2_UP_VATID').': '.$data->vat_id;
}
?>
</p>
</td>
</tr>
</table>
<br />
<br />
<br />
<table cellpadding="0" cellspacing="0">
<tr>
<th width="5%" align="center" valign="top">
<strong>#</strong>
</th>
<th width="30%" align="left" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_SERVICE'); ?></strong>
</th>
<th width="7%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_QTY'); ?></strong>
</th>
<th width="7%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_UNIT'); ?></strong>
</th>
<th width="10%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_BASE_PRICE'); ?></strong>
</th>
<th width="10%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_TAX_RATE'); ?></strong>
</th>
<th width="10%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_BASE_COST'); ?></strong>
</th>
<th width="10%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_TAX'); ?></strong>
</th>
<th width="10%" align="center" valign="top">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_TOTAL'); ?></strong>
</th>
</tr>
<tr>
<td colspan="9" style="border-bottom: 1px solid #666666;"></td>
</tr>
<tr>
<td colspan="9"> </td>
</tr>
<?php
$no = 1;
if ($data->delivery_price > 0) {
$delivery = new stdClass();
$delivery->item_name = Text::_('COM_DJCATALOG2_INVOICE_DELIVERY').' - '.$data->delivery_method;
$delivery->quantity = 1;
$delivery->base_cost = $data->delivery_price;
$delivery->cost = $data->delivery_price;
$delivery->tax_rate = $data->delivery_tax_rate;
$delivery->tax = $data->delivery_tax;
$delivery->total = $data->delivery_total;
$data->items[] = $delivery;
}
if ($data->payment_price > 0) {
$payment = new stdClass();
$payment->item_name = Text::_('COM_DJCATALOG2_INVOICE_PAYMENT').' - '.$data->payment_method;
$payment->quantity = 1;
$payment->base_cost = $data->payment_price;
$payment->cost = $data->payment_price;
$payment->tax_rate = $data->payment_tax_rate;
$payment->tax = $data->payment_tax;
$payment->total = $data->payment_total;
$data->items[] = $payment;
}
foreach ($data->items as $item) {
?>
<tr>
<td align="center" style="padding: 10px 0;">
<?php echo $no; ?>
</td>
<td align="left" style="padding: 10px 0;"><?php echo $item->item_name ?></td>
<td align="center" style="padding: 10px 0;">
<?php echo (float)$item->quantity; ?>
</td>
<td align="center" style="padding: 10px 0;">
<?php echo $item->unit ? $item->unit : Text::_('COM_DJCATALOG2_UNIT_PC'); ?>
</td>
<td align="center" style="padding: 10px 0;">
<?php echo number_format($item->base_cost, 2, '.', ''); ?>
</td>
<td align="center" style="padding: 10px 0;">
<?php
if ($item->tax == 0.0 && $item->tax_rate == 0.0) {
echo '-';
} else {
echo number_format((100*$item->tax_rate), 2, '.', '').'%';
}
?>
</td>
<td align="center" style="padding: 10px 0;">
<?php echo number_format($item->cost, 2, '.', ''); ?>
</td>
<td align="center" style="padding: 10px 0;">
<?php echo number_format($item->tax, 2, '.', ''); ?>
</td>
<td align="center"style="padding: 10px 0;" >
<?php echo number_format($item->total, 2, '.', ''); ?>
</td>
</tr>
<?php if (!empty(($item->additional_info)) && trim((string)$item->additional_info) != '') { ?>
<?php $additional_info = json_decode((string)$item->additional_info); ?>
<?php if ($additional_info) {?>
<tr>
<td> </td>
<td colspan="8">
<?php
if ($item->item_type == 'item') {
$attrs = array();
foreach($additional_info as $label => $value) {
$attrs[] = '<strong>'.$label.'</strong>: <span>'.($value ? $value : '---').'</span>';
}
echo implode(' | ', $attrs);
} else if ($item->item_type == 'customisation') {
$attrs = array();
foreach ($additional_info as $customisation_info) {
$info = '<strong>' . $customisation_info->name.'</strong>: ';
if (empty($customisation_info->value)) {
$info .= '---';
} else {
if ($customisation_info->type == 'text' || $customisation_info->type == 'textarea' || $customisation_info->type == 'checkbox' || $customisation_info->type == 'radio') {
$info .= nl2br($customisation_info->value);
} else if ($customisation_info->type == 'file') {
$info .= $customisation_info->value->caption;
}
}
$attrs[] = $info;
}
echo implode(' | ', $attrs);
}
?>
<br /><br />
</td>
</tr>
<?php } ?>
<?php } ?>
<?php if (!empty(($item->features_info)) && trim((string)$item->features_info) != '' && $item->item_type == 'item') { ?>
<?php $additional_info = json_decode((string)$item->features_info); ?>
<?php if ($additional_info) {?>
<tr>
<td> </td>
<td colspan="8">
<?php
$attrs = array();
foreach($additional_info as $label => $value) {
$attrs[] = '<strong>'.$label.'</strong>: <span>'.($value ? $value : '---').'</span>';
}
echo implode(' | ', $attrs);
?>
<br /><br />
</td>
</tr>
<?php } ?>
<?php } ?>
<?php
$no++;
}
?>
<tr>
<td colspan="9"> </td>
</tr>
<tr>
<td colspan="6" align="right">
<strong><?php echo Text::_('COM_DJCATALOG2_INVOICE_TOTAL') ?>:</strong>
</td>
<td align="center">
<strong><?php echo number_format($data->total, 2, '.', ''); ?></strong>
</td>
<td align="center">
<strong><?php echo number_format($data->tax, 2, '.', ''); ?></strong>
</td>
<td align="center" style="border: 1px solid #666666">
<strong><?php echo number_format($data->grand_total, 2, '.', ''); ?></strong>
</td>
</tr>
<tr>
<td colspan="6"> </td>
<td align="right" colspan="2">
<strong><?php echo Text::_('COM_DJCATALOG2_ORDER_CURRENCY')?> </strong>
</td>
<td align="center" style="border: 1px solid #666666">
<strong><?php echo strtoupper($data->currency); ?></strong>
</td>
</tr>
<tr>
<td colspan="9"> </td>
</tr>
</table>
<br /><br />