@extends('layouts.acc_layout') @section('title', '| Add Vehicle Allowance Auto Voucher') @section('stylesheets') @endsection @section('content')
Add Vehicle Allowance Auto Voucher
@php $company = DB::table('gnr_company')->where('id', Auth::user()->company_id_fk)->select('name','address')->first(); @endphp
{{ $company->name}}
{{$company->address}}
Branch: {{ $monthlyLog->branchCodeWith0}} - {{ $monthlyLog->branchName}}
Designation: {{ $monthlyLog->designation }}
Employee: {{ substr($monthlyLog->empId, 0, 5)}} - {{ $monthlyLog->empName}}
Allowance Month: {{ $voucherMonth }}


{!! Form::open(array('url' => '', 'role' => 'form', 'class'=>'form-horizontal form-groups')) !!}
{!! Form::label('voucherDate', 'Voucher Date:', ['class' => 'col-sm-1 control-label']) !!}
{!! Form::text('voucherDate', date('d-m-Y', strtotime($voucherDate)), ['class' => 'form-control', 'style'=>'cursor:pointer', 'readonly'])!!}

{{ Form::hidden("logId", $monthlyLog->id) }} {{ Form::hidden("employeeIdWithName", substr($monthlyLog->empId, 0, 5) . '-' . $monthlyLog->empName) }} {{ Form::hidden("employeeId", $monthlyLog->employeeIdFk) }} {{ Form::hidden("branchIdFk", $monthlyLog->branchIdFk) }} {{ Form::hidden("companyIdFk", $monthlyLog->companyIdFk) }} {{ Form::hidden("projectIdFk", $monthlyLog->projectIdFk) }} {{ Form::hidden("projectTypeIdFk", $monthlyLog->projectTypeIdFk) }} {{ Form::hidden("voucherMonth", $voucherMonth) }} {{ Form::hidden("voucherDate", $voucherDate) }} {{ Form::hidden("localNarration", $voucherConfig->localNarration) }} {{ Form::hidden("globalNarration", $voucherConfig->globalNarration) }} {{ Form::hidden("creditLedgerCodeIdFk", $voucherConfig->creditLedgerIdFk) }} {{ Form::hidden("fuelDebitLedgerCodeIdFk", $voucherConfig->fuelDebitLedgerCodeIdFk) }} {{ Form::hidden("maintenanceDebitLedgerCodeIdFk", $voucherConfig->maintenanceDebitLedgerCodeIdFk) }} {{ Form::hidden("fuelCost", $monthlyLog->fuelCost) }} {{ Form::hidden("mobilCost", $monthlyLog->mobilCost) }} {{ Form::hidden("servicingCost", $monthlyLog->servicingCost) }} @php $creditLedger = DB::table('acc_account_ledger')->where('id', $voucherConfig->creditLedgerIdFk)->selectRaw("CONCAT(code, ' - ', name) AS account")->value('account'); $fuelDebitLedger = DB::table('acc_account_ledger')->where('id', $voucherConfig->fuelDebitLedgerCodeIdFk)->selectRaw("CONCAT(code, ' - ', name) AS account")->value('account'); $maintenanceDebitLedger = DB::table('acc_account_ledger')->where('id', $voucherConfig->maintenanceDebitLedgerCodeIdFk)->selectRaw("CONCAT(code, ' - ', name) AS account")->value('account'); @endphp
@php $maintenanceCost = $monthlyLog->mobilCost + $monthlyLog->servicingCost; $destinationPath = public_path('uploads/vehicleAllowanceMonthlyLog/'); $filePath = $destinationPath . '/' . $monthlyLog->logBookImage; @endphp
Dr Account Cr Account Amount Narration Log Book Image
{{$fuelDebitLedger}} {{$creditLedger}} {{ number_format($monthlyLog->fuelCost)}} {{$voucherMonth}}  
{{$maintenanceDebitLedger}} {{$creditLedger}} {{ number_format($maintenanceCost)}} {{$voucherMonth}}
Total: {{ number_format($monthlyLog->totalAmount)}}
{!! Form::submit('Save', ['id' => 'saveButton', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}
@endsection