Browse Source

Update invoice views using lang files

pull/7/head
Nafies Luthfi 8 years ago
parent
commit
98bbfe85c7
  1. 2
      resources/lang/de/invoice.php
  2. 4
      resources/lang/en/invoice.php
  3. 4
      resources/lang/id/invoice.php
  4. 2
      resources/views/customers/invoices.blade.php
  5. 4
      resources/views/invoices/index.blade.php
  6. 16
      resources/views/invoices/partials/item-list.blade.php
  7. 7
      resources/views/invoices/pdf.blade.php
  8. 21
      resources/views/projects/invoices.blade.php

2
resources/lang/de/invoice.php

@ -38,6 +38,8 @@ return [
'item_removed' => 'Position gelöscht.', 'item_removed' => 'Position gelöscht.',
'confirm_instruction' => 'Bitte übeprüfen Sie diese Rechnungsposition, tippe :back_link zum Bearbeiten.', 'confirm_instruction' => 'Bitte übeprüfen Sie diese Rechnungsposition, tippe :back_link zum Bearbeiten.',
'draft_del_confirm' => 'Wollen Sie wirklich diesen Entwurf löschen?', 'draft_del_confirm' => 'Wollen Sie wirklich diesen Entwurf löschen?',
'payment_instruction' => 'Payment can be transfered via our bank account(s):',
'thanks_text' => 'Thank you for using our services.',
// Attributes // Attributes
'number' => 'Rechnungsnr.', 'number' => 'Rechnungsnr.',

4
resources/lang/en/invoice.php

@ -21,7 +21,7 @@ return [
'create' => 'Create new Invoice', 'create' => 'Create new Invoice',
'save' => 'Save Invoice', 'save' => 'Save Invoice',
'created' => 'New Invoice has been created.', 'created' => 'New Invoice has been created.',
'show' => 'Invoice Detail',
'show' => 'View Invoice Detail',
'edit' => 'Edit Invoice', 'edit' => 'Edit Invoice',
'update' => 'Update Invoice', 'update' => 'Update Invoice',
'updated' => 'Invoice data has been updated.', 'updated' => 'Invoice data has been updated.',
@ -38,6 +38,8 @@ return [
'item_removed' => 'Item removed.', 'item_removed' => 'Item removed.',
'confirm_instruction' => 'Please check this Invoice detail, hit :back_link to edit the detail.', 'confirm_instruction' => 'Please check this Invoice detail, hit :back_link to edit the detail.',
'draft_del_confirm' => 'Are you sure to remove this Invoice Draft?', 'draft_del_confirm' => 'Are you sure to remove this Invoice Draft?',
'payment_instruction' => 'Payment can be transfered via our bank account(s):',
'thanks_text' => 'Thank you for using our services.',
// Attributes // Attributes
'number' => 'Invocie No.', 'number' => 'Invocie No.',

4
resources/lang/id/invoice.php

@ -21,7 +21,7 @@ return [
'create' => 'Input Invoice Baru', 'create' => 'Input Invoice Baru',
'save' => 'Simpan Invoice', 'save' => 'Simpan Invoice',
'created' => 'Input Invoice baru telah berhasil.', 'created' => 'Input Invoice baru telah berhasil.',
'show' => 'Detail Invoice',
'show' => 'Lihat Detail Invoice',
'edit' => 'Edit Invoice', 'edit' => 'Edit Invoice',
'update' => 'Update Invoice', 'update' => 'Update Invoice',
'updated' => 'Update data Invoice telah berhasil.', 'updated' => 'Update data Invoice telah berhasil.',
@ -38,6 +38,8 @@ return [
'item_removed' => 'Item berhasil dihapus.', 'item_removed' => 'Item berhasil dihapus.',
'confirm_instruction' => 'Silakan periksa rincian di bawah ini, jika belum sesuai, silakan klik :back_link.', 'confirm_instruction' => 'Silakan periksa rincian di bawah ini, jika belum sesuai, silakan klik :back_link.',
'draft_del_confirm' => 'Yakin ingin menghapus Draft Invoice ini?', 'draft_del_confirm' => 'Yakin ingin menghapus Draft Invoice ini?',
'payment_instruction' => 'Pembayaran dapat dilakukan melalui transfer ke rekening berikut:',
'thanks_text' => 'Terima kasih atas kerjasamanya.',
// Attributes // Attributes
'number' => 'No. Invoice', 'number' => 'No. Invoice',

2
resources/views/customers/invoices.blade.php

@ -29,7 +29,7 @@
[ [
'icon' => 'search', 'icon' => 'search',
'class' => 'btn btn-info btn-xs', 'class' => 'btn btn-info btn-xs',
'title' => 'Lihat ' . trans('invoice.show')
'title' => __('invoice.show'),
] ]
) !!} ) !!}
{!! html_link_to_route( {!! html_link_to_route(

4
resources/views/invoices/index.blade.php

@ -41,7 +41,7 @@
[ [
'icon' => 'search', 'icon' => 'search',
'class' => 'btn btn-info btn-xs', 'class' => 'btn btn-info btn-xs',
'title' => 'Lihat ' . trans('invoice.show')
'title' => __('invoice.show'),
] ]
) !!} ) !!}
{!! html_link_to_route( {!! html_link_to_route(
@ -62,7 +62,7 @@
<tr> <tr>
<th colspan="5" class="text-right">{{ trans('app.total') }}</th> <th colspan="5" class="text-right">{{ trans('app.total') }}</th>
<th class="text-right">{{ formatRp($invoices->sum('amount')) }}</th> <th class="text-right">{{ formatRp($invoices->sum('amount')) }}</th>
<th></th>
<th>&nbsp;</th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>

16
resources/views/invoices/partials/item-list.blade.php

@ -2,16 +2,15 @@
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">
{{ trans('invoice.items') }} {{ trans('invoice.items') }}
<small class="text-muted">({{ count($invoice->items) }} Item)</small>
</h3> </h3>
</div> </div>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>#</th>
<th>Deskripsi</th>
<th class="text-center">Biaya</th>
<th class="text-center">Action</th>
<th>{{ __('app.table_no') }}</th>
<th>{{ __('app.description') }}</th>
<th class="text-center">{{ __('invoice.item_amount') }}</th>
<th class="text-center">{{ __('app.action') }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -38,20 +37,19 @@
'currency' => Option::get('money_sign', 'Rp') 'currency' => Option::get('money_sign', 'Rp')
] ]
) !!} ) !!}
{{ Form::submit('Update', ['id' => 'update-item-'.$key, 'class' => 'btn btn-success btn-xs pull-right']) }}
{{ Form::submit(__('app.update'), ['id' => 'update-item-'.$key, 'class' => 'btn btn-success btn-xs pull-right']) }}
</td> </td>
{{ Form::close() }} {{ Form::close() }}
<td class="col-md-1 text-center show-on-hover-parent"> <td class="col-md-1 text-center show-on-hover-parent">
{!! FormField::delete([ {!! FormField::delete([
'route' => ['invoices.items.destroy', $invoice], 'route' => ['invoices.items.destroy', $invoice],
'onsubmit' => 'Yakin ingin menghapus Item ini?',
'class' => '', 'class' => '',
], 'x', ['id' => 'remove-item-'.$key, 'class' => 'btn btn-danger btn-xs show-on-hover','title' => 'Hapus item ini'], ['item_index' => $key]) !!}
], 'x', ['id' => 'remove-item-'.$key, 'class' => 'btn btn-danger btn-xs show-on-hover' ,'title' => __('invoice.item_remove')], ['item_index' => $key]) !!}
</td> </td>
</tr> </tr>
@endforeach @endforeach
<tr> <tr>
<th colspan="4">Tambah Item Invoice</th>
<th colspan="4">{{ __('invoice.add_item') }}</th>
</tr> </tr>
<tr> <tr>
{{ Form::open(['route' => ['invoices.items.store', $invoice]]) }} {{ Form::open(['route' => ['invoices.items.store', $invoice]]) }}

7
resources/views/invoices/pdf.blade.php

@ -129,16 +129,15 @@
@if ($invoice->notes) @if ($invoice->notes)
<tr style="vertical-align: top;"> <tr style="vertical-align: top;">
<td colspan="3"> <td colspan="3">
<p style="font-style: italic;"><strong>Catatan</strong> : {!! nl2br($invoice->notes) !!}</p>
<p style="font-style: italic;"><strong>{{ __('app.notes') }}</strong> : {!! nl2br($invoice->notes) !!}</p>
</td> </td>
</tr> </tr>
@endif @endif
{{-- TODO : Add dynamic bank account based on agency bank account. --}}
<tr style="vertical-align: top;"> <tr style="vertical-align: top;">
<td colspan="3"> <td colspan="3">
@empty ($bankAccounts) @empty ($bankAccounts)
@else @else
<p>Pembayaran dapat dilakukan melalui transfer ke rekening berikut:</p>
<p>{{ __('invoice.payment_instruction') }}</p>
@foreach ($bankAccounts as $key => $bankAccount) @foreach ($bankAccounts as $key => $bankAccount)
@php $bankAccount = (object) $bankAccount; @endphp @php $bankAccount = (object) $bankAccount; @endphp
<table style="border: 1px solid #ccc;width: 330px"> <table style="border: 1px solid #ccc;width: 330px">
@ -150,7 +149,7 @@
@endforeach @endforeach
@endempty @endempty
<p>Terima kasih atas kerjasamanya.</p>
<p>{{ __('invoice.thanks_text') }}</p>
</td> </td>
</tr> </tr>
<tr> <tr>

21
resources/views/projects/invoices.blade.php

@ -42,12 +42,27 @@
<td>{{ $project->customer->nameLink() }}</td> <td>{{ $project->customer->nameLink() }}</td>
<td class="text-right">{{ formatRp($invoice->amount) }}</td> <td class="text-right">{{ formatRp($invoice->amount) }}</td>
<td class="text-center"> <td class="text-center">
{!! html_link_to_route('invoices.show', '', [$invoice->number], ['class' => 'btn btn-info btn-xs','icon' => 'search','title' => 'Lihat ' . trans('invoice.show')]) !!}
{!! html_link_to_route('invoices.pdf', '', [$invoice->number], ['class' => 'btn btn-default btn-xs','icon' => 'print','title' => trans('invoice.print'), 'target' => '_blank']) !!}
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
[
'class' => 'btn btn-info btn-xs',
'icon' => 'search',
'title' => __('invoice.show'),
]
) !!}
{!! html_link_to_route(
'invoices.pdf', '', [$invoice->number],
[
'class' => 'btn btn-default btn-xs',
'icon' => 'print',
'title' => __('invoice.print'),
'target' => '_blank'
]
) !!}
</td> </td>
</tr> </tr>
@empty @empty
<tr><td colspan="6">{{ trans('invoice.empty') }}</td></tr>
<tr><td colspan="7">{{ trans('invoice.empty') }}</td></tr>
@endforelse @endforelse
</tbody> </tbody>
<tfoot> <tfoot>

Loading…
Cancel
Save