@extends('layouts.app') @section('content-header')
@if(!$invoice->id) {{ Breadcrumbs::render('transactions-form', 'Create new', '') }}

Create Transactions

@else {{ Breadcrumbs::render('transactions-form', $invoice->bill_no, $invoice->id) }}

Edit Transactions

@endif
@endsection @section('content') @if(!$invoice->id) {!! Form::model($invoice, [ 'method' => 'POST', 'route' => ['transactions.store'], 'role' => 'form'])!!} @else {!! Form::model($invoice, [ 'method' => 'PUT', 'route' => ['transactions.update', $invoice->id], 'role' => 'form'])!!} @endif
@if (count($errors) > 0)
Whoops! There were some problems with your input.

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if ($message = Session::get('fail'))
Whoops! There were some problems with your input.

{{ $message }}
@endif
{!! Form::label('lblStore', 'Store'); !!} {{ Form::select( 'txtStore', $stores, $invoice->store_id, [ 'class' => 'chosen-select form-control', 'data-placeholder' => 'Select Store ...' ] ) }} @if ($errors->has('txtStore'))

{{$errors->first('txtStore')}}

@endif
{!! Form::label('lblTransactionNo', 'Transaction No'); !!} {!! Form::text('txtInvoiceNo', $invoice->inv_no, ['id' => 'txtInvoiceNo', 'class' => 'form-control', 'placeholder' => 'Transaction No']); !!} @if ($errors->has('txtInvoiceNo'))

{{$errors->first('txtInvoiceNo')}}

@endif
{!! Form::label('lblBillNo', 'Bill No'); !!} {!! Form::text('txtBillNo', $invoice->bill_no, ['id' => 'txtBillNo', 'class' => 'form-control', 'placeholder' => 'Bill No']); !!} @if ($errors->has('txtBillNo'))

{{$errors->first('txtBillNo')}}

@endif
{!! Form::label('lblDate', 'Transaction Date (dd/mm/yyyy)'); !!} {!! Form::text('txtDate', empty($invoice->date_added) ? '' : date('d/m/Y', strtotime($invoice->date_added)), ['class' => 'form-control date', 'placeholder' => 'Transaction Date', 'maxlength' => 10, 'data-provide' => 'datepicker']); !!} @if ($errors->has('txtDate'))

{{$errors->first('txtDate')}}

@endif
{!! Form::label('lblClerk', 'Clerk ID'); !!} {!! Form::text('txtClerkId', $invoice->clerk_id, ['id' => 'txtClerkId', 'class' => 'form-control', 'placeholder' => 'Clerk ID']); !!} @if ($errors->has('txtClerkId'))

{{$errors->first('txtClerkId')}}

@endif
{!! Form::label('lblMembershipNo', 'Membership No'); !!} {!! Form::text('txtMembershipNo', (isset($invoice->customer)) ? $invoice->customer->membership_no : '', ['class' => 'form-control', 'placeholder' => 'Membership No', 'id' => 'txtMembershipNo']); !!} @if ($errors->has('txtMembershipNo'))

{{$errors->first('txtMembershipNo')}}

@endif
{!! Form::label('lblMemberName', 'Member Name'); !!} {!! Form::text('txtMemberName', null, ['id' => 'txtMemberName', 'class' => 'form-control', 'placeholder' => 'Member Name', 'readonly' => 'readonly']); !!}
{!! Form::label('lblLastVisit', 'Last Visit'); !!} {!! Form::text('txtLastVisit', null, ['id' => 'txtLastVisit', 'class' => 'form-control', 'placeholder' => 'Member Name', 'readonly' => 'readonly']); !!}
{!! Form::label('lblCurrentPoints', 'Current Points'); !!} {!! Form::text('txtCurrentPoint', null, ['id' => 'txtCurrentPoint', 'class' => 'form-control', 'placeholder' => 'Current Points', 'readonly' => 'readonly']); !!}
Payment Details
{!! Form::label('lblPayment1', (empty($media[0]['name']) ? 'Media 1' : $media[0]['name'])); !!} {!! Form::text('txtPayment1', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment1'))

{{$errors->first('txtPayment1')}}

@endif
{!! Form::label('lblPayment2', (empty($media[1]['name']) ? 'Media 2' : $media[1]['name'])); !!} {!! Form::text('txtPayment2', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment2'))

{{$errors->first('txtPayment2')}}

@endif
{!! Form::label('lblPayment3', (empty($media[2]['name']) ? 'Media 3' : $media[2]['name'])); !!} {!! Form::text('txtPayment3', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment3'))

{{$errors->first('txtPayment3')}}

@endif
{!! Form::label('lblPayment4', (empty($media[3]['name']) ? 'Media 4' : $media[3]['name'])); !!} {!! Form::text('txtPayment4', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment4'))

{{$errors->first('txtPayment4')}}

@endif
{!! Form::label('lblPayment5', (empty($media[4]['name']) ? 'Media 5' : $media[4]['name'])); !!} {!! Form::text('txtPayment5', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment5'))

{{$errors->first('txtPayment5')}}

@endif
{!! Form::label('lblPayment6', (empty($media[5]['name']) ? 'Media 6' : $media[5]['name'])); !!} {!! Form::text('txtPayment6', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment6'))

{{$errors->first('txtPayment6')}}

@endif
{!! Form::label('lblPayment7', (empty($media[6]['name']) ? 'Media 7' : $media[6]['name'])); !!} {!! Form::text('txtPayment7', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment7'))

{{$errors->first('txtPayment7')}}

@endif
{!! Form::label('lblPayment8', (empty($media[7]['name']) ? 'Media 8' : $media[7]['name'])); !!} {!! Form::text('txtPayment8', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment8'))

{{$errors->first('txtPayment8')}}

@endif
{!! Form::label('lblPayment9', (empty($media[8]['name']) ? 'Media 9' : $media[8]['name'])); !!} {!! Form::text('txtPayment9', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment9'))

{{$errors->first('txtPayment9')}}

@endif
{!! Form::label('lblPayment10', (empty($media[9]['name']) ? 'Media 10' : $media[9]['name'])); !!} {!! Form::text('txtPayment10', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment10'))

{{$errors->first('txtPayment10')}}

@endif
{!! Form::label('lblPayment11', (empty($media[10]['name']) ? 'Media 11' : $media[10]['name'])); !!} {!! Form::text('txtPayment11', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment11'))

{{$errors->first('txtPayment11')}}

@endif
{!! Form::label('lblPayment12', (empty($media[11]['name']) ? 'Media 12' : $media[11]['name'])); !!} {!! Form::text('txtPayment12', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment12'))

{{$errors->first('txtPayment12')}}

@endif
{!! Form::label('lblPayment13', (empty($media[12]['name']) ? 'Media 13' : $media[12]['name'])); !!} {!! Form::text('txtPayment13', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment13'))

{{$errors->first('txtPayment13')}}

@endif
{!! Form::label('lblPayment14', (empty($media[13]['name']) ? 'Media 14' : $media[13]['name'])); !!} {!! Form::text('txtPayment14', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment14'))

{{$errors->first('txtPayment14')}}

@endif
{!! Form::label('lblPayment15', (empty($media[14]['name']) ? 'Media 15' : $media[14]['name'])); !!} {!! Form::text('txtPayment15', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment15'))

{{$errors->first('txtPayment15')}}

@endif
{!! Form::label('lblPayment16', (empty($media[15]['name']) ? 'Media 16' : $media[15]['name'])); !!} {!! Form::text('txtPayment16', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment16'))

{{$errors->first('txtPayment16')}}

@endif
{!! Form::label('lblPayment17', (empty($media[16]['name']) ? 'Media 17' : $media[16]['name'])); !!} {!! Form::text('txtPayment17', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment17'))

{{$errors->first('txtPayment17')}}

@endif
{!! Form::label('lblPayment18', (empty($media[17]['name']) ? 'Media 18' : $media[17]['name'])); !!} {!! Form::text('txtPayment18', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment18'))

{{$errors->first('txtPayment18')}}

@endif
{!! Form::label('lblPayment19', (empty($media[18]['name']) ? 'Media 19' : $media[18]['name'])); !!} {!! Form::text('txtPayment19', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment19'))

{{$errors->first('txtPayment19')}}

@endif
{!! Form::label('lblPayment20', (empty($media[19]['name']) ? 'Media 20' : $media[19]['name'])); !!} {!! Form::text('txtPayment20', null, ['class' => 'form-control', 'placeholder' => 'Amount']); !!} @if ($errors->has('txtPayment20'))

{{$errors->first('txtPayment20')}}

@endif
{!! Form::submit('Submit', ['class' => 'btn btn-primary'])!!} {!! link_to_route('transactions.index', 'Cancel', null, ['class' => 'btn btn-danger']) !!}
{!! Form::close() !!} @endsection @include('_components.scripts.form')