akaunting 3.0 (the last dance)
This commit is contained in:
@@ -1,58 +1,94 @@
|
||||
@extends('layouts.portal')
|
||||
<x-layouts.portal>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.payments', 2) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.payments', 2))
|
||||
<x-slot name="content">
|
||||
@if ($payments->count() || request()->get('search', false))
|
||||
<x-index.container>
|
||||
<x-index.search search-string="App\Models\Portal\Banking\Transaction" />
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0">
|
||||
{!! Form::open([
|
||||
'route' => 'portal.payments.index',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<x-table>
|
||||
<x-table.thead>
|
||||
<x-table.tr class="flex items-center px-1">
|
||||
<x-table.th override="class" class="p-0"></x-table.th>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 align-items-center">
|
||||
<x-search-string model="App\Models\Portal\Banking\Transaction" />
|
||||
</div>
|
||||
</div>
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-sortablelink column="paid_at" title="{{ trans('general.date') }}" />
|
||||
</x-table.th>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-sortablelink column="payment_method" title="{{ trans_choice('general.payment_methods', 1) }}" />
|
||||
</x-table.th>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-3 col-sm-3">@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th class="col-xs-3 col-sm-3">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-xs-6 col-sm-3">@sortablelink('payment_method', trans_choice('general.payment_methods', 1))</th>
|
||||
<th class="col-sm-3 d-none d-sm-block">@sortablelink('description', trans('general.description'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-sortablelink column="description" title="{{ trans('general.description') }}" />
|
||||
</x-table.th>
|
||||
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr class="row align-items-center border-top-1 tr-py">
|
||||
<td class="col-xs-3 col-sm-3"><a href="{{ route('portal.payments.show', $item->id) }}">@date($item->paid_at)</a></td>
|
||||
<td class="col-xs-3 col-sm-3">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-xs-6 col-sm-3">{{ $payment_methods[$item->payment_method] }}</td>
|
||||
<td class="col-sm-3 d-none d-sm-block">{{ $item->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<x-table.th class="w-3/12" kind="amount">
|
||||
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $payments])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
<x-table.tbody>
|
||||
@foreach($payments as $item)
|
||||
<x-table.tr href="{{ route('portal.payments.show', $item->id) }}">
|
||||
<x-table.td kind="action"></x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12">
|
||||
<span class="font-bold"><x-date date="{{ $item->paid_at }}" /></span>
|
||||
</x-table.td>
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/portal/payments.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-table.td class="w-4/12 sm:w-3/12">
|
||||
{{ $payment_methods[$item->payment_method] }}
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-3/12 hidden sm:table-cell">
|
||||
{{ $item->description }}
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-3/12" kind="amount">
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||
</x-table.td>
|
||||
</x-table.tr>
|
||||
@endforeach
|
||||
</x-table.tbody>
|
||||
</x-table>
|
||||
|
||||
<x-pagination :items="$payments" />
|
||||
</x-index.container>
|
||||
@else
|
||||
<x-empty-page
|
||||
group="banking"
|
||||
page="transactions"
|
||||
hide-button-import
|
||||
:buttons="[
|
||||
[
|
||||
'url' => route('transactions.create', ['type' => 'income']),
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'description' => trans('general.empty.actions.new', ['type' => trans_choice('general.incomes', 1)]),
|
||||
'active_badge' => false
|
||||
],
|
||||
[
|
||||
'url' => route('transactions.create', ['type' => 'expense']),
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]),
|
||||
'description' => trans('general.empty.actions.new', ['type' => trans_choice('general.expenses', 1)]),
|
||||
'active_badge' => false
|
||||
],
|
||||
[
|
||||
'url' => 'https://akaunting.com/premium-cloud',
|
||||
'permission' => 'create-banking-transactions',
|
||||
'text' => trans('import.title', ['type' => trans_choice('general.bank_transactions', 2)]),
|
||||
'description' => '',
|
||||
'active_badge' => false
|
||||
]
|
||||
]"
|
||||
/>
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
<x-script folder="portal" file="apps" />
|
||||
</x-layouts.portal>
|
||||
|
||||
71
resources/views/portal/payments/preview.blade.php
Normal file
71
resources/views/portal/payments/preview.blade.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<x-layouts.preview>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.payments', 1) . ': '}} <x-date date="{{ $payment->paid_at }}" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="sticky" description="{{ trans('transactions.sticky.description') }}" url="{{ route('transactions.show', $payment->id) }}"></x-slot>
|
||||
|
||||
<x-slot name="buttons">
|
||||
@stack('button_pdf_start')
|
||||
<x-link href="{{ route('preview.payments.pdf', $payment->id) }}" class="bg-green text-white px-3 py-1.5 mb-3 sm:mt-2 sm:mb-0 rounded-lg text-sm font-medium leading-6 hover:bg-green-700">
|
||||
{{ trans('general.download') }}
|
||||
</x-link>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_print_start')
|
||||
<x-link href="{{ route('preview.payments.print', $payment->id) }}" target="_blank" class="px-3 py-1.5 mb-3 sm:mt-2 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium leading-6">
|
||||
{{ trans('general.print') }}
|
||||
</x-link>
|
||||
@stack('button_print_end')
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<div class="flex flex-col lg:flex-row my-10 lg:space-x-24 rtl:space-x-reverse space-y-12 lg:space-y-0">
|
||||
<div class="w-full lg:w-5/12 space-y-8">
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full text-left group">
|
||||
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
|
||||
{{ trans('portal.received_date') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="relative overflow-hidden transition-all duration-700">
|
||||
<span class="text-sm">
|
||||
<x-date date="{{ $payment->paid_at }}" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Status partials-->
|
||||
@if ($payment->document)
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full ltr:text-left rtl:text-right">
|
||||
<span class="font-medium">
|
||||
{{ trans('portal.payments') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="text-sm">
|
||||
{{ trans('portal.payment_detail.description', ['date' => date($payment->paid_at), 'amount' => money($payment->amount, $payment->currency_code, true)]) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-7/12">
|
||||
<x-transactions.show.template
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
transaction-template="{{ setting('payment.template', 'default') }}"
|
||||
hide-payment-methods
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
|
||||
<x-script folder="portal" file="apps" />
|
||||
</x-layouts.preview>
|
||||
@@ -1,39 +1,67 @@
|
||||
@extends('layouts.portal')
|
||||
<x-layouts.portal>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.payments', 1) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.payments', 1) . ': ' . @date($payment->paid_at))
|
||||
<x-slot name="buttons">
|
||||
@stack('button_pdf_start')
|
||||
<x-link href="{{ route('portal.payments.pdf', $payment->id) }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 text-white font-medium rounded-xl text-sm leading-6">
|
||||
{{ trans('general.download') }}
|
||||
</x-link>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_print_start')
|
||||
<x-link href="{{ route('portal.payments.print', $payment->id) }}" target="_blank" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-sm font-medium leading-6">
|
||||
{{ trans('general.print') }}
|
||||
</x-link>
|
||||
@stack('button_print_end')
|
||||
</x-slot>
|
||||
|
||||
@section('new_button')
|
||||
@stack('button_print_start')
|
||||
<a href="{{ route('portal.payments.print', $payment->id) }}" target="_blank" class="btn btn-white btn-sm">
|
||||
{{ trans('general.print') }}
|
||||
</a>
|
||||
@stack('button_print_end')
|
||||
<x-slot name="content">
|
||||
<div class="flex flex-col lg:flex-row my-10 lg:space-x-24 rtl:space-x-reverse space-y-12 lg:space-y-0">
|
||||
<div class="w-full lg:w-5/12 space-y-8">
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full text-left group">
|
||||
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
|
||||
{{ trans('portal.received_date') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@stack('button_pdf_start')
|
||||
<a href="{{ route('portal.payments.pdf', $payment->id) }}" class="btn btn-white btn-sm">
|
||||
{{ trans('general.download') }}
|
||||
</a>
|
||||
@stack('button_pdf_end')
|
||||
@endsection
|
||||
<div class="relative overflow-hidden transition-all duration-700">
|
||||
<span class="text-sm">
|
||||
<x-date date="{{ $payment->paid_at }}" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('content')
|
||||
<x-transactions.show.header
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
hide-header-contact
|
||||
class-header-status="col-md-8"
|
||||
/>
|
||||
<!--Status partials-->
|
||||
@if ($payment->document)
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full ltr:text-left rtl:text-right">
|
||||
<span class="font-medium">
|
||||
{{ trans('portal.payments') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<x-transactions.show.transaction
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
transaction-template="{{ setting('payment.template', 'default') }}"
|
||||
hide-payment-methods
|
||||
/>
|
||||
@endsection
|
||||
<span class="text-sm">
|
||||
{{ trans('portal.payment_detail.description', ['date' => date($payment->paid_at), 'amount' => money($payment->amount, $payment->currency_code, true)]) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@push('footer_start')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
<div class="w-full lg:w-7/12">
|
||||
<x-transactions.show.template
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
transaction-template="{{ setting('payment.template', 'default') }}"
|
||||
hide-payment-methods
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<script src="{{ asset('public/js/portal/payments.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
</x-layouts.portal>
|
||||
@@ -1,46 +1,80 @@
|
||||
@extends('layouts.signed')
|
||||
<div class="w-full lg:max-w-6xl m-auto">
|
||||
<x-layouts.signed>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.payments', 1) . ': ' . date($payment->paid_at) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.payments', 1) . ': ' . @date($payment->paid_at))
|
||||
<x-slot name="buttons">
|
||||
@stack('button_pdf_start')
|
||||
<x-link href="{{ $pdf_action }}" class="bg-green text-white px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-sm font-medium leading-6 hover:bg-green-700">
|
||||
{{ trans('general.download') }}
|
||||
</x-link>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@section('new_button')
|
||||
@stack('button_print_start')
|
||||
<a href="{{ $print_action }}" target="_blank" class="btn btn-white btn-sm">
|
||||
{{ trans('general.print') }}
|
||||
</a>
|
||||
@stack('button_print_end')
|
||||
@stack('button_print_start')
|
||||
<x-link href="{{ $print_action }}" target="_blank" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium leading-6">
|
||||
{{ trans('general.print') }}
|
||||
</x-link>
|
||||
@stack('button_print_end')
|
||||
|
||||
@stack('button_pdf_start')
|
||||
<a href="{{ $pdf_action }}" class="btn btn-white btn-sm">
|
||||
{{ trans('general.download') }}
|
||||
</a>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_dashboard_start')
|
||||
@if (! user())
|
||||
<x-link href="{{ route('portal.dashboard') }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium leading-6">
|
||||
{{ trans('payments.all_payments') }}
|
||||
</x-link>
|
||||
@endif
|
||||
@stack('button_dashboard_end')
|
||||
</x-slot>
|
||||
|
||||
@stack('button_dashboard_start')
|
||||
@if (!user())
|
||||
<a href="{{ route('portal.dashboard') }}" class="btn btn-white btn-sm">
|
||||
{{ trans('payments.all_payments') }}
|
||||
</a>
|
||||
@endif
|
||||
@stack('button_dashboard_end')
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<div class="flex flex-col lg:flex-row my-10 lg:space-x-24 rtl:space-x-reverse space-y-12 lg:space-y-0">
|
||||
<div class="w-full lg:w-5/12 space-y-8">
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full text-left group">
|
||||
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
|
||||
{{ trans('portal.received_date') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@section('content')
|
||||
<x-transactions.show.header
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
hide-header-contact
|
||||
class-header-status="col-md-8"
|
||||
/>
|
||||
<div class="relative overflow-hidden transition-all duration-700">
|
||||
<span class="text-sm">
|
||||
<x-date date="{{ $payment->paid_at }}" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-transactions.show.transaction
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
transaction-template="{{ setting('payment.template', 'default') }}"
|
||||
hide-payment-methods
|
||||
/>
|
||||
@endsection
|
||||
<!--Status partials-->
|
||||
@if ($payment->document)
|
||||
<div class="border-b-2 border-gray-200 pb-1">
|
||||
<div class="relative w-full ltr:text-left rtl:text-right">
|
||||
<span class="font-medium">
|
||||
{{ trans('portal.payments') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@push('footer_start')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
<script src="{{ asset('public/js/portal/payments.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<span class="text-sm">
|
||||
{{ trans('portal.payment_detail.description', ['date' => date($payment->paid_at), 'amount' => money($payment->amount, $payment->currency_code, true)]) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-7/12">
|
||||
<x-transactions.show.template
|
||||
type="payment"
|
||||
:transaction="$payment"
|
||||
transaction-template="{{ setting('payment.template', 'default') }}"
|
||||
hide-payment-methods
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
|
||||
<x-script folder="portal" file="apps" />
|
||||
</x-layouts.signed>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user