@extends('layouts.app') @section('content') @php $totalMaterials = collect($materials ?? [])->count(); $totalRows = collect($materials ?? [])->sum(function ($material) { return collect($material->prices ?? []) ->groupBy(function ($item) { return ($item->sisi ?? 1) . '|' . ($item->min_qty ?? 1) . '|' . ($item->max_qty ?? 'null'); }) ->count(); }); $activeCount = collect($materials ?? [])->where('is_active', true)->count(); $inactiveCount = max($totalMaterials - $activeCount, 0); @endphp
{{-- Header --}}
AI Style Pricelist Kasir Percetakan

{{ $title ?? 'Pricelist Kasir' }}

Daftar harga umum dan percetakan dengan tampilan yang lebih modern, rapi, dan mudah dibaca untuk kebutuhan kasir.

Bahan
{{ number_format($totalMaterials, 0, ',', '.') }}
Baris Harga
{{ number_format($totalRows, 0, ',', '.') }}
Aktif
{{ number_format($activeCount, 0, ',', '.') }}
Nonaktif
{{ number_format($inactiveCount, 0, ',', '.') }}
{{-- Filter --}}

Filter Pricelist

Cari bahan, pilih kategori, dan lihat status pricelist dengan cepat.

Reset
{{-- Table --}}

Daftar Pricelist

Harga umum dan harga percetakan per bahan, sisi, dan range qty.

{{ number_format($totalRows, 0, ',', '.') }} baris harga
@php $hasRows = false; @endphp @foreach ($materials as $material) @php $groupedPrices = collect($material->prices ?? [])->groupBy(function ($item) { return ($item->sisi ?? 1) . '|' . ($item->min_qty ?? 1) . '|' . ($item->max_qty ?? 'null'); }); @endphp @foreach ($groupedPrices as $group) @php $umum = $group->firstWhere('member_type', 'umum'); $studio = $group->firstWhere('member_type', 'studio'); @endphp @if ($umum || $studio) @php $hasRows = true; @endphp @endif @endforeach @endforeach @if (!$hasRows) @endif
Nama Kategori Sisi Qty Harga Umum Harga Percetakan Status
{{ $material->name }}
{{ $material->category->name ?? '-' }} {{ (int) ($umum->sisi ?? $studio->sisi ?? 1) }} Sisi {{ number_format((float) ($umum->min_qty ?? $studio->min_qty ?? 1), 0, ',', '.') }} - {{ ($umum->max_qty ?? $studio->max_qty ?? null) !== null ? number_format((float) ($umum->max_qty ?? $studio->max_qty), 0, ',', '.') : '∞' }} Rp {{ number_format((float) ($umum->price ?? 0), 0, ',', '.') }} Rp {{ number_format((float) ($studio->price ?? 0), 0, ',', '.') }} {{ $material->is_active ? 'Aktif' : 'Nonaktif' }}
Belum ada data pricelist
@endsection