@extends('admin.layout.master') @section('title','Comparative Statement') @section('custom_style') @endsection @section ('content')
| # | PRODUCT | REQ. QTY |
@forelse ($quotations as $a=>$quotation)
@if(count($purchaseOrders)==0) @endif {{-- --}} | @php $amount[$quotation->id]=0; $tr.='Qty | Rate | Total | '; @endphp @empty @endforelseNote | ||
|---|---|---|---|---|---|---|---|---|---|
| {{ ($p++) }} | {{ $item->product->name_eng }} | {{ $item->quantity }} | @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){{ $product->first()->quantity }} | {{ $product->first()->rate }} | @php $amount[$quotation->id]+=($product->first()->quantity*$product->first()->rate); @endphp{{ ($product->first()->quantity*$product->first()->rate) }} | @endif @empty @endforelse{{ $item->note }} | |||
| Total : | @forelse ($quotations as $a=>$quotation){{$amount[$quotation->id]}} | @empty @endforelse||||||||
| Discount : | @forelse ($quotations as $a=>$quotation){{$quotation->discount.'%'}} | {{($amount[$quotation->id]*($quotation->discount/100))}} | @empty @endforelse|||||||