Merge Invoice and Bill into Document

This commit is contained in:
Burak Çakırel
2020-12-24 01:28:38 +03:00
parent 830cc05957
commit 0c1424db47
436 changed files with 31655 additions and 37350 deletions

View File

@@ -0,0 +1,261 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
<tr class="row table-head-line">
@if (!$hideBulkAction)
<th class="{{ $classBulkAction }}">
{{ Form::bulkActionAllGroup() }}
</th>
@endif
@stack('document_number_th_start')
@if (!$hideDocumentNumber)
<th class="{{ $classDocumentNumber }}">
@stack('document_number_th_inside_start')
@sortablelink('document_number', $textDocumentNumber, ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])
@stack('document_number_th_inside_end')
</th>
@endif
@stack('document_number_th_end')
@stack('contact_name_th_start')
@if (!$hideContactName)
<th class="{{ $classContactName }}">
@stack('contact_name_th_inside_start')
@sortablelink('contact_name', $textContactName)
@stack('contact_name_th_inside_end')
</th>
@endif
@stack('contact_name_th_end')
@stack('amount_th_start')
@if (!$hideAmount)
<th class="{{ $classAmount }}">
@stack('amount_th_inside_start')
@sortablelink('amount', trans('general.amount'))
@stack('amount_th_inside_end')
</th>
@endif
@stack('amount_th_end')
@stack('issued_at_th_start')
@if (!$hideIssuedAt)
<th class="{{ $classIssuedAt }}">
@stack('issued_at_th_inside_start')
@sortablelink('issued_at', $textIssueAt)
@stack('issued_at_th_inside_end')
</th>
@endif
@stack('issued_at_th_end')
@stack('due_at_th_start')
@if (!$hideDueAt)
<th class="{{ $classDueAt }}">
@stack('due_at_th_inside_start')
@sortablelink('due_at', $textDueAt)
@stack('due_at_th_inside_end')
</th>
@endif
@stack('due_at_th_end')
@stack('status_th_start')
@if (!$hideStatus)
<th class="{{ $classStatus }}">
@stack('status_th_inside_start')
@sortablelink('status', trans_choice('general.statuses', 1))
@stack('status_th_inside_end')
</th>
@endif
@stack('status_th_end')
@if (!$hideActions)
<th class="{{ $classActions }}">
<a>{{ trans('general.actions') }}</a>
</th>
@endif
</tr>
</thead>
<tbody>
@foreach($documents as $item)
@php $paid = $item->paid; @endphp
<tr class="row align-items-center border-top-1">
@if (!$hideBulkAction)
<td class="{{ $classBulkAction }}">
{{ Form::bulkActionGroup($item->id, $item->document_number) }}
</td>
@endif
@stack('document_number_td_start')
@if (!$hideDocumentNumber)
<td class="{{ $classDocumentNumber }}">
@stack('document_number_td_inside_start')
<a class="col-aka" href="{{ route($routeButtonShow , $item->id) }}">{{ $item->document_number }}</a>
@stack('document_number_td_inside_end')
</td>
@endif
@stack('document_number_td_end')
@stack('contact_name_td_start')
@if (!$hideContactName)
<td class="{{ $classContactName }}">
@stack('contact_name_td_inside_start')
{{ $item->contact_name }}
@stack('contact_name_td_inside_end')
</td>
@endif
@stack('contact_name_td_end')
@stack('amount_td_start')
@if (!$hideAmount)
<td class="{{ $classAmount }}">
@stack('amount_td_inside_start')
@money($item->amount, $item->currency_code, true)
@stack('amount_td_inside_end')
</td>
@endif
@stack('amount_td_end')
@stack('issued_at_td_start')
@if (!$hideIssuedAt)
<td class="{{ $classIssuedAt }}">
@stack('issued_at_td_inside_start')
@date($item->issued_at)
@stack('issued_at_td_inside_end')
</td>
@endif
@stack('issued_at_td_end')
@stack('due_at_td_start')
@if (!$hideDueAt)
<td class="{{ $classDueAt }}">
@stack('due_at_td_inside_start')
@date($item->due_at)
@stack('due_at_td_inside_end')
</td>
@endif
@stack('due_at_td_end')
@stack('status_td_start')
@if (!$hideStatus)
<td class="{{ $classStatus }}">
@stack('status_td_inside_start')
<span class="badge badge-pill badge-{{ $item->status_label }}">{{ trans($textDocumentStatus . $item->status) }}</span>
@stack('status_td_inside_end')
</td>
@endif
@stack('status_td_end')
@if (!$hideActions)
<td class="{{ $classActions }}">
<div class="dropdown">
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-ellipsis-h text-muted"></i>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
@stack('show_button_start')
@if (!$hideButtonShow)
<a class="dropdown-item" href="{{ route($routeButtonShow, $item->id) }}">{{ trans('general.show') }}</a>
@endif
@stack('show_button_end')
@stack('edit_button_start')
@if (!$hideButtonEdit)
@if ($checkButtonReconciled)
@if (!$item->reconciled)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $item->id) }}">{{ trans('general.edit') }}</a>
@endif
@else
<a class="dropdown-item" href="{{ route($routeButtonEdit, $item->id) }}">{{ trans('general.edit') }}</a>
@endif
@endif
@stack('edit_button_end')
<div class="dropdown-divider"></div>
@if ($checkButtonCancelled)
@if ($item->status != 'cancelled')
@stack('duplicate_button_start')
@if (!$hideButtonDuplicate)
@can($permissionDocumentCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $item->id) }}">{{ trans('general.duplicate') }}</a>
<div class="dropdown-divider"></div>
@endcan
@endif
@stack('duplicate_button_end')
@stack('cancel_button_start')
@if (!$hideButtonCancel)
@can($permissionDocumentUpdate)
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $item->id) }}">{{ trans('general.cancel') }}</a>
@endcan
@endif
@stack('cancel_button_end')
@endif
@else
@stack('duplicate_button_start')
@if (!$hideButtonDuplicate)
@can($permissionDocumentCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $item->id) }}">{{ trans('general.duplicate') }}</a>
<div class="dropdown-divider"></div>
@endcan
@endif
@stack('duplicate_button_end')
@stack('cancel_button_start')
@if (!$hideButtonCancel)
@can($permissionDocumentUpdate)
<a class="dropdown-item" href="{{ route($routeButtonCancelled, $item->id) }}">{{ trans('general.cancel') }}</a>
@endcan
@endif
@stack('cancel_button_end')
@endif
@stack('delete_button_start')
@if (!$hideButtonDelete)
@can($permissionDocumentDelete)
@if ($checkButtonReconciled)
@if (!$item->reconciled)
{!! Form::deleteLink($item, $routeButtonDelete) !!}
@endif
@else
{!! Form::deleteLink($item, $routeButtonDelete) !!}
@endif
@endcan
@endif
@stack('delete_button_end')
</div>
</div>
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>

View File

@@ -0,0 +1,5 @@
<div class="card-footer table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $documents])
</div>
</div>

View File

@@ -0,0 +1,33 @@
@if (!$hideBulkAction)
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
{!! Form::open([
'method' => 'GET',
'route' => $formCardHeaderRoute,
'role' => 'form',
'class' => 'mb-0'
]) !!}
@if (!$hideSearchString)
<div class="align-items-center" v-if="!bulk_action.show">
<x-search-string model="{{ $searchStringModel }}" />
</div>
@endif
{{ Form::bulkActionRowGroup($textBulkAction, $bulkActions, $bulkActionRouteParameters) }}
{!! Form::close() !!}
</div>
@else
@if (!$hideSearchString)
<div class="card-header border-bottom-0">
{!! Form::open([
'method' => 'GET',
'route' => $formCardHeaderRoute,
'role' => 'form',
'class' => 'mb-0'
]) !!}
<div class="align-items-center">
<x-search-string model="{{ $searchStringModel }}" />
</div>
{!! Form::close() !!}
</div>
@endif
@endif

View File

@@ -0,0 +1,67 @@
@if ($hideEmptyPage || ($documents->count() || request()->get('search', false)))
<div class="card">
<x-documents.index.card-header
type="{{ $type }}"
hide-bulk-action="{{ $hideBulkAction }}"
:form-card-header-route="$formCardHeaderRoute"
hide-search-string="{{ $hideSearchString }}"
search-string-model="{{ $searchStringModel }}"
text-bulk-action="{{ $textBulkAction }}"
bulk-action-class="{{ $bulkActionClass }}"
:bulk-actions="$bulkActions"
:bulk-action-route-parameters="$bulkActionRouteParameters"
/>
<x-documents.index.card-body
type="{{ $type }}"
:documents="$documents"
hide-bulk-action="{{ $hideBulkAction }}"
class-bulk-action="{{ $classBulkAction }}"
hide-document-number="{{ $hideDocumentNumber }}"
text-document-number="{{ $textDocumentNumber }}"
class-document-number="{{ $classDocumentNumber }}"
hide-contact-name="{{ $hideContactName }}"
text-contact-name="{{ $textContactName }}"
class-contact-name="{{ $classContactName }}"
hide-amount="{{ $hideAmount }}"
class-amount="{{ $classAmount }}"
hide-issued-at="{{ $hideIssuedAt }}"
text-issued-at="{{ $textIssueAt }}"
class-issued-at="{{ $classIssuedAt }}"
hide-due-at="{{ $hideDueAt }}"
class-due-at="{{ $classDueAt }}"
text-due-at="{{ $textDueAt }}"
hide-status="{{ $hideStatus }}"
class-status="{{ $classStatus }}"
hide-actions="{{ $hideActions }}"
class-actions="{{ $classActions }}"
text-document-status="{{ $textDocumentStatus }}"
hide-button-show="{{ $hideButtonShow }}"
route-button-show="{{ $routeButtonShow }}"
hide-button-edit="{{ $hideButtonEdit }}"
check-button-reconciled="{{ $checkButtonReconciled }}"
route-button-edit="{{ $routeButtonEdit }}"
check-button-cancelled="{{ $checkButtonCancelled }}"
hide-button-duplicate="{{ $hideButtonDuplicate }}"
permission-document-create="{{ $permissionDocumentCreate }}"
route-button-duplicate="{{ $routeButtonDuplicate }}"
hide-button-cancel="{{ $hideButtonCancel }}"
permission-document-update="{{ $permissionDocumentUpdate }}"
route-button-called="{{ $routeButtonCancelled }}"
hide-button-delete="{{ $hideButtonDelete }}"
permission-document-delete="{{ $permissionDocumentDelete }}"
route-button-delete="{{ $routeButtonDelete }}"
/>
<x-documents.index.card-footer
type="{{ $type }}"
:documents="$documents"
/>
</div>
@else
<x-documents.index.empty-page
type="{{ $type }}"
page="{{ $page }}"
docs-path="{{ $docsPath }}"
/>
@endif

View File

@@ -0,0 +1 @@
@include('partials.admin.empty_page', ['page' => $page, 'docs_path' => $docsPath])

View File

@@ -0,0 +1,19 @@
@if ($checkCreatePermission)
@can($createPermission)
@endif
@if (!$hideCreate)
<a href="{{ route($createRoute) }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
@endif
@if (!$hideImport)
<a href="{{ route($importRoute, $importRouteParameters) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
@endif
@if ($checkCreatePermission)
@endcan
@endif
@if (!$hideExport)
<a href="{{ route($exportRoute, request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
@endif