loadDefinition(PointSaleDistributionDefinition::class); } public function filterByDistribution(Distribution $distribution): self { $this->andWhere(['id_distribution' => $distribution->id]); return $this; } public function filterByPointSale(PointSale $pointSale): self { $this->andWhere(['id_point_sale' => $pointSale->id]); return $this; } public function filterIsDelivery(bool $delivery) { $this->andWhere(['delivery' => $delivery ? 1 : 0]); return $this; } }