{{ trans('invoice.items') }} ({{ $draft->getItemsCount() }} Item)

@foreach($draft->items() as $key => $item) {{ Form::open(['route' => ['invoice-drafts.update-draft-item', $draft->draftKey], 'method' => 'patch']) }} {{ Form::hidden('item_key['.$key.']', $key) }} {{ Form::close() }} @endforeach {{ Form::open(['route' => ['invoice-drafts.add-draft-item', $draft->draftKey]]) }} {{ Form::close() }}
# Deskripsi Biaya Action
{{ $no }} {!! FormField::textarea( 'description['.$key.']', ['id' => 'description-'.$key, 'value' => $item->description, 'label' => false] ) !!} {!! FormField::price( 'amount['.$key.']', ['id' => 'amount-'.$key, 'value' => $item->amount, 'label' => false] ) !!} {{ Form::submit('Update', ['id' => 'update-item-'.$key, 'class' => 'btn btn-success btn-xs pull-right']) }} {!! FormField::delete([ 'route' => ['invoice-drafts.remove-draft-item', $draft->draftKey], 'onsubmit' => 'Yakin ingin menghapus Item ini?', 'class' => '', ], 'x', ['id' => 'remove-item-'.$key, 'class' => 'btn btn-danger btn-xs show-on-hover','title' => 'Hapus item ini'], ['item_index' => $key]) !!}
Tambah Item Invoice
{!! FormField::textarea( 'new_item_description', ['id' => 'new_item_description', 'label' => false, 'placeholder' => trans('invoice.item_description')] ) !!} {!! FormField::price( 'new_item_amount', ['id' => 'new_item_amount', 'label' => false, 'placeholder' => trans('invoice.item_amount')] ) !!} {{ Form::submit(trans('invoice.add_item'), ['class' => 'btn btn-primary btn-block']) }}
{{ trans('invoice.amount') }} : {{ formatRp($draft->getTotal()) }}