@php
$PendingStatus = DB::table('projection_orders')
->leftJoin(
'projection_order_confirms',
'projection_orders.id',
'=',
'projection_order_confirms.projection_order_id',
)
->leftJoin('p_i_s', 'projection_orders.id', '=', 'p_i_s.projection_order_id')
->leftJoin(
'supply_chain_entries',
'projection_orders.id',
'=',
'supply_chain_entries.projection_order_id',
)
->leftJoin(
'yarn_mushuks',
'projection_orders.id',
'=',
'yarn_mushuks.projection_order_id',
)
->leftJoin(
'commercial_master_entries',
'projection_orders.id',
'=',
'commercial_master_entries.projection_order_id',
)
->leftJoin(
'actual_deliveries',
'projection_orders.id',
'=',
'actual_deliveries.projection_order_id',
)
->leftJoin(
'commercial_document_preparations',
'projection_orders.id',
'=',
'commercial_document_preparations.projection_order_id',
)
->leftJoin(
'commercial_invoices',
'projection_orders.id',
'=',
'commercial_invoices.projection_order_id',
)
->leftJoin(
'accountancies',
'projection_orders.id',
'=',
'accountancies.projection_order_id',
)
->select(
'projection_orders.buyer_name as buyer_name',
'projection_orders.job_no as job_no',
'projection_orders.season as season',
'p_i_s.buyer_export_lc_no as buyer_export_lc_no',
'yarn_mushuks.yarn_lc_no as yarn_lc_no',
'supply_chain_entries.yarn_pi_no as yarn_pi_no',
DB::raw(
'CASE WHEN p_i_s.buyer_export_lc_no IS NULL THEN 1 ELSE 0 END as buyer_export_lc_no_status',
),
DB::raw(
'CASE WHEN supply_chain_entries.yarn_pi_no IS NULL THEN 1 ELSE 0 END as yarn_pi_no_status',
),
DB::raw(
'CASE WHEN yarn_mushuks.yarn_lc_no IS NULL THEN 1 ELSE 0 END as yarn_lc_no_status',
),
DB::raw(
'CASE WHEN yarn_mushuks.mushok_date IS NULL THEN 1 ELSE 0 END as mushok_date',
),
DB::raw(
'CASE WHEN commercial_master_entries.ip_rcvd_date IS NULL THEN 1 ELSE 0 END as ip_rcvd_date',
),
DB::raw(
'CASE WHEN commercial_master_entries.up_number IS NULL THEN 1 ELSE 0 END as up_number',
),
DB::raw(
'CASE WHEN commercial_invoices.doc_curt_status IS NULL THEN 1 ELSE 0 END as doc_curt_status',
),
DB::raw(
'CASE WHEN accountancies.ldbc_bill_no IS NULL THEN 1 ELSE 0 END as ldbc_bill_no',
),
DB::raw(
'CASE WHEN accountancies.maturity_date IS NULL THEN 1 ELSE 0 END as maturity_date',
),
DB::raw(
'CASE WHEN accountancies.bank_sub_date IS NULL THEN 1 ELSE 0 END as bank_sub_date',
),
)
->distinct('projection_orders.id')
->get();
// dd($PendingStatus);
@endphp
@forelse ($PendingStatus as $item)
{{ $item->buyer_name }} |
{{ $item->job_no }} |
{{ $item->season }} |
@if ($item->buyer_export_lc_no_status == 1)
Pending
@else
{{ $item->buyer_export_lc_no }}
@endif
|
@if ($item->yarn_pi_no_status == 1)
Pending
@else
Completed
@endif
|
@if ($item->yarn_lc_no_status == 1)
Pending
@else
Completed
@endif
|
@if ($item->mushok_date == 1)
Pending
@else
Completed
@endif
|
@if ($item->ip_rcvd_date == 1)
Pending
@else
Completed
@endif
|
@if ($item->up_number == 1)
Pending
@else
Completed
@endif
|
@if ($item->doc_curt_status == 1)
Pending
@else
Completed
@endif
|
@if ($item->ldbc_bill_no == 1)
Pending
@else
Completed
@endif
|
@if ($item->maturity_date == 1)
Pending
@else
Completed
@endif
|
@if ($item->bank_sub_date == 1)
Pending
@else
Completed
@endif
|
@empty
No Data Found |
@endforelse