Merge Invoice and Bill into Document
This commit is contained in:
29
resources/views/components/documents/form/advanced.blade.php
Normal file
29
resources/views/components/documents/form/advanced.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="accordion-recurring-and-more-header" data-toggle="collapse" data-target="#accordion-recurring-and-more-body" aria-expanded="false" aria-controls="accordion-recurring-and-more-body">
|
||||
<h4 class="mb-0">{{ trans('general.recurring_and_more') }}</h4>
|
||||
</div>
|
||||
|
||||
<div id="accordion-recurring-and-more-body" class="collapse hide" aria-labelledby="accordion-recurring-and-more-header">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
@if (!$hideRecurring)
|
||||
{{ Form::recurring('create') }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
@if (!$hideCategory)
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.' . $category_type . '_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=' . $category_type, 'remote_action' => route('categories.index'). '?type=' . $category_type], 'col-md-12') }}
|
||||
@endif
|
||||
|
||||
@if (!$hideAttachment)
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,8 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('invoices.index') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
51
resources/views/components/documents/form/company.blade.php
Normal file
51
resources/views/components/documents/form/company.blade.php
Normal file
@ -0,0 +1,51 @@
|
||||
<div class="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="accordion-company-header" data-toggle="collapse" data-target="#accordion-company-body" aria-expanded="false" aria-controls="accordion-company-body">
|
||||
<h4 class="mb-0">{{ trans_choice('general.companies', 1) }}</h4>
|
||||
</div>
|
||||
|
||||
<div id="accordion-company-body" class="collapse hide" aria-labelledby="accordion-company-header">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
@if (!$hideLogo)
|
||||
{{ Form::fileGroup('company_logo', trans('settings.company.logo'), 'file-image-o', [], setting('company.logo')) }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
@if (!$hideDocumentTitle)
|
||||
{{ Form::textGroup($inputNameType . '_title', trans('settings.' . $type . '.title'), 'font', [], setting($type . '.title'), 'col-md-12') }}
|
||||
@endif
|
||||
|
||||
@if (!$hideDocumentSubheading)
|
||||
{{ Form::textGroup($inputNameType . '_subheading', trans('settings.' . $type . '.subheading'), 'font', [], setting($type . '.subheading'), 'col-md-12') }}
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyEdit)
|
||||
<akaunting-company-edit company-id="{{ session('company_id') }}"
|
||||
button-text="{{ trans('Edit your business address') }}"
|
||||
taxt-number-text="{{ trans('general.tax_number') }}"
|
||||
:company="{{ json_encode($company) }}"
|
||||
:company-form="{{ json_encode([
|
||||
'show' => true,
|
||||
'text' => trans('Edit your business address'),
|
||||
'buttons' => [
|
||||
'cancel' => [
|
||||
'text' => trans('general.cancel'),
|
||||
'class' => 'btn-outline-secondary'
|
||||
],
|
||||
'confirm' => [
|
||||
'text' => trans('general.save'),
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
]
|
||||
])}}"
|
||||
></akaunting-company-edit>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
74
resources/views/components/documents/form/content.blade.php
Normal file
74
resources/views/components/documents/form/content.blade.php
Normal file
@ -0,0 +1,74 @@
|
||||
@if (empty($document))
|
||||
{!! Form::open([
|
||||
'route' => $formRoute,
|
||||
'id' => $formId,
|
||||
'@submit.prevent' => $formSubmit,
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
@else
|
||||
{!! Form::model($document, [
|
||||
'route' => [$formRoute, $document->id],
|
||||
'id' => $formId,
|
||||
'method' => 'PATCH',
|
||||
'@submit.prevent' => $formSubmit,
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
@endif
|
||||
@if (!$hideCompany)
|
||||
<x-documents.form.company
|
||||
type="{{ $type }}"
|
||||
hide-logo="{{ $hideLogo }}"
|
||||
hide-document-title="{{ $hideDocumentTitle }}"
|
||||
hide-document-subheading="{{ $hideDocumentSubheading }}"
|
||||
hide-company-edit="{{ $hideCompanyEdit }}"
|
||||
/>
|
||||
@endif
|
||||
|
||||
<x-documents.form.main
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
hide-contact="{{ $hideContact }}"
|
||||
contact-type="{{ $contactType }}"
|
||||
hide-issue-at="{{ $hideIssuedAt }}"
|
||||
text-issue-at="{{ $textIssuedAt }}"
|
||||
hide-document-number="{{ $hideDocumentNumber }}"
|
||||
text-document-number="{{ $textDocumentNumber }}"
|
||||
hide-due-at="{{ $hideDueAt }}"
|
||||
text-due-at="{{ $textDueAt }}"
|
||||
hide-order-number="{{ $hideOrderNumber }}"
|
||||
text-order-number="{{ $textOrderNumber }}"
|
||||
/>
|
||||
|
||||
@if (!$hideFooter)
|
||||
<x-documents.form.footer type="{{ $type }}" :document="$document" />
|
||||
@endif
|
||||
|
||||
@if (!$hideAdvanced)
|
||||
<x-documents.form.advanced
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
hide-recurring="{{ $hideRecurring }}"
|
||||
hide-category="{{ $hideCategory }}"
|
||||
hide-attachment="{{ $hideAttachment }}"
|
||||
/>
|
||||
@endif
|
||||
|
||||
@if (!$hideButtons)
|
||||
<x-documents.form.buttons
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
/>
|
||||
@endif
|
||||
|
||||
{{ Form::hidden('type', old('type', $type), ['id' => 'type', 'v-model' => 'form.type']) }}
|
||||
{{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }}
|
||||
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
|
||||
{!! Form::close() !!}
|
12
resources/views/components/documents/form/footer.blade.php
Normal file
12
resources/views/components/documents/form/footer.blade.php
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
<div class="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="accordion-footer-header" data-toggle="collapse" data-target="#accordion-footer-body" aria-expanded="false" aria-controls="accordion-footer-body">
|
||||
<h4 class="mb-0">{{ trans('general.footer') }}</h4>
|
||||
</div>
|
||||
|
||||
<div id="accordion-footer-body" class="collapse hide" aria-labelledby="accordion-footer-header">
|
||||
{{ Form::textareaGroup('footer', '', '', setting($type . '.footer'), ['rows' => '3'], 'embed-acoordion-textarea') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
81
resources/views/components/documents/form/items.blade.php
Normal file
81
resources/views/components/documents/form/items.blade.php
Normal file
@ -0,0 +1,81 @@
|
||||
<div class="row document-item-body">
|
||||
<div class="col-sm-12 p-0" style="table-layout: fixed;">
|
||||
@php $item_colspan = in_array(setting('localisation.discount_location', 'total'), ['item', 'both']) ? '6' : '5' @endphp
|
||||
@if (!$hideEditItemColumns)
|
||||
<x-edit-item-columns type="{{ $type }}" />
|
||||
@endif
|
||||
|
||||
<div class="table-responsive overflow-x-scroll overflow-y-hidden">
|
||||
<table class="table" id="items" style="table-layout: fixed">
|
||||
<colgroup>
|
||||
<col style="width: 40px;">
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 30%;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 250px;">
|
||||
<col style="width: 40px;">
|
||||
</colgroup>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
@stack('move_th_start')
|
||||
<th class="text-left border-top-0 border-right-0 border-bottom-0"></th>
|
||||
@stack('move_th_end')
|
||||
|
||||
@if (!$hideItems)
|
||||
@stack('name_th_start')
|
||||
<th class="text-left border-top-0 border-right-0 border-bottom-0">{{ $textItems }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('move_th_start')
|
||||
<th class="text-left border-top-0 border-right-0 border-bottom-0"></th>
|
||||
@stack('move_th_end')
|
||||
@endif
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="text-center border-top-0 border-right-0 border-bottom-0" style="padding-right: 5px;">{{ $textQuantity }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="text-right border-top-0 border-right-0 border-bottom-0" style="padding-left: 5px;">{{ $textPrice }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_th_start')
|
||||
<th class="text-right border-top-0 border-right-0 border-bottom-0">{{ trans('invoices.discount') }}</th>
|
||||
@stack('discount_th_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="text-right border-top-0 border-bottom-0 item-total">{{ $textAmount }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
|
||||
@stack('remove_th_start')
|
||||
<th class="text-left border-top-0 border-right-0 border-bottom-0"></th>
|
||||
@stack('remove_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="invoice-item-rows">
|
||||
@include('components.documents.form.line-item')
|
||||
|
||||
@stack('add_item_td_start')
|
||||
<tr id="addItem">
|
||||
<td class="text-right border-bottom-0" colspan="{{ '7' }}">
|
||||
<x-select-item-button type="{{ $type }}" />
|
||||
</td>
|
||||
</tr>
|
||||
@stack('add_item_td_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
318
resources/views/components/documents/form/line-item.blade.php
Normal file
318
resources/views/components/documents/form/line-item.blade.php
Normal file
@ -0,0 +1,318 @@
|
||||
<tr v-for="(row, index) in items"
|
||||
:index="index">
|
||||
@stack('name_td_start')
|
||||
<td class="border-right-0 border-bottom-0 p-0"
|
||||
:class="[{'has-error': form.errors.has('items.' + index + '.name') }]"
|
||||
colspan="7">
|
||||
<table class="w-100">
|
||||
<colgroup>
|
||||
<col style="width: 40px;">
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 30%;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 250px;">
|
||||
<col style="width: 40px;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
@stack('move_td_start')
|
||||
<td class="pb-4 align-middle" colspan="1" style="color: #8898aa;">
|
||||
<div draggable="true">
|
||||
<i class="fas fa-grip-vertical"></i>
|
||||
</div>
|
||||
</td>
|
||||
@stack('move_td_end')
|
||||
|
||||
@stack('items_td_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
@stack('name_td_start')
|
||||
@if (!$hideName)
|
||||
<td class="pb-4 align-middle" colspan="1">
|
||||
<span class="aka-text aka-text--body" tabindex="0" v-html="row.name"></span>
|
||||
</td>
|
||||
@endif
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('description_td_start')
|
||||
@if (!$hideDescription)
|
||||
<td class="pb-4" colspan="1">
|
||||
<textarea
|
||||
class="form-control"
|
||||
placeholder="Enter item description"
|
||||
style="height: 38px;"
|
||||
:name="'items.' + index + '.description'"
|
||||
v-model="row.description"
|
||||
data-item="description"
|
||||
resize="none"
|
||||
></textarea>
|
||||
</td>
|
||||
@endif
|
||||
@stack('description_td_end')
|
||||
@endif
|
||||
@stack('items_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
@if (!$hideQuantity)
|
||||
<td colspan="1" class="pb-4" style="padding-right: 5px; padding-left: 5px;">
|
||||
<div>
|
||||
@stack('quantity_input_start')
|
||||
<input type="text"
|
||||
class="form-control text-center p-0"
|
||||
:name="'items.' + index + '.quantity'"
|
||||
autocomplete="off"
|
||||
required="required"
|
||||
data-item="quantity"
|
||||
v-model="row.quantity"
|
||||
@input="onCalculateTotal"
|
||||
@change="form.errors.clear('items.' + index + '.quantity')">
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="form.errors.has('items.' + index + '.quantity')"
|
||||
v-html="form.errors.get('items.' + index + '.quantity')">
|
||||
</div>
|
||||
@stack('quantity_input_end')
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
@if (!$hidePrice)
|
||||
<td colspan="1" class="pb-4" style="padding-right: 5px; padding-left: 5px;">
|
||||
<div>
|
||||
@stack('price_input_start')
|
||||
{{ Form::moneyGroup('price', '', '', ['required' => 'required', 'row-input' => 'true', 'v-model' => 'row.price', 'v-error' => 'form.errors.get(\'items.\' + index + \'.price\')', 'v-error-message' => 'form.errors.get(\'items.\' + index + \'.price\')' , 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; form.errors.clear(\'items.\' + index + \'.price\'); onCalculateTotal'], 0.00, 'text-right input-price p-0') }}
|
||||
@stack('price_input_end')
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
@stack('price_td_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<td colspan="1" class="pb-4"
|
||||
:class="[{'has-error': form.errors.has('items.' + index + '.discount') }]">
|
||||
@stack('discount_input_start')
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="input-discount">
|
||||
<i class="fa fa-percent"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="number"
|
||||
max="100"
|
||||
min="0"
|
||||
class="form-control text-center p-0"
|
||||
:name="'items.' + index + '.discount'"
|
||||
autocomplete="off"
|
||||
required="required"
|
||||
data-item="discount"
|
||||
v-model="row.discount"
|
||||
@input="onCalculateTotal"
|
||||
@change="form.errors.clear('items.' + index + '.discount')">
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="form.errors.has('items.' + index + '.discount')"
|
||||
v-html="form.errors.get('items.' + index + '.discount')">
|
||||
</div>
|
||||
</div>
|
||||
@stack('discount_input_end')
|
||||
</td>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_td_start')
|
||||
@if (!$hideAmount)
|
||||
<td colspan="1" class="text-right long-texts pb-4">
|
||||
<div>
|
||||
{{ Form::moneyGroup('total', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.total', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
@stack('total_td_end')
|
||||
|
||||
@stack('delete_td_start')
|
||||
<td colspan="1" class="pb-4 align-middle">
|
||||
<div>
|
||||
<button type="button" @click="onDeleteItem(index)" class="btn btn-link btn-delete p-0">
|
||||
<i class="far fa-trash-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
@stack('delete_td_end')
|
||||
</tr>
|
||||
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
<tr v-if="!row.add_tax || !row.add_discount">
|
||||
<td colspan="3" style="border: 0;">
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;">
|
||||
<div>
|
||||
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddDiscount(index)" v-if="!discount">Add Discount</button>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;">
|
||||
<div>
|
||||
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddTax(index)" v-if="!tax">Add Tax</button>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="text-right total-column border-bottom-0 long-texts">
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="w-1">
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="row.add_discount">
|
||||
<td colspan="3" style="border: 0;"></td>
|
||||
<td colspan="2" style="border: 0;">
|
||||
<div>
|
||||
@stack('tax_id_input_start')
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="input-discount-rate">
|
||||
<i class="fa fa-percent"></i>
|
||||
</span>
|
||||
</div>
|
||||
<input type="number"
|
||||
max="100"
|
||||
min="0"
|
||||
class="form-control text-center"
|
||||
:name="'items.' + index + '.discount-rate'"
|
||||
autocomplete="off"
|
||||
required="required"
|
||||
data-item="discount_rate"
|
||||
v-model="row.discount_rate"
|
||||
@input="onCalculateTotal"
|
||||
@change="form.errors.clear('items.' + index + '.discount_rate')">
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="form.errors.has('items.' + index + '.discount_rate')"
|
||||
v-html="form.errors.get('items.' + index + '.discount_rate')">
|
||||
</div>
|
||||
</div>
|
||||
@stack('tax_id_input_end')
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="text-right total-column border-bottom-0 long-texts">
|
||||
<div>
|
||||
{{ Form::moneyGroup('discount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.discount', 'data-item' => 'discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="w-1">
|
||||
<button type="button" @click="onDeleteDiscount(index)" class="btn btn-link btn-sm p-0">
|
||||
<i class="far fa-trash-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="row.add_tax" v-for="(row_tax, row_tax_index) in row.tax_ids"
|
||||
:index="row_tax_index">
|
||||
@else
|
||||
<tr v-for="(row_tax, row_tax_index) in row.tax_ids"
|
||||
:index="row_tax_index">
|
||||
@endif
|
||||
<td class="pb-0" colspan="2" style="border: 0;">
|
||||
</td>
|
||||
<td class="pb-0 pr-0 align-middle text-right long-texts" colspan="1" style="border: 0;">
|
||||
<span class="invoice-item-row-tax-section__tax__add__label">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
</td>
|
||||
<td class="pb-0" colspan="2" style="border: 0; padding-right: 5px; padding-left: 5px;" >
|
||||
<div>
|
||||
@stack('taxes_input_start')
|
||||
<akaunting-select
|
||||
class="mb-0 select-tax"
|
||||
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
|
||||
:icon="''"
|
||||
:title="''"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
|
||||
:name="'items.' + index + '.taxes.' + row_tax_index"
|
||||
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
|
||||
:disabled-options="form.items[index].tax_ids"
|
||||
:value="row_tax.id"
|
||||
@interface="row_tax.id = $event"
|
||||
@change="onCalculateTotal()"
|
||||
@new="taxes.push($event)"
|
||||
:form-error="form.errors.get('items.' + index + '.taxes')"
|
||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||
></akaunting-select>
|
||||
@stack('taxes_input_end')
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="pb-0 text-right long-texts">
|
||||
<div>
|
||||
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="pb-0 align-middle">
|
||||
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
|
||||
<i class="far fa-trash-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="row.add_tax">
|
||||
<td class="pb-0" colspan="2" style="border: 0;">
|
||||
</td>
|
||||
<td class="pb-0 pr-0 align-middle text-right long-texts" colspan="1" style="border: 0;">
|
||||
<span class="invoice-item-row-tax-section__tax__add__label">{{ trans_choice('general.taxes', 1) }}</span>
|
||||
</td>
|
||||
<td colspan="2" style="border: 0; padding-right: 5px; padding-left: 5px;">
|
||||
<div>
|
||||
@stack('taxes_input_start')
|
||||
<akaunting-select
|
||||
class="mb-0 select-tax"
|
||||
:form-classes="[{'has-error': form.errors.has('items.' + index + '.taxes') }]"
|
||||
:icon="''"
|
||||
:title="''"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
|
||||
:name="'items.' + index + '.taxes.999'"
|
||||
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
|
||||
:disabled-options="form.items[index].tax_ids"
|
||||
:value="tax_id"
|
||||
:add-new="{{ json_encode([
|
||||
'status' => true,
|
||||
'text' => trans('general.add_new'),
|
||||
'path' => route('modals.taxes.create'),
|
||||
'type' => 'modal',
|
||||
'field' => [
|
||||
'key' => 'id',
|
||||
'value' => 'title'
|
||||
],
|
||||
'new_text' => trans('modules.new'),
|
||||
'buttons' => [
|
||||
'cancel' => [
|
||||
'text' => trans('general.cancel'),
|
||||
'class' => 'btn-outline-secondary'
|
||||
],
|
||||
'confirm' => [
|
||||
'text' => trans('general.save'),
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
]
|
||||
])}}"
|
||||
@interface="tax_id = $event"
|
||||
@visible-change="onSelectedTax(index)"
|
||||
@new="taxes.push($event)"
|
||||
:form-error="form.errors.get('items.' + index + '.taxes')"
|
||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||
></akaunting-select>
|
||||
@stack('taxes_input_end')
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;" class="text-right long-texts align-middle">
|
||||
<div>
|
||||
__
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="1" style="border: 0;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
@stack('name_td_end')
|
||||
</tr>
|
33
resources/views/components/documents/form/main.blade.php
Normal file
33
resources/views/components/documents/form/main.blade.php
Normal file
@ -0,0 +1,33 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<x-documents.form.metadata
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
hide-contact="{{ $hideContact }}"
|
||||
contact-type="{{ $contactType }}"
|
||||
hide-issue-at="{{ $hideIssuedAt }}"
|
||||
text-issue-at="{{ $textIssuedAt }}"
|
||||
hide-document-number="{{ $hideDocumentNumber }}"
|
||||
text-document-number="{{ $textDocumentNumber }}"
|
||||
hide-due-at="{{ $hideDueAt }}"
|
||||
text-due-at="{{ $textDueAt }}"
|
||||
hide-order-number="{{ $hideOrderNumber }}"
|
||||
text-order-number="{{ $textOrderNumber }}"
|
||||
/>
|
||||
|
||||
<x-documents.form.items
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
/>
|
||||
|
||||
<x-documents.form.totals
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
/>
|
||||
|
||||
<x-documents.form.note
|
||||
type="{{ $type }}"
|
||||
:document="$document"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
29
resources/views/components/documents/form/metadata.blade.php
Normal file
29
resources/views/components/documents/form/metadata.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
@if (!$hideContact)
|
||||
<div class="row">
|
||||
<x-select-contact-card type="{{ $contactType }}" :contact="($document) ? $document->contact : new stdClass()"/>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
<div class="row">
|
||||
@if (!$hideIssuedAt)
|
||||
{{ Form::dateGroup('issued_at', $textIssuedAt, 'calendar', ['id' => 'issued_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], $issuedAt) }}
|
||||
@endif
|
||||
|
||||
@if (!$hideDocumentNumber)
|
||||
{{ Form::textGroup('document_number', $textDocumentNumber, 'file', ['required' => 'required'], $documentNumber) }}
|
||||
@endif
|
||||
|
||||
@if (!$hideDueAt)
|
||||
{{ Form::dateGroup('due_at', $textDueAt, 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], $dueAt) }}
|
||||
@endif
|
||||
|
||||
@if (!$hideOrderNumber)
|
||||
{{ Form::textGroup('order_number', $textOrderNumber, 'shopping-cart', [], $orderNumber) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
3
resources/views/components/documents/form/note.blade.php
Normal file
3
resources/views/components/documents/form/note.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="row embed-card-body-footer">
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), '', setting($type . '.notes'), ['rows' => '3', 'class' => 'form-control embed-card-body-footer-textarea'], 'col-md-12 embed-acoordion-textarea') }}
|
||||
</div>
|
135
resources/views/components/documents/form/totals.blade.php
Normal file
135
resources/views/components/documents/form/totals.blade.php
Normal file
@ -0,0 +1,135 @@
|
||||
<div class="row document-item-body">
|
||||
<div class="col-sm-12 mb-4 p-0">
|
||||
<div class="table-responsive overflow-x-scroll overflow-y-hidden">
|
||||
<table class="table" id="totals">
|
||||
<colgroup>
|
||||
<col style="width: 60%;">
|
||||
<col style="width: 30%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 40px;">
|
||||
</colgroup>
|
||||
<tbody id="invoice-item-rows">
|
||||
@stack('sub_total_td_start')
|
||||
<tr id="tr-subtotal">
|
||||
<td class="border-bottom-0 pb-0"></td>
|
||||
<td class="text-right border-right-0 border-bottom-0 align-middle pb-0">
|
||||
<strong>{{ trans('invoices.sub_total') }}</strong>
|
||||
</td>
|
||||
<td class="text-right border-bottom-0 long-texts pb-0">
|
||||
<div>
|
||||
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="border-bottom-0 pb-0"></td>
|
||||
</tr>
|
||||
@stack('sub_total_td_end')
|
||||
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('item_discount_td_start')
|
||||
<tr id="tr-subtotal">
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pb-0">
|
||||
<strong>{{ trans('invoices.item_discount') }}</strong>
|
||||
</td>
|
||||
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
||||
<div>
|
||||
{{ Form::moneyGroup('item_discount', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.item_discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
</tr>
|
||||
@stack('item_discount_td_end')
|
||||
@endif
|
||||
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['total', 'both']))
|
||||
@stack('add_discount_td_start')
|
||||
<tr id="tr-discount">
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pb-0">
|
||||
<el-popover
|
||||
popper-class="p-0 h-0"
|
||||
placement="bottom"
|
||||
width="300"
|
||||
v-model="discount">
|
||||
<div class="card d-none" :class="[{'show' : discount}]">
|
||||
<div class="discount card-body">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group input-group-merge">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="input-discount">
|
||||
<i class="fa fa-percent"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::number('pre_discount', null, ['id' => 'pre-discount', 'class' => 'form-control', 'v-model' => 'form.discount']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="discount-description">
|
||||
<strong>{{ trans('invoices.discount_desc') }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="discount card-footer">
|
||||
<div class="row float-right">
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<a href="javascript:void(0)" @click="discount = false" class="btn btn-outline-secondary" @click="closePayment">
|
||||
{{ trans('general.cancel') }}
|
||||
</a>
|
||||
{!! Form::button(trans('general.save'), ['type' => 'button', 'id' => 'save-discount', '@click' => 'onAddDiscount', 'class' => 'btn btn-success']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-link class="cursor-pointer text-info" slot="reference" type="primary" v-if="!totals.discount_text">{{ trans('invoices.add_discount') }}</el-link>
|
||||
<el-link slot="reference" type="primary" v-if="totals.discount_text" v-html="totals.discount_text"></el-link>
|
||||
</el-popover>
|
||||
</td>
|
||||
<td class="text-right border-top-0 border-bottom-0 pb-0">
|
||||
<div>
|
||||
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
||||
</div>
|
||||
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
|
||||
</td>
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
</tr>
|
||||
@stack('add_discount_td_end')
|
||||
@endif
|
||||
|
||||
@stack('tax_total_td_start')
|
||||
<tr v-for="(tax, tax_index) in totals.taxes"
|
||||
:index="tax_index">
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
<td class="text-right border-top-0 border-right-0 border-bottom-0 align-middle pb-0">
|
||||
<strong v-html="tax.name"></strong>
|
||||
</td>
|
||||
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
||||
<div>
|
||||
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'tax.total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
</tr>
|
||||
@stack('tax_total_td_end')
|
||||
|
||||
@stack('grand_total_td_start')
|
||||
<tr id="tr-total">
|
||||
<td class="border-top-0 pb-0"></td>
|
||||
<td class="text-right border-top-0 border-right-0 align-middle pb-0">
|
||||
<strong class="document-total-span">{{ trans('invoices.total') }}</strong>
|
||||
{{ Form::selectGroup('currency_code', '', 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'model' => 'form.currency_code', 'change' => 'onChangeCurrency'], 'document-total-currency') }}
|
||||
</td>
|
||||
<td class="text-right border-top-0 long-texts pb-0">
|
||||
<div>
|
||||
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="border-top-0"></td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
261
resources/views/components/documents/index/card-body.blade.php
Normal file
261
resources/views/components/documents/index/card-body.blade.php
Normal 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>
|
@ -0,0 +1,5 @@
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $documents])
|
||||
</div>
|
||||
</div>
|
@ -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
|
67
resources/views/components/documents/index/content.blade.php
Normal file
67
resources/views/components/documents/index/content.blade.php
Normal 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
|
@ -0,0 +1 @@
|
||||
@include('partials.admin.empty_page', ['page' => $page, 'docs_path' => $docsPath])
|
@ -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
|
17
resources/views/components/documents/script.blade.php
Normal file
17
resources/views/components/documents/script.blade.php
Normal file
@ -0,0 +1,17 @@
|
||||
@php
|
||||
$document_items = 'false';
|
||||
|
||||
if ($items) {
|
||||
$document_items = json_encode($items);
|
||||
} else if (old('items')) {
|
||||
$document_items = json_encode(old('items'));
|
||||
}
|
||||
@endphp
|
||||
|
||||
<script type="text/javascript">
|
||||
var document_items = {!! $document_items !!};
|
||||
var document_currencies = {!! $currencies !!};
|
||||
var document_taxes = {!! $taxes !!};
|
||||
</script>
|
||||
|
||||
<script src="{{ asset( $scriptFile . '?v=' . version('short')) }}"></script>
|
@ -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>
|
267
resources/views/components/documents/template/classic.blade.php
Normal file
267
resources/views/components/documents/template/classic.blade.php
Normal file
@ -0,0 +1,267 @@
|
||||
<div class="row">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@stack('company_logo_start')
|
||||
@if (!$hideCompanyLogo)
|
||||
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
|
||||
<img class="c-logo" src="{{ Storage::url($document->contact->logo->id) }}" height="128" width="128" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img class="c-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
@stack('company_details_start')
|
||||
@if (!$hideCompanyDetails)
|
||||
@if (!$hideCompanyName)
|
||||
<strong>{{ setting('company.name') }}</strong><br>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyAddress)
|
||||
<p>{!! nl2br(setting('company.address')) !!}</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyTaxNumber)
|
||||
<p>
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyPhone)
|
||||
<p>
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyEmail)
|
||||
<p>{{ setting('company.email') }}</p>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_details_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-33">
|
||||
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backGroundColor }};">
|
||||
<hr class="invoice-classic-line" style="background-color:{{ $backGroundColor }};">
|
||||
</div>
|
||||
|
||||
<div class="col-33">
|
||||
<div class="invoice-classic-frame ml-1">
|
||||
<div class="invoice-classic-inline-frame text-center">
|
||||
@stack('invoice_number_input_start')
|
||||
@if (!$hideDocumentNumber)
|
||||
<div class="text company">
|
||||
<strong>{{ $textDocumentNumber }}:</strong><br>
|
||||
{{ $document->document_number }}
|
||||
</div>
|
||||
@endif
|
||||
@stack('invoice_number_input_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-33">
|
||||
<hr class="invoice-classic-line mb-1 mt-4" style="background-color:{{ $backGroundColor }};">
|
||||
<hr class="invoice-classic-line" style="background-color:{{ $backGroundColor }};">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@if (!$hideContactInfo)
|
||||
<strong>{{ $textContactInfo }}</strong><br>
|
||||
@endif
|
||||
|
||||
@stack('name_input_start')
|
||||
@if (!$hideContactName)
|
||||
<strong>{{ $document->contact_name }}</strong><br>
|
||||
@endif
|
||||
@stack('name_input_end')
|
||||
|
||||
@stack('address_input_start')
|
||||
@if (!$hideContactAddress)
|
||||
<p>{!! nl2br($document->contact_address) !!}</p>
|
||||
@endif
|
||||
@stack('address_input_end')
|
||||
|
||||
@stack('tax_number_input_start')
|
||||
@if (!$hideContactTaxNumber)
|
||||
<p>
|
||||
@if ($document->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
|
||||
@stack('phone_input_start')
|
||||
@if (!$hideContactPhone)
|
||||
<p>
|
||||
@if ($document->contact_phone)
|
||||
{{ $document->contact_phone }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
|
||||
@stack('email_start')
|
||||
@if (!$hideContactEmail)
|
||||
<p>{{ $document->contact_email }}</p>
|
||||
@endif
|
||||
@stack('email_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
@stack('order_number_input_start')
|
||||
@if (!$hideOrderNumber)
|
||||
@if ($document->order_number)
|
||||
<strong>{{ $textOrderNumber }}:</strong>
|
||||
<span class="float-right">{{ $document->order_number }}</span><br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
@if (!$hideIssuedAt)
|
||||
<strong>{{ $textIssuedAt }}:</strong>
|
||||
<span class="float-right">@date($document->issued_at)</span><br><br>
|
||||
@endif
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
@if (!$hideDueAt)
|
||||
<strong>{{ $textDueAt }}:</strong>
|
||||
<span class="float-right">@date($document->due_at)</span><br><br>
|
||||
@endif
|
||||
@stack('due_at_input_end')
|
||||
|
||||
@foreach ($document->totals_sorted as $total)
|
||||
@if ($total->code == 'total')
|
||||
<strong>{{ trans($total->name) }}:</strong>
|
||||
<span class="float-right">@money($total->amount - $document->paid, $document->currency_code, true)</span><br><br>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="c-lines">
|
||||
<thead>
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="text-left item">{{ $textItems }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity">{{ $textQuantity }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price">{{ $textPrice }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<td class="discount">{{ $item->discount }}</td>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total">{{ $textAmount }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($document->items as $item)
|
||||
@include('partials.documents.item.print', ['document' => $document])
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@stack('notes_input_start')
|
||||
@if($hideNote)
|
||||
@if ($document->notes)
|
||||
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
|
||||
{!! nl2br($document->notes) !!}
|
||||
@endif
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42 float-right text-right">
|
||||
<div class="text company pr-2">
|
||||
@foreach ($document->totals_sorted as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_total_tr_start')
|
||||
<div class="border-top-dashed py-2">
|
||||
<strong class="float-left">{{ trans($total->title) }}:</strong>
|
||||
<span>@money($total->amount, $document->currency_code, true)</span>
|
||||
</div>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@else
|
||||
@if ($document->paid)
|
||||
@stack('paid_total_tr_start')
|
||||
<div class="border-top-dashed py-2">
|
||||
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
|
||||
<span>- @money($document->paid, $document->currency_code, true)</span>
|
||||
</div>
|
||||
@stack('paid_total_tr_end')
|
||||
@endif
|
||||
@stack('grand_total_tr_start')
|
||||
<div class="border-top-dashed py-2">
|
||||
<strong class="float-left">{{ trans($total->name) }}:</strong>
|
||||
<span>@money($total->amount - $document->paid, $document->currency_code, true)</span>
|
||||
</div>
|
||||
@stack('grand_total_tr_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!$hideFooter)
|
||||
@if ($document->footer)
|
||||
<div class="row mt-1">
|
||||
<div class="col-100">
|
||||
<div class="text company">
|
||||
<strong>{!! nl2br($document->footer) !!}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
252
resources/views/components/documents/template/default.blade.php
Normal file
252
resources/views/components/documents/template/default.blade.php
Normal file
@ -0,0 +1,252 @@
|
||||
<div class="row border-bottom-1">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@stack('company_logo_start')
|
||||
@if (!$hideCompanyLogo)
|
||||
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
|
||||
<img class="d-logo" src="{{ Storage::url($document->contact->logo->id) }}" height="128" width="128" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img class="d-logo" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
@stack('company_details_start')
|
||||
@if (!$hideCompanyDetails)
|
||||
@if (!$hideCompanyName)
|
||||
<strong>{{ setting('company.name') }}</strong><br>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyAddress)
|
||||
<p>{!! nl2br(setting('company.address')) !!}</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyTaxNumber)
|
||||
<p>
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyPhone)
|
||||
<p>
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyEmail)
|
||||
<p>{{ setting('company.email') }}</p>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_details_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
<br>
|
||||
@if ($hideContactInfo)
|
||||
<strong>{{ $textContactInfo }}</strong><br>
|
||||
@endif
|
||||
|
||||
@stack('name_input_start')
|
||||
@if (!$hideContactName)
|
||||
<strong>{{ $document->contact_name }}</strong><br>,
|
||||
@endif
|
||||
@stack('name_input_end')
|
||||
|
||||
@stack('address_input_start')
|
||||
@if (!$hideContactAddress)
|
||||
<p>{!! nl2br($document->contact_address) !!}</p>
|
||||
@endif
|
||||
@stack('address_input_end')
|
||||
|
||||
@stack('tax_number_input_start')
|
||||
@if (!$hideContactTaxNumber)
|
||||
<p>
|
||||
@if ($document->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
|
||||
@stack('phone_input_start')
|
||||
@if (!$hideContactPhone)
|
||||
<p>
|
||||
@if ($document->contact_phone)
|
||||
{{ $document->contact_phone }}
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
|
||||
@stack('email_start')
|
||||
@if (!$hideContactEmail)
|
||||
<p>
|
||||
{{ $document->contact_email }}
|
||||
</p>
|
||||
@endif
|
||||
@stack('email_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
<br>
|
||||
@stack('document_number_input_start')
|
||||
@if (!$hideDocumentNumber)
|
||||
<strong>
|
||||
{{ $textDocumentNumber }}:
|
||||
</strong>
|
||||
<span class="float-right">{{ $document->document_number }}</span><br><br>
|
||||
@endif
|
||||
@stack('document_number_input_end')
|
||||
|
||||
@stack('order_number_input_start')
|
||||
@if (!$hideOrderNumber)
|
||||
@if ($document->order_number)
|
||||
<strong>
|
||||
{{ $textOrderNumber }}:
|
||||
</strong>
|
||||
<span class="float-right">{{ $document->order_number }}</span><br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('issued_at_input_start')
|
||||
@if (!$hideIssuedAt)
|
||||
<strong>
|
||||
{{ $textIssuedAt }}:
|
||||
</strong>
|
||||
<span class="float-right">@date($document->issued_at)</span><br><br>
|
||||
@endif
|
||||
@stack('issueed_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
@if (!$hideDueAt)
|
||||
<strong>
|
||||
{{ $textDueAt }}:
|
||||
</strong>
|
||||
<span class="float-right">@date($document->due_at)</span><br><br>
|
||||
@endif
|
||||
@stack('due_at_input_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="lines">
|
||||
@foreach($document as $item)
|
||||
<thead style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
@endforeach
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if ($hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ $textItems }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ $textQuantity }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ $textPrice }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<td class="discount text-white">{{ $item->discount }}</td>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ $textAmount }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($document->items as $item)
|
||||
@include('partials.documents.item.print', ['document' => $document])
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-9">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@stack('notes_input_start')
|
||||
@if ($document->notes)
|
||||
<br>
|
||||
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
|
||||
{!! nl2br($document->notes) !!}
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42 float-right text-right">
|
||||
<div class="text company">
|
||||
@foreach ($document->totals_sorted as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_total_tr_start')
|
||||
<div class="border-top-1 py-2">
|
||||
<strong class="float-left">{{ trans($total->title) }}:</strong>
|
||||
<span>@money($total->amount, $document->currency_code, true)</span><br>
|
||||
</div>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@else
|
||||
@if ($document->paid)
|
||||
@stack('paid_total_tr_start')
|
||||
<div class="border-top-1 py-2">
|
||||
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
|
||||
<span>- @money($document->paid, $document->currency_code, true)</span><br>
|
||||
</div>
|
||||
@stack('paid_total_tr_end')
|
||||
@endif
|
||||
@stack('grand_total_tr_start')
|
||||
<div class="border-top-1 py-2">
|
||||
<strong class="float-left">{{ trans($total->name) }}:</strong>
|
||||
<span>@money($total->amount - $document->paid, $document->currency_code, true)</span>
|
||||
</div>
|
||||
@stack('grand_total_tr_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!$hideFooter)
|
||||
@if ($document->footer)
|
||||
<div class="row mt-4">
|
||||
<div class="col-100 text-left">
|
||||
<div class="text company">
|
||||
<strong>{!! nl2br($document->footer) !!}<strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
235
resources/views/components/documents/template/modern.blade.php
Normal file
235
resources/views/components/documents/template/modern.blade.php
Normal file
@ -0,0 +1,235 @@
|
||||
<div class="row" style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<div class="col-58">
|
||||
<div class="text company pl-2 mb-1 d-flex align-items-center">
|
||||
@stack('company_logo_start')
|
||||
@if (!$hideCompanyLogo)
|
||||
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
|
||||
<img src="{{ Storage::url($document->contact->logo->id) }}" height="128" width="128" alt="{{ $document->contact_name }}"/>
|
||||
@else
|
||||
<img src="{{ $logo }}" alt="{{ setting('company.name') }}" />
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyName)
|
||||
<strong class="pl-2 text-white">{{ setting('company.name') }}</strong>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_logo_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
@stack('company_details_start')
|
||||
@if (!$hideCompanyDetails)
|
||||
@if (!$hideCompanyAddress)
|
||||
<strong class="text-white">{!! nl2br(setting('company.address')) !!}</strong><br><br>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyTaxNumber)
|
||||
<strong class="text-white">
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</strong><br><br>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyPhone)
|
||||
<strong class="text-white">
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</strong><br><br>
|
||||
@endif
|
||||
|
||||
@if (!$hideCompanyEmail)
|
||||
<strong class="text-white">{{ setting('company.email') }}</strong><br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('company_details_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@if (!$hideContactInfo)
|
||||
<strong>{{ $textContactInfo }}</strong>
|
||||
<br>
|
||||
@endif
|
||||
|
||||
@stack('name_input_start')
|
||||
@if (!$hideContactName)
|
||||
<strong>{{ $document->contact_name }}</strong>
|
||||
<br><br>
|
||||
@endif
|
||||
@stack('name_input_end')
|
||||
|
||||
@stack('address_input_start')
|
||||
@if (!$hideContactAddress)
|
||||
{!! nl2br($document->contact_address) !!}
|
||||
<br><br>
|
||||
@endif
|
||||
@stack('address_input_end')
|
||||
|
||||
@stack('tax_number_input_start')
|
||||
@if (!$hideContactTaxNumber)
|
||||
@if ($document->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $document->contact_tax_number }}
|
||||
<br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
|
||||
@stack('phone_input_start')
|
||||
@if (!$hideContactPhone)
|
||||
@if ($document->contact_phone)
|
||||
{{ $document->contact_phone }}
|
||||
<br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
|
||||
@stack('email_start')
|
||||
@if (!$hideContactEmail)
|
||||
{{ $document->contact_email }}
|
||||
<br><br>
|
||||
@endif
|
||||
@stack('email_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42">
|
||||
<div class="text company">
|
||||
@stack('order_number_input_start')
|
||||
@if (!$hideOrderNumber)
|
||||
@if ($document->order_number)
|
||||
<strong>{{ $textOrderNumber }}:</strong>
|
||||
<span class="float-right">{{ $document->order_number }}</span><br><br>
|
||||
@endif
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoice_number_input_start')
|
||||
@if (!$hideDocumentNumber)
|
||||
<strong>{{ $textDocumentNumber }}:</strong>
|
||||
<span class="float-right">{{ $document->document_number }}</span><br><br>
|
||||
@endif
|
||||
@stack('invoice_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
@if (!$hideIssuedAt)
|
||||
<strong>{{ $textIssuedAt }}:</strong>
|
||||
<span class="float-right">@date($document->issued_at)</span><br><br>
|
||||
@endif
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
@if (!$hideDueAt)
|
||||
<strong>{{ $textDueAt }}:</strong>
|
||||
<span class="float-right">@date($document->due_at)</span>
|
||||
@endif
|
||||
@stack('due_at_input_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-100">
|
||||
<div class="text">
|
||||
<table class="m-lines">
|
||||
<thead style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<tr>
|
||||
@stack('name_th_start')
|
||||
@if (!$hideItems || (!$hideName && !$hideDescription))
|
||||
<th class="item text-left text-white">{{ $textItems }}</th>
|
||||
@endif
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
@if (!$hideQuantity)
|
||||
<th class="quantity text-white">{{ $textQuantity }}</th>
|
||||
@endif
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
@if (!$hidePrice)
|
||||
<th class="price text-white">{{ $textPrice }}</th>
|
||||
@endif
|
||||
@stack('price_th_end')
|
||||
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<td class="discount text-white">{{ $item->discount }}</td>
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('total_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="total text-white">{{ $textAmount }}</th>
|
||||
@endif
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($document->items as $item)
|
||||
@include('partials.documents.item.print', ['document' => $document])
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-7">
|
||||
<div class="col-58">
|
||||
<div class="text company">
|
||||
@stack('notes_input_start')
|
||||
@if($hideNote)
|
||||
@if ($document->notes)
|
||||
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
|
||||
{!! nl2br($document->notes) !!}
|
||||
@endif
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-42 float-right text-right">
|
||||
<div class="text company pr-2">
|
||||
@foreach ($document->totals_sorted as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_total_tr_start')
|
||||
<strong class="float-left">{{ trans($total->title) }}:</strong>
|
||||
<span>@money($total->amount, $document->currency_code, true)</span><br><br>
|
||||
@stack($total->code . '_total_tr_end')
|
||||
@else
|
||||
@if ($document->paid)
|
||||
@stack('paid_total_tr_start')
|
||||
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
|
||||
<span>- @money($document->paid, $document->currency_code, true)</span><br><br>
|
||||
@stack('paid_total_tr_end')
|
||||
@endif
|
||||
@stack('grand_total_tr_start')
|
||||
<strong class="float-left">{{ trans($total->name) }}:</strong>
|
||||
<span>@money($total->amount - $document->paid, $document->currency_code, true)</span>
|
||||
@stack('grandtotal_tr_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!$hideFooter)
|
||||
@if ($document->footer)
|
||||
<div class="row mt-7">
|
||||
<div class="col-100 py-2" style="background-color:{{ $backGroundColor }} !important; -webkit-print-color-adjust: exact;">
|
||||
<div class="text pl-2">
|
||||
<strong class="text-white">{!! nl2br($document->footer) !!}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
Reference in New Issue
Block a user