Merge Invoice and Bill into Document
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
@if ($attachment)
|
||||
<div class="row align-items-center">
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
@php
|
||||
$file = $attachment;
|
||||
@endphp
|
||||
|
||||
@include('partials.media.file')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
152
resources/views/components/documents/show/content.blade.php
Normal file
152
resources/views/components/documents/show/content.blade.php
Normal file
@@ -0,0 +1,152 @@
|
||||
@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 }}"
|
||||
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')
|
||||
|
||||
@stack('recurring_message_start')
|
||||
@if (!$hideRecurringMessage)
|
||||
<x-documents.show.recurring-message
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
text-recurring-type="{{ $textRecurringType }}"
|
||||
/>
|
||||
@endif
|
||||
@stack('recurring_message_end')
|
||||
|
||||
@stack('status_message_start')
|
||||
@if (!$hideStatusMessage)
|
||||
<x-documents.show.status-message
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
text-status-message="{{ $textStatusMessage }}"
|
||||
/>
|
||||
@endif
|
||||
@stack('status_message_end')
|
||||
|
||||
@stack('timeline_start')
|
||||
@if (!$hideTimeline)
|
||||
<x-documents.show.timeline
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
:hide-timeline-statuses="$hideTimelineStatuses"
|
||||
hide-timeline-create="{{ $hideTimelineCreate }}"
|
||||
hide-timeline-create-title="{{ $textTimelineCreateTitle }}"
|
||||
text-timeline-create-message="{{ $textTimelineCreateMessage }}"
|
||||
hide-button-edit="{{ $hideButtonEdit }}"
|
||||
permission-document-update="{{ $permissionDocumentUpdate }}"
|
||||
route-button-edit="{{ $routeButtonEdit }}"
|
||||
hide-timeline-sent="{{ $hideTimelineSent }}"
|
||||
text-timeline-sent-title="{{ $textTimelineSentTitle }}"
|
||||
text-timeline-sent-status-draft="{{ $textTimelineSentStatusDraft }}"
|
||||
hide-button-sent="{{ $hideButtonSent }}"
|
||||
permission-document-update="{{ $permissionDocumentUpdate }}"
|
||||
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-sent="{{ $hideTimelineSent }}"
|
||||
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')
|
||||
|
||||
@stack('invoice_start')
|
||||
<x-documents.show.document
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
document-template="{{ $documentTemplate }}"
|
||||
logo="{{ $logo }}"
|
||||
back-ground-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 }}"
|
||||
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 }}"
|
||||
/>
|
||||
@stack('invoice_end')
|
||||
|
||||
@stack('attachment_start')
|
||||
@if (!$hideAttachment)
|
||||
<x-documents.show.attachment
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
:attachment="$attachment"
|
||||
/>
|
||||
@endif
|
||||
@stack('attachment_end')
|
||||
|
||||
@stack('row_footer_start')
|
||||
@if (!$hideFooter)
|
||||
<x-documents.show.footer
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
:histories="$histories"
|
||||
:transactions="$transactions"
|
||||
hide-footer-histories="{{ $hideFooterHistories }}"
|
||||
text-histories="{{ $textHistories }}"
|
||||
text-history-status="{{ $textHistoryStatus }}"
|
||||
hide-footer-transactions="{{ $hideFooterTransactions }}"
|
||||
/>
|
||||
@endif
|
||||
@stack('row_footer_end')
|
||||
|
||||
{{ Form::hidden('document_id', $document->id, ['id' => 'document_id']) }}
|
||||
{{ Form::hidden($type . '_id', $document->id, ['id' => $type . '_id']) }}
|
||||
141
resources/views/components/documents/show/document.blade.php
Normal file
141
resources/views/components/documents/show/document.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
|
||||
|
||||
<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 }}"
|
||||
back-ground-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 }}"
|
||||
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 }}"
|
||||
back-ground-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 }}"
|
||||
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 }}"
|
||||
back-ground-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 }}"
|
||||
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>
|
||||
27
resources/views/components/documents/show/footer.blade.php
Normal file
27
resources/views/components/documents/show/footer.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="row">
|
||||
@stack('row_footer_histories_start')
|
||||
@if (!$hideFooterHistories)
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
<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="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
<x-documents.show.transactions
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
:transactions="$transactions"
|
||||
/>
|
||||
</div>
|
||||
@endif
|
||||
@stack('row_footer_transactions_end')
|
||||
</div>
|
||||
59
resources/views/components/documents/show/header.blade.php
Normal file
59
resources/views/components/documents/show/header.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<div class="row" style="font-size: inherit !important">
|
||||
@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
|
||||
|
||||
@if (!$hideHeaderContact)
|
||||
<div class="{{ $classHeaderContact }}">
|
||||
{{ trans_choice($textHeaderContact, 1) }}
|
||||
<br>
|
||||
|
||||
<strong>
|
||||
<span class="float-left">
|
||||
{{ $document->contact_name }}
|
||||
</span>
|
||||
</strong>
|
||||
<br><br>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!$hideHeaderAmount)
|
||||
<div class="{{ $classHeaderAmount }}">
|
||||
{{ trans($textHeaderAmount) }}
|
||||
<br>
|
||||
|
||||
<strong>
|
||||
<span class="float-left">
|
||||
@money($document->amount - $document->paid, $document->currency_code, true)
|
||||
</span>
|
||||
</strong>
|
||||
<br><br>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!$hideHeaderDueAt)
|
||||
<div class="{{ $classHeaderDueAt }}">
|
||||
{{ trans($textHeaderDueAt) }}
|
||||
<br>
|
||||
|
||||
<strong>
|
||||
<span class="float-left">
|
||||
@date($document->due_at)
|
||||
</span>
|
||||
</strong>
|
||||
<br><br>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -0,0 +1,51 @@
|
||||
<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>
|
||||
@@ -0,0 +1,27 @@
|
||||
@stack('recurring_message_start')
|
||||
@if (($recurring = $document->recurring) && ($next = $recurring->getNextRecurring()))
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-12">
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<div class="media-comment-text">
|
||||
<div class="d-flex">
|
||||
@stack('recurring_message_head_start')
|
||||
<h5 class="mt-0">{{ trans('recurring.recurring') }}</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>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@stack('recurring_message_end')
|
||||
@@ -0,0 +1,15 @@
|
||||
@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')
|
||||
208
resources/views/components/documents/show/timeline.blade.php
Normal file
208
resources/views/components/documents/show/timeline.blade.php
Normal file
@@ -0,0 +1,208 @@
|
||||
@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($permissionDocumentUpdate)
|
||||
<a href="{{ route($routeButtonEdit, $document->id) }}" class="btn btn-primary btn-sm btn-alone">
|
||||
{{ 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')
|
||||
@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($permissionDocumentUpdate)
|
||||
@if($document->status == 'draft')
|
||||
<a href="{{ route($routeButtonSent, $document->id) }}" class="btn btn-white btn-sm">
|
||||
{{ trans($textTimelineSentStatusMarkSent) }}
|
||||
</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-secondary btn-sm" disabled="disabled">
|
||||
<span class="text-disabled">{{ trans($textTimelineSentStatusMarkSent) }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@endcan
|
||||
@endif
|
||||
@stack('timeline_sent_body_button_sent_end')
|
||||
|
||||
@stack('timeline_receive_body_button_received_start')
|
||||
@if (!$hideButtonReceived)
|
||||
@can($permissionDocumentUpdate)
|
||||
<a href="{{ route($routeButtonReceived, $document->id) }}" class="btn btn-danger btn-sm btn-alone">
|
||||
{{ trans($textTimelineSentStatusReceived) }}
|
||||
</a>
|
||||
@endcan
|
||||
@endif
|
||||
@stack('timeline_receive_body_button_received_end')
|
||||
</div>
|
||||
@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')
|
||||
@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
|
||||
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
@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">
|
||||
{{ trans($textTimelineSendStatusMail) }}
|
||||
</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-white btn-sm green-tooltip" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
|
||||
<span class="text-disabled">{{ trans($textTimelineSendStatusMail) }}</span>
|
||||
</button>
|
||||
@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">
|
||||
{{ 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 (!$hideTimelineSent)
|
||||
<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('update-sales-invoices')
|
||||
<a href="{{ route($routeButtonPaid, $document->id) }}" class="btn btn-white btn-sm header-button-top">
|
||||
{{ 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_get_paid_end')
|
||||
@endif
|
||||
121
resources/views/components/documents/show/top-buttons.blade.php
Normal file
121
resources/views/components/documents/show/top-buttons.blade.php
Normal file
@@ -0,0 +1,121 @@
|
||||
@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> {{ trans('general.more_actions') }}
|
||||
</button>
|
||||
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_dropdown_start')
|
||||
@stack('duplicate_button_start')
|
||||
@if (!$hideButtonDuplicate)
|
||||
@can($permissionDocumentCreate)
|
||||
<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
|
||||
|
||||
@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($permissionDocumentUpdate)
|
||||
@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_cancelled_start')
|
||||
<a class="dropdown-item" href="{{ route($routeButtonCustomize) }}">
|
||||
{{ trans('general.customize') }}
|
||||
</a>
|
||||
@stack('button_cancelled_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($permissionDocumentDelete)
|
||||
@if ($checkButtonReconciled)
|
||||
@if (!$document->reconciled)
|
||||
{!! Form::deleteLink($document, $routeButtonDelete) !!}
|
||||
@endif
|
||||
@else
|
||||
{!! Form::deleteLink($document, $routeButtonDelete) !!}
|
||||
@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($permissionDocumentCreate)
|
||||
<a href="{{ route($routeButtonAddNew) }}" class="btn btn-white btn-sm">
|
||||
{{ trans('general.add_new') }}
|
||||
</a>
|
||||
@endcan
|
||||
@endif
|
||||
@stack('add_new_button_end')
|
||||
@@ -0,0 +1,83 @@
|
||||
<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')
|
||||
<th class="col-xs-4 col-sm-3">
|
||||
{{ trans('general.date') }}
|
||||
</th>
|
||||
<th class="col-xs-4 col-sm-3">
|
||||
{{ trans('general.amount') }}
|
||||
</th>
|
||||
<th class="col-sm-3 d-none d-sm-block">
|
||||
{{ trans_choice('general.accounts', 1) }}
|
||||
</th>
|
||||
<th class="col-xs-4 col-sm-3">
|
||||
{{ trans('general.actions') }}
|
||||
</th>
|
||||
@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 col-sm-3">
|
||||
@date($transaction->paid_at)
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-3">
|
||||
@money($transaction->amount, $transaction->currency_code, true)
|
||||
</td>
|
||||
<td class="col-sm-3 d-none d-sm-block">
|
||||
{{ $transaction->account->name }}
|
||||
</td>
|
||||
<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>
|
||||
@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>
|
||||
Reference in New Issue
Block a user