@php
$i = 0;
@endphp
@foreach( $customerRfqParts as $customerRfqPart )
@php
$inventory_id = $customerRfqPart->inventory->id;
$i++;
@endphp
| Vendor |
Vendor Quantity |
Unit Price |
Total Price |
Certificate |
Lead Time |
Note |
@foreach( $customerRfqPart->customerRfq->vendorQuotations as $vendorQuotation )
@php
$vendorQuotationParts = \App\Models\VendorQuotationPart::
where('vendor_quotation_id', '=', $vendorQuotation->id)
->where('inventory_id', '=', $customerRfqPart->inventory->id)
->orderBy('id', 'asc')->get();
@endphp
@foreach( $vendorQuotationParts as $vendorQuotationPart )
| {{ $vendorQuotation->vendor->name }} |
{{ $vendorQuotationPart->quantity }} |
{{ $vendorQuotationPart->unit_price }} |
{{ $vendorQuotationPart->quantity * $vendorQuotationPart->unit_price }} |
{{ $vendorQuotationPart->cert }} {{ $vendorQuotationPart->tag_date }} |
{{ $vendorQuotationPart->lead_time }} |
{{ $vendorQuotationPart->note }} |
@endforeach
@endforeach
History:
| Type |
Reference |
Name |
Date |
Quantity |
Unit Price |
@php
$customer_rfqs = \App\Models\CustomerRfqPart::select('customer_rfq_parts.*')
->join('customer_rfqs', 'customer_rfq_parts.customer_rfq_id', '=', 'customer_rfqs.id')
->where("customer_rfq_parts.inventory_id", "=", $inventory_id)
->where("customer_rfq_parts.customer_rfq_id", "!=", $customerRfqPart->customerRfq->id)
->whereRaw('customer_rfqs.date >= date_sub(now(), interval 6 month)')
->orderBy('id', 'desc')
->get();
@endphp
@foreach( $customer_rfqs as $customer_rfq )
| Customer RFQ |
{{ $customer_rfq->customerRfq->customer_rfq_number }} |
{{ $customer_rfq->customerRfq->customer->name }} |
{{ $customer_rfq->customerRfq->date }} |
{{ $customer_rfq->quantity }} |
{{ $customer_rfq->unit_price }} |
@endforeach
@php
$vendor_quotations = \App\Models\VendorQuotationPart::select('vendor_quotation_parts.*')
->join('vendor_quotations', 'vendor_quotation_parts.vendor_quotation_id', '=', 'vendor_quotations.id')
->where("vendor_quotation_parts.inventory_id", "=", $inventory_id)
->where("vendor_quotations.customer_rfq_id", "!=", $customerRfqPart->customerRfq->id)
->whereRaw('vendor_quotations.date >= date_sub(now(), interval 6 month)')
->orderBy('id', 'desc')
->get();
@endphp
@foreach( $vendor_quotations as $vendor_quotation )
| Vendor Quotation |
{{ $vendor_quotation->vendorQuotation->quotation_number }} |
{{ $vendor_quotation->vendorQuotation->vendor->name }} |
{{ $vendor_quotation->vendorQuotation->date }} |
{{ $vendor_quotation->quantity }} |
{{ $vendor_quotation->unit_price }} |
@endforeach
@php
$our_quotations = \App\Models\OurQuotationPart::select('our_quotation_parts.*')
->join('our_quotations', 'our_quotation_parts.our_quotation_id', '=', 'our_quotations.id')
->where("our_quotation_parts.inventory_id", "=", $inventory_id)
//->where("our_quotations.customer_rfq_id", "!=", $customerRfqPart->customerRfq->id)
->whereRaw('our_quotations.date >= date_sub(now(), interval 6 month)')
->orderBy('id', 'desc')
->get();
@endphp
@foreach( $our_quotations as $our_quotation )
| Our Quotation |
{{ $our_quotation->ourQuotation->quotation_number }} |
{{ $our_quotation->ourQuotation->customerRfq->customer->name }} |
{{ $our_quotation->ourQuotation->date }} |
{{ $our_quotation->quantity }} |
{{ $our_quotation->unit_price }} |
@endforeach
@endforeach