items->sum(fn ($item) => $item->unit_price * $item->quantity); } public function getTotal(): int { $subtotal = $this->items->sum(fn ($item) => $item->unit_price * $item->quantity); return max(0, $subtotal - parseRupiahToInt($this->form->discount) - $this->voucherDiscount); } }