Add filter by sale_channel, add method to get prices by offer, sale_channel and quantity

This commit is contained in:
Ludovic CANDELLIER
2022-01-23 21:37:54 +01:00
parent 94a162deb7
commit fe759565a8
36 changed files with 29 additions and 1165 deletions

View File

@@ -12,7 +12,7 @@ class SaleChannelsDataTable extends DataTable
public function query(SaleChannel $model)
{
$model = $model->withCount('deliveries');
$model = $model->withCount(['deliveries', 'tariffs']);
return $this->buildQuery($model);
}
@@ -21,7 +21,8 @@ class SaleChannelsDataTable extends DataTable
return [
Column::make('code')->title('Code abrégé')->width(100),
Column::make('name')->title('Nom'),
Column::make('deliveries_count')->title(__('shop.deliveries.list'))->searchable(false)->class('text-right'),
Column::make('deliveries_count')->title('#Distrib')->searchable(false)->class('text-right'),
Column::make('tariffs_count')->title('#Tarifs')->searchable(false)->class('text-right'),
$this->makeColumnButtons(),
];
}