refactor: rename hpp_formatted attribute to cogs_formatted in Order model
This commit is contained in:
parent
6baee0f9cc
commit
2ae9c0c470
@ -20,7 +20,7 @@
|
|||||||
use Spatie\Activitylog\Traits\LogsActivity;
|
use Spatie\Activitylog\Traits\LogsActivity;
|
||||||
|
|
||||||
#[Guarded(['id'])]
|
#[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])]
|
#[ObservedBy([OrderObserver::class])]
|
||||||
class Order extends Model
|
class Order extends Model
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ protected function casts(): array
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function hppFormatted(): Attribute
|
protected function cogsFormatted(): Attribute
|
||||||
{
|
{
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: fn () => 'Rp '.number_format($this->cogs, 0, ',', '.'),
|
get: fn () => 'Rp '.number_format($this->cogs, 0, ',', '.'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user