@extends('layouts.master') @section('title','Manage Requisition - Purcahse Requisition') @section('content')
{{--

Comparative Statement according to Quotation

--}}

{{ unit_name() ?? app_info()->company_name }}

Industrial estate
Chittagong
Comparative Statement according to Quotation
{{--

Purchase Order Date: {{ \Carbon\Carbon::now()->format('Y/m/d')}}

--}}

{{-- requisition lists start --}}
{{-- Group By Quotation start --}}

Purchase Requisition : {{ $requisition->id }}, Dt - {{ date('d-m-Y', strtotime($requisition->created_at)) }}

Date : {{ \Carbon\Carbon::parse($requisition->created_at)->format('d-m-Y')}}


@php $counterStopAfterThirdSuppliername = 0; @endphp @foreach($suppliers as $sup=>$supplier) @php $counterStopAfterThirdSuppliername++ @endphp {{-- @if($counterStopAfterThirdSuppliername == 3) @break @endif --}} @endforeach @if($requisition->purchased_status == 1) @foreach($products as $productskey=>$cs) @foreach($suppliers as $sup=>$supplier) @php $pricing = App\QuotationProduct::where('supplier_id', $sup)->where('requisition_product_id',$productskey)->first(); $purchase_product = App\PurchaseProduct::where('quotation_id',$pricing->id)->first(); @endphp @if(isset($purchase_product->id)) @endif @endforeach @endforeach @else @foreach($suppliers as $sup=>$supplier) @endforeach @endif {{-- @php $counterStopAfterThirdSuppliername = 0; @endphp @foreach($suppliers as $sup=>$supplier) @php $counterStopAfterThirdSuppliername++ @endphp @if($counterStopAfterThirdSuppliername == 3) @break @endif @endforeach --}} @php $i =0; $count = 0; @endphp @if($requisition->purchased_status == 1) @foreach($products as $productskey=>$cs) @if($count == 0) {{-- --}} {{-- --}} @php $counterStopAfterThirdSupplier = 0; @endphp @foreach($suppliers as $sup=>$supplier) @php $counterStopAfterThirdSupplier++; // $pricing = \App\QuotationProduct::where('requisition_id',$requisition->id)->where('supplier_id',$supplier[0]->supplier_id)->where('requisition_product_id',$cs[$count]->requisition_product_id)->orderBy('price')->first(); $pricing = App\QuotationProduct::where('supplier_id', $sup)->where('requisition_product_id',$productskey)->first(); $purchase_product = App\PurchaseProduct::where('quotation_id',$pricing->id)->first(); @endphp {{-- product pricing show according to supplier start --}} {{-- @foreach($pricing as $price) --}} @if(isset($purchase_product->id)) @else @endif {{-- @endforeach --}} {{-- product pricing show according to supplier End --}} @if($counterStopAfterThirdSupplier == 3) @break @endif @endforeach @endif @endforeach @else @foreach($products as $productskey=>$cs) @if($count == 0) {{-- --}} {{-- --}} @php $counterStopAfterThirdSupplier = 0; @endphp @foreach($suppliers as $sup=>$supplier) @php $counterStopAfterThirdSupplier++; $pricing = App\QuotationProduct::where('supplier_id', $sup)->where('requisition_product_id',$productskey)->first()->price; @endphp {{-- product pricing show according to supplier start --}} {{-- @foreach($pricing as $price) --}} {{-- @endforeach --}} {{-- product pricing show according to supplier End --}} {{-- @if($counterStopAfterThirdSupplier == 3) @break @endif --}} @endforeach @endif @endforeach @endif
Supplier Name> {{ \App\Supplier::find($supplier->first()->supplier_id)['name'] ?? "Unknown" }} Last Purchase
Tk, Dt, Brand, Origin
Remarks
Item Qty PO No - {{ $purchase_product->purchase->id }} PO No -
#SL Item Code Item Name {{ \App\Supplier::find($supplier->first()->supplier_id)['name'] ?? "Unknown" }} Quotation Generate By
{{ ++$i }}{{ $cs[$count]->requisitionProduct->product->item_code }}{{ $cs[$count]->requisitionProduct->product->name }} {{ $cs[$count]->qty }} Pcs Tk-{{ $pricing->price }}/- Per Pc Credit
Brand - {{ optional(optional($cs[$count]->product)->brand)->name }}
Origin - @php $last_purchase_price = $pricing->price; $last_purchase_brand = optional(optional($cs[$count]->product)->brand)->name; @endphp
Tk-{{ $pricing->price }}/- Per Pc Credit
Brand - {{ optional(optional($cs[$count]->product)->brand)->name }}
Origin -
Tk-{{ $last_purchase_price }}/- Per Pc Credit
Brand - {{ $last_purchase_brand }}
Origin -
C/S No -
Dt -
{{ ++$i }}{{ $cs[$count]->requisitionProduct->product->item_code }}{{ $cs[$count]->requisitionProduct->product->name }} {{ $cs[$count]->qty }} Pcs Tk-{{ $pricing }}/- Per Pc Credit
Brand - {{ optional(optional($cs[$count]->product)->brand)->name }}
Origin -
New C/S No -
Dt -
Prepared By Purchase Officer Purcahse Manager ED(Tech)/Director/MD
{{-- Group By Quotation End --}}
@stop @section('style') @stop @section('plugin_for_datatable_buttons') {{--load script for data table by Ahmed --}} @stop