Add New Voucher Request

{{ $new_code }}

Request List

@if(is_array($voucher_request) || is_object($voucher_request)) @forelse($voucher_request as $list) @php $users = App\Models\Users_model::where('id', $list->created_by)->first(); $total_vouchers = App\Models\Voucher_request_detail_model::where('id_voucher_request', $list->id)->sum('qty'); $voucher_request_detail = App\Models\Voucher_request_detail_model::where('id_voucher_request', $list->id)->get(); $total = 0; foreach($voucher_request_detail as $detail) { $detail_total = $detail->qty * $detail->amount; $total += $detail_total; } $campaign = App\Models\Campaign_model::where("id", $list->id_campaign)->first(); if(!empty($list->needed_approval_by)) { $approvers = explode(",", $list->needed_approval_by); $approvers_name = []; foreach($approvers as $id) { $user_approver = App\Models\Users_model::where('id', $id)->first(); array_push($approvers_name, $user_approver->name); // $final_name = implode(", ", $approvers_name); } } // if($total == 0) { // $final_name = "-"; // } @endphp @if($list->type == 1) @elseif($list->type == 2) @endif @if($campaign) @else @endif @php if($list->status == 0) { $status = "Pending"; } if($list->status == 1) { $status = "Approved"; } if($list->status == -1) { $status = "Reject"; } @endphp @empty @endforelse @endif
ID Request Code Voucher Type Total Vouchers Grand Total Valid Until Created by Status Approvers Notes Add vouchers to Request
{{ $list->id }} {{ $list->rv_code }} {{ ($list->type == 1) ? "Gramasi" : "Nominal" }}{{ $total_vouchers }} pcs{{ number_format($total, 4) }} gramRp. {{ number_format($total, 2) }}{{ $campaign->berlaku_sampai }}-{{ $users ? $users->name : 'LAKUSHOP' }}{{ $status }} {{-- @if ($final_name) {{ $final_name }} @else --}} - {{-- @endif --}} {{ $list->notes }}
No Data
@if($voucher_request) {{ $voucher_request->appends($_GET)->links("pagination::bootstrap-4") }} @endif