akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -1,166 +1,33 @@
@extends('layouts.portal')
<x-layouts.portal>
<x-slot name="title">
{{ trans_choice('general.dashboards', 1) }}
</x-slot>
@section('title', trans_choice('general.dashboards', 1))
<x-slot name="content">
<div class="grid sm:grid-cols-3 my-10 divide-y lg:divide-y-0 lg:divide-x space-y-10 lg:space-y-0">
<div class="lg:ltr:pr-12 lg:rtl:pl-12">
<x-widgets.contact />
@section('new_button')
<!--Dashboard General Filter-->
<el-date-picker
v-model="filter_date"
type="daterange"
align="right"
unlink-panels
:format="'yyyy-MM-dd'"
value-format="yyyy-MM-dd"
@change="onChangeFilterDate"
range-separator=">>"
start-placeholder="{{ $date_picker_shortcuts[trans("reports.this_year")]["start"] }}"
end-placeholder="{{ $date_picker_shortcuts[trans("reports.this_year")]["end"] }}"
:picker-options="{
shortcuts: [
{
text: '{{ trans("reports.this_year") }}',
onClick(picker) {
const start = new Date('{{ $date_picker_shortcuts[trans("reports.this_year")]["start"] }}');
const end = new Date('{{ $date_picker_shortcuts[trans("reports.this_year")]["end"] }}');
@stack('column_left')
</div>
picker.$emit('pick', [start, end]);
}
},
{
text: '{{ trans("reports.previous_year") }}',
onClick(picker) {
const start = new Date('{{ $date_picker_shortcuts[trans("reports.previous_year")]["start"] }}');
const end = new Date('{{ $date_picker_shortcuts[trans("reports.previous_year")]["end"] }}');
<div class="lg:px-12 pt-10 lg:pt-0 space-y-12">
<x-widgets.last-payment />
picker.$emit('pick', [start, end]);
}
},
{
text: '{{ trans("reports.this_quarter") }}',
onClick(picker) {
const start = new Date('{{ $date_picker_shortcuts[trans("reports.this_quarter")]["start"] }}');
const end = new Date('{{ $date_picker_shortcuts[trans("reports.this_quarter")]["end"] }}');
<x-widgets.outstanding-balance />
picker.$emit('pick', [start, end]);
}
},
{
text: '{{ trans("reports.previous_quarter") }}',
onClick(picker) {
const start = new Date('{{ $date_picker_shortcuts[trans("reports.previous_quarter")]["start"] }}');
const end = new Date('{{ $date_picker_shortcuts[trans("reports.previous_quarter")]["end"] }}');
@stack('column_center')
</div>
picker.$emit('pick', [start, end]);
}
},
{
text: '{{ trans("reports.last_12_months") }}',
onClick(picker) {
const start = new Date('{{ $date_picker_shortcuts[trans("reports.last_12_months")]["start"] }}');
const end = new Date('{{ $date_picker_shortcuts[trans("reports.last_12_months")]["end"] }}');
<div class="lg:ltr:pl-12 lg:rtl:pr-12 pt-10 lg:pt-0 space-y-12">
<x-widgets.latest-invoices />
picker.$emit('pick', [start, end]);
}
}
]
}">
</el-date-picker>
@endsection
<x-widgets.invoice-history />
@section('content')
<div class="row">
<div class="col-md-4">
<div class="card bg-gradient-success card-stats">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-white mb-0">{{ trans('general.paid') }}</h5>
<span class="font-weight-bold text-white mb-0">{{ $totals['paid'] }}</span>
</div>
<x-widgets.payment-history />
<div class="col-auto">
<div class="icon icon-shape bg-white text-success rounded-circle shadow">
<i class="fa fa-money-bill"></i>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="progress progress-xs mb-0">
<div class="progress-bar bg-success" role="progressbar" aria-valuenow="{{ $progress['paid'] }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ $progress['paid'] }}%"></div>
</div>
</div>
@stack('column_right')
</div>
</div>
<div class="col-md-4">
<div class="card bg-gradient-warning card-stats">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-white mb-0">{{ trans('general.unpaid') }}</h5>
<span class="font-weight-bold text-white mb-0">{{ $totals['unpaid'] }}</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-white text-warning rounded-circle shadow">
<i class="fa fa-money-bill"></i>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="progress progress-xs mb-0">
<div class="progress-bar bg-warning" role="progressbar" aria-valuenow="{{ $progress['unpaid'] }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ $progress['unpaid'] }}%"></div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card bg-gradient-danger card-stats">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-white mb-0">{{ trans('general.overdue') }}</h5>
<span class="font-weight-bold text-white mb-0">{{ $totals['overdue'] }}</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-white text-danger rounded-circle shadow">
<i class="fa fa-money-bill"></i>
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="progress progress-xs mb-0">
<div class="progress-bar bg-danger" role="progressbar" aria-valuenow="{{ $progress['overdue'] }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ $progress['overdue'] }}%"></div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('widgets.cash_flow') }}</h4>
</div>
<div class="card-body" id="chart">
{!! $chart->container() !!}
</div>
</div>
</div>
</div>
@endsection
@push('body_js')
{!! $chart->script() !!}
@endpush
@push('scripts_start')
<script src="{{ asset('public/js/portal/dashboard.js?v=' . version('short')) }}"></script>
@endpush
</x-slot>
</x-layouts.portal>

View File

@ -0,0 +1,29 @@
@if ($layout == 'signed')
<x-layouts.signed>
<x-slot name="title">
{{ trans('portal.payment_received') }}
</x-slot>
<x-slot name="buttons">
<x-layouts.portal.finish.buttons :invoice="$invoice" />
</x-slot>
<x-slot name="content">
<x-layouts.portal.finish.content :invoice="$invoice" />
</x-slot>
</x-layouts.signed>
@else
<x-layouts.portal>
<x-slot name="title">
{{ trans('portal.payment_received') }}
</x-slot>
<x-slot name="buttons">
<x-layouts.portal.finish.buttons :invoice="$invoice" />
</x-slot>
<x-slot name="content">
<x-layouts.portal.finish.content :invoice="$invoice" />
</x-slot>
</x-layouts.portal>
@endif

View File

@ -1,26 +1,179 @@
@extends('layouts.portal')
<x-layouts.portal>
<x-slot name="title">
{{ trans_choice('general.invoices', 2) }}
</x-slot>
@section('title', trans_choice('general.invoices', 2))
<x-slot name="content">
@if ($invoices->count() || request()->get('search', false))
<x-index.container>
<x-index.search search-string="App\Models\Portal\Sale\Invoice" />
@section('content')
<x-documents.index.content
type="invoice"
:documents="$invoices"
hide-bulk-action
hide-contact-name
hide-actions
hide-empty-page
form-card-header-route="portal.invoices.index"
route-button-show="portal.invoices.show"
class-document-number="col-xs-4 col-sm-4 col-md-3 disabled-col-aka"
class-amount="col-xs-4 col-sm-2 col-md-2 text-right"
class-issued-at="col-sm-3 col-md-3 d-none d-sm-block"
class-due-at="col-md-2 d-none d-md-block"
class-status="col-xs-4 col-sm-3 col-md-2 text-center"
search-string-model="App\Models\Portal\Sale\Invoice"
/>
@endsection
<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>
@stack('issued_at_th_start')
@push('scripts_start')
<script src="{{ asset('public/js/portal/invoices.js?v=' . version('short')) }}"></script>
@endpush
<x-table.th class="w-4/12 hidden sm:table-cell">
@stack('due_at_th_inside_start')
<x-slot name="first">
<x-sortablelink column="due_at" title="{{ trans('invoices.due_date') }}" />
</x-slot>
@stack('due_at_th_inside_end')
@stack('issued_at_th_inside_start')
<x-slot name="second">
<x-sortablelink column="issued_at" title="{{ trans('invoices.invoice_date') }}" />
</x-slot>
@stack('issued_at_th_inside_end')
</x-table.th>
@stack('issued_at_th_end')
@stack('status_th_start')
<x-table.th class="w-3/12 hidden sm:table-cell">
@stack('status_th_inside_start')
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
@stack('status_th_inside_end')
</x-table.th>
@stack('status_th_end')
@stack('document_number_th_start')
<x-table.th class="w-3/12 sm:table-cell">
@stack('document_number_th_inside_start')
<x-sortablelink column="document_number" title="{{ trans_choice('general.numbers', 1) }}" />
@stack('document_number_th_inside_end')
</x-table.th>
@stack('document_number_th_end')
@stack('amount_th_start')
<x-table.th class="w-6/12 sm:w-2/12" kind="amount">
@stack('amount_th_inside_start')
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
@stack('amount_th_inside_end')
</x-table.th>
@stack('amount_th_end')
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($invoices as $item)
@php $paid = $item->paid; @endphp
<x-table.tr href="{{ route('portal.invoices.show', $item->id) }}">
<x-table.td kind="action"></x-table.td>
@stack('issued_at_td_start')
<x-table.td class="w-4/12 hidden sm:table-cell">
@stack('due_at_td_inside_start')
<x-slot name="first" class="font-bold truncate" override="class">
{{ \Date::parse($item->due_at)->diffForHumans() }}
</x-slot>
@stack('due_at_td_inside_end')
@stack('issued_at_td_inside_start')
<x-slot name="second">
<x-date date="{{ $item->issued_at }}" />
</x-slot>
@stack('issued_at_td_inside_end')
</x-table.td>
@stack('issued_at_td_end')
@stack('status_td_start')
<x-table.td class="w-3/12 hidden sm:table-cell">
@stack('status_td_inside_start')
<x-index.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" />
@stack('status_td_inside_end')
</x-table.td>
@stack('status_td_end')
@stack('due_at_and_issued_at_td_start')
<x-table.td class="w-3/12 sm:table-cell">
@stack('document_number_td_inside_start')
<x-slot name="first" class="relative w-20 font-normal group" data-tooltip-target="tooltip-information-{{ $item->id }}" data-tooltip-placement="left" override="class,data-tooltip-target,data-tooltip-placement">
<span class="border-black border-b border-dashed">
{{ $item->document_number }}
</span>
<div class="w-full absolute h-10 -left-10 -mt-6"></div>
<x-documents.index.information :document="$item" show-route="portal.invoices.show"/>
</x-slot>
@stack('document_number_td_inside_end')
</x-table.td>
@stack('due_at_and_issued_at_td_end')
@stack('amount_td_start')
<x-table.td class="w-6/12 sm:w-2/12" kind="amount">
@stack('amount_td_inside_start')
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
@stack('amount_td_inside_end')
</x-table.td>
@stack('amount_td_end')
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$invoices" />
</x-index.container>
@else
<x-empty-page
group="sales"
page="invoices"
hide-button-import
:buttons="[
[
'url' => route('transactions.create', ['type' => 'income']),
'permission' => 'create-sales-invoices',
'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' => 'https://akaunting.com/premium-cloud',
'permission' => 'create-sales-invoices',
'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>

View File

@ -0,0 +1,151 @@
<x-layouts.preview>
<x-slot name="title">
{{ setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number }}
</x-slot>
<x-slot name="sticky" url="{{ route('invoices.show', $invoice->id) }}"></x-slot>
<x-slot name="buttons">
@stack('button_pdf_start')
<x-link href="{{ route('preview.invoices.pdf', $invoice->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.invoices.print', $invoice->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">
@if (! empty($payment_methods) && ! in_array($invoice->status, ['paid', 'cancelled']))
<div class="tabs w-full" x-data="{ active: '{{ reset($payment_methods) }}' }">
<div role="tablist" class="flex flex-wrap">
@php $is_active = true; @endphp
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<div class="swiper-slide">
<div
x-on:click="active = '{{ $name }}'"
@click="onChangePaymentMethodSigned('{{ $key }}')"
id="tabs-payment-method-{{ $key }}-tab"
x-bind:class="active != '{{ $name }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
class="relative text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
>
{{ $name }}
</div>
</div>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp
@endforeach
</div>
<div class="swiper-button-next top-3 right-0">
<span class="material-icons">chevron_right</span>
</div>
<div class="swiper-button-prev top-3 left-0">
<span class="material-icons">chevron_left</span>
</div>
</div>
</div>
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_content_start')
<div
x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
class="my-3"
id="tabs-payment-method-{{ $key }}"
>
<component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
</div>
@stack('invoice_{{ $key }}_content_end')
@php $is_active = false; @endphp
@endforeach
</div>
<x-form id="portal">
<x-form.group.payment-method
id="payment-method"
:selected="array_key_first($payment_methods)"
not-required
form-group-class="invisible"
placeholder="{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
change="onChangePaymentMethodSigned('{{ array_key_first($payment_methods) }}')"
/>
<x-form.input.hidden name="document_id" :value="$invoice->id" v-model="form.document_id" />
</x-form>
@endif
@if ($invoice->transactions->count())
<x-show.accordion type="transactions" open>
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.transactions', 2) }}"
description=""
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="text-xs mt-1" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('invoices.payment_received') }} :
</span>
@if ($invoice->transactions->count())
@foreach ($invoice->transactions as $transaction)
<div class="my-2">
<span>
<x-link href="{{ route('preview.payments.show', $transaction->id) }}" class="text-black border-b border-transparent transition-all hover:border-black" override="class">
<x-date :date="$transaction->paid_at" />
</x-link>
- {!! 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>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>
@endif
</div>
<div class="hidden lg:block w-7/12">
<x-documents.show.template
type="invoice"
:document="$invoice"
document-template="{{ setting('invoice.template', 'default') }}"
/>
</div>
</div>
</x-slot>
@push('stylesheet')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
@push('scripts_start')
<script type="text/javascript">
var payment_action_path = {!! json_encode($payment_actions) !!};
</script>
@endpush
<x-script folder="portal" file="apps" />
</x-layouts.preview>

View File

@ -1,69 +1,61 @@
@extends('layouts.portal')
<x-layouts.portal>
<x-slot name="title">
{{ setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number }}
</x-slot>
@section('title', setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number)
<x-slot name="buttons">
@stack('button_pdf_start')
<x-link href="{{ route('portal.invoices.pdf', $invoice->id) }}" 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="{{ route('portal.invoices.print', $invoice->id) }}" target="_blank" class="btn btn-white btn-sm">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@stack('button_print_start')
<x-link href="{{ route('portal.invoices.print', $invoice->id) }}" 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')
</x-slot>
@stack('button_pdf_start')
<a href="{{ route('portal.invoices.pdf', $invoice->id) }}" class="btn btn-white btn-sm">
{{ trans('general.download') }}
</a>
@stack('button_pdf_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">
@if (! empty($payment_methods) && ! in_array($invoice->status, ['paid', 'cancelled']))
<div class="tabs w-full" x-data="{ active: '{{ reset($payment_methods) }}' }">
<div role="tablist" class="flex flex-wrap gap-y-4">
@php $is_active = true; @endphp
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<div class="swiper-slide">
<div
x-on:click="active = '{{ $name }}'"
@click="onChangePaymentMethod('{{ $key }}')"
id="tabs-payment-method-{{ $key }}-tab"
x-bind:class="active != '{{ $name }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
class="text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
>
{{ $name }}
</div>
</div>
@stack('invoice_{{ $key }}_tab_end')
@section('content')
<x-documents.show.header
type="invoice"
:document="$invoice"
hide-header-contact
class-header-status="col-md-8"
/>
@if (!empty($payment_methods) && !in_array($invoice->status, ['paid', 'cancelled']))
<div class="row">
<div class="col-md-12">
{!! Form::open([
'id' => 'invoice-payment',
'role' => 'form',
'autocomplete' => "off",
'novalidate' => 'true',
'class' => 'mb-0'
]) !!}
{{ Form::selectGroup('payment_method', '', 'money el-icon-money', $payment_methods, array_key_first($payment_methods), ['change' => 'onChangePaymentMethod', 'id' => 'payment-method', 'class' => 'form-control d-none', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])], 'col-sm-12 d-none') }}
{!! Form::hidden('document_id', $invoice->id, ['v-model' => 'form.document_id']) !!}
{!! Form::close() !!}
<div class="nav-wrapper">
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-payment-method" role="tablist">
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<li class="nav-item">
<a @click="onChangePaymentMethod('{{ $key }}')" class="nav-link mb-sm-3 mb-md-0{{ ($is_active) ? ' active': '' }}" id="tabs-payment-method-{{ $key }}-tab" data-toggle="tab" href="#tabs-payment-method-{{ $key }}" role="tab" aria-controls="tabs-payment-method-{{ $key }}" aria-selected="true">
{{ $name }}
</a>
</li>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp
@endforeach
</ul>
</div>
<div class="card shadow">
<div class="card-body">
<div class="tab-content" id="myTabContent">
@php $is_active = false; @endphp
@endforeach
</div>
</div>
</div>
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_content_start')
<div class="tab-pane fade{{ ($is_active) ? ' show active': '' }}" id="tabs-payment-method-{{ $key }}" role="tabpanel" aria-labelledby="tabs-payment-method-{{ $key }}-tab">
<div
x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
class="my-3"
id="tabs-payment-method-{{ $key }}"
>
<component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
</div>
@stack('invoice_{{ $key }}_content_end')
@ -71,20 +63,74 @@
@php $is_active = false; @endphp
@endforeach
</div>
</div>
<x-form id="portal">
<x-form.group.payment-method
id="payment-method"
:selected="array_key_first($payment_methods)"
not-required
form-group-class="invisible"
placeholder="{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
change="onChangePaymentMethod('{{ array_key_first($payment_methods) }}')"
/>
<x-form.input.hidden name="document_id" :value="$invoice->id" v-model="form.document_id" />
</x-form>
@endif
@if ($invoice->transactions->count())
<x-show.accordion type="transactions" open>
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.transactions', 2) }}"
description=""
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="text-xs mt-1" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('invoices.payment_received') }} :
</span>
@if ($invoice->transactions->count())
@foreach ($invoice->transactions as $transaction)
<div class="my-2">
<span>
<x-link href="{{ route('portal.payments.show', $transaction->id) }}" class="text-black border-b border-transparent transition-all hover:border-black" override="class">
<x-date :date="$transaction->paid_at" />
</x-link>
- {!! 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>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>
@endif
</div>
<div class="hidden lg:block w-7/12">
<x-documents.show.template
type="invoice"
:document="$invoice"
document-template="{{ setting('invoice.template', 'default') }}"
/>
</div>
</div>
</div>
@endif
</x-slot>
<x-documents.show.document
type="invoice"
:document="$invoice"
document-template="{{ setting('invoice.template', 'default') }}"
/>
@endsection
@push('stylesheet')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
@push('scripts_start')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
<script src="{{ asset('public/js/portal/invoices.js?v=' . version('short')) }}"></script>
@endpush
<x-script folder="portal" file="apps" />
</x-layouts.portal>

View File

@ -1,102 +1,151 @@
@extends('layouts.signed')
<div class="w-full lg:max-w-6xl m-auto">
<x-layouts.signed>
<x-slot name="title">
{{ setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number }}
</x-slot>
@section('title', setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number)
<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('invoices.all_invoices') }}
</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('invoices.all_invoices') }}
</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">
@if (! empty($payment_methods) && ! in_array($invoice->status, ['paid', 'cancelled']))
<div class="tabs w-full" x-data="{ active: '{{ reset($payment_methods) }}' }">
<div role="tablist" class="flex flex-wrap">
@php $is_active = true; @endphp
@section('content')
<x-documents.show.header
type="invoice"
:document="$invoice"
hide-header-contact
class-header-status="col-md-8"
/>
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<div class="swiper-slide">
<div
x-on:click="active = '{{ $name }}'"
@click="onChangePaymentMethodSigned('{{ $key }}')"
id="tabs-payment-method-{{ $key }}-tab"
x-bind:class="active != '{{ $name }}' ? '' : 'active-tabs text-purple border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md'"
class="relative text-sm text-black text-center pb-2 border-b cursor-pointer transition-all tabs-link"
>
{{ $name }}
</div>
</div>
@stack('invoice_{{ $key }}_tab_end')
@if (!empty($payment_methods) && !in_array($invoice->status, ['paid', 'cancelled']))
<div class="row">
<div class="col-md-12">
{!! Form::open([
'id' => 'invoice-payment',
'role' => 'form',
'autocomplete' => "off",
'novalidate' => 'true',
'class' => 'mb-0'
]) !!}
{{ Form::selectGroup('payment_method', '', 'money el-icon-money', $payment_methods, array_key_first($payment_methods), ['change' => 'onChangePaymentMethodSigned', 'id' => 'payment-method', 'class' => 'form-control d-none', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])], 'col-sm-12 d-none') }}
{!! Form::hidden('document_id', $invoice->id, ['v-model' => 'form.document_id']) !!}
{!! Form::close() !!}
<div class="nav-wrapper">
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-payment-method" role="tablist">
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
<li class="nav-item">
<a @click="onChangePaymentMethodSigned('{{ $key }}')" class="nav-link mb-sm-3 mb-md-0{{ ($is_active) ? ' active': '' }}" id="tabs-payment-method-{{ $key }}-tab" data-toggle="tab" href="#tabs-payment-method-{{ $key }}" role="tab" aria-controls="tabs-payment-method-{{ $key }}" aria-selected="true">
{{ $name }}
</a>
</li>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp
@endforeach
</ul>
</div>
<div class="card shadow">
<div class="card-body">
<div class="tab-content" id="myTabContent">
@php $is_active = true; @endphp
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_content_start')
<div class="tab-pane fade{{ ($is_active) ? ' show active': '' }}" id="tabs-payment-method-{{ $key }}" role="tabpanel" aria-labelledby="tabs-payment-method-{{ $key }}-tab">
<component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
@php $is_active = false; @endphp
@endforeach
</div>
</div>
</div>
@stack('invoice_{{ $key }}_content_end')
@php $is_active = true; @endphp
@php $is_active = false; @endphp
@endforeach
</div>
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_content_start')
<div
x-bind:class="active != '{{ $name }}' ? 'hidden': 'block'"
class="my-3"
id="tabs-payment-method-{{ $key }}"
>
<component v-bind:is="method_show_html" @interface="onRedirectConfirm"></component>
</div>
@stack('invoice_{{ $key }}_content_end')
@php $is_active = false; @endphp
@endforeach
</div>
<x-form id="portal">
<x-form.group.payment-method
id="payment-method"
:selected="array_key_first($payment_methods)"
not-required
form-group-class="invisible"
placeholder="{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
change="onChangePaymentMethodSigned('{{ array_key_first($payment_methods) }}')"
/>
<x-form.input.hidden name="document_id" :value="$invoice->id" v-model="form.document_id" />
</x-form>
@endif
@if ($invoice->transactions->count())
<x-show.accordion type="transactions" open>
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.transactions', 2) }}"
description=""
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="text-xs mt-1" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('invoices.payment_received') }} :
</span>
@if ($invoice->transactions->count())
@foreach ($invoice->transactions as $transaction)
<div class="my-2">
<span>
<x-link href="{{ \URL::signedRoute('portal.payments.show', [$transaction->id]) }}" class="text-black border-b border-transparent transition-all hover:border-black" override="class">
<x-date :date="$transaction->paid_at" />
</x-link>
- {!! 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>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>
@endif
</div>
<div class="hidden lg:block w-7/12">
<x-documents.show.template
type="invoice"
:document="$invoice"
document-template="{{ setting('invoice.template', 'default') }}"
/>
</div>
</div>
</div>
</div>
@endif
</x-slot>
<x-documents.show.document
type="invoice"
:document="$invoice"
document-template="{{ setting('invoice.template', 'default') }}"
/>
@endsection
@push('stylesheet')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
@push('footer_start')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
<script src="{{ asset('public/js/portal/invoices.js?v=' . version('short')) }}"></script>
@push('scripts_start')
<script type="text/javascript">
var payment_action_path = {!! json_encode($payment_actions) !!};
</script>
@endpush
<script type="text/javascript">
var payment_action_path = {!! json_encode($payment_actions) !!};
</script>
@endpush
<x-script folder="portal" file="apps" />
</x-layouts.signed>
</div>

View File

@ -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>

View 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>

View File

@ -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>

View File

@ -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>

View File

@ -1,64 +1,75 @@
@extends('layouts.portal')
<x-layouts.portal>
<x-slot name="title">
{{ trans('general.title.edit', ['type' => trans('auth.profile')]) }}
</x-slot>
@section('title', trans('general.title.edit', ['type' => trans('auth.profile')]))
<x-slot name="content">
<x-form.container>
<x-form id="portal" method="PATCH" :route="['portal.profile.update', $user->id]" :model="$user">
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('auth.personal_information') }}" description="{{ trans('auth.form_description.personal') }}" />
</x-slot>
@section('content')
<div class="card">
{!! Form::model($user, [
'id' => 'profile',
'method' => 'PATCH',
'route' => ['portal.profile.update', $user->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<x-slot name="body">
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 {{ user()->id == $user->id ? 'grid-rows-4' : 'grid-rows-3' }}">
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'user') }}
<x-form.group.email name="email" label="{{ trans('general.email') }}" />
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
<x-form.group.text name="phone" label="{{ trans('general.phone') }}" value="{{ $user->contact->phone }}" not-required />
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', [], $user->contact->tax_number) }}
<x-form.group.checkbox name="change_password" :options="['1' => trans('auth.change_password')]" form-group-class="sm:col-span-3 {{ user()->id == $user->id ? '' : 'hidden' }}" input-group-class="pt-8" @input="onChangePassword($event)" />
{{ Form::textGroup('phone', trans('general.phone'), 'phone', [], $user->contact->phone) }}
<x-form.group.password name="password" :label="trans('auth.password.new')" v-show="show_password" />
</div>
{{ Form::textareaGroup('address', trans('general.address'), [], $user->contact->address) }}
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 {{ user()->id == $user->id ? 'grid-rows-4' : 'grid-rows-3' }}">
@if (setting('default.use_gravatar', '0') == '1')
<x-form.group.text name="fake_picture" label="{{ trans_choice('general.pictures', 1) }}" disabled placeholder="{{ trans('settings.default.use_gravatar') }}" form-group-class="sm:col-span-3 sm:row-span-3" />
@else
<x-form.group.file name="picture" label="{{ trans_choice('general.pictures', 1) }}" not-required form-group-class="sm:col-span-3 sm:row-span-3" />
@endif
{{ Form::textGroup('city', trans_choice('general.cities', 1), 'city', [], $user->contact->city) }}
<x-form.group.password name="current_password" :label="trans('auth.password.current')" v-show="show_password" />
{{ Form::textGroup('zip_code', trans('general.zip_code'), 'mail-bulk', [], $user->contact->zip_code) }}
<x-form.group.password name="password_confirmation" :label="trans('auth.password.new_confirm')" v-show="show_password" />
</div>
</x-slot>
</x-form.section>
{{ Form::textGroup('state', trans('general.state'), 'city', [], $user->contact->state) }}
<x-form.section>
<x-slot name="head">
<x-form.section.head title="{{ trans('general.preferences') }}" description="{!! trans('auth.form_description.preferences') !!}" />
</x-slot>
{{ Form::selectGroup('country', trans_choice('general.countries', 1), 'globe-americas', trans('countries'), $user->contact->country, []) }}
<x-slot name="body">
<x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" value="{{ $user->contact->tax_number }}" not-required />
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
<x-form.group.locale />
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
<x-form.group.country :selected="$user->contact->country" />
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }}
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ $user->contact->city }}" not-required />
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
</div>
</div>
<x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" value="{{ $user->contact->zip_code }}" not-required />
@canany(['update-portal-profile'])
<div class="card-footer">
<div class="row save-buttons">
{{ Form::saveButtons('portal.dashboard') }}
</div>
</div>
@endcanany
<x-form.group.text name="state" label="{{ trans('general.state') }}" value="{{ $user->contact->state }}" not-required />
{!! Form::close() !!}
</div>
@endsection
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" :value="$user->contact->address" />
</x-slot>
</x-form.section>
@push('scripts_start')
<script src="{{ asset('public/js/portal/profile.js?v=' . version('short')) }}"></script>
@endpush
@canany(['update-portal-profile'])
<x-form.section>
<x-slot name="foot">
<x-form.buttons cancel-route="portal.dashboard" />
</x-slot>
</x-form.section>
@endcanany
</x-form>
</x-form.container>
</x-slot>
<x-script folder="portal" file="apps" />
</x-layouts.portal>