From 4df6c215add298e56cf85f927911df128f989fb7 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Thu, 30 Apr 2026 17:03:31 +0700 Subject: [PATCH] style: format currency output in Order model for consistency --- app/Models/Order.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Models/Order.php b/app/Models/Order.php index 4be6598..3e67099 100644 --- a/app/Models/Order.php +++ b/app/Models/Order.php @@ -43,42 +43,42 @@ protected function casts(): array protected function cogsFormatted(): Attribute { return Attribute::make( - get: fn() => 'Rp ' . number_format($this->cogs, 0, ',', '.'), + get: fn () => 'Rp '.number_format($this->cogs, 0, ',', '.'), ); } protected function subtotalFormatted(): Attribute { return Attribute::make( - get: fn() => 'Rp ' . number_format($this->subtotal, 0, ',', '.'), + get: fn () => 'Rp '.number_format($this->subtotal, 0, ',', '.'), ); } protected function discountFormatted(): Attribute { return Attribute::make( - get: fn() => 'Rp ' . number_format($this->discount, 0, ',', '.'), + get: fn () => 'Rp '.number_format($this->discount, 0, ',', '.'), ); } protected function paymentFormatted(): Attribute { return Attribute::make( - get: fn() => 'Rp ' . number_format($this->payment, 0, ',', '.'), + get: fn () => 'Rp '.number_format($this->payment, 0, ',', '.'), ); } protected function totalFormatted(): Attribute { return Attribute::make( - get: fn() => 'Rp ' . number_format($this->total, 0, ',', '.'), + get: fn () => 'Rp '.number_format($this->total, 0, ',', '.'), ); } protected function createdAtFormatted(): Attribute { return Attribute::make( - get: fn() => $this->created_at->translatedFormat('d F Y H:i'), + get: fn () => $this->created_at->translatedFormat('d F Y H:i'), ); }