@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
Result {{ $title_menu }}

{{-- Blade table integration --}}
{{-- Check result data --}} @if ($table_result) @foreach ($group_lines as $group_line) @endforeach @foreach ($group_lines as $group_line) @endforeach @foreach ($beforeUpgrade as $key => $data) @foreach ($group_lines as $group_line) @endforeach @endforeach @foreach ($group_lines as $group_line) {{-- Hitung total roll dan weight per group --}} @php $total_roll = $beforeUpgrade->sum("roll_{$group_line}"); $total_weight = $beforeUpgrade->sum("weight_{$group_line}"); @endphp @endforeach {{-- Kolom untuk Total keseluruhan (semua group) --}} @foreach ($group_lines as $group_line) {{-- Mengambil total produksi roll dan weight per group dari $total_produksi --}} @endforeach {{-- Kolom untuk Total keseluruhan (semua group) --}} @foreach ($group_lines as $group_line) {{-- Kolom kosong untuk roll (batch) --}} {{-- Kolom untuk weight --}} @php // Hitung persentase hanya untuk weight per group $percent_weight = isset($total_produksi->{"weight_{$group_line}"}) && $total_produksi->{"weight_{$group_line}"} > 0 ? ($total_off_grade->{"weight_{$group_line}"} / $total_produksi->{"weight_{$group_line}"}) * 100 : 0; @endphp @endforeach {{-- Kolom untuk Total keseluruhan (semua group) --}} {{-- Kolom kosong untuk total roll (batch) --}} {{-- Kolom untuk total weight --}} @php // Hitung persentase total keseluruhan hanya untuk weight $total_percent_weight = isset($total_produksi->total_weight) && $total_produksi->total_weight > 0 ? ($total_off_grade->total_weight / $total_produksi->total_weight) * 100 : 0; @endphp @else {{-- Update colspan to match total columns --}} @endif
Resume Off Grade (group) - {{ $nama_filter }} - {{ $period }}
No Remark Before Upgrade Total
Group {{ $group_line }}
Roll (Batch) Weight (kg) Roll (Batch) Weight (kg)
{{ $key + 1 }} {{ $data->remark }} {{ $data->{"roll_{$group_line}"} ?? '-' }} {{ null !== $data->{"weight_{$group_line}"} ? number_format($data->{"weight_{$group_line}"}, 1) : '-' }} {{ $data->total_batch }} {{ null !== $data->total_weight ? number_format($data->total_weight, 1) : '-' }}
Total Off Grade {{ $total_roll ?? '-' }} {{ null !== $total_weight ? number_format($total_weight, 1) : '-' }} {{ $beforeUpgrade->sum('total_batch') }} {{ null !== $beforeUpgrade->sum('total_weight') ? number_format($beforeUpgrade->sum('total_weight'), 1) : '-' }}
Total Produksi {{ $total_produksi->{"roll_{$group_line}"} ?? '-' }} {{ null !== $total_produksi->{"weight_{$group_line}"} ? number_format($total_produksi->{"weight_{$group_line}"}, 1) : '-' }} {{ $total_produksi->total_batch ?? '-' }} {{ null !== $total_produksi->total_weight ? number_format($total_produksi->total_weight, 1) : '-' }}
% Off Grade {{ number_format($percent_weight, 2) }}% {{ number_format($total_percent_weight, 2) }}%
Data not found!
{{-- check flag js on dmenu --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') {{-- file js in folder (resources/views/js) --}} @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif @endsection @push('js') {{-- --}} @endpush