From 2ac0042c881b9af07b79d374db8dfbaff04db23e Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:50:42 +0800 Subject: [PATCH 1/2] Update CustomerGroupPricingRelationManager.php --- .../RelationManagers/CustomerGroupPricingRelationManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php index 34e40a6467..8d3f28701a 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php +++ b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php @@ -147,7 +147,8 @@ 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( __('lunarpanel::relationmanagers.customer_group_pricing.table.actions.create.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( From d81c7728f3d3fda4f09e7112b6a5cbf901202eb5 Mon Sep 17 00:00:00 2001 From: Author Date: Thu, 2 Jan 2025 10:53:30 +0000 Subject: [PATCH 2/2] chore: fix code style --- .../RelationManagers/CustomerGroupPricingRelationManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php index 8d3f28701a..ee412b274d 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php +++ b/packages/admin/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupPricingRelationManager.php @@ -148,7 +148,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( __('lunarpanel::relationmanagers.customer_group_pricing.table.actions.create.label')