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 +1 @@
<script src="{{ asset( $scriptFile . '?v=' . $version) }}"></script>
<x-script :alias="$alias" :folder="$folder" :file="$file" />

View File

@ -1,9 +1,28 @@
@if ($attachment)
<div class="row align-items-center">
@foreach ($attachment as $file)
<div class="col-xs-12 col-sm-4 mb-4">
@include('partials.media.file')
<div class="border-b border-gray-200 pb-4"
x-data="{ attachment : null }"
>
<div class="relative w-full text-left cursor-pointer group"
x-on:click="attachment !== 1 ? attachment = 1 : attachment = null"
>
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
{{ trans_choice('general.attachments', 2) }}
</span>
<div class="text-black-400 text-sm">
{{ trans('transactions.slider.attachments') }}
</div>
@endforeach
<span class="material-icons absolute right-0 top-0 transition-all transform" x-bind:class="attachment === 1 ? 'rotate-180' : ''">expand_more</span>
</div>
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="container1"
x-bind:class="attachment == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
@foreach ($attachment as $file)
<x-media.file :file="$file" />
@endforeach
</div>
</div>
@endif

View File

@ -0,0 +1,11 @@
@stack('add_new_button_start')
@if (! $hideButtonAddNew)
@can($permissionCreate)
<x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary">
{{ trans($textButtonAddNew) }}
</x-link>
@endcan
@endif
@stack('add_new_button_end')

View File

@ -0,0 +1,34 @@
<div class="border-b pb-4" x-data="{ children : null }">
<button class="relative w-full text-left cursor-pointer group"
x-on:click="children !== 1 ? children = 1 : children = null"
>
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
{{ trans_choice('general.transactions', 2) }}
</span>
<div class="text-black-400 text-sm">
{!! trans('transactions.slider.children', ['count' => $transaction->children()->count()]) !!}
</div>
<span class="material-icons absolute right-0 top-0 transition-all transform"
x-bind:class="children === 1 ? 'rotate-180' : ''"
>expand_more</span>
</button>
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="container1"
x-bind:class="children == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
@if ($transaction->children()->count())
@foreach ($transaction->children() as $child)
@php $url = '<a href="' . route('transactions.show', $child->id) . '" class="text-purple">' . $child->number . '</a>' @endphp
<div class="my-2">
{{ trans('recurring.child', ['url' => $url, 'date' => company_date($child->paid_at)]) }}
</div>
@endforeach
@else
{{ trans('general.none') }}
@endif
</div>
</div>

View File

@ -1,118 +1,132 @@
@stack('content_header_start')
@if (!$hideHeader)
<x-transactions.show.header
type="{{ $type }}"
:transaction="$transaction"
hide-header-account="{{ $hideHeaderAccount }}"
text-header-account="{{ $textHeaderAccount }}"
class-header-account="{{ $classHeaderAccount }}"
hide-header-category="{{ $hideHeaderCategory }}"
text-header-category="{{ $textHeaderCategory }}"
class-header-category="{{ $classHeaderCategory }}"
hide-header-contact="{{ $hideHeaderContact }}"
text-header-contact="{{ $textHeaderContact }}"
class-header-contact="{{ $classHeaderContact }}"
hide-header-amount="{{ $hideHeaderAmount }}"
text-header-amount="{{ $textHeaderAmount }}"
class-header-amount="{{ $classHeaderAmount }}"
hide-header-paid-at="{{ $hideHeaderPaidAt }}"
text-header-paid-at="{{ $textHeaderPaidAt }}"
class-header-paid-at="{{ $classHeaderPaidAt }}"
/>
@endif
@stack('content_header_end')
<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-12">
@stack('recurring_message_start')
@stack('recurring_message_start')
@if (!$hideRecurringMessage)
<x-transactions.show.recurring-message
type="{{ $type }}"
:transaction="$transaction"
text-recurring-type="{{ $textRecurringType }}"
/>
@endif
@stack('recurring_message_end')
@if (! $hideRecurringMessage)
@if (($recurring = $transaction->recurring) && ($next = $recurring->getNextRecurring()))
@php
$recurring_message = trans('recurring.message', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'date' => $next->format(company_date_format())
]);
@endphp
@stack('transaction_start')
<x-transactions.show.transaction
type="{{ $type }}"
:transaction="$transaction"
transaction-template="{{ $transactionTemplate }}"
logo="{{ $logo }}"
hide-company="{{ $hideCompany }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
hide-content-title="{{ $hideContentTitle }}"
hide-paid-at="{{ $hidePaidAt }}"
hide-account="{{ $hideAccount }}"
hide-category="{{ $hideCategory }}"
hide-payment-methods="{{ $hidePaymentMethods }}"
hide-reference="{{ $hideReference }}"
hide-description="{{ $hideDescription }}"
hide-amount="{{ $hideAmount }}"
@if (($parent = $transaction->parent))
@php
$recurring_message = trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'link' => '<a href="' . route(mb_strtolower(trans_choice($textRecurringType, 2)) . '.show', $parent->id) . '"><u>' . $parent->document_number . '</u></a>'
]);
@endphp
text-content-title="{{ $textContentTitle }}"
text-paid-at="{{ $textPaidAt }}"
text-account="{{ $textAccount }}"
text-category="{{ $textCategory }}"
text-payment-methods="{{ $textPaymentMethods }}"
text-reference="{{ $textReference }}"
text-description="{{ $textDescription }}"
text-paid-by="{{ $textPaidBy }}"
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
@endif
hide-contact="{{ $hideContact }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
@stack('recurring_message_end')
hide-related="{{ $hideRelated }}"
hide-related-document-number="{{ $hideRelatedDocumentNumber }}"
hide-related-contact="{{ $hideRelatedContact }}"
hide-related-document-date="{{ $hideRelatedDocumentDate }}"
hide-related-document-amount="{{ $hideRelatedDocumentAmount }}"
hide-related-amount="{{ $hideRelatedAmount }}"
text-related-transaction="{{ $textRelatedTransansaction }}"
text-related-document-number="{{ $textRelatedDocumentNumber }}"
text-related-contact="{{ $textRelatedContact }}"
text-related-document-date="{{ $textRelatedDocumentDate }}"
text-related-document-amount="{{ $textRelatedDocumentAmount }}"
text-related-amount="{{ $textRelatedAmount }}"
route-document-show="{{ $routeDocumentShow }}"
/>
@stack('transaction_end')
@stack('attachment_start')
@if (!$hideAttachment)
<x-transactions.show.attachment
@stack('row_create_start')
<x-transactions.show.create
type="{{ $type }}"
:transaction="$transaction"
:attachment="$attachment"
/>
@endif
@stack('attachment_end')
@stack('row_create_end')
@stack('row_footer_start')
@if (!$hideFooter)
<x-transactions.show.footer
type="{{ $type }}"
:transaction="$transaction"
:histories="$histories"
class-footer-histories="{{ $classFooterHistories }}"
hide-footer-histories="{{ $hideFooterHistories }}"
text-histories="{{ $textHistories }}"
/>
@endif
@stack('row_footer_end')
@stack('schedule_start')
@if (! $hideSchedule)
<x-transactions.show.schedule
type="{{ $type }}"
:transaction="$transaction"
/>
@endif
@stack('schedule_end')
{{ Form::hidden('transaction_id', $transaction->id, ['id' => 'transaction_id']) }}
{{ Form::hidden($type . '_id', $transaction->id, ['id' => $type . '_id']) }}
@stack('children_start')
@if (! $hideChildren)
<x-transactions.show.children
type="{{ $type }}"
:transaction="$transaction"
/>
@endif
@stack('children_end')
@stack('attachment_start')
@if (! $hideAttachment)
<x-transactions.show.attachment
type="{{ $type }}"
:transaction="$transaction"
:attachment="$attachment"
/>
@endif
@stack('attachment_end')
</div>
<div class="w-full lg:w-7/12">
@stack('transaction_start')
<x-transactions.show.template
type="{{ $type }}"
:transaction="$transaction"
transaction-template="{{ $transactionTemplate }}"
logo="{{ $logo }}"
hide-company="{{ $hideCompany }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-content-title="{{ $hideContentTitle }}"
hide-number="{{ $hideNumber }}"
hide-paid-at="{{ $hidePaidAt }}"
hide-account="{{ $hideAccount }}"
hide-category="{{ $hideCategory }}"
hide-payment-methods="{{ $hidePaymentMethods }}"
hide-reference="{{ $hideReference }}"
hide-description="{{ $hideDescription }}"
hide-amount="{{ $hideAmount }}"
text-content-title="{{ $textContentTitle }}"
text-number="{{ $textNumber }}"
text-paid-at="{{ $textPaidAt }}"
text-account="{{ $textAccount }}"
text-category="{{ $textCategory }}"
text-payment-methods="{{ $textPaymentMethods }}"
text-reference="{{ $textReference }}"
text-description="{{ $textDescription }}"
text-paid-by="{{ $textPaidBy }}"
hide-contact="{{ $hideContact }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-related="{{ $hideRelated }}"
hide-related-document-number="{{ $hideRelatedDocumentNumber }}"
hide-related-contact="{{ $hideRelatedContact }}"
hide-related-document-date="{{ $hideRelatedDocumentDate }}"
hide-related-document-amount="{{ $hideRelatedDocumentAmount }}"
hide-related-amount="{{ $hideRelatedAmount }}"
text-related-transaction="{{ $textRelatedTransansaction }}"
text-related-document-number="{{ $textRelatedDocumentNumber }}"
text-related-contact="{{ $textRelatedContact }}"
text-related-document-date="{{ $textRelatedDocumentDate }}"
text-related-document-amount="{{ $textRelatedDocumentAmount }}"
text-related-amount="{{ $textRelatedAmount }}"
route-document-show="{{ $routeDocumentShow }}"
/>
@stack('transaction_end')
</div>
<x-form.input.hidden name="transaction_id" :value="$transaction->id" />
<x-form.input.hidden name="{{ $type . '_id' }}" :value="$transaction->id" />
</div>

View File

@ -0,0 +1,32 @@
@php $created_date = '<span class="font-medium">' . company_date($transaction->created_at) . '</span>' @endphp
<div class="border-b pb-4" x-data="{ create : null }">
<button class="relative w-full text-left group"
x-on:click="create !== 1 ? create = 1 : create = null"
>
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
{{ trans('general.create') }}
</span>
<div class="text-black-400 text-sm">
@if ($transaction->isRecurringTransaction())
{!! trans('transactions.slider.create_recurring', ['user' => $transaction->owner->name, 'date' => $created_date]) !!}
@else
{!! trans('transactions.slider.create', ['user' => $transaction->owner->name, 'date' => $created_date]) !!}
@endif
</div>
<span class="material-icons absolute right-0 top-0 transition-all transform" x-bind:class="create === 1 ? 'rotate-180' : ''">expand_more</span>
</button>
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="container1"
x-bind:class="create == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
<a href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
{{ trans('general.edit') }}
</a>
</div>
</div>
</div>

View File

@ -1,14 +0,0 @@
<div class="row">
@stack('row_footer_histories_start')
@if (!$hideFooterHistories)
<div class="{{ $classFooterHistories }}">
<x-transactions.show.histories
type="{{ $type }}"
:transaction="$transaction"
:histories="$histories"
text-histories="{{ $textHistories }}"
/>
</div>
@endif
@stack('row_footer_histories_end')
</div>

View File

@ -1,89 +0,0 @@
<div class="row" style="font-size: inherit !important">
@stack('header_account_start')
@if (!$hideHeaderAccount)
<div class="{{ $classHeaderAccount }}">
{{ trans_choice($textHeaderAccount, 1) }}
<br>
<strong>
<span class="float-left long-texts mwpx-200 transaction-head-text">
<a href="{{ route('accounts.show', $transaction->account->id) }}">
{{ $transaction->account->name }}
</a>
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_account_end')
@stack('header_category_start')
@if (!$hideHeaderCategory)
<div class="{{ $classHeaderCategory }}">
{{ trans_choice($textHeaderCategory, 1) }}
<br>
<strong>
<span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transaction->category->name }}
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_category_end')
@stack('header_contact_start')
@if (!$hideHeaderContact)
<div class="{{ $classHeaderContact }}">
{{ trans_choice($textHeaderContact, 1) }}
<br>
<strong>
<span class="float-left long-texts mwpx-300 transaction-head-text">
@if (!empty($transaction->contact->id))
<a href="{{ route($routeContactShow, $transaction->contact->id) }}">
{{ $transaction->contact->name }}
</a>
@else
{{ $transaction->contact->name }}
@endif
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_contact_end')
@stack('header_amount_start')
@if (!$hideHeaderAmount)
<div class="{{ $classHeaderAmount }}">
{{ trans($textHeaderAmount) }}
<br>
<strong>
<span class="float-left long-texts mwpx-100 transaction-head-text">
@money($transaction->amount, $transaction->currency_code, true)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_amount_end')
@stack('header_paid_at_start')
@if (!$hideHeaderPaidAt)
<div class="{{ $classHeaderPaidAt }}">
{{ trans($textHeaderPaidAt) }}
<br>
<strong>
<span class="float-left long-texts mwpx-100 transaction-head-text">
@date($transaction->paid_at)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_paid_at_end')
</div>

View File

@ -1,47 +0,0 @@
<div class="accordion">
<div class="card">
<div class="card-header" id="accordion-histories-header" data-toggle="collapse" data-target="#accordion-histories-body" aria-expanded="false" aria-controls="accordion-histories-body">
<h4 class="mb-0">{{ trans($textHistories) }}</h4>
</div>
<div id="accordion-histories-body" class="collapse hide" aria-labelledby="accordion-histories-header">
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_histories_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_histories_head_start')
<th class="col-xs-4 col-sm-3">
{{ trans('general.date') }}
</th>
<th class="col-xs-8 col-sm-9 text-left long-texts">
{{ trans('general.created') }}
</th>
@stack('row_footer_histories_head_end')
</tr>
@stack('row_footer_histories_head_tr_end')
</thead>
<tbody>
@stack('row_footer_histories_body_tr_start')
@foreach($histories as $history)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_histories_body_td_start')
<td class="col-xs-4 col-sm-3">
@date($history->created_at)
</td>
<td class="col-xs-4 col-sm-6 text-left long-texts">
{{ $history->owner->name }}
</td>
@stack('row_footer_histories_body_td_end')
</tr>
@endforeach
@stack('row_footer_histories_body_tr_end')
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,155 @@
@stack('button_group_start')
@if (! $hideButtonMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@stack('edit_button_start')
@if (! $transaction->hasTransferRelation)
@if (! $hideButtonEdit)
@can($permissionUpdate)
<x-dropdown.link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}">
{{ trans('general.edit') }}
</x-dropdown.link>
@endcan
@endif
@endif
@stack('edit_button_end')
@stack('duplicate_button_start')
@if (! $transaction->hasTransferRelation)
@if (! $hideButtonDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@endif
@endif
@stack('duplicate_button_end')
@stack('connect_button_start')
@if ($transaction->is_splittable && empty($transaction->document_id))
@if (! $hideButtonConnect)
@can($permissionCreate)
@if ($type == 'income' && $transaction->contact->exists)
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" title="{{ trans('general.connect') }}" @click="onConnect({{ $transaction->load('account')->toJson() }}, {{ $transaction->currency->toJson() }}, {{ $transaction->contact->invoices()->notPaid()->where('currency_code', $transaction->currency_code)->with(['media', 'totals', 'transactions'])->get()->toJson() }})"><span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">{{ trans('general.connect') }}</span></button>
@elseif ($type == 'income' && ! $transaction->contact->exists)
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" title="{{ trans('general.connect') }}" @click="onConnect({{ $transaction->load('account')->toJson() }}, {{ $transaction->currency->toJson() }}, {{ App\Models\Document\Document::invoice()->notPaid()->where('currency_code', $transaction->currency_code)->with(['media', 'totals', 'transactions'])->get()->toJson() }})"><span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">{{ trans('general.connect') }}</span></button>
@elseif ($type == 'expense' && $transaction->contact->exists)
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" title="{{ trans('general.connect') }}" @click="onConnect({{ $transaction->load('account')->toJson() }}, {{ $transaction->currency->toJson() }}, {{ $transaction->contact->bills()->notPaid()->where('currency_code', $transaction->currency_code)->with(['media', 'totals', 'transactions'])->get()->toJson() }})"><span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">{{ trans('general.connect') }}</span></button>
@elseif ($type == 'expense' && ! $transaction->contact->exists)
<button type="button" class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" title="{{ trans('general.connect') }}" @click="onConnect({{ $transaction->load('account')->toJson() }}, {{ $transaction->currency->toJson() }}, {{ App\Models\Document\Document::bill()->notPaid()->where('currency_code', $transaction->currency_code)->with(['media', 'totals', 'transactions'])->get()->toJson() }})"><span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">{{ trans('general.connect') }}</span></button>
@endif
@endcan
@endif
@endif
@stack('connect_button_end')
@if (! $hideDivider1)
<x-dropdown.divider />
@endif
@stack('button_print_start')
@if (! $hideButtonPrint)
<x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@stack('button_print_end')
@stack('button_pdf_start')
@if (! $hideButtonPdf)
<x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@stack('button_pdf_end')
@if (! $hideDivider2)
<x-dropdown.divider />
@endif
@stack('share_button_start')
@if (! $transaction->hasTransferRelation)
@if (! $hideButtonShare)
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@endif
@stack('share_button_end')
@stack('email_button_start')
@if (! $transaction->hasTransferRelation)
@if (! $hideButtonEmail)
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-dropdown.button @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')">
{{ trans('invoices.send_mail') }}
</x-dropdown.button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="left">
<x-dropdown.button disabled="disabled">
{{ trans('invoices.send_mail') }}
</x-dropdown.button>
</x-tooltip>
@endif
@endif
@endif
@stack('email_button_end')
@if (! $hideDivider3)
<x-dropdown.divider />
@endif
@stack('button_end_start')
@if (! $hideButtonEnd)
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
@endif
@stack('button_end_end')
@if (! $hideDivider4)
<x-dropdown.divider />
@endif
@stack('delete_button_start')
@if (! $transaction->hasTransferRelation)
@if (! $hideButtonDelete)
@can($permissionDelete)
@if ($checkButtonReconciled)
@if (! $transaction->reconciled)
<x-delete-link :model="$transaction" :route="$routeButtonDelete" :text="$textDeleteModal" model-name="transaction_number" />
@endif
@else
<x-delete-link :model="$transaction" :route="$routeButtonDelete" :text="$textDeleteModal" model-name="transaction_number" />
@endif
@endcan
@endif
@endif
@stack('delete_button_end')
</x-dropdown>
@endif
@stack('button_group_end')

View File

@ -1,44 +0,0 @@
@stack('recurring_message_start')
@if (($recurring = $transaction->recurring) && ($next = $recurring->getNextRecurring()))
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info fade show" role="alert">
<div class="d-flex">
@stack('recurring_message_head_start')
<h5 class="mt-0 text-white"><strong>{{ trans('recurring.recurring') }}</strong></h5>
@stack('recurring_message_head_end')
</div>
@stack('recurring_message_body_start')
<p class="text-sm lh-160 mb-0">{{ trans('recurring.message', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'date' => $next->format(company_date_format())
]) }}
</p>
@stack('recurring_message_body_end')
</div>
</div>
</div>
@endif
@if ($transaction->parent)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info fade show" role="alert">
<div class="d-flex">
@stack('recurring_parent_message_head_start')
<h5 class="mt-0 text-white"><strong>{{ trans('recurring.recurring') }}</strong></h5>
@stack('recurring_parent_message_head_end')
</div>
@stack('recurring_parent_message_body_start')
<p class="text-sm lh-160 mb-0">{!! trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'link' => '<a href="' . route($routePrefix . '.show', $transaction->parent->id) . '"><u>' . trans_choice($textRecurringType, 1) . '#' . $transaction->parent->id . '</u></a>'
]) !!}
</p>
@stack('recurring_parent_message_body_end')
</div>
</div>
</div>
@endif
@stack('recurring_message_end')

View File

@ -0,0 +1,43 @@
@php
$started_date = '<span class="font-medium">' . company_date($transaction->recurring->started_at) . '</span>';
$frequency = Str::lower(trans('recurring.' . str_replace('ly', 's', $transaction->recurring->frequency)));
@endphp
<div class="border-b pb-4" x-data="{ schedule : null }">
<button class="relative w-full text-left cursor-pointer group"
x-on:click="schedule !== 1 ? schedule = 1 : schedule = null"
>
<span class="font-medium border-b border-transparent transition-all group-hover:border-black">
{{ trans_choice('general.schedules', 1) }}
</span>
<div class="text-black-400 text-sm">
{!! trans('transactions.slider.schedule', ['frequency' => $frequency, 'interval' => $transaction->recurring->interval, 'date' => $started_date]) !!}
</div>
<span class="material-icons absolute right-0 top-0 transition-all transform" x-bind:class="schedule === 1 ? 'rotate-180' : ''">expand_more</span>
</button>
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="container1"
x-bind:class="schedule == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
@if ($next = $transaction->recurring->getNextRecurring())
{{ trans('recurring.next_date', ['date' => $next->format(company_date_format())]) }}
<br>
@if (($transaction->recurring->limit_by == 'count'))
@if ($transaction->recurring->limit_count == 0)
{{ trans('recurring.ends_never') }}
@else
{{ trans('recurring.ends_after', ['times' => $transaction->recurring->limit_count]) }}
@endif
@else
{{ trans('recurring.ends_date', ['date' => company_date($transaction->recurring->limit_date)]) }}
@endif
@else
{{ trans('documents.statuses.ended') }}
@endif
</div>
</div>
</div>

View File

@ -0,0 +1,76 @@
<div class="p-7 shadow-2xl rounded-2xl">
@if ($transactionTemplate)
@switch($transactionTemplate)
@case('classic')
@break
@case('modern')
@break
@default
<x-transactions.template.ddefault
type="{{ $type }}"
:transaction="$transaction"
:payment_methods="$payment_methods"
transaction-template="{{ $transactionTemplate }}"
logo="{{ $logo }}"
hide-company="{{ $hideCompany }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-content-title="{{ $hideContentTitle }}"
hide-number="{{ $hideNumber }}"
hide-paid-at="{{ $hidePaidAt }}"
hide-account="{{ $hideAccount }}"
hide-category="{{ $hideCategory }}"
hide-payment-methods="{{ $hidePaymentMethods }}"
hide-reference="{{ $hideReference }}"
hide-description="{{ $hideDescription }}"
hide-amount="{{ $hideAmount }}"
text-content-title="{{ $textContentTitle }}"
text-number="{{ $textNumber }}"
text-paid-at="{{ $textPaidAt }}"
text-account="{{ $textAccount }}"
text-category="{{ $textCategory }}"
text-payment-methods="{{ $textPaymentMethods }}"
text-reference="{{ $textReference }}"
text-description="{{ $textDescription }}"
text-paid-by="{{ $textPaidBy }}"
hide-contact="{{ $hideContact }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-related="{{ $hideRelated }}"
hide-related-document-number="{{ $hideRelatedDocumentNumber }}"
hide-related-contact="{{ $hideRelatedContact }}"
hide-related-document-date="{{ $hideRelatedDocumentDate }}"
hide-related-document-amount="{{ $hideRelatedDocumentAmount }}"
hide-related-amount="{{ $hideRelatedAmount }}"
text-related-transaction="{{ $textRelatedTransansaction }}"
text-related-document-number="{{ $textRelatedDocumentNumber }}"
text-related-contact="{{ $textRelatedContact }}"
text-related-document-date="{{ $textRelatedDocumentDate }}"
text-related-document-amount="{{ $textRelatedDocumentAmount }}"
text-related-amount="{{ $textRelatedAmount }}"
route-document-show="{{ $routeDocumentShow }}"
/>
@endswitch
@else
@include($transactionTemplate)
@endif
<akaunting-connect-transactions
:show="connect.show"
:transaction="connect.transaction"
:currency="connect.currency"
:documents="connect.documents"
:translations="{{ json_encode($connectTranslations) }}"
modal-dialog-class="max-w-screen-lg"
v-on:close-modal="connect.show = false"
></akaunting-connect-transactions>
</div>

View File

@ -1,123 +0,0 @@
@stack('button_group_start')
@if (!$hideButtonMoreActions)
<div class="dropup header-drop-top">
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-chevron-down"></i>&nbsp; {{ trans('general.more_actions') }}
</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@stack('edit_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $transaction->id) }}">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@endif
@stack('edit_button_end')
@stack('duplicate_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonDuplicate)
@can($permissionCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $transaction->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@endif
@endif
@stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div>
@endif
@endif
@stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint)
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@stack('share_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonShare)
<a class="dropdown-item" href="{{ $signedUrl }}" target="_blank">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonEmail)
@if($transaction->contact->email)
<a class="dropdown-item" href="{{ route($routeButtonEmail, $transaction->id) }}">
{{ trans('invoices.send_mail') }}
</a>
@else
<el-tooltip content="{{ trans('invoices.messages.email_required') }}" placement="right">
<button type="button" class="dropdown-item btn-tooltip">
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
</button>
</el-tooltip>
@endif
@endif
@endif
@stack('edit_button_end')
@stack('button_pdf_start')
@if (!$hideButtonPdf)
<a class="dropdown-item" href="{{ route($routeButtonPdf, $transaction->id) }}">
{{ trans('general.download_pdf') }}
</a>
@endif
@stack('button_pdf_end')
@stack('button_dropdown_divider_3_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div>
@endif
@endif
@stack('button_dropdown_divider_3_end')
@stack('delete_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonDelete)
@can($permissionDelete)
@if ($checkButtonReconciled)
@if (!$transaction->reconciled)
{!! Form::deleteLink($transaction, $routeButtonDelete, $textDeleteModal, 'transaction_number') !!}
@endif
@else
{!! Form::deleteLink($transaction, $routeButtonDelete, $textDeleteModal, 'transaction_number') !!}
@endif
@endcan
@endif
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>
</div>
@endif
@stack('button_group_end')
@stack('add_new_button_start')
@if (!$hideButtonAddNew)
@can($permissionCreate)
<a href="{{ route($routeButtonAddNew) }}" class="btn btn-white btn-sm">
{{ trans('general.add_new') }}
</a>
@endcan
@endif
@stack('add_new_button_end')

View File

@ -1,73 +0,0 @@
<div class="card show-card" style="padding: 0; padding-left: 15px; padding-right: 15px; border-radius: 0; box-shadow: 0 4px 16px rgba(0,0,0,.2);">
<div class="card-body show-card-body">
@if ($transactionTemplate)
@switch($transactionTemplate)
@case('classic')
@break
@case('modern')
@break
@default
<x-transactions.template.ddefault
type="{{ $type }}"
:transaction="$transaction"
:payment_methods="$payment_methods"
transaction-template="{{ $transactionTemplate }}"
logo="{{ $logo }}"
hide-company="{{ $hideCompany }}"
hide-company-logo="{{ $hideCompanyLogo }}"
hide-company-details="{{ $hideCompanyDetails }}"
hide-company-name="{{ $hideCompanyName }}"
hide-company-address="{{ $hideCompanyAddress }}"
hide-company-tax-number="{{ $hideCompanyTaxNumber }}"
hide-company-phone="{{ $hideCompanyPhone }}"
hide-company-email="{{ $hideCompanyEmail }}"
hide-content-title="{{ $hideContentTitle }}"
hide-paid-at="{{ $hidePaidAt }}"
hide-account="{{ $hideAccount }}"
hide-category="{{ $hideCategory }}"
hide-payment-methods="{{ $hidePaymentMethods }}"
hide-reference="{{ $hideReference }}"
hide-description="{{ $hideDescription }}"
hide-amount="{{ $hideAmount }}"
text-content-title="{{ $textContentTitle }}"
text-paid-at="{{ $textPaidAt }}"
text-account="{{ $textAccount }}"
text-category="{{ $textCategory }}"
text-payment-methods="{{ $textPaymentMethods }}"
text-reference="{{ $textReference }}"
text-description="{{ $textDescription }}"
text-paid-by="{{ $textPaidBy }}"
hide-contact="{{ $hideContact }}"
hide-contact-info="{{ $hideContactInfo }}"
hide-contact-name="{{ $hideContactName }}"
hide-contact-address="{{ $hideContactAddress }}"
hide-contact-tax-number="{{ $hideContactTaxNumber }}"
hide-contact-phone="{{ $hideContactPhone }}"
hide-contact-email="{{ $hideContactEmail }}"
hide-related="{{ $hideRelated }}"
hide-related-document-number="{{ $hideRelatedDocumentNumber }}"
hide-related-contact="{{ $hideRelatedContact }}"
hide-related-document-date="{{ $hideRelatedDocumentDate }}"
hide-related-document-amount="{{ $hideRelatedDocumentAmount }}"
hide-related-amount="{{ $hideRelatedAmount }}"
text-related-transaction="{{ $textRelatedTransansaction }}"
text-related-document-number="{{ $textRelatedDocumentNumber }}"
text-related-contact="{{ $textRelatedContact }}"
text-related-document-date="{{ $textRelatedDocumentDate }}"
text-related-document-amount="{{ $textRelatedDocumentAmount }}"
text-related-amount="{{ $textRelatedAmount }}"
route-document-show="{{ $routeDocumentShow }}"
/>
@endswitch
@else
@include($transactionTemplate)
@endif
</div>
</div>

View File

@ -1,64 +1,64 @@
@stack('company_start')
@if (!$hideCompany)
<table class="border-bottom-1">
<tr>
@if (!$hideCompanyLogo)
<td style="width:5%;" valign="top">
@stack('company_logo_start')
@if (!empty($transaction->contact->logo) && !empty($transaction->contact->logo->id))
<img src="{{ Storage::url($transaction->contact->logo->id) }}" height="128" width="128" alt="{{ $transaction->contact_name }}" />
@else
<img src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif
@stack('company_logo_end')
</td>
<table class="border-bottom-1">
<tr>
@if (!$hideCompanyLogo)
<td style="width:20%; padding: 0 0 15px 0;" valign="top">
@stack('company_logo_start')
@if (!empty($transaction->contact->logo) && !empty($transaction->contact->logo->id))
<img src="{{ Storage::url($transaction->contact->logo->id) }}" height="70" width="70" alt="{{ $transaction->contact_name }}" />
@else
<img src="{{ $logo }}" height="70" width="70" alt="{{ setting('company.name') }}" />
@endif
@stack('company_logo_end')
</td>
@endif
@if (!$hideCompanyDetails)
<td class="text" style="width: 80%; padding: 0 0 15px 0;">
@stack('company_details_start')
@if (!$hideCompanyName)
<h2 class="text-semibold text">
{{ setting('company.name') }}
</h2>
@endif
@if (!$hideCompanyDetails)
<td style="width: 60%;">
@stack('company_details_start')
@if (!$hideCompanyName)
<h2 class="mb-1" style="font-size: 16px;">
{{ setting('company.name') }}
</h2>
@endif
@if (!$hideCompanyAddress)
<p style="margin:0; padding:0; font-size:14px;">{!! nl2br(setting('company.address')) !!}</p>
@endif
@if (!$hideCompanyTaxNumber)
<p style="margin:0; padding:0; font-size:14px;">
@if (setting('company.tax_number'))
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif
</p>
@endif
@if (!$hideCompanyPhone)
<p style="margin:0; padding:0; font-size:14px;">
@if (setting('company.phone'))
{{ setting('company.phone') }}
@endif
</p>
@endif
@if (!$hideCompanyEmail)
<p style="margin:0; padding:0; font-size:14px;">{{ setting('company.email') }}</p>
@endif
@stack('company_details_end')
</td>
@if (!$hideCompanyAddress)
<p>{!! (setting('company.address')) !!}</p>
@endif
</tr>
</table>
@if (!$hideCompanyTaxNumber)
@if (setting('company.tax_number'))
<p>
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
</p>
@endif
@endif
@if (!$hideCompanyPhone)
@if (setting('company.phone'))
<p>
{{ setting('company.phone') }}
</p>
@endif
@endif
@if (!$hideCompanyEmail)
<p>{{ setting('company.email') }}</p>
@endif
@stack('company_details_end')
</td>
@endif
</tr>
</table>
@endif
@stack('company_end')
@if (!$hideContentTitle)
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
<td style="width: 60%; padding: 15px 0 15px 0;">
<h2 style="font-size: 12px; font-weight:600;">
{{ trans($textContentTitle) }}
</h2>
</td>
@ -67,283 +67,296 @@
@endif
<table>
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:0;">
<table>
@stack('paid_at_input_start')
@if (!$hidePaidAt)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textPaidAt) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
@date($transaction->paid_at)
</td>
</tr>
@endif
@stack('paid_at_input_end')
@stack('account_id_input_start')
@if (!$hideAccount)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textAccount, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transaction->account->name }}
</td>
</tr>
@endif
@stack('account_id_input_end')
@stack('category_id_input_start')
@if (!$hideCategory)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textCategory, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transaction->category->name }}
</td>
</tr>
@endif
@stack('category_id_input_end')
@stack('payment_method_input_start')
@if (!$hidePaymentMethods)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textPaymentMethods, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ !empty($payment_methods[$transaction->payment_method]) ? $payment_methods[$transaction->payment_method] : trans('general.na') }}
</td>
</tr>
@endif
@stack('payment_method_input_end')
@stack('reference_input_start')
@if (!$hideReference)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textReference) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transaction->reference }}
</td>
</tr>
@endif
@stack('reference_input_end')
@stack('description_input_start')
@if (!$hideDescription)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDescription) }}:
</td>
<td style="width:80%; padding-bottom:3px; font-size:14px;">
<p style="font-size:14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0;">
{!! nl2br($transaction->description) !!}
</p>
</td>
</tr>
@endif
@stack('description_input_end')
@if (!$hideContact)
<tr>
<td style="padding-top:45px; padding-bottom:0;">
<h2 style="font-size: 16px;">
{{ trans($textPaidBy) }}
</h2>
</td>
</tr>
@if (!$hideContactInfo)
<tr>
<td style="padding-bottom:5px; padding-top:0; font-size:14px;">
<strong>{{ trans($textContactInfo) }}</strong><br>
</td>
</tr>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<tr>
<td style="padding-bottom:5px; padding-top:0; font-size:14px;">
<strong>{{ $transaction->contact->name }}</strong><br>
</td>
</tr>
@endif
@stack('name_input_end')
@stack('address_input_start')
@if (!$hideContactAddress)
<tr>
<td style="padding-bottom:5px; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
{!! nl2br($transaction->contact->address) !!}
</p>
</td>
</tr>
@endif
@stack('address_input_end')
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
<tr>
<td style="padding-bottom:5px; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
@if ($transaction->contact->tax_number)
{{ trans('general.tax_number') }}: {{ $transaction->contact->tax_number }}
@endif
</p>
</td>
</tr>
@endif
@stack('tax_number_input_end')
@stack('phone_input_start')
@if (!$hideContactPhone)
<tr>
<td style="padding-bottom:0; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
@if ($transaction->contact->phone)
{{ $transaction->contact->phone }}
@endif
</p>
</td>
</tr>
@endif
@stack('phone_input_end')
@stack('email_start')
@if (!$hideContactEmail)
<tr>
<td style="padding-bottom:0; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
{{ $transaction->contact->email }}
</p>
</td>
</tr>
@endif
@stack('email_input_end')
@endif
</table>
</td>
@if (!$hideAmount)
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
{{ trans($textAmount) }}
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transaction->amount, $transaction->currency_code, true)
</p>
</td>
</tr>
</table>
@stack('number_input_start')
@if (!$hideNumber)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans_choice($textNumber, 1) }}:
</td>
@endif
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->number }}
</td>
</tr>
@endif
@stack('number_input_end')
@stack('paid_at_input_start')
@if (!$hidePaidAt)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans($textPaidAt) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
@date($transaction->paid_at)
</td>
</tr>
@endif
@stack('paid_at_input_end')
@stack('account_id_input_start')
@if (!$hideAccount)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans_choice($textAccount, 1) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->account->name }}
</td>
</tr>
@endif
@stack('account_id_input_end')
@stack('category_id_input_start')
@if (!$hideCategory)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans_choice($textCategory, 1) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->category->name }}
</td>
</tr>
@endif
@stack('category_id_input_end')
@stack('payment_method_input_start')
@if (!$hidePaymentMethods)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans_choice($textPaymentMethods, 1) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ !empty($payment_methods[$transaction->payment_method]) ? $payment_methods[$transaction->payment_method] : trans('general.na') }}
</td>
</tr>
@endif
@stack('payment_method_input_end')
@stack('reference_input_start')
@if (!$hideReference)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans($textReference) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->reference }}
</td>
</tr>
@endif
@stack('reference_input_end')
@stack('description_input_start')
@if (!$hideDescription)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans($textDescription) }}:
</td>
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
<p style="font-size:12px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0;">
{!! nl2br($transaction->description) !!}
</p>
</td>
</tr>
@endif
@stack('description_input_end')
</table>
<table class="border-top-1" style="margin-top:15px;">
<tr>
<td style="width: 60%; padding: 15px 0 15px 0;">
<h2 style="font-size: 12px; font-weight:600;">
{{ trans($textPaidBy) }}
</h2>
</td>
</tr>
</table>
<table class="border-bottom-1" style="padding-bottom:15px;">
@if (!$hideContact)
@if (! $hideContactInfo)
<tr>
<td style="width: 60%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<strong>{{ trans($textContactInfo) }}</strong><br>
</td>
</tr>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.name') }}
</td>
<td class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->contact->name }}
</td>
</tr>
@endif
@stack('name_input_end')
@stack('address_input_start')
@if (!$hideContactAddress)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.address') }}
</td>
<td class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{!! nl2br($transaction->contact->address) !!}
</td>
</tr>
@endif
@stack('address_input_end')
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.tax_number') }}
</td>
<td class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
@if ($transaction->contact->tax_number)
{{ trans('general.tax_number') }}: {{ $transaction->contact->tax_number }}
@endif
</td>
</tr>
@endif
@stack('tax_number_input_end')
@stack('phone_input_start')
@if (!$hideContactPhone)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.phone') }}
</td>
<td class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
@if ($transaction->contact->phone)
{{ $transaction->contact->phone }}
@endif
</td>
</tr>
@endif
@stack('phone_input_end')
@stack('email_start')
@if (!$hideContactEmail)
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.email') }}
</td>
<td class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transaction->contact->email }}
</td>
</tr>
@endif
@stack('email_input_end')
@endif
<tr>
<td></td>
</tr>
</table>
@if (!$hideRelated)
@if ($transaction->document)
<table>
<tr>
<td class="border-bottom-1" style="padding-bottom: 0; padding-top:16px;"></td>
</tr>
</table>
<table>
<tr>
<td style="padding:15px 0 0 0;">
<h2 style="font-size: 12px; font-weight:600; margin-bottom: 15px;">{{ trans($textRelatedTransansaction) }}</h2>
</td>
</tr>
</table>
<table>
<table class="table" cellspacing="0" cellpadding="0" style="padding:15px 0 0 0;">
<thead style="color:#424242; font-size:12px;">
<tr class="border-bottom-1">
<th class="item text-alignment-left" style="padding:5px 0;">
@if (!$hideRelatedDocumentNumber)
<span style="font-size: 13px;">{{ trans_choice($textRelatedDocumentNumber, 1) }}</span> <br />
@endif
@if (!$hideRelatedContact)
<span style="font-weight:500;"> {{ trans_choice($textRelatedContact, 1) }} </span>
@endif
</th>
@if (!$hideRelatedDocumentDate)
<th class="price" style=" padding:5px 0; text-align:center;">
{{ trans($textRelatedDocumentDate) }}
</th>
@endif
<th class="price text-alignment-right" style="padding: 5px 0;">
@if (!$hideRelatedDocumentAmount)
<span style="font-size: 13px;">{{ trans($textRelatedDocumentAmount) }}</span><br />
@endif
@if (!$hideRelatedAmount)
<span style="font-weight:500;">{{ trans($textRelatedAmount) }}</span>
@endif
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding-bottom: 0; padding-top:36px;">
<h2 style="font-size: 16px;">{{ trans($textRelatedTransansaction) }}</h2>
<td class="item text-alignment-left" style="color:#424242; font-size:12px; padding-left:0;">
@if (!$hideRelatedDocumentNumber)
<a class="text-medium" style="border-bottom:1px solid;" href="{{ route($routeDocumentShow, $transaction->document->id) }}">
{{ $transaction->document->document_number }}
</a> <br />
@endif
@if (!$hideRelatedContact)
<span style="color: #6E6E6E"> {{ $transaction->document->contact_name }} </span>
@endif
</td>
@if (!$hideRelatedDocumentDate)
<td class="price" style="color:#424242; font-size:12px; text-align:center;">
@date($transaction->document->due_at)
</td>
@endif
<td class="price text-alignment-right" style="color:#424242; font-size:12px; padding-right:0;">
@if (!$hideRelatedDocumentAmount)
@money($transaction->document->amount, $transaction->document->currency_code, true) <br />
@endif
@if (!$hideRelatedAmount)
<span style="color: #6E6E6E"> @money($transaction->amount, $transaction->currency_code, true) </span>
@endif
</td>
</tr>
</table>
<table class="table table-flush table-hover" cellspacing="0" cellpadding="0" style="margin-bottom: 36px;">
<thead style="background-color: #f6f9fc; -webkit-print-color-adjust: exact; font-family: Arial, sans-serif; color:#8898aa; font-size:11px;">
<tr class="border-bottom-1">
@if (!$hideRelatedDocumentNumber)
<th class="item text-left" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<span>{{ trans_choice($textRelatedDocumentNumber, 1) }}</span>
</th>
@endif
@if (!$hideRelatedContact)
<th class="quantity" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
{{ trans_choice($textRelatedContact, 1) }}
</th>
@endif
@if (!$hideRelatedDocumentDate)
<th class="price" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
{{ trans($textRelatedDocumentDate) }}
</th>
@endif
@if (!$hideRelatedDocumentAmount)
<th class="price" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
{{ trans($textRelatedDocumentAmount) }}
</th>
@endif
@if (!$hideRelatedAmount)
<th class="total" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
{{ trans($textRelatedAmount) }}
</th>
@endif
</tr>
</thead>
<tbody>
<tr>
@if (!$hideRelatedDocumentNumber)
<td class="item" style="color:#525f7f; font-size:13px;">
<a style="color:#6da252 !important;" href="{{ route($routeDocumentShow, $transaction->document->id) }}">
{{ $transaction->document->document_number }}
</a>
</td>
@endif
@if (!$hideRelatedContact)
<td class="quantity" style="color:#525f7f; font-size:13px;">
{{ $transaction->document->contact_name }}
</td>
@endif
@if (!$hideRelatedDocumentDate)
<td class="price" style="color:#525f7f; font-size:13px;">
@date($transaction->document->due_at)
</td>
@endif
@if (!$hideRelatedDocumentAmount)
<td class="price" style="color:#525f7f; font-size:13px;">
@money($transaction->document->amount, $transaction->document->currency_code, true)
</td>
@endif
@if (!$hideRelatedAmount)
<td class="total" style="color:#525f7f; font-size:13px;">
@money($transaction->amount, $transaction->currency_code, true)
</td>
@endif
</tr>
</tbody>
</table>
</tbody>
</table>
@endif
@endif
@if (!$hideAmount)
<table style="text-align: right; margin-top:55px;">
<tr>
<td valign="center" style="width:80%; display:block; float:right; background-color: #55588B; -webkit-print-color-adjust: exact; color:#ffffff; border-radius: 5px;">
<table>
<tr>
<td valign="center" style="width: 80%; padding:0; font-size: 14px; font-weight:600; color:#ffffff;">
{{ trans($textAmount) }}:
</td>
<td valign="center" style="width: 20%; padding:0; font-size: 14px; color:#ffffff;">
@money($transaction->amount, $transaction->currency_code, true)
</td>
</tr>
</table>
</td>
</tr>
</table>
@endif