Fix typo
This commit is contained in:
31
app/Datatables/Shop/PriceGenericsDataTable.php
Normal file
31
app/Datatables/Shop/PriceGenericsDataTable.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Datatables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\PriceGeneric;
|
||||
|
||||
class PriceGenericsDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'price_generics';
|
||||
|
||||
public function query(PriceGeneric $model)
|
||||
{
|
||||
$model = $model::with(['category','priceByUnit'])->withCount('prices');
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('category.name')->title('Catégorie'),
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('price_by_unit.price')->title('Prix HT')->class('text-right'),
|
||||
Column::make('price_by_unit.price_taxed')->title('Prix TTC')->class('text-right'),
|
||||
Column::make('prices_count')->title('Nb tarifs')->class('text-right'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user