2020-03-23 18:10:42 +01:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
|
|
|
@section('meta_title', ctrans('texts.payment'))
|
|
|
|
|
|
|
|
@section('body')
|
2021-01-13 16:20:19 +01:00
|
|
|
<div class="container mx-auto">
|
|
|
|
<div class="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.payment') }}
|
|
|
|
</h3>
|
|
|
|
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500" translate>
|
|
|
|
{{ ctrans('texts.payment_details') }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<dl>
|
2023-03-16 06:45:40 +01:00
|
|
|
|
|
|
|
@if(!empty($payment->status_id) && !is_null($payment->status_id))
|
|
|
|
<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.status') }}
|
|
|
|
</dt>
|
|
|
|
<div class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2024-01-26 00:04:50 +01:00
|
|
|
{!! $payment->badgeForStatus() !!}
|
2023-03-16 06:45:40 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2021-01-13 16:20:19 +01:00
|
|
|
@if(!empty($payment->clientPaymentDate()) && !is_null($payment->clientPaymentDate()))
|
2021-05-11 15:02:52 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2021-01-13 16:20:19 +01:00
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.payment_date') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $payment->clientPaymentDate() }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
2020-09-18 11:02:21 +02:00
|
|
|
|
2021-05-11 15:02:52 +02:00
|
|
|
@if(!empty($payment->number) && !is_null($payment->number))
|
|
|
|
<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.number') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $payment->number }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2021-01-13 16:20:19 +01:00
|
|
|
@if(!empty($payment->transaction_reference) && !is_null($payment->transaction_reference))
|
|
|
|
<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.transaction_reference') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2020-11-01 15:56:17 +01:00
|
|
|
<span class="break-all">
|
|
|
|
{{ $payment->transaction_reference }}
|
|
|
|
</span>
|
2021-01-13 16:20:19 +01:00
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
2020-09-18 11:02:21 +02:00
|
|
|
|
2023-03-10 07:49:43 +01:00
|
|
|
|
2021-05-11 15:02:52 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2021-01-13 16:20:19 +01:00
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.method') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2023-03-10 07:49:43 +01:00
|
|
|
{{ $payment->translatedType() }}
|
2021-01-13 16:20:19 +01:00
|
|
|
</dd>
|
|
|
|
</div>
|
2023-03-10 07:49:43 +01:00
|
|
|
|
2020-09-18 11:02:21 +02:00
|
|
|
|
2021-01-13 16:20:19 +01:00
|
|
|
@if(!empty($payment->formattedAmount()) && !is_null($payment->formattedAmount()))
|
|
|
|
<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>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2023-01-19 04:45:34 +01:00
|
|
|
{{ $payment->formatAmount($payment->amount > 0 ? $payment->amount : $payment?->invoices->sum('pivot.amount')) }}
|
2021-01-13 16:20:19 +01:00
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($payment->status_id) && !is_null($payment->status_id))
|
|
|
|
|
2021-01-26 17:21:12 +01:00
|
|
|
@if($payment->refunded > 0)
|
|
|
|
<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.refunded') }}
|
|
|
|
</dt>
|
|
|
|
<div class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ \App\Utils\Number::formatMoney($payment->refunded, $payment->client) }}
|
|
|
|
</div>
|
2021-01-13 16:20:19 +01:00
|
|
|
</div>
|
2021-01-26 17:21:12 +01:00
|
|
|
@endif
|
2023-03-16 06:45:40 +01:00
|
|
|
|
|
|
|
@if($payment->applied != $payment->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.remaining') }}
|
|
|
|
</dt>
|
|
|
|
<div class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ \App\Utils\Number::formatMoney($payment->amount - $payment->applied, $payment->client) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2021-01-13 16:20:19 +01:00
|
|
|
@endif
|
|
|
|
</dl>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
</div>
|
2021-01-13 16:20:19 +01:00
|
|
|
<div class="mt-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.invoices') }}
|
|
|
|
</h3>
|
|
|
|
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.list_of_payment_invoices') }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<dl>
|
|
|
|
@foreach($payment->invoices as $invoice)
|
2023-05-03 01:59:53 +02:00
|
|
|
@if(!$invoice->is_proforma && !$invoice->is_deleted)
|
2021-05-11 15:02:52 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2021-01-13 16:20:19 +01:00
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.invoice_number') }}
|
|
|
|
</dt>
|
|
|
|
<div class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
<a class="button-link text-primary"
|
|
|
|
href="{{ route('client.invoice.show', ['invoice' => $invoice->hashed_id])}}">
|
|
|
|
{{ $invoice->number }}
|
|
|
|
</a>
|
2023-01-19 04:45:34 +01:00
|
|
|
- {{ \App\Utils\Number::formatMoney($payment->invoices->where('id', $invoice->id)->sum('pivot.amount') - $payment->invoices->where('id', $invoice->id)->sum('pivot.refunded'), $payment->client) }}
|
2021-01-13 16:20:19 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-03-16 06:45:40 +01:00
|
|
|
@endif
|
2021-01-13 16:20:19 +01:00
|
|
|
@endforeach
|
|
|
|
</dl>
|
|
|
|
</div>
|
2023-02-27 05:32:37 +01:00
|
|
|
|
|
|
|
<!-- if this is a stripe bank transfer - show the required details here: -->
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
2023-02-27 05:32:37 +01:00
|
|
|
@if($bank_details)
|
|
|
|
@include('portal.ninja2020.gateways.stripe.bank_transfer.bank_details')
|
|
|
|
@endif
|
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
2021-01-13 16:20:19 +01:00
|
|
|
@endsection
|