@extends('layouts.app') @section('content') @permission('customer-charge-create')

Customer : {{ $customer->name }}

@if(Session::has('flash_message'))

{{ Session::get('flash_message') }}

@endif


Charges Records
@foreach($charge as $item) @endforeach
@php $sum = 0; @endphp @foreach($charge as $c) @if($c->currency == 'USD') @php $sum += $c->amount; @endphp @endif @endforeach @php $sum1 = 0; @endphp @foreach($charge as $c) @if($c->currency == 'MZM') @php $sum1 += $c->amount; @endphp @endif @endforeach @php $sum2 = 0; @endphp @foreach($charge as $c) @if($c->currency == 'ZAR') @php $sum2 += $c->amount; @endphp @endif @endforeach USD : {{ $sum }} | MZM : {{ $sum1 }} | ZAR : {{ $sum2 }}
Charge Unit Amount Currency Remark Actions
{{ $item->charge['name'] }} {{ $item->unit }} {{ $item->amount }} {{ $item->currency }} {{ $item->remark }} {!! Form::open([ 'method'=>'DELETE', 'url' => ['/admin/customer/charge', $item->id , $customer->id], 'style' => 'display:inline' ]) !!} {!! Form::button(' ', array( 'type' => 'submit', 'class' => 'btn red btn-xs', 'title' => 'Delete Charge', 'onclick'=>'return confirm("Confirm delete?")' )) !!} {!! Form::close() !!}
@endpermission @endsection