@extends('admin.layout.master') @section('title','Comparative Statement') @section('custom_style') @endsection @section ('content')

Comparative Statement

{{-- end --}}
@csrf @php $tr=''; $purchaseOrders=$quotations->pluck('purchaseOrders')->flatten(1); //dd(count($purchaseOrders->flatten(1))==0); @endphp @forelse ($quotations as $a=>$quotation) @php $amount[$quotation->id]=0; $tr.=''; @endphp @empty @endforelse {!! $tr.'' !!} @php $p=1; @endphp @forelse ($requisition->details as $i=>$item) @forelse ($quotations as $k=>$quotation) @php // $product= $quotation->where('product_id',$item->product_id)->where('product_id',$item->product_id); $product= $quotation->details->where('product_id',$item->product_id); @endphp @if(count($product)>0) @php $amount[$quotation->id]+=($product->first()->quantity*$product->first()->rate); @endphp @endif @empty @endforelse @empty @endforelse @forelse ($quotations as $a=>$quotation) @empty @endforelse @forelse ($quotations as $a=>$quotation) @empty @endforelse
# PRODUCT REQ.
QTY
@if(count($purchaseOrders)==0) @endif {{-- --}} QtyRateTotalNote
{{ ($p++) }} {{ $item->product->name_eng }} {{ $item->quantity }} {{ $product->first()->quantity }} {{ $product->first()->rate }}{{ ($product->first()->quantity*$product->first()->rate) }}{{ $item->note }}
Total : {{$amount[$quotation->id]}}
Discount : {{$quotation->discount.'%'}} {{($amount[$quotation->id]*($quotation->discount/100))}}

@include('inventory.prepurchase.requisition.requisition_details_modal') @endsection @section('script') @stop