refactor: rename hpp_formatted attribute to cogs_formatted in Order model

This commit is contained in:
Yoga Pangestu 2026-04-30 13:32:56 +07:00
parent 6baee0f9cc
commit 2ae9c0c470

View File

@ -20,7 +20,7 @@
use Spatie\Activitylog\Traits\LogsActivity;
#[Guarded(['id'])]
#[Appends(['hpp_formatted', 'subtotal_formatted', 'discount_formatted', 'payment_formatted', 'total_formatted'])]
#[Appends(['cogs_formatted', 'subtotal_formatted', 'discount_formatted', 'payment_formatted', 'total_formatted'])]
#[ObservedBy([OrderObserver::class])]
class Order extends Model
{
@ -40,7 +40,7 @@ protected function casts(): array
];
}
protected function hppFormatted(): Attribute
protected function cogsFormatted(): Attribute
{
return Attribute::make(
get: fn () => 'Rp '.number_format($this->cogs, 0, ',', '.'),