2020-03-23 18:10:42 +01:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
|
|
|
@section('meta_title', ctrans('texts.pay_now'))
|
|
|
|
|
|
|
|
@push('head')
|
2020-09-18 11:02:21 +02:00
|
|
|
<meta name="show-invoice-terms" content="{{ $settings->show_accept_invoice_terms ? true : false }}">
|
|
|
|
<meta name="require-invoice-signature" content="{{ $settings->require_invoice_signature ? true : false }}">
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endpush
|
|
|
|
|
|
|
|
@section('body')
|
2021-01-11 15:34:46 +01:00
|
|
|
<form action="{{ route('client.payments.process') }}" method="post" id="payment-form" onkeypress="return event.keyCode != 13;">
|
2020-09-18 11:02:21 +02:00
|
|
|
@csrf
|
|
|
|
<input type="hidden" name="company_gateway_id" id="company_gateway_id">
|
|
|
|
<input type="hidden" name="payment_method_id" id="payment_method_id">
|
|
|
|
<input type="hidden" name="signature">
|
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
<div class="container mx-auto">
|
|
|
|
<div class="grid grid-cols-6 gap-4">
|
|
|
|
<div class="col-span-6 md:col-start-2 md:col-span-4">
|
|
|
|
<div class="flex justify-end">
|
|
|
|
<div class="flex justify-end mb-2">
|
2021-02-18 13:37:27 +01:00
|
|
|
@livewire('pay-now-dropdown', ['total' => $total])
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-24 23:13:47 +01:00
|
|
|
|
2020-08-26 02:47:50 +02:00
|
|
|
@foreach($invoices as $key => $invoice)
|
2020-09-18 11:02:21 +02:00
|
|
|
<input type="hidden" name="payable_invoices[{{$key}}][invoice_id]" value="{{ $invoice->hashed_id }}">
|
|
|
|
<div class="mb-4 overflow-hidden bg-white shadow sm:rounded-lg">
|
|
|
|
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
|
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
|
|
|
{{ ctrans('texts.invoice') }}
|
2020-09-30 13:31:15 +02:00
|
|
|
<a class="button-link text-primary" href="{{ route('client.invoice.show', $invoice->hashed_id) }}">
|
2020-09-18 11:02:21 +02:00
|
|
|
(#{{ $invoice->number }})
|
|
|
|
</a>
|
|
|
|
</h3>
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
<div>
|
|
|
|
<dl>
|
|
|
|
@if(!empty($invoice->number) && !is_null($invoice->number))
|
2020-12-10 12:38:07 +01:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2020-09-18 11:02:21 +02:00
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.invoice_number') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $invoice->number }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($invoice->due_date) && !is_null($invoice->due_date))
|
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.due_date') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $invoice->due_date }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2020-12-10 12:38:07 +01:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2020-09-18 11:02:21 +02:00
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.additional_info') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
@if($invoice->po_number)
|
2020-09-24 11:29:47 +02:00
|
|
|
{{ $invoice->po_number }}
|
2020-09-18 11:02:21 +02:00
|
|
|
@elseif($invoice->public_notes)
|
2020-09-24 11:29:47 +02:00
|
|
|
{{ $invoice->public_notes }}
|
2020-09-18 11:02:21 +02:00
|
|
|
@else
|
2020-09-24 11:29:47 +02:00
|
|
|
{{ $invoice->date}}
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(!empty($invoice->amount) && !is_null($invoice->amount))
|
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.amount') }}
|
|
|
|
</dt>
|
2020-09-24 11:29:47 +02:00
|
|
|
<dd class="text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2 flex flex-col">
|
2020-09-18 11:02:21 +02:00
|
|
|
<!-- App\Utils\Number::formatMoney($invoice->amount, $invoice->client) -->
|
2020-09-24 11:29:47 +02:00
|
|
|
<!-- Disabled input field don't send it's value with request. -->
|
|
|
|
@if(!$settings->client_portal_allow_under_payment && !$settings->client_portal_allow_over_payment)
|
2021-01-11 15:34:46 +01:00
|
|
|
<label>
|
|
|
|
{{ $invoice->client->currency()->code }} ({{ $invoice->client->currency()->symbol }})
|
|
|
|
|
|
|
|
<input
|
|
|
|
name="payable_invoices[{{$key}}][amount]"
|
|
|
|
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"
|
|
|
|
class="mt-1 text-sm text-gray-800"
|
|
|
|
readonly />
|
|
|
|
</label>
|
2020-09-24 11:29:47 +02:00
|
|
|
@else
|
|
|
|
<div class="flex items-center">
|
2021-01-11 15:34:46 +01:00
|
|
|
<label>
|
2020-09-24 11:29:47 +02:00
|
|
|
<span class="mt-2">{{ $invoice->client->currency()->code }} ({{ $invoice->client->currency()->symbol }})</span>
|
2021-01-11 15:34:46 +01:00
|
|
|
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="input mt-0 mr-4 relative"
|
|
|
|
name="payable_invoices[{{$key}}][amount]"
|
|
|
|
value="{{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }}"/>
|
|
|
|
</label>
|
2020-09-24 11:29:47 +02:00
|
|
|
</div>
|
2021-01-11 15:34:46 +01:00
|
|
|
@endif
|
2020-09-24 11:29:47 +02:00
|
|
|
|
|
|
|
@if($settings->client_portal_allow_under_payment)
|
|
|
|
<span class="mt-1 text-sm text-gray-800">{{ ctrans('texts.minimum_payment') }}: {{ $settings->client_portal_under_payment_minimum }}</span>
|
|
|
|
@endif
|
2020-09-18 11:02:21 +02:00
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endforeach
|
2021-01-27 14:10:24 +01:00
|
|
|
|
|
|
|
@if(intval($total) == 0)
|
|
|
|
<small>* {{ ctrans('texts.online_payments_minimum_note') }}</small>
|
|
|
|
@endif
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
</form>
|
2020-09-24 11:29:47 +02:00
|
|
|
|
2020-11-17 16:56:36 +01:00
|
|
|
@include('portal.ninja2020.invoices.includes.terms', ['entities' => $invoices, 'entity_type' => ctrans('texts.invoice')])
|
2020-09-18 11:02:21 +02:00
|
|
|
@include('portal.ninja2020.invoices.includes.signature')
|
2020-09-24 11:29:47 +02:00
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('footer')
|
2020-09-24 11:29:47 +02:00
|
|
|
<script src="{{ asset('js/clients/invoices/payment.js') }}"></script>
|
2021-01-11 15:34:46 +01:00
|
|
|
@endpush
|