From 156eca433ce83177673a0784361cb03762cd2b5d Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Fri, 9 Jan 2026 20:25:22 +0700 Subject: [PATCH] fix: remove cost_price from select statements in BottlesTable, PerfumesTable, and ProductsTable --- app/Livewire/Datatable/Catalog/BottlesTable.php | 2 +- app/Livewire/Datatable/Catalog/PerfumesTable.php | 1 - app/Livewire/Datatable/Catalog/ProductsTable.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Livewire/Datatable/Catalog/BottlesTable.php b/app/Livewire/Datatable/Catalog/BottlesTable.php index 300557a..f663503 100644 --- a/app/Livewire/Datatable/Catalog/BottlesTable.php +++ b/app/Livewire/Datatable/Catalog/BottlesTable.php @@ -106,7 +106,7 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg public function builder(): Builder { - return Bottle::select('id', 'name', 'size', 'cost_price', 'sale_price') + return Bottle::select('id', 'name', 'size', 'sale_price') ->with('outlets') ->whereHas( 'outlets', diff --git a/app/Livewire/Datatable/Catalog/PerfumesTable.php b/app/Livewire/Datatable/Catalog/PerfumesTable.php index acca317..d5d3423 100644 --- a/app/Livewire/Datatable/Catalog/PerfumesTable.php +++ b/app/Livewire/Datatable/Catalog/PerfumesTable.php @@ -114,7 +114,6 @@ public function builder(): Builder 'sku', 'perfumes.name', 'concentration', - 'cost_price', 'sale_price' ) ->with([ diff --git a/app/Livewire/Datatable/Catalog/ProductsTable.php b/app/Livewire/Datatable/Catalog/ProductsTable.php index 448bec6..da143da 100644 --- a/app/Livewire/Datatable/Catalog/ProductsTable.php +++ b/app/Livewire/Datatable/Catalog/ProductsTable.php @@ -98,7 +98,7 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg public function builder(): Builder { - return Product::select('products.id', 'sku', 'products.name', 'cost_price', 'sale_price') + return Product::select('products.id', 'sku', 'products.name', 'sale_price') ->with('outlets') ->whereHas( 'outlets',