2023-07-16 04:40:32 +02:00
|
|
|
|
@push('head')
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
table, th, td {
|
2023-07-12 04:50:57 +02:00
|
|
|
|
/* border: 1px solid black; */
|
2023-07-11 13:16:15 +02:00
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
td
|
|
|
|
|
{
|
|
|
|
|
max-width: 1px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
margin-right:10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
2023-07-16 04:40:32 +02:00
|
|
|
|
@endpush
|
2023-07-12 06:55:48 +02:00
|
|
|
|
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div class="w-full bg-white py-3 border-2 shadow sm:rounded-lg">
|
|
|
|
|
|
|
|
|
|
<div class="px-3 border-fuchsia-600 border-b-2 pb-3">
|
|
|
|
|
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<div id="company-details" class="mx-auto">
|
|
|
|
|
{!! $company_details !!}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div class="border-fuchsia-600 border-b-2 pb-3 mt-3">
|
2023-07-12 02:44:19 +02:00
|
|
|
|
|
2023-07-12 08:57:03 +02:00
|
|
|
|
<div id="entity-details"> {!! $entity_details !!} </div>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
|
|
|
|
|
</div>
|
2023-07-12 04:50:57 +02:00
|
|
|
|
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<div id="user-details" class="mt-3 px-3 border-b-2 border-fuschia-600 flex flex-col items-end">
|
2023-07-12 04:50:57 +02:00
|
|
|
|
|
|
|
|
|
<div x-data="{ show_user: false }" class="mb-3">
|
|
|
|
|
|
|
|
|
|
<button @click="show_user = !show_user" :aria-expanded="show_user ? 'true' : 'false'" :class="{ 'active': show_user }" class="bg-gray-100 hover:bg-gray-200 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center">
|
|
|
|
|
<span class="overflow-ellipsis overflow-hidden">{{ $user_name }}</span>
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div id="terms" class="py-3" x-show="show_user">
|
|
|
|
|
{!! $user_details !!}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2023-07-12 02:44:19 +02:00
|
|
|
|
</div>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
|
|
|
|
|
@if($products->count() > 0)
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div id="product-details" class="py-6 mr-5 ml-5">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<table width="100%">
|
|
|
|
|
<thead>
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<tr class="border-b-2">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<th style="text-align:left; width:70%; padding-left:2px;">Item</th>
|
|
|
|
|
<th style="text-align:right; width:30%; padding-right:2px;">Amount</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($products as $product)
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<tr style="display: table-row;" class="border-b-2">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<td>
|
|
|
|
|
<div class="product-information">
|
|
|
|
|
<div class="item-details">
|
2023-12-22 21:22:29 +01:00
|
|
|
|
|
|
|
|
|
<p class="overflow-ellipsis overflow-hidden px-1 mb-2">{!! $product['notes'] !!}</p>
|
2023-07-13 04:43:54 +02:00
|
|
|
|
<p class="mt-2">
|
|
|
|
|
@if($show_quantity)
|
|
|
|
|
{{ $product['quantity'] }} x
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@if($show_cost)
|
|
|
|
|
{{ $product['cost'] }}
|
|
|
|
|
@endif
|
2023-12-22 21:22:29 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
2023-07-19 11:25:01 +02:00
|
|
|
|
|
|
|
|
|
<td style="text-align:right; padding-right:2px;">
|
|
|
|
|
@if($show_line_total)
|
|
|
|
|
{{ $product['line_total'] }}
|
|
|
|
|
@endif
|
|
|
|
|
</td>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
@if($services->count() > 0)
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<div id="task-details" class="py-6 mr-3 ml-3">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<table width="100%">
|
|
|
|
|
<thead>
|
2023-07-20 13:17:01 +02:00
|
|
|
|
<tr class="border-b-2">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<th style="text-align:left; width:70%; padding-left:2px;">Service</th>
|
|
|
|
|
<th style="text-align:right; width:30%; padding-right:2px;">Amount</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($services as $service)
|
2023-07-20 13:17:01 +02:00
|
|
|
|
<tr style="display: table-row;" class="border-b-2">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<td>
|
|
|
|
|
<div class="">
|
|
|
|
|
<div class="">
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<p class="mt-2">{{ $service['quantity'] }} × {{ $service['cost'] }}</p>
|
2023-07-20 13:17:01 +02:00
|
|
|
|
<p class="overflow-ellipsis overflow-hidden px-1 mb-2">{!! $service['notes'] !!}</p>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="text-align:right; padding-right:2px;">{{ $service['line_total'] }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<div id="totals" class="mb-10 mr-3 ml-3">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
<table width="100%">
|
|
|
|
|
<tbody>
|
2023-12-12 10:49:44 +01:00
|
|
|
|
@if($discount)
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:left; padding-right:10px;" class="text-lg">{{ ctrans('texts.discount') }}</td>
|
|
|
|
|
<td style="text-align:right; padding-right:10px;" class="text-lg">{{ $discount }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endif
|
|
|
|
|
@if($taxes)
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:left; padding-right:10px;" class="text-lg">{{ ctrans('texts.tax') }}</td>
|
|
|
|
|
<td style="text-align:right; padding-right:10px;" class="text-lg">{{ $taxes }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endif
|
2023-07-12 08:57:03 +02:00
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:left; padding-right:10px;" class="text-lg">{{ ctrans('texts.total') }}</td>
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<td style="text-align:right; padding-right:10px;" class="text-lg">{{ $amount }}</td>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</tr>
|
2023-07-25 10:24:37 +02:00
|
|
|
|
@if(!$is_quote)
|
2023-07-12 08:57:03 +02:00
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align:left; padding-right:10px;" class="text-lg">{{ ctrans('texts.balance') }}</td>
|
2023-07-12 06:06:32 +02:00
|
|
|
|
<td style="text-align:right; padding-right:10px;" class="text-lg">{{ $balance }}</td>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</tr>
|
2023-07-25 10:24:37 +02:00
|
|
|
|
@endif
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if(strlen($entity->public_notes) > 3)
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div x-data="{ show_notes: false }" class="mb-10 mr-5 ml-5 flex flex-col items-end">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<button @click="show_notes = !show_notes" :aria-expanded="show_notes ? 'true' : 'false'" :class="{ 'active': show_notes }" class="bg-gray-100 hover:bg-gray-200 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center">
|
2023-07-12 02:44:19 +02:00
|
|
|
|
<span>{{ ctrans('texts.notes') }}</span>
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div id="notes" class="py-10 border-b-2 border-fuschia-600" x-show="show_notes">
|
2023-10-29 02:09:00 +02:00
|
|
|
|
{!! html_entity_decode($entity->public_notes) !!}
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@if(strlen($entity->terms) > 3)
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div x-data="{ show_terms: false }" class="mb-10 mr-5 ml-5 flex flex-col items-end">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
|
|
|
|
|
<button @click="show_terms = !show_terms" :aria-expanded="show_terms ? 'true' : 'false'" :class="{ 'active': show_terms }" class="bg-gray-100 hover:bg-gray-200 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center">
|
2023-07-12 02:44:19 +02:00
|
|
|
|
<span>{{ ctrans('texts.terms') }}</span>
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div id="terms" class="py-10 border-b-2 border-fuschia-600" x-show="show_terms">
|
2023-10-29 02:09:00 +02:00
|
|
|
|
{!! html_entity_decode($entity->terms) !!}
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@if(strlen($entity->footer) > 3)
|
2023-07-12 04:50:57 +02:00
|
|
|
|
<div x-data="{ show_footer: false }" class="mb-10 mr-5 ml-5 flex flex-col items-end">
|
2023-07-11 13:16:15 +02:00
|
|
|
|
|
|
|
|
|
<button @click="show_footer = !show_footer" :aria-expanded="show_footer ? 'true' : 'false'" :class="{ 'active': show_footer }" class="bg-gray-100 hover:bg-gray-200 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center">
|
|
|
|
|
<span>{{ ctrans('texts.footer') }}</span>
|
2023-07-12 02:44:19 +02:00
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div id="terms" class="py-10 border-b-2 border-fuschia-600" x-show="show_footer">
|
2023-10-29 02:09:00 +02:00
|
|
|
|
{!! html_entity_decode($entity->footer) !!}
|
2023-07-11 13:16:15 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
2023-07-12 08:57:03 +02:00
|
|
|
|
@endif
|
|
|
|
|
|
2023-07-16 04:40:32 +02:00
|
|
|
|
@push('head')
|
2023-07-12 08:57:03 +02:00
|
|
|
|
<script>
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
|
|
|
|
|
Array.from(document.getElementsByClassName("entity-field")).forEach(function(item) {
|
|
|
|
|
if(item.innerText.length == 0){
|
|
|
|
|
item.parentNode.remove();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
|
document.addEventListener('livewire:init', () => {
|
|
|
|
|
|
|
|
|
|
Livewire.hook('message.processed', (message, component) => {
|
|
|
|
|
|
|
|
|
|
Array.from(document.getElementsByClassName("entity-field")).forEach(function(item) {
|
|
|
|
|
if(item.innerText.length == 0){
|
|
|
|
|
item.parentNode.remove();
|
|
|
|
|
}
|
|
|
|
|
});
|
2023-07-12 08:57:03 +02:00
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
|
});
|
|
|
|
|
|
2023-07-12 08:57:03 +02:00
|
|
|
|
var timeout = false;
|
|
|
|
|
|
|
|
|
|
/* Watch for resize of window and ensure we unset props with no values */
|
|
|
|
|
window.addEventListener('resize', function() {
|
|
|
|
|
clearTimeout(timeout);
|
|
|
|
|
timeout = setTimeout(getDimensions, 250);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
getDimensions();
|
|
|
|
|
|
|
|
|
|
function getDimensions() {
|
|
|
|
|
|
|
|
|
|
const width = window.innerWidth;
|
|
|
|
|
|
|
|
|
|
if(width < 900){
|
|
|
|
|
|
|
|
|
|
Array.from(document.getElementsByClassName("entity-field")).forEach(function(item) {
|
|
|
|
|
if(item.innerText.length == 0){
|
|
|
|
|
item.parentNode.remove();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2023-07-16 04:40:32 +02:00
|
|
|
|
@endpush
|