@if(isset($purchase_orders[0]))
@if($print)
Purchase Orders
{{$company->company_name}}
Address: {{$company->company_address}}, {{$company->city}}, Tanzania
Mob: {{$company->compny_phone}}
Email: {{$company->company_email}}
VENDOR SUMMARY
{{($vendor)?$vendor: ''}}
@if($from != "" && $to != "")
FROM {{\Carbon\Carbon::parse($from)->toFormattedDateString()}}
TO {{\Carbon\Carbon::parse($to)->toFormattedDateString()}}
@elseif($from != "" && $to == "")
FROM {{\Carbon\Carbon::parse($from)->toFormattedDateString()}}
TO {{\Carbon\Carbon::parse(date("Y/m/d"))->toFormattedDateString()}}
@elseif($from == "" && $to != "")
AS OF {{\Carbon\Carbon::parse($to)->toFormattedDateString()}}
@else
AS OF {{\Carbon\Carbon::parse(date('Y-m-d'))->toFormattedDateString()}}
@endif
S/N |
Month |
Currency |
Amount |
{{--*/ $total_amount = 0 /*--}}
@foreach($purchase_orders as $index=>$purchase_order)
{{--*/ $total_amount += $purchase_order->total_amount /*--}}
{{ ++$index}} |
{{ \Carbon\Carbon::parse($purchase_order->min_date)->format('M - Y')}} |
{{$purchase_order->currency == 'USD' ? '$' : ($purchase_order->currency == 'TSH' ? 'Tsh' : '')}} |
{{number_format($purchase_order->total_amount, 2)}} |
@endforeach
TOTAL |
{{number_format($total_amount, 2)}} |
@else
S/N |
Month |
Currency |
Amount |
{{--*/ $total_amount = 0 /*--}}
@foreach($purchase_orders as $index=>$purchase_order)
{{--*/ $total_amount += $purchase_order->total_amount /*--}}
{{ ++$index}} |
{{ \Carbon\Carbon::parse($purchase_order->min_date)->format('M - Y')}} |
{{$purchase_order->currency == 'USD' ? '$' : ($purchase_order->currency == 'TSH' ? 'Tsh' : '')}} |
{{number_format($purchase_order->total_amount, 2)}} |
@endforeach
TOTAL |
{{number_format($total_amount, 2)}} |
@endif
@else
Information Not Available.!!
@endif