$query = DeliveryNote::find() | $query = DeliveryNote::find() | ||||
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | |||||
->where(['delivery_note.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['delivery_note.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('delivery_note.status ASC, delivery_note.reference DESC'); | ->orderBy('delivery_note.status ASC, delivery_note.reference DESC'); | ||||
$query = Invoice::find() | $query = Invoice::find() | ||||
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | |||||
->where(['invoice.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['invoice.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('invoice.status ASC, invoice.reference DESC'); | ->orderBy('invoice.status ASC, invoice.reference DESC'); | ||||
$query = Quotation::find() | $query = Quotation::find() | ||||
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->joinWith($optionsSearch['join_with']) | |||||
->where(['quotation.id_producer' => GlobalParam::getCurrentProducerId()]) | ->where(['quotation.id_producer' => GlobalParam::getCurrentProducerId()]) | ||||
->orderBy('quotation.status ASC, quotation.reference DESC'); | ->orderBy('quotation.status ASC, quotation.reference DESC'); | ||||