From 2d0ac1c233af5d222f94f75e7587dcc17cf650ab Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:33:28 +0800 Subject: [PATCH] Fix compare price decimal saving (#2053) --- .../RelationManagers/CustomerGroupPricingRelationManager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php index 34e40a6467..ee412b274d 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php +++ b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php @@ -147,6 +147,7 @@ public function getDefaultTable(Table $table): Table $data['min_quantity'] = 1; $data['price'] = (int) ($data['price'] * $currencyModel->factor); + $data['compare_price'] = (int) ($data['compare_price'] * $currencyModel->factor); return $data; })->label( @@ -162,6 +163,7 @@ public function getDefaultTable(Table $table): Table $data['min_quantity'] = 1; $data['price'] = (int) ($data['price'] * $currencyModel->factor); + $data['compare_price'] = (int) ($data['compare_price'] * $currencyModel->factor); return $data; })->after(