renamed income/expense
This commit is contained in:
197
resources/views/sales/invoices/create.blade.php
Normal file
197
resources/views/sales/invoices/create.blade.php
Normal file
@@ -0,0 +1,197 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.invoices', 1)]))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'invoices.store',
|
||||
'id' => 'invoice',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create')]) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||
|
||||
{{ Form::dateGroup('invoiced_at', trans('invoices.invoice_date'), 'calendar', ['id' => 'invoiced_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::dateGroup('due_at', trans('invoices.due_date'), 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->addDays(setting('invoice.payment_terms', 0))->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number', trans('invoices.invoice_number'), 'file', ['required' => 'required'], $number) }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('invoices.order_number'), 'shopping-cart', []) }}
|
||||
|
||||
<div class="col-md-12 mb-4">
|
||||
{!! Form::label('items', trans_choice($text_override['items'], 2), ['class' => 'form-control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead class="thead-light">
|
||||
<tr class="row">
|
||||
@stack('actions_th_start')
|
||||
<th class="col-md-1 action-column border-right-0 border-bottom-0">{{ trans('general.actions') }}</th>
|
||||
@stack('actions_th_end')
|
||||
|
||||
@stack('name_th_start')
|
||||
<th class="col-md-3 text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-md-2 text-center border-right-0 border-bottom-0">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-md-2 text-right border-right-0 border-bottom-0">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('taxes_th_start')
|
||||
<th class="col-md-2 text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
@stack('taxes_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-md-2 text-right border-bottom-0">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="invoice-item-rows">
|
||||
@include('sales.invoices.item')
|
||||
|
||||
@stack('add_item_td_start')
|
||||
<tr class="row" id="addItem">
|
||||
<td class="col-md-1 action-column border-right-0 border-bottom-0"><button type="button" @click="onAddItem" id="button-add-item" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-icon btn-outline-success btn-lg" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="col-md-11 text-right border-bottom-0"></td>
|
||||
</tr>
|
||||
@stack('add_item_td_end')
|
||||
|
||||
@stack('sub_total_td_start')
|
||||
<tr class="row" id="tr-subtotal">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<strong>{{ trans('invoices.sub_total') }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right border-bottom-0 long-texts">
|
||||
<span id="sub-total" v-html="totals.sub">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('sub_total_td_end')
|
||||
|
||||
@stack('add_discount_td_start')
|
||||
<tr class="row" id="tr-discount">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<el-popover
|
||||
popper-class="p-0 h-0"
|
||||
placement="bottom"
|
||||
width="300"
|
||||
v-model="discount">
|
||||
<div class="card">
|
||||
<div class="discount card-body">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-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']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="discount-description">
|
||||
<strong>{{ trans('invoices.discount_desc') }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="discount card-footer">
|
||||
<div class="row text-center">
|
||||
<div class="col-md-12">
|
||||
<a href="javascript:void(0)" @click="discount = false" class="btn btn-icon btn-outline-secondary">
|
||||
<span class="btn-inner--icon"><i class="fas fa-times"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.cancel') }}</span>
|
||||
</a>
|
||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' => 'save-discount', '@click' => 'onAddDiscount', 'class' => 'btn btn-success']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-link 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="col-md-2 text-right border-bottom-0">
|
||||
<span id="discount-total" v-html="totals.discount"></span>
|
||||
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@stack('add_discount_td_end')
|
||||
|
||||
@stack('tax_total_td_start')
|
||||
<tr class="row" id="tr-tax">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<strong>{{ trans_choice('general.taxes', 1) }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right border-bottom-0 long-texts">
|
||||
<span id="tax-total" v-html="totals.tax">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('tax_total_td_end')
|
||||
|
||||
@stack('grand_total_td_start')
|
||||
<tr class="row" id="tr-total">
|
||||
<td class="col-md-10 text-right border-right-0">
|
||||
<strong>{{ trans('invoices.total') }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right long-texts">
|
||||
<span id="grand-total" v-html="totals.total">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), '', setting('invoice.notes')) }}
|
||||
|
||||
{{ Form::textareaGroup('footer', trans('general.footer'), '', setting('invoice.footer')) }}
|
||||
|
||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('defaults.category')) }}
|
||||
|
||||
{{ Form::recurring('create') }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
|
||||
{{ Form::hidden('contact_name', old('contact_name'), ['id' => 'contact_name', 'v-model' => 'form.contact_name']) }}
|
||||
{{ Form::hidden('contact_email', old('contact_email'), ['id' => 'contact_email', 'v-model' => 'form.contact_email']) }}
|
||||
{{ Form::hidden('contact_tax_number', old('contact_tax_number'), ['id' => 'contact_tax_number', 'v-model' => 'form.contact_tax_number']) }}
|
||||
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
|
||||
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
|
||||
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
|
||||
{{ Form::hidden('invoice_status_code', old('invoice_status_code', 'draft'), ['id' => 'invoice_status_code', 'v-model' => 'form.invoice_status_code']) }}
|
||||
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('sales/invoices') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var invoice_items = false;
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('public/js/sales/invoices.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
200
resources/views/sales/invoices/edit.blade.php
Normal file
200
resources/views/sales/invoices/edit.blade.php
Normal file
@@ -0,0 +1,200 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.invoices', 1)]))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($invoice, [
|
||||
'id' => 'invoice',
|
||||
'method' => 'PATCH',
|
||||
'route' => ['invoices.update', $invoice->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'change' => 'onChangeContact']) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $invoice->currency_code, ['required' => 'required', 'change' => 'onChangeCurrency']) }}
|
||||
|
||||
{{ Form::dateGroup('invoiced_at', trans('invoices.invoice_date'), 'calendar', ['id' => 'invoiced_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($invoice->invoiced_at)->toDateString()) }}
|
||||
|
||||
{{ Form::dateGroup('due_at', trans('invoices.due_date'), 'calendar', ['id' => 'due_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($invoice->due_at)->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number', trans('invoices.invoice_number'), 'file') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('invoices.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="col-md-12 mb-4">
|
||||
{!! Form::label('items', trans_choice($text_override['items'], 2), ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead class="thead-light">
|
||||
<tr class="row">
|
||||
@stack('actions_th_start')
|
||||
<th class="col-md-1 action-column border-right-0 border-bottom-0">{{ trans('general.actions') }}</th>
|
||||
@stack('actions_th_end')
|
||||
|
||||
@stack('name_th_start')
|
||||
<th class="col-md-3 text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-md-2 text-center border-right-0 border-bottom-0">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-md-2 text-right border-right-0 border-bottom-0">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('taxes_th_start')
|
||||
<th class="col-md-2 text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
@stack('taxes_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-md-2 text-right border-bottom-0">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="invoice-item-rows">
|
||||
@include('sales.invoices.item')
|
||||
|
||||
@stack('add_item_td_start')
|
||||
<tr class="row" id="addItem">
|
||||
<td class="col-md-1 action-column border-right-0 border-bottom-0"><button type="button" @click="onAddItem" id="button-add-item" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-icon btn-outline-success btn-lg" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="col-md-11 text-right border-bottom-0"></td>
|
||||
</tr>
|
||||
@stack('add_item_td_end')
|
||||
|
||||
@stack('sub_total_td_start')
|
||||
<tr class="row" id="tr-subtotal">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<strong>{{ trans('invoices.sub_total') }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right border-bottom-0 long-texts">
|
||||
<span id="sub-total" v-html="totals.sub">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('sub_total_td_end')
|
||||
|
||||
@stack('add_discount_td_start')
|
||||
<tr class="row" id="tr-discount">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<el-popover
|
||||
popper-class="p-0 h-0"
|
||||
placement="bottom"
|
||||
width="300"
|
||||
v-model="discount">
|
||||
<div class="card">
|
||||
<div class="discount card-body">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-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 text-right']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="discount-description">
|
||||
<strong>{{ trans('invoices.discount_desc') }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="discount card-footer">
|
||||
<div class="row text-center">
|
||||
<div class="col-md-12">
|
||||
<a href="javascript:void(0)" @click="discount = false" class="btn btn-icon btn-outline-secondary">
|
||||
<span class="btn-inner--icon"><i class="fas fa-times"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.cancel') }}</span>
|
||||
</a>
|
||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' => 'save-discount', '@click' => 'onAddDiscount', 'class' => 'btn btn-success']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-link 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="col-md-2 text-right border-bottom-0">
|
||||
<span id="discount-total" v-html="totals.discount"></span>
|
||||
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@stack('add_discount_td_end')
|
||||
|
||||
@stack('tax_total_td_start')
|
||||
<tr class="row" id="tr-tax">
|
||||
<td class="col-md-10 text-right border-right-0 border-bottom-0">
|
||||
<strong>{{ trans_choice('general.taxes', 1) }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right border-bottom-0 long-texts">
|
||||
<span id="tax-total" v-html="totals.tax">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('tax_total_td_end')
|
||||
|
||||
@stack('grand_total_td_start')
|
||||
<tr class="row" id="tr-total">
|
||||
<td class="col-md-10 text-right border-right-0">
|
||||
<strong>{{ trans('invoices.total') }}</strong>
|
||||
</td>
|
||||
<td class="col-md-2 text-right long-texts">
|
||||
<span id="grand-total" v-html="totals.total">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::textareaGroup('footer', trans('general.footer')) }}
|
||||
|
||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id) }}
|
||||
|
||||
{{ Form::recurring('edit', $invoice) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
|
||||
{{ Form::hidden('contact_name', old('contact_name'), ['id' => 'contact_name', 'v-model' => 'form.contact_name']) }}
|
||||
{{ Form::hidden('contact_email', old('contact_email'), ['id' => 'contact_email', 'v-model' => 'form.contact_email']) }}
|
||||
{{ Form::hidden('contact_tax_number', old('contact_tax_number'), ['id' => 'contact_tax_number', 'v-model' => 'form.contact_tax_number']) }}
|
||||
{{ Form::hidden('contact_phone', old('contact_phone'), ['id' => 'contact_phone', 'v-model' => 'form.contact_phone']) }}
|
||||
{{ Form::hidden('contact_address', old('contact_address'), ['id' => 'contact_address', 'v-model' => 'form.contact_address']) }}
|
||||
{{ Form::hidden('currency_rate', old('currency_rate', 1), ['id' => 'currency_rate', 'v-model' => 'form.contact_rate']) }}
|
||||
{{ Form::hidden('invoice_status_code', old('invoice_status_code', 'draft'), ['id' => 'invoice_status_code', 'v-model' => 'form.invoice_status_code']) }}
|
||||
{{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-sales-invoices')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('sales/invoices') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var invoice_items = {!! json_encode($invoice->items()->select(['item_id', 'name', 'quantity', 'price', 'total', 'tax'])->get()) !!};
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('public/js/sales/invoices.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
106
resources/views/sales/invoices/index.blade.php
Normal file
106
resources/views/sales/invoices/index.blade.php
Normal file
@@ -0,0 +1,106 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
|
||||
@section('new_button')
|
||||
@permission('create-sales-invoices')
|
||||
<span><a href="{{ route('invoices.create') }}" class="btn btn-primary btn-sm btn-success header-button-top"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
<span><a href="{{ url('common/import/sales/invoices') }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-upload"></span> {{ trans('import.import') }}</a></span>
|
||||
@endpermission
|
||||
<span><a href="{{ route('invoices.export', request()->input()) }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-download"></span> {{ trans('general.export') }}</a></span>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@if ($invoices->count())
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
|
||||
{!! Form::open([
|
||||
'url' => 'sales/invoices',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="row" v-if="!bulk_action.show">
|
||||
<div class="col-12 d-flex align-items-center">
|
||||
<span class="font-weight-400 d-none d-lg-block mr-2">{{ trans('general.search') }}:</span>
|
||||
<akaunting-search></akaunting-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.invoices', $bulk_actions, 'sales/invoices') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block">@sortablelink('invoice_number', trans_choice('general.numbers', 1), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-4 col-lg-2 col-xl-2">@sortablelink('contact_name', trans_choice('general.customers', 1))</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-3 col-lg-1 col-xl-1 text-right">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
|
||||
<th class="col-lg-2 col-xl-2 d-none d-lg-block">@sortablelink('due_at', trans('invoices.due_date'))</th>
|
||||
<th class="col-lg-1 col-xl-1 d-none d-lg-block">@sortablelink('invoice_status_code', trans_choice('general.statuses', 1))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center"><a>{{ trans('general.actions') }}</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
@php $paid = $item->paid; @endphp
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionGroup($item->id, $item->invoice_number) }}</td>
|
||||
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block"><a class="col-aka text-success" href="{{ route('invoices.show' , $item->id) }}">{{ $item->invoice_number }}</a></td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-4 col-lg-2 col-xl-2">{{ $item->contact_name }}</td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-3 col-lg-1 col-xl-1 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->invoiced_at)</td>
|
||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block">@date($item->due_at)</td>
|
||||
<td class="col-lg-1 col-xl-1 d-none d-lg-block">
|
||||
<span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('invoices.status.' . $item->status->code) }}</span>
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
|
||||
<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">
|
||||
<a class="dropdown-item" href="{{ route('invoices.show', $item->id) }}">{{ trans('general.show') }}</a>
|
||||
@if (!$item->reconciled)
|
||||
<a class="dropdown-item" href="{{ route('invoices.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@permission('create-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ route('invoices.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endpermission
|
||||
|
||||
@permission('delete-sales-invoices')
|
||||
@if (!$item->reconciled)
|
||||
{!! Form::deleteLink($item, 'sales/invoices') !!}
|
||||
@endif
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $invoices])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
@include('partials.admin.empty_page', ['page' => 'invoices', 'docs_path' => 'sales/invoices'])
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/sales/invoices.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
109
resources/views/sales/invoices/item.blade.php
Normal file
109
resources/views/sales/invoices/item.blade.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<tr class="row" v-for="(row, index) in form.items"
|
||||
:index="index">
|
||||
@stack('actions_td_start')
|
||||
<td class="col-md-1 action-column border-right-0 border-bottom-0">
|
||||
@stack('actions_button_start')
|
||||
<button type="button"
|
||||
@click="onDeleteItem(index)"
|
||||
data-toggle="tooltip"
|
||||
title="{{ trans('general.delete') }}"
|
||||
class="btn btn-icon btn-outline-danger btn-lg"><i class="fa fa-trash"></i>
|
||||
</button>
|
||||
@stack('actions_button_end')
|
||||
</td>
|
||||
@stack('actions_td_end')
|
||||
|
||||
@stack('name_td_start')
|
||||
<td class="col-md-3 border-right-0 border-bottom-0">
|
||||
@stack('name_input_start')
|
||||
{{ Form::selectAddNewGroup('name', '', '', $items, '', [
|
||||
'data-item' => 'name',
|
||||
'v-model' => 'row.name',
|
||||
'@input' => 'onGetItem($event, index)',
|
||||
'class' => 'form-control',
|
||||
'autocomplete' => 'form-control',
|
||||
'path' => route('modals.taxes.create')
|
||||
], 'mb-0 select-item') }}
|
||||
<input name="items[][show]"
|
||||
value="false"
|
||||
v-model="row.show"
|
||||
data-item="show"
|
||||
type="hidden">
|
||||
<input name="items[][item_id]"
|
||||
v-model="row.item_id"
|
||||
data-item="item_id"
|
||||
type="hidden">
|
||||
@stack('name_input_end')
|
||||
</td>
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
<td class="col-md-2 border-right-0 border-bottom-0">
|
||||
@stack('quantity_input_start')
|
||||
<input class="form-control text-center"
|
||||
autocomplete="off"
|
||||
required="required"
|
||||
data-item="quantity"
|
||||
v-model="row.quantity"
|
||||
@input="onCalculateTotal"
|
||||
name="item[][quantity]"
|
||||
type="text">
|
||||
{!! $errors->first('item.quantity', '<p class="help-block">:message</p>') !!}
|
||||
@stack('quantity_input_end')
|
||||
</td>
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
<td class="col-md-2 border-right-0 border-bottom-0">
|
||||
@stack('price_input_start')
|
||||
<input class="form-control text-right input-price"
|
||||
autocomplete="off"
|
||||
required="required"
|
||||
data-item="price"
|
||||
v-model.lazy="row.price"
|
||||
v-money="money"
|
||||
@input="onCalculateTotal"
|
||||
name="items[][price]"
|
||||
type="text">
|
||||
<input name="items[][currency]"
|
||||
data-item="currency"
|
||||
v-model="row.currency"
|
||||
@input="onCalculateTotal"
|
||||
type="hidden">
|
||||
{!! $errors->first('item.price', '<p class="help-block">:message</p>') !!}
|
||||
@stack('price_input_end')
|
||||
</td>
|
||||
@stack('price_td_end')
|
||||
|
||||
@stack('taxes_td_start')
|
||||
<td class="col-md-2 border-right-0 border-bottom-0">
|
||||
@stack('tax_id_input_start')
|
||||
{{ Form::multiSelectAddNewGroup('tax_id', '', '', $taxes, '', [
|
||||
'data-item' => 'tax_id',
|
||||
'v-model' => 'row.tax_id',
|
||||
'change' => 'onCalculateTotal',
|
||||
'class' => 'form-control',
|
||||
'collapse' => 'false',
|
||||
'path' => route('modals.taxes.create')
|
||||
], 'mb-0 select-tax') }}
|
||||
@stack('tax_id_input_end')
|
||||
</td>
|
||||
@stack('taxes_td_end')
|
||||
|
||||
@stack('total_td_start')
|
||||
<td class="col-md-2 text-right total-column border-bottom-0 long-texts">
|
||||
<input name="item[][total]"
|
||||
data-item="total"
|
||||
v-model.lazy="row.total"
|
||||
v-money="money"
|
||||
type="hidden">
|
||||
@stack('total_input_start')
|
||||
@if (empty($item) || !isset($item->total))
|
||||
<span id="item-total" v-html="row.total">0</span>
|
||||
@else
|
||||
<span id="item-total" v-html="row.total">@money($item->total, $invoice->currency_code, true)</span>
|
||||
@endif
|
||||
@stack('total_input_end')
|
||||
</td>
|
||||
@stack('total_td_end')
|
||||
</tr>
|
||||
265
resources/views/sales/invoices/print_classic.blade.php
Normal file
265
resources/views/sales/invoices/print_classic.blade.php
Normal file
@@ -0,0 +1,265 @@
|
||||
@extends('layouts.print')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<img class="mt-4" src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
</div>
|
||||
<div class="col-md-5 text-right">
|
||||
<p class="mb-0 mt-4 font-weight-600">
|
||||
{{ setting('company.name') }}
|
||||
</p>
|
||||
|
||||
<p class="mb-0">
|
||||
{!! nl2br(setting('company.address')) !!}
|
||||
</p>
|
||||
|
||||
<p class="mb-0">
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</p>
|
||||
|
||||
<p class="mb-0 mt-3">
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</p>
|
||||
|
||||
<p class="mb-0">
|
||||
{{ setting('company.email') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-4">
|
||||
<div class="col-md-4">
|
||||
<hr class="bg-default invoice-classic-line mb-1 mt-5">
|
||||
<hr class="bg-default invoice-classic-line my-0">
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<div class="invoice-classic-frame">
|
||||
<div class="invoice-classic-inline-frame">
|
||||
@stack('invoice_number_input_start')
|
||||
<p class="mt-4">
|
||||
<b>{{ trans('invoices.invoice_number') }}:</b>
|
||||
{{ $invoice->invoice_number }}
|
||||
</p>
|
||||
@stack('invoice_number_input_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<hr class="bg-default invoice-classic-line mb-1 mt-5">
|
||||
<hr class="bg-default invoice-classic-line my-0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-7">
|
||||
|
||||
<h4>{{ trans('invoices.bill_to') }}</h4>
|
||||
@stack('name_input_start')
|
||||
<strong class="d-block">{{ $invoice->contact_name }}</strong>
|
||||
@stack('name_input_end')
|
||||
|
||||
@stack('address_input_start')
|
||||
<p class="mb-0">
|
||||
{!! nl2br($invoice->contact_address) !!}
|
||||
</p>
|
||||
@stack('address_input_end')
|
||||
|
||||
@stack('tax_number_input_start')
|
||||
<p class="mb-0">
|
||||
@if ($invoice->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}<br>
|
||||
@endif
|
||||
</p>
|
||||
@stack('tax_number_input_end')
|
||||
|
||||
@stack('phone_input_start')
|
||||
<p class="mb-0 mt-3">
|
||||
@if ($invoice->contact_phone)
|
||||
{{ $invoice->contact_phone }}
|
||||
@endif
|
||||
</p>
|
||||
@stack('phone_input_end')
|
||||
|
||||
@stack('email_start')
|
||||
<p class="mb-0">
|
||||
{{ $invoice->contact_email }}
|
||||
</p>
|
||||
@stack('email_input_end')
|
||||
|
||||
</div>
|
||||
<div class="col-md-5 text-right">
|
||||
@stack('order_number_input_start')
|
||||
@if ($invoice->order_number)
|
||||
<p>
|
||||
<b>{{ trans('invoices.order_number') }}:</b>
|
||||
{{ $invoice->order_number }}
|
||||
</p>
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
<p>
|
||||
<b>{{ trans('invoices.invoice_date') }}:</b>
|
||||
@date($invoice->invoiced_at)
|
||||
</p>
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
<p>
|
||||
<b>{{ trans('invoices.payment_due') }}:</b>
|
||||
@date($invoice->due_at)
|
||||
</p>
|
||||
@stack('due_at_input_end')
|
||||
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code == 'total')
|
||||
<p class="bg-light border-radius-5 float-right text-center w-50">
|
||||
<b>{{ trans($total->name) }}:</b>
|
||||
@money($total->amount - $invoice->paid, $invoice->currency_code, true)
|
||||
</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-table">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr class="row border-dashed">
|
||||
@stack('name_th_start')
|
||||
<th class="col-xs-4 col-sm-3 pl-5">{{ trans_choice($text_override['items'], 2) }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-center">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-sm-3 text-center d-none d-sm-block pl-5">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-right pr-5">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr class="row border-dashed">
|
||||
@stack('name_td_start')
|
||||
<td class="col-xs-4 col-sm-3 pl-5">
|
||||
{{ $item->name }}
|
||||
@if ($item->desc)
|
||||
<br><small>{!! $item->desc !!}</small>
|
||||
@endif
|
||||
</td>
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
<td class="col-sm-3 text-center d-none d-sm-block pl-5">@money($item->price, $invoice->currency_code, true)</td>
|
||||
@stack('price_td_end')
|
||||
|
||||
@stack('total_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-right pr-5">@money($item->total, $invoice->currency_code, true)</td>
|
||||
@stack('total_td_end')
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
@stack('notes_input_start')
|
||||
@if ($invoice->notes)
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
|
||||
<p class="form-control text-muted">{{ $invoice->notes }}</p>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless border-dashed">
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_td_start')
|
||||
<tr class="border-dashed">
|
||||
<th>
|
||||
{{ trans($total->title) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack($total->code . '_td_end')
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr class="border-dashed">
|
||||
<th>
|
||||
{{ trans('invoices.paid') }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
- @money($invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('grand_total_td_start')
|
||||
<tr class="border-dashed">
|
||||
<th>
|
||||
{{ trans($total->name) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount - $invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($invoice->footer)
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{!! $invoice->footer !!}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
280
resources/views/sales/invoices/print_default.blade.php
Normal file
280
resources/views/sales/invoices/print_default.blade.php
Normal file
@@ -0,0 +1,280 @@
|
||||
@extends('layouts.print')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="row mx--4">
|
||||
<div class="col-md-7 border-bottom-1">
|
||||
<div class="table-responsive mt-4">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<img src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 border-bottom-1">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{{ setting('company.name') }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{!! nl2br(setting('company.address')) !!}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{{ setting('company.email') }}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans('invoices.bill_to') }}
|
||||
@stack('name_input_start')
|
||||
<strong class="d-block">{{ $invoice->contact_name }}</strong>
|
||||
@stack('name_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('address_input_start')
|
||||
{!! nl2br($invoice->contact_address) !!}
|
||||
@stack('address_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('tax_number_input_start')
|
||||
@if ($invoice->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}<br>
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('phone_input_start')
|
||||
@if ($invoice->contact_phone)
|
||||
{{ $invoice->contact_phone }}
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('email_start')
|
||||
{{ $invoice->contact_email }}
|
||||
@stack('email_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
@stack('invoice_number_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@stack('invoice_number_input_end')
|
||||
|
||||
@stack('order_number_input_start')
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">@date($invoice->invoiced_at)</td>
|
||||
</tr>
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">@date($invoice->due_at)</td>
|
||||
</tr>
|
||||
@stack('due_at_input_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-table">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr class="row bg-default text-white">
|
||||
@stack('name_th_start')
|
||||
<th class="col-xs-4 col-sm-3 pl-5 text-white">{{ trans_choice($text_override['items'], 2) }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-center text-white">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-sm-3 text-center d-none d-sm-block pl-5 text-white">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-right pr-5 text-white">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr class="row">
|
||||
@stack('name_td_start')
|
||||
<td class="col-xs-4 col-sm-3 pl-5">
|
||||
{{ $item->name }}
|
||||
@if ($item->desc)
|
||||
<br><small>{!! $item->desc !!}</small>
|
||||
@endif
|
||||
</td>
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
<td class="col-sm-3 text-center d-none d-sm-block pl-5">@money($item->price, $invoice->currency_code, true)</td>
|
||||
@stack('price_td_end')
|
||||
|
||||
@stack('total_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-right pr-5">@money($item->total, $invoice->currency_code, true)</td>
|
||||
@stack('total_td_end')
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
@stack('notes_input_start')
|
||||
@if ($invoice->notes)
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
|
||||
<p class="form-control text-muted">{{ $invoice->notes }}</p>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_td_start')
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans($total->title) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack($total->code . '_td_end')
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans('invoices.paid') }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
- @money($invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('grand_total_td_start')
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans($total->name) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount - $invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($invoice->footer)
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{!! $invoice->footer !!}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
276
resources/views/sales/invoices/print_modern.blade.php
Normal file
276
resources/views/sales/invoices/print_modern.blade.php
Normal file
@@ -0,0 +1,276 @@
|
||||
@extends('layouts.print')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-7 bg-primary">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless mt-4">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="d-flex align-items-center">
|
||||
<img src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
<h3 class="ml-4 text-white">{{ setting('company.name') }}</h3>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 bg-default">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="text-white">
|
||||
{!! nl2br(setting('company.address')) !!}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-white">
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-white">
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-white">
|
||||
{{ setting('company.email') }}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<h4>{{ trans('invoices.bill_to') }}</h4>
|
||||
@stack('name_input_start')
|
||||
<strong class="d-block">{{ $invoice->contact_name }}</strong>
|
||||
@stack('name_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@stack('address_input_start')
|
||||
{!! nl2br($invoice->contact_address) !!}
|
||||
@stack('address_input_end')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@stack('tax_number_input_start')
|
||||
@if ($invoice->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}<br>
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@stack('phone_input_start')
|
||||
@if ($invoice->contact_phone)
|
||||
{{ $invoice->contact_phone }}
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@stack('email_start')
|
||||
{{ $invoice->contact_email }}
|
||||
@stack('email_input_end')
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
@stack('invoice_number_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@stack('invoice_number_input_end')
|
||||
|
||||
@stack('order_number_input_start')
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">@date($invoice->invoiced_at)</td>
|
||||
</tr>
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">@date($invoice->due_at)</td>
|
||||
</tr>
|
||||
@stack('due_at_input_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-table">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr class="row bg-default">
|
||||
@stack('name_th_start')
|
||||
<th class="col-xs-4 col-sm-3 pl-5 text-white">{{ trans_choice($text_override['items'], 2) }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-center text-white">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-sm-3 text-center d-none d-sm-block pl-5 text-white">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-right pr-5 text-white">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr class="row">
|
||||
@stack('name_td_start')
|
||||
<td class="col-xs-4 col-sm-3 pl-5">
|
||||
{{ $item->name }}
|
||||
@if ($item->desc)
|
||||
<br><small>{!! $item->desc !!}</small>
|
||||
@endif
|
||||
</td>
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
<td class="col-sm-3 text-center d-none d-sm-block pl-5">@money($item->price, $invoice->currency_code, true)</td>
|
||||
@stack('price_td_end')
|
||||
|
||||
@stack('total_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-right pr-5">@money($item->total, $invoice->currency_code, true)</td>
|
||||
@stack('total_td_end')
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
@stack('notes_input_start')
|
||||
@if ($invoice->notes)
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
|
||||
<p class="form-control text-muted">{{ $invoice->notes }}</p>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_td_start')
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans($total->title) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack($total->code . '_td_end')
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans('invoices.paid') }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
- @money($invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('grand_total_td_start')
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans($total->name) }}:
|
||||
</th>
|
||||
<td class="text-right">
|
||||
@money($total->amount - $invoice->paid, $invoice->currency_code, true)
|
||||
</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($invoice->footer)
|
||||
<div class="row">
|
||||
<div class="col-md-12 bg-default">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="text-white">
|
||||
{!! $invoice->footer !!}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
668
resources/views/sales/invoices/show.blade.php
Normal file
668
resources/views/sales/invoices/show.blade.php
Normal file
@@ -0,0 +1,668 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
@stack('recurring_message_start')
|
||||
@if (($recurring = $invoice->recurring) && ($next = $recurring->next()))
|
||||
<div class="callout callout-info">
|
||||
@stack('recurring_message_head_start')
|
||||
<h4>{{ trans('recurring.recurring') }}</h4>
|
||||
@stack('recurring_message_head_end')
|
||||
|
||||
@stack('recurring_message_body_start')
|
||||
<p>{{ trans('recurring.message', [
|
||||
'type' => mb_strtolower(trans_choice('general.invoices', 1)),
|
||||
'date' => $next->format($date_format)
|
||||
]) }}
|
||||
</p>
|
||||
@stack('recurring_message_body_end')
|
||||
</div>
|
||||
@endif
|
||||
@stack('recurring_message_end')
|
||||
|
||||
@stack('status_message_start')
|
||||
@if ($invoice->status->code == 'draft')
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning fade show" role="alert">
|
||||
@stack('status_message_body_start')
|
||||
<span class="alert-text">
|
||||
<strong>{!! trans('invoices.messages.draft') !!}</strong>
|
||||
</span>
|
||||
@stack('status_message_body_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@stack('status_message_end')
|
||||
|
||||
@stack('timeline_start')
|
||||
@if ($invoice->status->code != 'paid')
|
||||
@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_body_create_invoice_start')
|
||||
<div class="timeline-block">
|
||||
<span class="timeline-step badge-info">
|
||||
<i class="fas fa-plus"></i>
|
||||
</span>
|
||||
<div class="timeline-content">
|
||||
@stack('timeline_body_create_invoice_head_start')
|
||||
<h2 class="font-weight-500">{{ trans('invoices.create_invoice') }}</h2>
|
||||
@stack('timeline_body_create_invoice_head_end')
|
||||
|
||||
@stack('timeline_body_create_invoice_body_start')
|
||||
@stack('timeline_body_create_invoice_body_message_start')
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('invoices.messages.status.created', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</small>
|
||||
@stack('timeline_body_create_invoice_body_message_end')
|
||||
|
||||
<div class="mt-3">
|
||||
@stack('timeline_body_create_invoice_body_button_edit_start')
|
||||
<a href="{{ url('sales/invoices/' . $invoice->id . '/edit') }}" class="btn btn-info btn-sm btn-alone">
|
||||
{{ trans('general.edit') }}
|
||||
</a>
|
||||
@stack('timeline_body_create_invoice_body_button_edit_end')
|
||||
</div>
|
||||
@stack('timeline_body_create_invoice_body_end')
|
||||
</div>
|
||||
</div>
|
||||
@stack('timeline_body_create_invoice_end')
|
||||
|
||||
@stack('timeline_body_send_invoice_start')
|
||||
<div class="timeline-block">
|
||||
<span class="timeline-step badge-warning">
|
||||
<i class="far fa-envelope"></i>
|
||||
</span>
|
||||
<div class="timeline-content">
|
||||
@stack('timeline_body_send_invoice_head_start')
|
||||
<h2 class="font-weight-500">{{ trans('invoices.send_invoice') }}</h2>
|
||||
@stack('timeline_body_send_invoice_head_end')
|
||||
|
||||
@stack('timeline_body_send_invoice_body_start')
|
||||
@if ($invoice->status->code != 'sent' && $invoice->status->code != 'partial' && $invoice->status->code != 'viewed')
|
||||
@stack('timeline_body_send_invoice_body_message_start')
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('invoices.messages.status.send.draft') }}</small>
|
||||
@stack('timeline_body_send_invoice_body_message_end')
|
||||
|
||||
<div class="mt-3">
|
||||
@stack('timeline_body_send_invoice_body_button_sent_start')
|
||||
@permission('update-sales-invoices')
|
||||
@if($invoice->invoice_status_code == 'draft')
|
||||
<a href="{{ url('sales/invoices/' . $invoice->id . '/sent') }}" class="btn btn-white btn-sm header-button-top">{{ trans('invoices.mark_sent') }}</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-secondary btn-sm header-button-top" disabled="disabled">
|
||||
<span class="text-disabled">{{ trans('invoices.mark_sent') }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('timeline_body_send_invoice_body_button_sent_end')
|
||||
|
||||
@stack('timeline_body_send_invoice_body_button_email_start')
|
||||
@if($invoice->contact_email)
|
||||
<a href="{{ url('sales/invoices/' . $invoice->id . '/email') }}" class="btn btn-warning btn-sm header-button-bottom">{{ trans('invoices.send_mail') }}</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-white btn-sm header-button-bottom green-tooltip" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
|
||||
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@stack('timeline_body_send_invoice_body_button_email_end')
|
||||
</div>
|
||||
@elseif($invoice->status->code == 'viewed')
|
||||
@stack('timeline_body_viewed_invoice_body_message_start')
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('invoices.messages.status.viewed') }}</small>
|
||||
@stack('timeline_body_viewed_invoice_body_message_end')
|
||||
@else
|
||||
@stack('timeline_body_send_invoice_body_message_start')
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</small>
|
||||
@stack('timeline_body_send_invoice_body_message_end')
|
||||
@endif
|
||||
@stack('timeline_body_send_invoice_body_end')
|
||||
</div>
|
||||
</div>
|
||||
@stack('timeline_body_send_invoice_end')
|
||||
|
||||
@stack('timeline_body_get_paid_start')
|
||||
<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_body_get_paid_head_start')
|
||||
<h2 class="font-weight-500">{{ trans('invoices.get_paid') }}</h2>
|
||||
@stack('timeline_body_get_paid_head_end')
|
||||
|
||||
@stack('timeline_body_get_paid_body_start')
|
||||
@stack('timeline_body_get_paid_body_message_start')
|
||||
@if($invoice->status->code != 'paid' && empty($invoice->transactions->count()))
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('invoices.messages.status.paid.await') }}</small>
|
||||
@else
|
||||
<small>{{ trans_choice('general.statuses', 1) . ':' }}</small>
|
||||
<small>{{ trans('general.partially_paid') }}</small>
|
||||
@endif
|
||||
@stack('timeline_body_get_paid_body_message_end')
|
||||
|
||||
<div class="mt-3">
|
||||
@stack('timeline_body_get_paid_body_button_pay_start')
|
||||
@permission('update-sales-invoices')
|
||||
<a href="{{ route('invoices.paid', $invoice->id) }}" class="btn btn-white btn-sm header-button-top">{{ trans('invoices.mark_paid') }}</a>
|
||||
@endpermission
|
||||
@stack('timeline_body_get_paid_body_button_pay_end')
|
||||
|
||||
@stack('timeline_body_get_paid_body_button_payment_start')
|
||||
@if(empty($invoice->transactions->count()) || (!empty($invoice->transactions->count()) && $invoice->paid != $invoice->amount))
|
||||
<button @click="onPayment" id="button-payment" class="btn btn-success btn-sm header-button-bottom">{{ trans('invoices.add_payment') }}</button>
|
||||
@endif
|
||||
@stack('timeline_body_get_paid_body_button_payment_end')
|
||||
</div>
|
||||
@stack('timeline_body_get_paid_body_end')
|
||||
</div>
|
||||
</div>
|
||||
@stack('timeline_body_get_paid_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('timeline_body_get_paid_end')
|
||||
@endif
|
||||
@stack('timeline_end')
|
||||
|
||||
@stack('invoice_start')
|
||||
<div class="card">
|
||||
@stack('invoice_status_start')
|
||||
<div class="card-header status-{{ $invoice->status->label }}">
|
||||
<h3 class="text-white mb-0 float-right">{{ trans('invoices.status.' . $invoice->status->code) }}</h3>
|
||||
</div>
|
||||
@stack('invoice_status_end')
|
||||
|
||||
<div class="card-body">
|
||||
@stack('invoice_header_start')
|
||||
<div class="row mx--4">
|
||||
<div class="col-md-7 border-bottom-1">
|
||||
<div class="table-responsive mt-2">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<img src="{{ $logo }}" alt="{{ setting('company.name') }}"/>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 border-bottom-1">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{{ setting('company.name') }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{!! nl2br(setting('company.address')) !!}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if (setting('company.tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@if (setting('company.phone'))
|
||||
{{ setting('company.phone') }}
|
||||
@endif
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{{ setting('company.email') }}
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('invoice_header_end')
|
||||
|
||||
@stack('invoice_information_start')
|
||||
<div class="row">
|
||||
<div class="col-md-7 long-texts">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
{{ trans('invoices.bill_to') }}
|
||||
@stack('name_input_start')
|
||||
<strong class="d-block">{{ $invoice->contact_name }}</strong>
|
||||
@stack('name_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('address_input_start')
|
||||
{!! nl2br($invoice->contact_address) !!}
|
||||
@stack('address_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('tax_number_input_start')
|
||||
@if ($invoice->contact_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}
|
||||
@endif
|
||||
@stack('tax_number_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('phone_input_start')
|
||||
@if ($invoice->contact_phone)
|
||||
{{ $invoice->contact_phone }}
|
||||
@endif
|
||||
@stack('phone_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@stack('email_start')
|
||||
{{ $invoice->contact_email }}
|
||||
@stack('email_input_end')
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 long-texts">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
@stack('invoice_number_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@stack('invoice_number_input_end')
|
||||
|
||||
@stack('order_number_input_start')
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('order_number_input_end')
|
||||
|
||||
@stack('invoiced_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">@date($invoice->invoiced_at)</td>
|
||||
</tr>
|
||||
@stack('invoiced_at_input_end')
|
||||
|
||||
@stack('due_at_input_start')
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">@date($invoice->due_at)</td>
|
||||
</tr>
|
||||
@stack('due_at_input_end')
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('invoice_information_end')
|
||||
|
||||
@stack('invoice_item_start')
|
||||
<div class="row show-table">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr class="row">
|
||||
@stack('name_th_start')
|
||||
<th class="col-xs-4 col-sm-3 pl-5">{{ trans_choice($text_override['items'], 2) }}</th>
|
||||
@stack('name_th_end')
|
||||
|
||||
@stack('quantity_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-center">{{ trans($text_override['quantity']) }}</th>
|
||||
@stack('quantity_th_end')
|
||||
|
||||
@stack('price_th_start')
|
||||
<th class="col-sm-3 text-center d-none d-sm-block">{{ trans($text_override['price']) }}</th>
|
||||
@stack('price_th_end')
|
||||
|
||||
@stack('total_th_start')
|
||||
<th class="col-xs-4 col-sm-3 text-right pr-5">{{ trans('invoices.total') }}</th>
|
||||
@stack('total_th_end')
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr class="row">
|
||||
@stack('name_td_start')
|
||||
<td class="col-xs-4 col-sm-3 pl-5">{{ $item->name }}</td>
|
||||
@stack('name_td_end')
|
||||
|
||||
@stack('quantity_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
|
||||
@stack('quantity_td_end')
|
||||
|
||||
@stack('price_td_start')
|
||||
<td class="col-sm-3 text-center d-none d-sm-block pl-8">@money($item->price, $invoice->currency_code, true)</td>
|
||||
@stack('price_td_end')
|
||||
|
||||
@stack('total_td_start')
|
||||
<td class="col-xs-4 col-sm-3 text-right pr-5">@money($item->total, $invoice->currency_code, true)</td>
|
||||
@stack('total_td_end')
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('invoice_item_end')
|
||||
|
||||
@stack('invoice_total_start')
|
||||
<div class="row mt-5">
|
||||
<div class="col-md-7">
|
||||
@stack('notes_input_start')
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
@if ($invoice->notes)
|
||||
<tr>
|
||||
<th>
|
||||
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
|
||||
<p class="form-control text-muted long-texts">{{ $invoice->notes }}</p>
|
||||
</th>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@stack('notes_input_end')
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@stack($total->code . '_td_start')
|
||||
<tr>
|
||||
<th>{{ trans($total->title) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@stack($total->code . '_td_end')
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr class="text-success">
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
@stack('grand_total_td_start')
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@stack('grand_total_td_end')
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('invoice_total_end')
|
||||
</div>
|
||||
|
||||
@stack('card_footer_start')
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
@stack('button_edit_start')
|
||||
@if(!$invoice->reconciled)
|
||||
<a href="{{ url('sales/invoices/' . $invoice->id . '/edit') }}" class="btn btn-info header-button-top">
|
||||
<i class="fas fa-edit"></i> {{ trans('general.edit') }}
|
||||
</a>
|
||||
@endif
|
||||
@stack('button_edit_end')
|
||||
|
||||
@stack('button_print_start')
|
||||
<a href="{{ url('sales/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-success header-button-top">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
@stack('button_print_end')
|
||||
|
||||
@stack('button_share_start')
|
||||
<a href="{{ $signed_url }}" target="_blank" class="btn btn-white header-button-top">
|
||||
<i class="fa fa-share"></i> Share
|
||||
</a>
|
||||
@stack('button_share_end')
|
||||
|
||||
@stack('button_group_start')
|
||||
<div class="dropup">
|
||||
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i> {{ trans('general.more_actions') }}</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_pay_start')
|
||||
@if($invoice->status->code != 'paid')
|
||||
@permission('update-sales-invoices')
|
||||
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/pay') }}">{{ trans('invoices.mark_paid') }}</a>
|
||||
@endpermission
|
||||
|
||||
@if(empty($invoice->paid) || ($invoice->paid != $invoice->amount))
|
||||
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('invoices.add_payment') }}</button>
|
||||
@endif
|
||||
<div class="dropdown-divider"></div>
|
||||
@endif
|
||||
@stack('button_pay_end')
|
||||
|
||||
@stack('button_sent_start')
|
||||
@permission('update-sales-invoices')
|
||||
@if($invoice->invoice_status_code == 'draft')
|
||||
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/sent') }}">{{ trans('invoices.mark_sent') }}</a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_sent_end')
|
||||
|
||||
@stack('button_email_start')
|
||||
@if($invoice->contact_email)
|
||||
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/email') }}">{{ trans('invoices.send_mail') }}</a>
|
||||
@else
|
||||
<button type="button" class="dropdown-item" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
|
||||
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
|
||||
</button>
|
||||
@endif
|
||||
@stack('button_email_end')
|
||||
|
||||
@stack('button_pdf_start')
|
||||
<a class="dropdown-item" href="{{ url('sales/invoices/' . $invoice->id . '/pdf') }}">{{ trans('invoices.download_pdf') }}</a>
|
||||
@stack('button_pdf_end')
|
||||
|
||||
@stack('button_delete_start')
|
||||
@permission('delete-sales-invoices')
|
||||
@if(!$invoice->reconciled)
|
||||
{!! Form::deleteLink($invoice, 'sales/invoices') !!}
|
||||
@endif
|
||||
@endpermission
|
||||
@stack('button_delete_end')
|
||||
</div>
|
||||
</div>
|
||||
@stack('button_group_end')
|
||||
|
||||
@if($invoice->attachment)
|
||||
@php $file = $invoice->attachment; @endphp
|
||||
@include('partials.media.file')
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@stack('card_footer_end')
|
||||
</div>
|
||||
@stack('invoice_end')
|
||||
|
||||
@stack('row_footer_start')
|
||||
<div class="row">
|
||||
@stack('row_footer_history_start')
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
<div class="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
|
||||
<h4 class="mb-0">{{ trans('invoices.histories') }}</h4>
|
||||
</div>
|
||||
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-4 col-sm-4">{{ trans('general.date') }}</th>
|
||||
<th class="col-xs-4 col-sm-4 text-center">{{ trans_choice('general.statuses', 1) }}</th>
|
||||
<th class="col-xs-4 col-sm-4 text-left long-texts">{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->histories as $history)
|
||||
<tr class="row align-items-center">
|
||||
<td class="col-xs-4 col-sm-4">@date($history->created_at)</td>
|
||||
<td class="col-xs-4 col-sm-4 text-center">{{ $history->status->name }}</td>
|
||||
<td class="col-xs-4 col-sm-4 text-left long-texts">{{ $history->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('row_footer_history_end')
|
||||
|
||||
@stack('row_footer_transaction_start')
|
||||
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||
<div class="accordion">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingTwo" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
|
||||
<h4 class="mb-0">{{ trans_choice('general.transactions', 2) }}</h4>
|
||||
</div>
|
||||
<div id="collapseTwo" class="collapse hide" aria-labelledby="headingTwo">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($invoice->transactions->count())
|
||||
@foreach($invoice->transactions as $transaction)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<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">
|
||||
@if ($transaction->reconciled)
|
||||
<button type="button" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-check"></i> {{ trans('reconciliations.reconciled') }}
|
||||
</button>
|
||||
@else
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-transaction-' . $transaction->id,
|
||||
'method' => 'DELETE',
|
||||
'route' => ['transactions.destroy', $transaction->id],
|
||||
'class' => 'd-inline'
|
||||
]) !!}
|
||||
{{ Form::hidden('form_id', '#invoice-transaction-' . $transaction->id, ['id' => 'form_id-' . $transaction->id]) }}
|
||||
{{ Form::hidden('title', trans_choice('general.transactions', 2), ['id' => 'title-' . $transaction->id]) }}
|
||||
@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::hidden('message', $message, ['id' => 'mesage-' . $transaction->id]) }}
|
||||
{{ Form::hidden('cancel', trans('general.cancel'), ['id' => 'cancel-' . $transaction->id]) }}
|
||||
{{ Form::hidden('delete', trans('general.delete'), ['id' => 'delete-' . $transaction->id]) }}
|
||||
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-sm',
|
||||
'title' => trans('general.delete'),
|
||||
'@click' => 'onDeleteTransaction("invoice-transaction-' . $transaction->id . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="text-muted" id="datatable-basic_info" role="status" aria-live="polite">
|
||||
{{ trans('general.no_records') }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('row_footer_transaction_end')
|
||||
</div>
|
||||
@stack('row_footer_end')
|
||||
@endsection
|
||||
|
||||
@push('content_content_end')
|
||||
<akaunting-modal
|
||||
:show="payment.modal"
|
||||
@cancel="payment.modal = false"
|
||||
:title="'{{ trans('general.title.new', ['type' => trans_choice('general.payments', 1)]) }}'"
|
||||
:message="payment.html"
|
||||
:button_cancel="'{{ trans('general.button.save') }}'"
|
||||
:button_delete="'{{ trans('general.button.cancel') }}'">
|
||||
<template #modal-body>
|
||||
@include('modals.invoices.payment')
|
||||
</template>
|
||||
|
||||
<template #card-footer>
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" @click="closePayment">
|
||||
<span>{{ trans('general.cancel') }}</span>
|
||||
</button>
|
||||
|
||||
<a href="{{ url('apps/categories/payment-method') }}" class="btn btn-white">
|
||||
<span class="fa fa-money"></span> {{ trans('invoices.accept_payments') }}
|
||||
</a>
|
||||
|
||||
<button type="button" class="btn btn-success button-submit" @click="addPayment">
|
||||
<div class="aka-loader d-none"></div>
|
||||
<span>{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</akaunting-modal>
|
||||
@endpush
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/sales/invoices.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user