2020-03-23 18:10:42 +01:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
|
|
|
@section('meta_title', ctrans('texts.view_invoice'))
|
|
|
|
|
2020-04-03 22:12:12 +02:00
|
|
|
@push('head')
|
2020-04-16 10:41:25 +02:00
|
|
|
<meta name="pdf-url" content="{{ $invoice->pdf_file_path() }}">
|
2020-04-03 22:12:12 +02:00
|
|
|
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
|
|
|
|
@endpush
|
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
@section('body')
|
|
|
|
|
2020-11-16 15:37:09 +01:00
|
|
|
@if(!$invoice->isPayable() && $client->getSetting('custom_message_paid_invoice'))
|
2020-04-13 03:48:23 +02:00
|
|
|
@component('portal.ninja2020.components.message')
|
2020-11-16 15:37:09 +01:00
|
|
|
{{ $client->getSetting('custom_message_paid_invoice') }}
|
2020-04-13 03:48:23 +02:00
|
|
|
@endcomponent
|
|
|
|
@endif
|
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
@if($invoice->isPayable())
|
|
|
|
<form action="{{ route('client.invoices.bulk') }}" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4" translate>
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
2021-01-14 03:57:05 +01:00
|
|
|
{{ ctrans('texts.invoice_number_placeholder', ['invoice' => $invoice->number])}} - {{ ctrans('texts.unpaid') }}
|
2020-03-23 18:10:42 +01:00
|
|
|
</h3>
|
|
|
|
<div class="mt-2 max-w-xl text-sm leading-5 text-gray-500">
|
|
|
|
<p translate>
|
2020-03-26 22:43:57 +01:00
|
|
|
{{ ctrans('texts.invoice_still_unpaid') }}
|
2020-03-23 18:10:42 +01:00
|
|
|
<!-- This invoice is still not paid. Click the button to complete the payment. -->
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
|
|
|
|
<div class="inline-flex rounded-md shadow-sm">
|
|
|
|
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
|
|
|
|
<input type="hidden" name="action" value="payment">
|
2020-09-30 13:31:15 +02:00
|
|
|
<button class="button button-primary bg-primary">{{ ctrans('texts.pay_now') }}</button>
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-01-14 03:57:05 +01:00
|
|
|
@else
|
2021-02-15 15:52:13 +01:00
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4">
|
2021-01-14 03:57:05 +01:00
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
2021-01-27 12:45:38 +01:00
|
|
|
{{ ctrans('texts.invoice_number_placeholder', ['invoice' => $invoice->number])}}
|
|
|
|
- {{ ctrans('texts.paid') }}
|
2021-01-14 03:57:05 +01:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endif
|
|
|
|
|
2021-02-15 15:52:13 +01:00
|
|
|
@if($invoice->documents->count() > 0)
|
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4">
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<p class="text-lg leading-6 font-medium text-gray-900">{{ ctrans('texts.attachments') }}:</p>
|
|
|
|
@foreach($invoice->documents as $document)
|
|
|
|
<div class="inline-flex items-center space-x-1">
|
|
|
|
<a href="{{ route('client.documents.show', $document->hashed_id) }}" target="_blank"
|
|
|
|
class="block text-sm button-link text-primary">{{ Illuminate\Support\Str::limit($document->name, 40) }}</a>
|
|
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
|
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
|
|
stroke-linejoin="round" class="text-primary h-6 w-4">
|
|
|
|
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
|
|
|
|
<polyline points="15 3 21 3 21 9"></polyline>
|
|
|
|
<line x1="10" y1="14" x2="21" y2="3"></line>
|
|
|
|
</svg>
|
|
|
|
|
|
|
|
@if(!$loop->last)
|
|
|
|
<span>—</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="flex items-center justify-between mt-4">
|
2020-04-03 22:12:12 +02:00
|
|
|
<section class="flex items-center">
|
2020-04-16 23:18:07 +02:00
|
|
|
<div class="items-center" style="display: none" id="pagination-button-container">
|
|
|
|
<button class="input-label focus:outline-none hover:text-blue-600 transition ease-in-out duration-300" id="previous-page-button" title="Previous page">
|
|
|
|
<svg class="w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
<button class="input-label focus:outline-none hover:text-blue-600 transition ease-in-out duration-300" id="next-page-button" title="Next page">
|
|
|
|
<svg class="w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
|
|
</svg>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-01-27 12:45:38 +01:00
|
|
|
<span class="text-sm text-gray-700 ml-2">{{ ctrans('texts.page') }}:
|
2020-04-16 23:18:07 +02:00
|
|
|
<span id="current-page-container"></span>
|
|
|
|
<span>{{ strtolower(ctrans('texts.of')) }}</span>
|
|
|
|
<span id="total-page-container"></span>
|
|
|
|
</span>
|
2020-04-03 22:12:12 +02:00
|
|
|
</section>
|
2020-06-17 16:52:39 +02:00
|
|
|
<section class="flex items-center space-x-1">
|
|
|
|
<div class="flex items-center mr-4 space-x-1">
|
2020-07-29 15:27:43 +02:00
|
|
|
<span class="text-gray-600 mr-2" id="zoom-level">100%</span>
|
2020-06-17 16:52:39 +02:00
|
|
|
<a href="#" id="zoom-in">
|
|
|
|
<svg class="text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600 cursor-pointer" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
|
|
|
|
</a>
|
|
|
|
<a href="#" id="zoom-out">
|
|
|
|
<svg class="text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600 cursor-pointer" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>
|
|
|
|
</a>
|
2020-04-03 22:12:12 +02:00
|
|
|
</div>
|
2020-06-17 16:52:39 +02:00
|
|
|
<div x-data="{ open: false }" @keydown.escape="open = false" @click.away="open = false" class="relative inline-block text-left">
|
|
|
|
<div>
|
|
|
|
<button @click="open = !open" class="flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600">
|
|
|
|
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
|
|
|
|
<path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" />
|
|
|
|
</svg>
|
|
|
|
</button>
|
2020-04-03 22:12:12 +02:00
|
|
|
</div>
|
2020-06-17 16:52:39 +02:00
|
|
|
<div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg">
|
|
|
|
<div class="rounded-md bg-white shadow-xs">
|
|
|
|
<div class="py-1">
|
2020-06-18 12:48:31 +02:00
|
|
|
<a target="_blank" href="?mode=fullscreen" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ ctrans('texts.open_in_new_tab') }}</a>
|
2020-06-17 16:52:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-03 22:12:12 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-17 16:52:39 +02:00
|
|
|
</section>
|
2020-04-03 22:12:12 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex justify-center">
|
|
|
|
<canvas id="pdf-placeholder" class="shadow rounded-lg bg-white mt-4 p-4"></canvas>
|
|
|
|
</div>
|
|
|
|
@endsection
|
2020-03-23 18:10:42 +01:00
|
|
|
|
2020-04-03 22:12:12 +02:00
|
|
|
@section('footer')
|
|
|
|
<script src="{{ asset('js/clients/shared/pdf.js') }}"></script>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endsection
|