diff --git a/app/Datatables/Shop/CategoriesDataTable.php b/app/Datatables/Admin/Shop/CategoriesDataTable.php similarity index 98% rename from app/Datatables/Shop/CategoriesDataTable.php rename to app/Datatables/Admin/Shop/CategoriesDataTable.php index 8e78a910..cb653d59 100644 --- a/app/Datatables/Shop/CategoriesDataTable.php +++ b/app/Datatables/Admin/Shop/CategoriesDataTable.php @@ -1,6 +1,6 @@ buildQuery($model); + } + + protected function getColumns() + { + return [ + Column::make('value')->title('Valeur'), + $this->makeColumnButtons(), + ]; + } +} diff --git a/app/Datatables/Shop/TariffsDataTable.php b/app/Datatables/Admin/Shop/TariffsDataTable.php similarity index 97% rename from app/Datatables/Shop/TariffsDataTable.php rename to app/Datatables/Admin/Shop/TariffsDataTable.php index a080f5f1..070ef26e 100644 --- a/app/Datatables/Shop/TariffsDataTable.php +++ b/app/Datatables/Admin/Shop/TariffsDataTable.php @@ -1,6 +1,6 @@ activeIfRoute('customers') ->order(3); - $menu->addTo('customers', 'Clients', [ 'route' => 'Admin.Shop.Customers.index', 'permission' => 'backend_access' ]) - ->activeIfRoute(['Admin.Shop.Customers.*'])->order(1); - - $menu->addTo('customers', 'Canaux de vente', [ 'route' => 'Admin.Shop.SaleChannels.index', 'permission' => 'backend_access' ]) - ->activeIfRoute(['Admin.Shop.SaleChannels.*'])->order(1); + $menu->addTo('customers', 'Clients', [ + 'route' => 'Admin.Shop.Customers.index', + 'permission' => 'backend_access', + ])->activeIfRoute(['Admin.Shop.Customers.*'])->order(1); } } diff --git a/app/Repositories/Shop/Invoices.php b/app/Repositories/Shop/Invoices.php index 572c257d..655defa5 100644 --- a/app/Repositories/Shop/Invoices.php +++ b/app/Repositories/Shop/Invoices.php @@ -49,7 +49,6 @@ class Invoices { InvoiceStats::increase($data['total_taxed']); $data['uuid'] = Str::uuid()->toString(); - $data['ref'] = self::getNewRef(); return Invoice::create($data); } diff --git a/app/Repositories/Shop/Orders.php b/app/Repositories/Shop/Orders.php index 8d630c38..00a71581 100644 --- a/app/Repositories/Shop/Orders.php +++ b/app/Repositories/Shop/Orders.php @@ -23,6 +23,7 @@ class Orders unset($data['basket']); $order = self::store($data); $detail = OrderDetails::saveBasket($order->id, $basket['detail']); + $data['ref'] = $order->ref; unset($data['comment']); unset($data['agree']); unset($data['customer_id']);