@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'Wait Approval PO Director Detail']) @php $bsart = $bsart ?? request('bsart'); $type = $type ?? request('type'); $codeRows = $waitApprovalPoDirCodeRows ?? []; $nonRows = $waitApprovalPoDirNonRows ?? []; $currentBsart = $bsart ?? ''; $bsartList = ['ZR15', 'ZR16', 'ZR17']; $typeQuery = $type ? '&type=' . $type : ''; $renderRows = function ($rows) { $html = ''; foreach ($rows as $i => $row) { $matnr = trim((string) ($row['MATNR'] ?? '')); $matnrClass = $matnr !== '' ? 'item-code-link matnr-cell' : ''; $html .= ''; $html .= '' . ($i + 1) . ''; $html .= '' . e($row['BSART'] ?? '-') . ''; $html .= '' . e(!empty($row['LIFNR']) ? substr($row['LIFNR'], 3, 7) : '-') . ''; $html .= '' . e($row['NAME1'] ?? '-') . ''; $html .= '' . e($row['EBELN'] ?? '-') . ''; $html .= '' . (isset($row['EBELP']) ? number_format((float) $row['EBELP'], 0, '', '') : '-') . ''; $html .= '' . e($row['TXZ01'] ?? '-') . ''; $html .= '' . e($matnr !== '' ? $matnr : '-') . ''; $html .= '' . number_format((float) ($row['MENGE'] ?? 0), 2, ',', '.') . ''; $html .= '' . e($row['MEINS'] ?? '-') . ''; $html .= '' . e($row['BANFN'] ?? '-') . ''; $html .= '' . e($row['AFNAM'] ?? '-') . ''; $html .= '' . e($row['WAERS'] ?? '-') . ''; $html .= '' . number_format((float) ($row['WKURS'] ?? 0), 5, ',', '.') . ''; $html .= '' . number_format((float) ($row['NETPR'] ?? 0), 2, ',', '.') . ''; $html .= '' . e($row['PEINH'] ?? '-') . ''; $html .= '' . number_format((float) ($row['NETWR'] ?? 0), 2, ',', '.') . ''; $html .= ''; } if (empty($rows)) { $html .= ''; $html .= '-'; $html .= '-'; $html .= '-'; $html .= 'No data'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= '-'; $html .= ''; } return $html; }; @endphp
List Detail Outstanding PO Director @if($currentBsart) - {{ $currentBsart }} ({{ getBsartLabel($currentBsart) }}) @endif
@if($currentBsart) {{ $currentBsart }} @else Pilih Document Type terlebih dahulu @endif
Back
@foreach ($bsartList as $docType) {{ $docType }} @endforeach
@if (empty($currentBsart))
Silakan pilih Document Type terlebih dahulu untuk menampilkan data.
@else @php $tableHead = ' No Type Code Name PO No Item Remark Item Code Qty Unit PR No User Cur Rate Price UP Amount '; @endphp
{!! $tableHead !!} {!! $renderRows($codeRows) !!}
{!! $tableHead !!} {!! $renderRows($nonRows) !!}
@endif
@endsection @push('js') @endpush