@switch($type)
@case("invoice")
@case("cashInvoice")
@case("chequeInvoice")
@php
$isAdminOrMdaAdmin = auth()->user()->hasRole('Super Administrator')
|| auth()->user()->hasRole("MDA Admin");
$today = date_create(date("d-m-Y"));
$diff = date_diff($today, date_create($resource["created_at"]))->format("%a");
@endphp
Print
Send
{{-- data-target="#msgModal" exists in the parent component (Invoice listing) --}}
@if ($type === 'invoice')
{{-- Only render this in invoicelisting page alone --}}
@if ($resource["payment_status"] == 0 && $resource["payment_type"]== "bank"
&& count(explode(",", $resource["service"])) == 1)
Requery
@endif
@endif
@if (($isAdminOrMdaAdmin) && $resource["payment_status"] != 1)
@if (intval($diff) >= 7 || empty($resource["transaction_reference"]))
{{-- Delete --}}
@endif
@endif
@break
@case("remittance")
Print
View Invoices
@break
@default
@endswitch