add: full multi-tenancy control

This commit is contained in:
Cauê Faleiros
2026-02-02 15:31:15 -03:00
commit c6ec92802b
1711 changed files with 258106 additions and 0 deletions

View File

@@ -0,0 +1,417 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
lang="<?php echo e($locale = app()->getLocale()); ?>"
dir="<?php echo e(in_array($locale, ['fa', 'ar']) ? 'rtl' : 'ltr'); ?>"
>
<head>
<!-- meta tags -->
<meta
http-equiv="Cache-control"
content="no-cache"
>
<meta
http-equiv="Content-Type"
content="text/html; charset=utf-8"
/>
<?php
if ($locale == 'en') {
$fontFamily = [
'regular' => 'DejaVu Sans',
'bold' => 'DejaVu Sans',
];
} else {
$fontFamily = [
'regular' => 'Arial, sans-serif',
'bold' => 'Arial, sans-serif',
];
}
if (in_array($locale, ['ar', 'fa', 'tr'])) {
$fontFamily = [
'regular' => 'DejaVu Sans',
'bold' => 'DejaVu Sans',
];
}
?>
<!-- lang supports inclusion -->
<style type="text/css">
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: <?php echo e($fontFamily['regular']); ?>;
}
body {
font-size: 10px;
color: #091341;
font-family: "<?php echo e($fontFamily['regular']); ?>";
}
b, th {
font-family: "<?php echo e($fontFamily['bold']); ?>";
}
.page-content {
padding: 12px;
}
.page-header {
border-bottom: 1px solid #E9EFFC;
text-align: center;
font-size: 24px;
text-transform: uppercase;
color: #000DBB;
padding: 24px 0;
margin: 0;
}
.logo-container {
position: absolute;
top: 20px;
left: 20px;
}
.logo-container.rtl {
left: auto;
right: 20px;
}
.logo-container img {
max-width: 100%;
height: auto;
}
.page-header b {
display: inline-block;
vertical-align: middle;
}
.small-text {
font-size: 7px;
}
table {
width: 100%;
border-spacing: 1px 0;
border-collapse: separate;
margin-bottom: 16px;
}
table thead th {
background-color: #E9EFFC;
color: #000DBB;
padding: 6px 18px;
text-align: left;
}
table.rtl thead tr th {
text-align: right;
}
table tbody td {
padding: 9px 18px;
border-bottom: 1px solid #E9EFFC;
text-align: left;
vertical-align: top;
}
table.rtl tbody tr td {
text-align: right;
}
.summary {
width: 100%;
display: inline-block;
}
.summary table {
float: right;
width: 250px;
padding-top: 5px;
padding-bottom: 5px;
background-color: #E9EFFC;
white-space: nowrap;
}
.summary table.rtl {
width: 280px;
}
.summary table.rtl {
margin-right: 480px;
}
.summary table td {
padding: 5px 10px;
}
.summary table td:nth-child(2) {
text-align: center;
}
.summary table td:nth-child(3) {
text-align: right;
}
</style>
</head>
<body dir="<?php echo e($locale); ?>">
<div class="page">
<!-- Header -->
<div class="page-header">
<b><?php echo app('translator')->get('admin::app.quotes.index.pdf.title'); ?></b>
</div>
<div class="page-content">
<!-- Invoice Information -->
<table class="<?php echo e(app()->getLocale ()); ?>">
<tbody>
<tr>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.quote-id'); ?>:
</b>
<span>
#<?php echo e($quote->id); ?>
</span>
</td>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.person'); ?>:
</b>
<span>
<?php echo e($quote->person->name); ?>
</span>
</td>
</tr>
<tr>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.sales-person'); ?>:
</b>
<span>
<?php echo e($quote->user->name); ?>
</span>
</td>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.subject'); ?>:
</b>
<span>
<?php echo e($quote->subject); ?>
</span>
</td>
</tr>
<tr>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.date'); ?>:
</b>
<span>
<?php echo e(core()->formatDate($quote->created_at, 'd-m-Y')); ?>
</span>
</td>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.sales-person'); ?>:
</b>
<span>
<?php echo e($quote->user->name); ?>
</span>
</td>
</tr>
<tr>
<td style="width: 50%; padding: 2px 18px;border:none;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.expired-at'); ?>:
</b>
<span>
<?php echo e(core()->formatDate($quote->expired_at, 'd-m-Y')); ?>
</span>
</td>
</tr>
</tbody>
</table>
<!-- Billing & Shipping Address -->
<table class="<?php echo e($locale); ?>">
<thead>
<tr>
<?php if($quote->billing_address): ?>
<th style="width: 50%;">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.billing-address'); ?>
</b>
</th>
<?php endif; ?>
<?php if($quote->shipping_address): ?>
<th style="width: 50%">
<b>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.shipping-address'); ?>
</b>
</th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<tr>
<?php if($quote->billing_address): ?>
<td style="width: 50%">
<div><?php echo e($quote->billing_address['address'] ?? ''); ?></div>
<div><?php echo e($quote->billing_address['postcode'] ?? '' . ' ' .$quote->billing_address['city'] ?? ''); ?> </div>
<div><?php echo e($quote->billing_address['state'] ?? ''); ?></div>
<div><?php echo e(core()->country_name($quote->billing_address['country'] ?? '')); ?></div>
</td>
<?php endif; ?>
<?php if($quote->shipping_address): ?>
<td style="width: 50%">
<div><?php echo e($quote->shipping_address['address'] ?? ''); ?></div>
<div><?php echo e($quote->shipping_address['postcode'] ?? '' . ' ' .$quote->shipping_address['city'] ?? ''); ?> </div>
<div><?php echo e($quote->shipping_address['state'] ?? ''); ?></div>
<div><?php echo e(core()->country_name($quote->shipping_address['country'] ?? '')); ?></div>
</td>
<?php endif; ?>
</tr>
</tbody>
</table>
<!-- Items -->
<div class="items">
<table class="<?php echo e(app()->getLocale ()); ?>">
<thead>
<tr>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.sku'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.product-name'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.price'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.quantity'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.amount'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.discount'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.tax'); ?>
</th>
<th>
<?php echo app('translator')->get('admin::app.quotes.index.pdf.grand-total'); ?>
</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $quote->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($item->sku); ?></td>
<td>
<?php echo e($item->name); ?>
</td>
<td><?php echo core()->formatBasePrice($item->price, true); ?></td>
<td class="text-center"><?php echo e($item->quantity); ?></td>
<td class="text-center"><?php echo core()->formatBasePrice($item->total, true); ?></td>
<td class="text-center"><?php echo core()->formatBasePrice($item->discount_amount, true); ?></td>
<td class="text-center"><?php echo core()->formatBasePrice($item->tax_amount, true); ?></td>
<td class="text-center"><?php echo core()->formatBasePrice($item->total + $item->tax_amount - $item->discount_amount, true); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<!-- Summary Table -->
<div class="summary">
<table class="<?php echo e(app()->getLocale ()); ?>">
<tbody>
<tr>
<td><?php echo app('translator')->get('admin::app.quotes.index.pdf.sub-total'); ?></td>
<td>-</td>
<td><?php echo core()->formatBasePrice($quote->sub_total, true); ?></td>
</tr>
<tr>
<td><?php echo app('translator')->get('admin::app.quotes.index.pdf.tax'); ?></td>
<td>-</td>
<td><?php echo core()->formatBasePrice($quote->tax_amount, true); ?></td>
</tr>
<tr>
<td><?php echo app('translator')->get('admin::app.quotes.index.pdf.discount'); ?></td>
<td>-</td>
<td><?php echo core()->formatBasePrice($quote->discount_amount, true); ?></td>
</tr>
<tr>
<td><?php echo app('translator')->get('admin::app.quotes.index.pdf.adjustment'); ?></td>
<td>-</td>
<td><?php echo core()->formatBasePrice($quote->adjustment_amount, true); ?></td>
</tr>
<tr>
<td><strong><?php echo app('translator')->get('admin::app.quotes.index.pdf.grand-total'); ?></strong></td>
<td><strong>-</strong></td>
<td><strong><?php echo core()->formatBasePrice($quote->grand_total, true); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
<?php /**PATH /var/www/html/packages/Webkul/Admin/src/Resources/views/quotes/pdf.blade.php ENDPATH**/ ?>