@extends('index') @section('content')

{{ isset($process) ? 'Process Material' : 'Purchase' }} Info

Back @if(!$purchase['has_received']) @if(isset($process)) Edit @else Edit @endif @endif Receive Pay
Name: {{$purchase['fname']}}
Phone: {{$purchase['phone1']}}
Address: {{$purchase['address']}}
P.O.#: {{$purchase['purchase_no']}}
Job.#: {{($purchase['job_no'])? $purchase['job_no']:'Default Purchase'}}
{{ isset($process) ? 'Processing' : 'Purchase' }} Date: {{\Carbon\Carbon::parse($purchase['purchase_date'])->format('d-m-Y')}}
Required Date: {{\Carbon\Carbon::parse($purchase['require_date'])->format('d-m-Y')}}
{{-- Purchase --}}
@if(!isset($process)) @if($purchaseItem->count()) @foreach($purchaseItem as $item) @endforeach @endif @php $total = $purchaseItem->sum(function($item) { return $item->quantity * $item->price; }); @endphp
Sr. Material / Product Units / Size Quantity Rate Amount
{{$loop->index + 1}} @if($purchase['purchase_type'] == 'material') {{ $item->material_no ?? '' }} @else {{ $item->article_no ?? '' }} - {{ $item->sname ?? '' }} @endif {{$item->hname}} {{number_format($item->quantity)}} {{number_format($item->price)}} {{number_format($item->quantity * $item->price)}}
Grand Total: {{ number_format($total) }}
@else @if($purchaseItem->count()) @foreach($purchaseItem as $item) @endforeach @endif @php $total = $purchaseItem->sum(function($item) { return $item->quantity * $item->price; }); @endphp
Sr. Material A Material B Quantity A Quantity B Rate Amount
{{$loop->index + 1}} {{$item->pmaterial_no}} - {{$item->pname}} {{$item->material_no}} - {{$item->name}} {{number_format($item->before_qty)}} {{$item->phname}} {{number_format($item->quantity)}} {{$item->hname}} {{number_format($item->price)}} {{number_format($item->quantity * $item->price)}}
Grand Total: {{ number_format($total) }}
@endif
{{-- Receive All --}}
@if($receiveSum->isEmpty()) @endif @if($receiveSum->count()) @foreach($receiveSum as $item) @endforeach @endif
Sr. Material / Product Units / Size Order Qty Receive Qty Return Qty Remaining Action
No data available in table
{{$loop->index + 1}} @if($purchase['purchase_type'] == 'material') {{ $item->material_no ?? '' }} - {{ $item->name ?? '' }} @else {{ $item->article_no ?? '' }} - {{ $item->sname ?? '' }} @endif {{$item->hname}} {{$item->quantity}} {{$item->rqty}} {{ $item->rqty2 ?? '0' }} {{$item->quantity - $item->rqty + $item->rqty2}}
Sr. Material / Product Units Order Qty Receive Qty Return Qty Remaining Action
{{-- Paymetnt Record --}}
@if($transaction->isEmpty()) @endif @php $total2 = 0; @endphp @if($transaction->count()) @foreach($transaction as $item) @php $total2 += $item->credit ; @endphp @endforeach @endif
Sr. Amount Paid Date Action
No data available in table
{{$loop->index + 1}} {{number_format($item->credit)}} {{\Carbon\Carbon::parse($item->transaction_date)->format('d-m-Y')}} View
Total: {{ number_format($total) }} | Paid: {{ number_format($total2) }} Remaining: {{ number_format($total - $total2) }}
{{-- Receive Times --}} @if($count >= 1) @for($i=1; $i<=$count; $i++) @php $loopIndex = 1; @endphp
Edit {{-- --}} @foreach($receiveAll as $item) @if($receiveTimes[$i-1]['receive_no'] == $item->receive_no) {{-- --}} @endif @endforeach {{-- --}}
Sr. Material / Product Units Receive Qty Pending Approved RejectedInspection StatusInspection Date
{{$loopIndex++}} @if($purchase['purchase_type'] == 'material') {{ $item->material_no ?? '' }} - {{ $item->name ?? '' }} @else {{ $item->article_no ?? '' }} - {{ $item->sname ?? '' }} @endif {{$item->hname}} {{$item->rqty}} {{$item->pending_qty}} {{$item->approved_qty}} {{$item->rejected_qty}}@if($item->inspection_status == 1) Pending @elseif($item->inspection_status == 2) Approved @else Rejected @endif{{\Carbon\Carbon::parse($item->inspection_date)->format('d-m-Y')}}
Sr. Material / Product Units Receive Qty Pending Approved RejectedInspection StatusInspection Date
@endfor @endif {{-- Return Times --}} @if($count2 >= 1) @for($i=1; $i<=$count2; $i++) @php $loopIndex = 1; @endphp
Edit @foreach($returnAll as $item) @if($returnTimes[$i-1]['return_no'] == $item->return_no) @endif @endforeach
Sr. Material / Product Units Return Qty Remarks
{{$loopIndex++}} @if($purchase['purchase_type'] == 'material') {{ $item->material_no ?? '' }} - {{ $item->name ?? '' }} @else {{ $item->article_no ?? '' }} - {{ $item->sname ?? '' }} @endif {{$item->hname}} {{$item->rqty}} {{$item->remarks}}
Sr. Material / Product Units Return Qty Remarks
@endfor @endif
@if($purchaseItem->count()) @foreach($purchaseItem as $purchase) @endforeach @endif @endsection