This commit is contained in:
denisdulici
2018-04-16 19:01:29 +03:00
parent 7897300cb8
commit d2b0a816e3
12 changed files with 130 additions and 41 deletions

View File

@ -21,6 +21,11 @@ return [
'space' => 'Space ( )',
],
'timezone' => 'Time Zone',
'percent' => [
'title' => 'Percent (%) Position',
'before' => 'Before Number',
'after' => 'After Number',
],
],
'invoice' => [
'tab' => 'Invoice',

View File

@ -114,10 +114,17 @@
<tbody>
@foreach($bill->totals as $total)
@if ($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@endif
@else
@if ($bill->paid)
<tr class="text-success">

View File

@ -117,12 +117,19 @@
<div class="table-responsive">
<table class="table">
<tbody>
@foreach($bill->totals as $total)
@foreach ($bill->totals as $total)
@if ($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@endif
@else
@if ($bill->paid)
<tr class="text-success">
@ -131,7 +138,7 @@
</tr>
@endif
<tr>
<th>{{ trans($total['name']) }}:</th>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
</tr>
@endif

View File

@ -112,12 +112,19 @@
<div class="table-responsive">
<table class="table">
<tbody>
@foreach($invoice->totals as $total)
@if($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@foreach ($invoice->totals as $total)
@if ($total->code != 'total')
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@endif
@else
@if ($invoice->paid)
<tr class="text-success">
@ -126,7 +133,7 @@
</tr>
@endif
<tr>
<th>{{ trans($total['name']) }}:</th>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@endif

View File

@ -119,12 +119,19 @@
<div class="table-responsive">
<table class="table">
<tbody>
@foreach($invoice->totals as $total)
@if($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@foreach ($invoice->totals as $total)
@if ($total->code != 'total')
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@endif
@else
@if ($invoice->paid)
<tr class="text-success">
@ -133,7 +140,7 @@
</tr>
@endif
<tr>
<th>{{ trans($total['name']) }}:</th>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@endif

View File

@ -47,6 +47,8 @@
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, null, []) }}
{{ Form::selectGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, null, []) }}
{{ Form::selectGroup('percent_position', trans('settings.localisation.percent.title'), 'percent', $percent_positions, null, []) }}
</div>
<div class="tab-pane tab-margin" id="invoice">
@ -164,6 +166,10 @@
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.timezone')]) }}"
});
$("#percent_position").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.percent.title')]) }}"
});
$("#default_account").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.account')]) }}"
});