@extends('layouts.portal.app') @section('content')
# | Customer | Period | Amount | @hasrole('Administrator')Date Created | @endhasrole @if($status == 0)Actions | @endif
---|---|---|---|---|---|
#{{ $companyCustomerInvoice->ref_no }} @if($companyCustomerInvoice->RemainingAmount > 0) @endif |
{{ $companyCustomerInvoice->companyCustomer? $companyCustomerInvoice->companyCustomer->names: '' }}
@if($companyCustomerInvoice->companyCustomer && $companyCustomerInvoice->companyCustomer->phone != "") {{ $companyCustomerInvoice->companyCustomer? $companyCustomerInvoice->companyCustomer->phone: '' }} @endif |
{{ \Carbon\Carbon::parse($companyCustomerInvoice->from_date)->format('d M Y') }} To {{ \Carbon\Carbon::parse($companyCustomerInvoice->to_date)->format('d M Y') }} |
Expected: Tsh {{ number_format($companyCustomerInvoice->amount) }} Bal: Tsh {{ number_format($companyCustomerInvoice->RemainingAmount, 2) }} |
@hasrole('Administrator')
{{ \Carbon\Carbon::parse($companyCustomerInvoice->created_at)->format('d M Y') }} | @endhasrole @if($status == 0)@if($companyCustomerInvoice->RemainingAmount > 0 && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Invoices.record_payments'))) @endif @if($companyCustomerInvoice->RemainingAmount > 0 && \Carbon\Carbon::parse($companyCustomerInvoice->created_at)->isCurrentMonth() && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Invoices.edit'))) @endif @if(count($companyCustomerInvoice->companyCustomerInvoicePayments) == 0 && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Invoices.delete'))) @endif | @endif