@extends('layouts.admin') @section('title', 'Voucher Report') @section('content-header', 'Voucher Report') @section('content')
@php $i = 0; $k = 0; $total_success = 0; $total_failed = 0; $total_overall = 0; $today = date('Y-m-d H:i:s'); $by = auth()->user()->getFullname(); @endphp @if($type == 'used') @endif @foreach($data as $vou) @if($type == 'used') @endif @if($type == 'used') @foreach($data3[$i] as $key) @if($key->sku_id != '') @else @if($key->cancel_flag == '0') @php $total_success += $vou->voucher_amt; @endphp @else @php $total_failed += $vou->voucher_amt; @endphp @endif @endif @endforeach @endif @php $total_overall += $vou->voucher_amt; $i++; @endphp @endforeach @if($type == 'used') @else @endif @if($type == 'used') @endif *All Calculation is Based on Voucher Data, Not Receipt

{{$title}} || Printed on {{$today}} by {{$by}}

Voucher Code Remark Receipt Number Amount (RM) Expiry DateUsed Date Used Outlet Counter No Receipt Status
{{ (string)$vou->voucher_code }} {{ $vou->Remark }} {{ $vou->voucher_amt }} {{ $vou->exp_date }}{{ $vou->tran_date }} {{ $vou->oid }} {{ $vou->reg }}
{{ $data2[$i] }} {{ $key->sku_id }} || {{ $key->sku_desc }} @if ($key->cancel_flag == 0) Success @elseif ($key->cancel_flag == 1) Cancelled @endif
TOTAL USED VOUCHERTOTAL AVAILABLE VOUCHER {{$i}}
TOTAL WITH SUCCEED RECEIPT(RM) {{ $total_success }}
TOTAL WITH CANCELLED RECEIPT(RM) {{$total_failed}}
TOTAL USED AMOUNT (RM) {{ $total_overall }}

@endsection @section('js') @endsection