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,9 +1,17 @@
@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>
@endforeach
</div>
<x-show.accordion type="attachment" :open="($accordionActive == 'attachment')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.attachments', 2) }}"
description="{{ trans('documents.form_description.attachment', ['type' => $type]) }}"
/>
</x-slot>
<x-slot name="body">
@foreach ($attachment as $file)
<x-media.file :file="$file" />
@endforeach
</x-slot>
</x-show.accordion>
@endif

View File

@ -0,0 +1,23 @@
@stack('add_new_button_start')
@if (! $hideCreate)
@can($permissionCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
{{ trans($textCreate) }}
</x-link>
@endcan
@endif
@stack('edit_button_start')
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideEdit)
@can($permissionUpdate)
<x-link href="{{ route($editRoute, $document->id) }}">
{{ trans('general.edit') }}
</x-link>
@endcan
@endif
@endif
@stack('edit_button_end')

View File

@ -0,0 +1,24 @@
<x-show.accordion type="children" :open="($accordionActive == 'children')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.invoices', 2) }}"
description="{!! trans('invoices.slider.children', ['count' => $document->children()->count()]) !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
@if ($document->children()->count())
@foreach ($document->children() as $child)
@php $url = '<a href="' . route('transactions.show', $child->id) . '" class="text-purple" @click="e => e.target.classList.add(\'disabled\')">' . $child->number . '</a>' @endphp
<div class="my-2">
{{ trans('recurring.child', ['url' => $url, 'date' => company_date($child->due_at)]) }}
</div>
@endforeach
@else
{{ trans('general.none') }}
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,157 +1,120 @@
@stack('content_header_start')
@if (!$hideHeader)
<x-documents.show.header
type="{{ $type }}"
:document="$document"
hide-header-status="{{ $hideHeaderStatus }}"
text-history-status="{{ $textHistoryStatus }}"
class-header-status="{{ $classHeaderStatus }}"
hide-header-contact="{{ $hideHeaderContact }}"
text-header-contact="{{ $textHeaderContact }}"
class-header-contact="{{ $classHeaderContact }}"
route-contact-show="{{ $routeContactShow }}"
hide-header-amount="{{ $hideHeaderAmount }}"
text-header-amount="{{ $textHeaderAmount }}"
class-header-amount="{{ $classHeaderAmount }}"
hide-header-due-at="{{ $hideHeaderDueAt }}"
text-header-due-at="{{ $textHeaderDueAt }}"
class-header-due-at="{{ $classHeaderDueAt }}"
/>
@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-documents.show.recurring-message
type="{{ $type }}"
:document="$document"
text-recurring-type="{{ $textRecurringType }}"
/>
@endif
@stack('recurring_message_end')
@if (! $hideRecurringMessage)
@if (($recurring = $document->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('status_message_start')
@if (!$hideStatusMessage)
<x-documents.show.status-message
type="{{ $type }}"
:document="$document"
text-status-message="{{ $textStatusMessage }}"
/>
@endif
@stack('status_message_end')
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
@stack('timeline_start')
@if (!$hideTimeline)
<x-documents.show.timeline
type="{{ $type }}"
:document="$document"
:hide-timeline-statuses="$hideTimelineStatuses"
hide-timeline-create="{{ $hideTimelineCreate }}"
text-timeline-create-title="{{ $textTimelineCreateTitle }}"
text-timeline-create-message="{{ $textTimelineCreateMessage }}"
hide-button-edit="{{ $hideButtonEdit }}"
permission-update="{{ $permissionUpdate }}"
route-button-edit="{{ $routeButtonEdit }}"
hide-timeline-sent="{{ $hideTimelineSent }}"
text-timeline-sent-title="{{ $textTimelineSentTitle }}"
text-timeline-sent-status-draft="{{ $textTimelineSentStatusDraft }}"
hide-button-sent="{{ $hideButtonSent }}"
route-button-sent="{{ $routeButtonSent }}"
text-timeline-sent-status-mark-sent="{{ $textTimelineSentStatusMarkSent }}"
hide-button-received="{{ $hideButtonReceived }}"
route-button-received="{{ $routeButtonReceived }}"
text-timeline-sent-status-received="{{ $textTimelineSentStatusReceived }}"
hide-button-email="{{ $hideButtonEmail }}"
route-button-email="{{ $routeButtonEmail }}"
text-timeline-send-status-mail="{{ $textTimelineSendStatusMail }}"
hide-button-share="{{ $hideButtonShare }}"
:signed-url="$signedUrl"
hide-timeline-paid="{{ $hideTimelinePaid }}"
text-timeline-get-paid-title="{{ $textTimelineGetPaidTitle }}"
text-timeline-get-paid-status-await="{{ $textTimelineGetPaidStatusAwait }}"
text-timeline-get-paid-status-partially-paid="{{ $textTimelineGetPaidStatusPartiallyPaid }}"
hide-button-paid="{{ $hideButtonPaid }}"
route-button-paid="{{ $routeButtonPaid }}"
text-timeline-get-paid-mark-paid="{{ $textTimelineGetPaidMarkPaid }}"
hide-button-add-payment="{{ $hideButtonAddPayment }}"
text-timeline-get-paid-add-payment="{{ $textTimelineGetPaidAddPayment }}"
/>
@endif
@stack('timeline_end')
@if (($parent = $document->parent))
@php
$recurring_message = trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
'link' => '<a href="' . route(config('type.document.' . $document->paten->type . '.route.prefix', 'invoices') . '.show', $parent->id) . '"><u>' . $parent->id . '</u></a>'
]);
@endphp
@stack('document_start')
<x-documents.show.document
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@stack('document_end')
<x-documents.show.message type="recurring" background-color="bg-blue-100" text-color="text-blue-600" message="{{ $recurring_message }}" />
@endif
@endif
@stack('attachment_start')
@if (!$hideAttachment)
<x-documents.show.attachment
type="{{ $type }}"
:document="$document"
:attachment="$attachment"
/>
@endif
@stack('attachment_end')
@stack('recurring_message_end')
@stack('row_footer_start')
@if (!$hideFooter)
<x-documents.show.footer
type="{{ $type }}"
:document="$document"
:histories="$histories"
:transactions="$transactions"
class-footer-histories="{{ $classFooterHistories }}"
hide-footer-histories="{{ $hideFooterHistories }}"
text-histories="{{ $textHistories }}"
text-history-status="{{ $textHistoryStatus }}"
hide-footer-transactions="{{ $hideFooterTransactions }}"
class-footer-transactions="{{ $classFooterTransactions }}"
/>
@endif
@stack('row_footer_end')
@stack('status_message_start')
{{ Form::hidden('document_id', $document->id, ['id' => 'document_id']) }}
{{ Form::hidden($type . '_id', $document->id, ['id' => $type . '_id']) }}
@if (! $hideStatusMessage)
@if ($document->status == 'draft')
<x-documents.show.message type="status" background-color="bg-red-100" text-color="text-red-600" message="{!! trans($textStatusMessage) !!}" />
@endif
@endif
@stack('status_message_end')
@stack('create_start')
@if (! $hideCreated)
<x-documents.show.create type="{{ $type }}" :document="$document" />
@endif
@stack('create_end')
@stack('send_start')
@if (! $hideSend)
<x-documents.show.send type="{{ $type }}" :document="$document" />
@endif
@stack('send_end')
@stack('receive_start')
@if (! $hideReceive)
<x-documents.show.receive type="{{ $type }}" :document="$document" />
@endif
@stack('receive_end')
@stack('get_paid_start')
@if (! $hideGetPaid)
<x-documents.show.get-paid type="{{ $type }}" :document="$document" />
@endif
@stack('get_paid_end')
@stack('make_paid_start')
@if (! $hideMakePayment)
<x-documents.show.make-payment type="{{ $type }}" :document="$document" />
@endif
@stack('make_paid_end')
@stack('restore_start')
@if (! $hideRestore)
<x-documents.show.restore type="{{ $type }}" :document="$document" />
@endif
@stack('restore_end')
@stack('schedule_start')
@if (! $hideSchedule)
<x-documents.show.schedule type="{{ $type }}" :document="$document" />
@endif
@stack('schedule_end')
@stack('children_start')
@if (! $hideChildren)
<x-documents.show.children type="{{ $type }}" :document="$document" />
@endif
@stack('children_end')
@stack('attachment_start')
@if (! $hideAttachment)
<x-documents.show.attachment type="{{ $type }}" :document="$document" :attachment="$attachment" />
@endif
@stack('attachment_end')
</div>
<div class="w-full lg:w-7/12">
@stack('document_start')
<x-documents.show.template type="{{ $type }}" :document="$document" />
@stack('document_end')
</div>
<x-form.input.hidden name="document_id" :value="$document->id" />
<x-form.input.hidden name="{{ $type . '_id' }}" :value="$document->id" />
</div>

View File

@ -0,0 +1,19 @@
<x-show.accordion type="create" :open="($accordionActive == 'create')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.create') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $created_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex">
<x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans('general.edit') }}
</x-link>
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,147 +0,0 @@
<div class="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">
@if ($documentTemplate)
@switch($documentTemplate)
@case('classic')
<x-documents.template.classic
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@case('modern')
<x-documents.template.modern
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@default
<x-documents.template.ddefault
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-discount="{{ $hideDiscount }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@endswitch
@else
@include($documentTemplate)
@endif
</div>
</div>

View File

@ -1,27 +0,0 @@
<div class="row">
@stack('row_footer_histories_start')
@if (!$hideFooterHistories)
<div class="{{ $classFooterHistories }}">
<x-documents.show.histories
type="{{ $type }}"
:document="$document"
:histories="$histories"
text-histories="{{ $textHistories }}"
text-history-status="{{ $textHistoryStatus }}"
/>
</div>
@endif
@stack('row_footer_histories_end')
@stack('row_footer_transactions_start')
@if (!$hideFooterTransactions)
<div class="{{ $classFooterTransactions }}">
<x-documents.show.transactions
type="{{ $type }}"
:document="$document"
:transactions="$transactions"
/>
</div>
@endif
@stack('row_footer_transactions_end')
</div>

View File

@ -0,0 +1,120 @@
<x-show.accordion type="get_paid" :open="($accordionActive == 'get-paid')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('invoices.get_paid') }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@stack('timeline_get_paid_body_button_payment_start')
@if (! $hideAddPayment)
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
override="class"
>
{{ trans('invoices.add_payment') }}
</x-button>
@endif
@endif
@stack('timeline_get_paid_body_button_payment_end')
@if (! $hideAcceptPayment)
<x-link href="{{ route('apps.categories.show', [
'alias' => 'payment-method',
'utm_source' => $type,
'utm_medium' => 'app',
'utm_campaign' => trans('documents.accept_payment_online'),
]) }}"
override="class"
class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6"
>
<span class="border-b border-transparent transition-all hover:border-black">
{{ trans('documents.accept_payment_online') }}
</span>
</x-link>
@endif
</div>
<div class="text-xs mt-4" style="margin-left: 0 !important;">
<span class="font-medium">
{{ trans('invoices.payment_received') }} :
</span>
@if ($transactions->count())
@foreach ($transactions as $transaction)
<div class="my-2">
<span>
<x-date :date="$transaction->paid_at" />
- {!! trans('documents.transaction', [
'amount' => '<span class="font-medium">' . money($transaction->amount, $transaction->currency_code, true) . '</span>',
'account' => '<span class="font-medium">' . $transaction->account->name . '</span>',
]) !!}
</span>
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmail('{{ route($transactionEmailRoute, $transaction->id) }}')">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</span>
</x-button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
<x-button class="text-purple mt-1" override="class" disabled="disabled">
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</span>
</x-button>
</x-tooltip>
@endif
<span> - </span>
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
class="text-purple mt-1"
override="class"
>
<span class="border-b border-transparent transition-all hover:border-purple">
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
<span class="border-b border-transparent transition-all hover:border-purple">
</x-button>
<span> - </span>
@php
$message = trans('general.delete_confirm', [
'name' => '<strong>' . Date::parse($transaction->paid_at)->format(company_date_format()) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
'type' => strtolower(trans_choice('general.transactions', 1))
]);
@endphp
<x-delete-link
:model="$transaction"
:route="'transactions.destroy'"
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
:message="$message"
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
class="text-purple mt-1"
text-class="border-b border-transparent transition-all hover:border-purple"
override="class"
/>
</div>
@endforeach
@else
<div class="my-2">
<span>{{ trans('general.no_records') }}</span>
</div>
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,69 +0,0 @@
<div class="row" style="font-size: inherit !important">
@stack('header_status_start')
@if (!$hideHeaderStatus)
<div class="{{ $classHeaderStatus }}">
{{ trans_choice('general.statuses', 1) }}
<br>
<strong>
<span class="float-left">
<span class="badge badge-{{ $document->status_label }}">
{{ trans($textHistoryStatus . $document->status) }}
</span>
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_status_end')
@stack('header_contact_start')
@if (!$hideHeaderContact)
<div class="{{ $classHeaderContact }}">
{{ trans_choice($textHeaderContact, 1) }}
<br>
<strong>
<span class="float-left">
<a href="{{ route($routeContactShow, $document->contact_id) }}">
{{ $document->contact_name }}
</a>
</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">
@money($document->amount_due, $document->currency_code, true)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_amount_end')
@stack('header_due_at_start')
@if (!$hideHeaderDueAt)
<div class="{{ $classHeaderDueAt }}">
{{ trans($textHeaderDueAt) }}
<br>
<strong>
<span class="float-left">
@date($document->due_at)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_due_at_end')
</div>

View File

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

View File

@ -0,0 +1,17 @@
@stack($type . '_message_start')
<div @class([
'rounded-xl px-5 py-3 mb-5',
$backgroundColor
])
>
<p @class([
'text-sm mb-0',
$textColor
])
>
{!! $message !!}
</p>
</div>
@stack($type . '_message_end')

View File

@ -0,0 +1,163 @@
@stack('button_group_start')
@if (! $hideMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@stack('button_dropdown_start')
@stack('duplicate_button_start')
@if (! $hideDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@endif
@stack('duplicate_button_end')
@if (! $hideDivider1)
<x-dropdown.divider />
@endif
@stack('button_print_start')
@if (! $hidePrint)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@endif
@stack('button_print_end')
@stack('button_pdf_start')
@if (! $hidePdf)
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@stack('button_pdf_end')
@if (! $hideDivider2)
<x-dropdown.divider />
@endif
@stack('share_button_start')
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (! $hideEmail)
@if ($document->contact_email)
<x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-dropdown.button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="left">
<x-dropdown.button disabled="disabled">
{{ trans($textEmail) }}
</x-dropdown.button>
</x-tooltip>
@endif
@endif
@endif
@stack('share_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider3)
<x-dropdown.divider />
@endif
@stack('button_customize_start')
@if (! $hideCustomize)
@can($permissionCustomize)
<x-dropdown.link href="{{ route($customizeRoute) }}">
{{ trans('general.customize') }}
</x-dropdown.link>
@endcan
@endif
@stack('button_customize_end')
@stack('end_button_start')
@if (! $hideEnd && $document->recurring)
<x-dropdown.link href="{{ route($endRoute, $document->id) }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
<x-dropdown.divider />
@endif
@stack('end_button_end')
@if (! $hideDivider4)
<x-dropdown.divider />
@endif
@stack('delete_button_start')
@if (! $hideDelete)
@can($permissionDelete)
@if ($checkReconciled)
@if (! $document->reconciled)
<x-delete-link :model="$document" :route="$deleteRoute" :text="$textDeleteModal" model-name="document_number" />
@endif
@else
<x-delete-link :model="$document" :route="$deleteRoute" :text="$textDeleteModal" model-name="document_number" />
@endif
@endcan
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</x-dropdown>
@endif
@stack('button_group_end')

View File

@ -0,0 +1,29 @@
<x-show.accordion type="receive" :open="($accordionActive == 'receive')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.receive') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $sent_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideMarkReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkReceived) }}
</x-link>
@else
<x-button kind="secondary" disabled="disabled">
{{ trans($textMarkReceived) }}
</x-button>
@endif
@endcan
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,44 +0,0 @@
@stack('recurring_message_start')
@if (($recurring = $document->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($date_format)
]) }}
</p>
@stack('recurring_message_body_end')
</div>
</div>
</div>
@endif
@if ($document->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', $document->parent->id) . '"><u>' . $document->parent->document_number . '</u></a>'
]) !!}
</p>
@stack('recurring_parent_message_body_end')
</div>
</div>
</div>
@endif
@stack('recurring_message_end')

View File

@ -0,0 +1,14 @@
<x-show.accordion type="restore" :open="($accordionActive == 'create')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.restore') }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body">
<x-button>
{{ trans('general.restore') }}
</x-button>
</x-slot>
</x-show.accordion>

View File

@ -0,0 +1,28 @@
<x-show.accordion type="schedule" :open="($accordionActive == 'schedule')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans_choice('general.schedules', 1) }}"
description="{!! $description !!}"
/>
</x-slot>
<x-slot name="body" class="block" override="class">
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
@if ($document->recurring && ($next = $document->recurring->getNextRecurring()))
{{ trans('recurring.next_date', ['date' => $next->format(company_date_format())]) }}
<br>
@if (($document->recurring->limit_by == 'count'))
@if ($document->recurring->limit_count == 0)
{{ trans('recurring.ends_never') }}
@else
{{ trans('recurring.ends_after', ['times' => $document->recurring->limit_count]) }}
@endif
@else
{{ trans('recurring.ends_date', ['date' => company_date($document->recurring->limit_date)]) }}
@endif
@else
{{ trans('documents.statuses.ended') }}
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -0,0 +1,51 @@
<x-show.accordion type="send" :open="($accordionActive == 'send')">
<x-slot name="head">
<x-show.accordion.head
title="{{ trans('general.send') }}"
description="{!! trans($description, [
'user' => $document->owner->name,
'date' => $sent_date,
]) !!}"
/>
</x-slot>
<x-slot name="body">
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideEmail)
@if ($document->contact_email)
<x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-button>
@else
<x-tooltip message="{{ trans('invoices.messages.email_required') }}" placement="top">
<x-dropdown.button disabled="disabled">
{{ trans($textEmail) }}
</x-dropdown.button>
</x-tooltip>
@endif
@endif
@if (! $hideMarkSent)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkSent) }}
</x-link>
@else
<x-button disabled="disabled">
{{ trans($textMarkSent) }}
</x-button>
@endif
@endcan
@endif
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-button>
@endif
@endif
</div>
</x-slot>
</x-show.accordion>

View File

@ -1,15 +0,0 @@
@stack('status_message_start')
@if ($document->status == 'draft')
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger fade show" role="alert">
@stack('status_message_body_start')
<span class="alert-text">
<strong>{!! trans($textStatusMessage) !!}</strong>
</span>
@stack('status_message_body_end')
</div>
</div>
</div>
@endif
@stack('status_message_end')

View File

@ -0,0 +1,143 @@
<div class="p-7 shadow-2xl rounded-2xl">
@if ($documentTemplate)
@switch($documentTemplate)
@case('classic')
<x-documents.template.classic
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@case('modern')
<x-documents.template.modern
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@break
@default
<x-documents.template.ddefault
type="{{ $type }}"
:document="$document"
document-template="{{ $documentTemplate }}"
logo="{{ $logo }}"
background-color="{{ $backgroundColor }}"
hide-footer="{{ $hideFooter }}"
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-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-order-number="{{ $hideOrderNumber }}"
hide-document-number="{{ $hideDocumentNumber }}"
hide-issued-at="{{ $hideIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
text-contact-info="{{ $textContactInfo }}"
text-issued-at="{{ $textIssuedAt }}"
text-document-number="{{ $textDocumentNumber }}"
text-due-at="{{ $textDueAt }}"
text-order-number="{{ $textOrderNumber }}"
text-document-title="{{ $textDocumentTitle }}"
text-document-subheading="{{ $textDocumentSubheading }}"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-discount="{{ $hideDiscount }}"
hide-price="{{ $hidePrice }}"
hide-amount="{{ $hideAmount }}"
hide-note="{{ $hideNote }}"
text-items="{{ $textItems }}"
text-quantity="{{ $textQuantity }}"
text-price="{{ $textPrice }}"
text-amount="{{ $textAmount }}"
/>
@endswitch
@else
@include($documentTemplate)
@endif
</div>

View File

@ -1,222 +0,0 @@
@if (!in_array($document->status, $hideTimelineStatuses))
@stack('timeline_body_start')
<div class="card">
<div class="card-body">
<div class="timeline timeline-one-side" data-timeline-content="axis" data-timeline-axis-style="dashed">
@stack('timeline_create_start')
@if (!$hideTimelineCreate)
<div class="timeline-block">
<span class="timeline-step badge-primary">
<i class="fas fa-plus"></i>
</span>
<div class="timeline-content">
@stack('timeline_create_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineCreateTitle) }}
</h2>
@stack('timeline_create_head_end')
@stack('timeline_create_body_start')
@stack('timeline_create_body_message_start')
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineCreateMessage, ['date' => Date::parse($document->created_at)->format($date_format)]) }}
</small>
@stack('timeline_create_body_message_end')
<div class="mt-3">
@stack('timeline_create_body_button_edit_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a href="{{ route($routeButtonEdit, $document->id) }}" class="btn btn-primary btn-sm btn-alone header-button-top">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('timeline_create_body_button_edit_end')
</div>
@stack('timeline_create_body_end')
</div>
</div>
@endif
@stack('timeline_create_end')
@stack('timeline_sent_start')
@if (!$hideTimelineSent)
<div class="timeline-block">
<span class="timeline-step badge-danger">
<i class="far fa-envelope"></i>
</span>
<div class="timeline-content">
@stack('timeline_sent_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineSentTitle) }}
</h2>
@stack('timeline_sent_head_end')
@stack('timeline_sent_body_start')
@if ($document->status != 'sent' && $document->status != 'partial' && $document->status != 'viewed' && $document->status != 'received')
@stack('timeline_sent_body_message_start')
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineSentStatusDraft) }}
</small>
@stack('timeline_sent_body_message_end')
<div class="mt-3">
@stack('timeline_sent_body_button_sent_start')
@if (!$hideButtonSent)
@can($permissionUpdate)
@if($document->status == 'draft')
<a href="{{ route($routeButtonSent, $document->id) }}" class="btn btn-white btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSentStatusMarkSent) }}
</a>
@else
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
{{ trans($textTimelineSentStatusMarkSent) }}
</button>
@endif
@endcan
@endif
@stack('timeline_sent_body_button_sent_end')
@stack('timeline_receive_body_button_received_start')
@if (!$hideButtonReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<a href="{{ route($routeButtonReceived, $document->id) }}" class="btn btn-danger btn-sm btn-alone header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSentStatusReceived) }}
</a>
@else
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
{{ trans($textTimelineSentStatusReceived) }}
</button>
@endif
@endcan
@endif
@stack('timeline_receive_body_button_received_end')
@elseif($document->status == 'viewed')
@stack('timeline_viewed_invoice_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.viewed') }}</small>
@stack('timeline_viewed_invoice_body_message_end')
@elseif($document->status == 'received')
@stack('timeline_receive_bill_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('bills.messages.status.receive.received', ['date' => Date::parse($document->received_at)->format($date_format)]) }}</small>
@stack('timeline_receive_bill_body_message_end')
@else
@stack('timeline_sent_body_message_start')
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
<small>{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($document->sent_at)->format($date_format)]) }}</small>
@stack('timeline_sent_body_message_end')
@endif
@if (!($document->status != 'sent' && $document->status != 'partial' && $document->status != 'viewed' && $document->status != 'received'))
<div class="mt-3">
@endif
@stack('timeline_sent_body_button_email_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
<a href="{{ route($routeButtonEmail, $document->id) }}" class="btn btn-danger btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineSendStatusMail) }}
</a>
@else
<el-tooltip content="{{ trans('invoices.messages.email_required') }}" placement="top">
<button type="button" class="btn btn-danger btn-sm btn-tooltip disabled header-button-top">
{{ trans($textTimelineSendStatusMail) }}
</button>
</el-tooltip>
@endif
@endif
@stack('timeline_sent_body_button_email_end')
@stack('timeline_sent_body_button_share_start')
@if (!$hideButtonShare)
@if ($document->status != 'cancelled')
<a href="{{ $signedUrl }}" target="_blank" class="btn btn-white btn-sm header-button-top">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('timeline_sent_body_button_share_end')
</div>
@stack('timeline_sent_body_end')
</div>
</div>
@endif
@stack('timeline_sent_end')
@stack('timeline_get_paid_start')
@if (!$hideTimelinePaid)
<div class="timeline-block">
<span class="timeline-step badge-success">
<i class="far fa-money-bill-alt"></i>
</span>
<div class="timeline-content">
@stack('timeline_get_paid_head_start')
<h2 class="font-weight-500">
{{ trans($textTimelineGetPaidTitle) }}
</h2>
@stack('timeline_get_paid_head_end')
@stack('timeline_get_paid_body_start')
@stack('timeline_get_paid_body_message_start')
@if($document->status != 'paid' && empty($document->transactions->count()))
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineGetPaidStatusAwait) }}
</small>
@else
<small>
{{ trans_choice('general.statuses', 1) . ':' }}
</small>
<small>
{{ trans($textTimelineGetPaidStatusPartiallyPaid) }}
</small>
@endif
@stack('timeline_get_paid_body_message_end')
<div class="mt-3">
@stack('timeline_get_paid_body_button_pay_start')
@if (!$hideButtonPaid)
@can($permissionUpdate)
<a href="{{ route($routeButtonPaid, $document->id) }}" class="btn btn-white btn-sm header-button-top" @click="e => e.target.classList.add('disabled')">
{{ trans($textTimelineGetPaidMarkPaid) }}
</a>
@endcan
@endif
@stack('timeline_get_paid_body_button_pay_end')
@stack('timeline_get_paid_body_button_payment_start')
@if (!$hideButtonAddPayment)
@if(empty($document->transactions->count()) || (!empty($document->transactions->count()) && $document->paid != $document->amount))
<button @click="onPayment" id="button-payment" class="btn btn-success btn-sm header-button-bottom">
{{ trans($textTimelineGetPaidAddPayment) }}
</button>
@endif
@endif
@stack('timeline_get_paid_body_button_payment_end')
</div>
@stack('timeline_get_paid_body_end')
</div>
</div>
@endif
@stack('timeline_get_paid_end')
</div>
</div>
</div>
@stack('timeline_body_end')
@endif

View File

@ -1,161 +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')
@if (in_array($document->status, $hideTimelineStatuses))
@stack('edit_button_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $document->id) }}">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('edit_button_end')
@endif
@stack('duplicate_button_start')
@if (!$hideButtonDuplicate)
@can($permissionCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $document->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@endif
@stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start')
@if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint)
@if ($checkButtonCancelled)
@if ($document->status != 'cancelled')
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@else
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@endif
@if (in_array($document->status, $hideTimelineStatuses))
@stack('share_button_start')
@if (!$hideButtonShare)
@if ($document->status != 'cancelled')
<a class="dropdown-item" href="{{ $signedUrl }}" target="_blank">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
<a class="dropdown-item" href="{{ route($routeButtonEmail, $document->id) }}">
{{ trans($textTimelineSendStatusMail) }}
</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($textTimelineSendStatusMail) }}</span>
</button>
</el-tooltip>
@endif
@endif
@stack('edit_button_end')
@endif
@stack('button_pdf_start')
@if (!$hideButtonPdf)
<a class="dropdown-item" href="{{ route($routeButtonPdf, $document->id) }}">
{{ trans('general.download_pdf') }}
</a>
@endif
@stack('button_pdf_end')
@if (!$hideButtonCancel)
@can($permissionUpdate)
@if ($checkButtonCancelled)
@if ($document->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $document->id) }}">
{{ trans('general.cancel') }}
</a>
@stack('button_cancelled_end')
@endif
@else
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $document->id) }}">
{{ trans('general.cancel') }}
</a>
@stack('button_cancelled_end')
@endif
@endcan
@endif
@stack('button_dropdown_divider_2_start')
@if (!$hideButtonGroupDivider2)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_2_end')
@if (!$hideButtonCustomize)
@can($permissionButtonCustomize)
@stack('button_customize_start')
<a class="dropdown-item" href="{{ route($routeButtonCustomize) }}">
{{ trans('general.customize') }}
</a>
@stack('button_customize_end')
@endcan
@endif
@stack('button_dropdown_divider_3_start')
@if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_3_end')
@stack('delete_button_start')
@if (!$hideButtonDelete)
@can($permissionDelete)
@if ($checkButtonReconciled)
@if (!$document->reconciled)
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif
@else
{!! Form::deleteLink($document, $routeButtonDelete, $textDeleteModal, 'document_number') !!}
@endif
@endcan
@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,99 +0,0 @@
<div class="accordion">
<div class="card">
<div class="card-header" id="accordion-transactions-header" data-toggle="collapse" data-target="#accordion-transactions-body" aria-expanded="false" aria-controls="accordion-transactions-body">
<h4 class="mb-0">{{ trans_choice('general.transactions', 2) }}</h4>
</div>
<div id="accordion-transactions-body" class="collapse hide" aria-labelledby="accordion-transactions-header">
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_transactions_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_transactions_head_td_start')
@php $class = 'col-sm-3'; @endphp
@cannot($permissionTransactionDelete)
@php $class = 'col-sm-4'; @endphp
@endcan
<th class="col-xs-4 {{ $class }}">
{{ trans('general.date') }}
</th>
<th class="col-xs-4 {{ $class }}">
{{ trans('general.amount') }}
</th>
<th class="{{ $class }} d-none d-sm-block">
{{ trans_choice('general.accounts', 1) }}
</th>
@can($permissionTransactionDelete)
<th class="col-xs-4 col-sm-3">
{{ trans('general.actions') }}
</th>
@endcan
@stack('row_footer_transactions_head_td_end')
</tr>
@stack('row_footer_transactions_head_tr_end')
</thead>
<tbody>
@stack('row_footer_transactions_body_tr_start')
@if ($transactions->count())
@foreach($transactions as $transaction)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_transactions_body_td_start')
<td class="col-xs-4 {{ $class }}">
@date($transaction->paid_at)
</td>
<td class="col-xs-4 {{ $class }}">
@money($transaction->amount, $transaction->currency_code, true)
</td>
<td class="{{ $class }} d-none d-sm-block">
{{ $transaction->account->name }}
</td>
@can($permissionTransactionDelete)
<td class="col-xs-4 col-sm-3 py-0">
@if ($transaction->reconciled)
<button type="button" class="btn btn-default btn-sm">
{{ trans('reconciliations.reconciled') }}
</button>
@else
@php $message = trans('general.delete_confirm', [
'name' => '<strong>' . Date::parse($transaction->paid_at)->format($date_format) . ' - ' . money($transaction->amount, $transaction->currency_code, true) . ' - ' . $transaction->account->name . '</strong>',
'type' => strtolower(trans_choice('general.transactions', 1))
]);
@endphp
{!! Form::button(trans('general.delete'), array(
'type' => 'button',
'class' => 'btn btn-danger btn-sm',
'title' => trans('general.delete'),
'@click' => 'confirmDelete("' . route('transactions.destroy', $transaction->id) . '", "' . trans_choice('general.transactions', 2) . '", "' . $message. '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
)) !!}
@endif
</td>
@endcan
@stack('row_footer_transactions_body_td_end')
</tr>
@endforeach
@else
<tr>
<td colspan="4">
<div class="text-muted nr-py" id="datatable-basic_info" role="status" aria-live="polite">
{{ trans('general.no_records') }}
</div>
</td>
</tr>
@endif
@stack('row_footer_transactions_body_tr_end')
</tbody>
</table>
</div>
</div>
</div>
</div>