Browse Source

[backend] Documents : intégration joinWith dans les modèles de recherche

refactoring
Guillaume Bourgeois 4 years ago
parent
commit
60bbca4488
3 changed files with 3 additions and 0 deletions
  1. +1
    -0
      common/models/DeliveryNoteSearch.php
  2. +1
    -0
      common/models/InvoiceSearch.php
  3. +1
    -0
      common/models/QuotationSearch.php

+ 1
- 0
common/models/DeliveryNoteSearch.php View File



$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');



+ 1
- 0
common/models/InvoiceSearch.php View File



$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');



+ 1
- 0
common/models/QuotationSearch.php View File



$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');



Loading…
Cancel
Save