From dbce89fe3721b074cbf7a69ebe86cb6f936ed23f Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Tue, 11 Nov 2025 11:21:02 +0700 Subject: [PATCH] feat(gods): menambahkan point_per_ml di form --- app/Livewire/Forms/Studio/Catalog/BottleForm.php | 1 + app/Livewire/Forms/Studio/Catalog/PerfumeForm.php | 1 + app/Livewire/Forms/Studio/Catalog/ProductForm.php | 1 + 3 files changed, 3 insertions(+) diff --git a/app/Livewire/Forms/Studio/Catalog/BottleForm.php b/app/Livewire/Forms/Studio/Catalog/BottleForm.php index c1cfec5..2050028 100644 --- a/app/Livewire/Forms/Studio/Catalog/BottleForm.php +++ b/app/Livewire/Forms/Studio/Catalog/BottleForm.php @@ -103,6 +103,7 @@ private function prepareSavedData(): array 'size' => $this->size, 'cost_price' => replaceCurrency($this->cost_price), 'sale_price' => replaceCurrency($this->sale_price), + 'point_per_ml' => round($this->sale_price / 100), 'description' => $this->description, ]; } diff --git a/app/Livewire/Forms/Studio/Catalog/PerfumeForm.php b/app/Livewire/Forms/Studio/Catalog/PerfumeForm.php index 43d115b..ba26328 100644 --- a/app/Livewire/Forms/Studio/Catalog/PerfumeForm.php +++ b/app/Livewire/Forms/Studio/Catalog/PerfumeForm.php @@ -145,6 +145,7 @@ private function prepareSavedData() 'sku' => $this->sku, 'cost_price' => replaceCurrency($this->cost_price), 'sale_price' => replaceCurrency($this->sale_price), + 'point_per_ml' => round($this->sale_price / 100), 'base_notes' => $this->base_notes, 'middle_notes' => $this->middle_notes, 'top_notes' => $this->top_notes, diff --git a/app/Livewire/Forms/Studio/Catalog/ProductForm.php b/app/Livewire/Forms/Studio/Catalog/ProductForm.php index c8383d2..a9b45f7 100644 --- a/app/Livewire/Forms/Studio/Catalog/ProductForm.php +++ b/app/Livewire/Forms/Studio/Catalog/ProductForm.php @@ -113,6 +113,7 @@ private function prepareSavedData() 'sku' => $this->sku, 'cost_price' => replaceCurrency($this->cost_price), 'sale_price' => replaceCurrency($this->sale_price), + 'point_per_ml' => round($this->sale_price / 100), 'description' => $this->description, 'outlet_ids' => $this->outlet_ids, 'image' => $this->image,