|
|
|
|
|
|
|
|
$deliveryNoteRepository = DeliveryNoteRepository::getInstance(); |
|
|
$deliveryNoteRepository = DeliveryNoteRepository::getInstance(); |
|
|
$optionsSearch = $deliveryNoteRepository->getDefaultOptionsSearch(); |
|
|
$optionsSearch = $deliveryNoteRepository->getDefaultOptionsSearch(); |
|
|
|
|
|
|
|
|
|
|
|
if(isset($params['DeliveryNoteSearch']['id_point_sale'])) { |
|
|
|
|
|
$optionsSearch['join_with'][] = 'orders'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$query = DeliveryNote::find() |
|
|
$query = DeliveryNote::find() |
|
|
->with($optionsSearch['with']) |
|
|
->with($optionsSearch['with']) |
|
|
->joinWith($optionsSearch['join_with']) |
|
|
->joinWith($optionsSearch['join_with']) |