@@ -62,6 +62,10 @@ class DeliveryNoteSearch extends DeliveryNote | |||
$deliveryNoteRepository = DeliveryNoteRepository::getInstance(); | |||
$optionsSearch = $deliveryNoteRepository->getDefaultOptionsSearch(); | |||
if(isset($params['DeliveryNoteSearch']['id_point_sale'])) { | |||
$optionsSearch['join_with'][] = 'orders'; | |||
} | |||
$query = DeliveryNote::find() | |||
->with($optionsSearch['with']) | |||
->joinWith($optionsSearch['join_with']) |