@extends('layouts.app') @section('content') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @php $items = $order->items->filter(fn ($item) => !(bool) ($item->is_cancelled ?? false))->values(); @endphp

Edit Item Invoice / Penagihan

Pakai halaman ini untuk menyesuaikan nama barang di invoice agar sama dengan PO. Qty, harga, subtotal, pembayaran, stok, dan status produksi tidak berubah.

@csrf @method('PATCH') @if($items->count() < 1)
Tidak ada item aktif yang bisa diedit untuk invoice.
@else
@foreach($items as $index => $item)

Item {{ $index + 1 }}

Subtotal lama tetap: Rp {{ number_format((float) ($item->subtotal ?? 0), 0, ',', '.') }}

@endforeach
Batal
@endif

Ringkasan Invoice

No Invoice{{ $order->invoice_number }}
Pelanggan{{ $order->customer_name ?? $order->customer->name ?? '-' }}
TotalRp {{ number_format((float) ($order->total_price ?? $order->grand_total ?? 0), 0, ',', '.') }}
Perubahan ini hanya untuk teks item invoice/penagihan supaya sama dengan PO. Data transaksi dan produksi tetap aman.
@endsection