akaunting 3.0 (the last dance)
This commit is contained in:
@ -0,0 +1,98 @@
|
||||
<x-show.accordion type="make_payment" :open="($accordionActive == 'make-payment')">
|
||||
<x-slot name="head">
|
||||
<x-show.accordion.head
|
||||
title="{{ trans('bills.make_payment') }}"
|
||||
description="{!! $description !!}"
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="body" class="block" override="class">
|
||||
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
|
||||
@stack('timeline_get_paid_body_button_payment_start')
|
||||
|
||||
@if (! $hideAddPayment)
|
||||
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
|
||||
<x-button
|
||||
@click="onPayment"
|
||||
id="button-payment"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('invoices.add_payment') }}
|
||||
</x-button>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('timeline_get_paid_body_button_payment_end')
|
||||
</div>
|
||||
|
||||
<div class="text-xs mt-1" style="margin-left: 0 !important;">
|
||||
<span class="font-medium">
|
||||
{{ trans('bills.payment_made') }} :
|
||||
</span>
|
||||
|
||||
@if ($transactions->count())
|
||||
@foreach ($transactions as $transaction)
|
||||
<div class="my-2">
|
||||
<span>
|
||||
<x-date :date="$transaction->paid_at" />
|
||||
- {!! trans('documents.transaction', [
|
||||
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
|
||||
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
|
||||
]) !!}
|
||||
</span>
|
||||
|
||||
</br>
|
||||
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="button-email-send" class="text-purple" override="class" @click="onEmail('{{ route($transactionEmailRoute, $transaction->id) }}')">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button>
|
||||
@else
|
||||
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
|
||||
<x-button class="text-purple" override="class" disabled="disabled">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
|
||||
<span> - </span>
|
||||
|
||||
<x-button
|
||||
@click="onEditPayment('{{ $transaction->id }}')"
|
||||
id="button-edit-payment"
|
||||
class="text-purple"
|
||||
override="class"
|
||||
>
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
|
||||
</x-button>
|
||||
|
||||
<span> - </span>
|
||||
|
||||
@php
|
||||
$message = trans('general.delete_confirm', [
|
||||
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
|
||||
'type' => strtolower(trans_choice('general.transactions', 1))
|
||||
]);
|
||||
@endphp
|
||||
|
||||
<x-delete-link
|
||||
:model="$transaction"
|
||||
:route="'transactions.destroy'"
|
||||
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
:message="$message"
|
||||
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
|
||||
class="text-purple"
|
||||
text-class="text-purple"
|
||||
override="class"
|
||||
/>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="my-2">
|
||||
<span>{{ trans('general.no_records') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-show.accordion>
|
Reference in New Issue
Block a user