Browse Source

[backend] Documents : correctif indexAction (groupBy nécessaire pour une bonne pagination)

refactoring
Guillaume 4 years ago
parent
commit
15131e7dbe
3 changed files with 6 additions and 3 deletions
  1. +2
    -1
      common/models/DeliveryNoteSearch.php
  2. +2
    -1
      common/models/InvoiceSearch.php
  3. +2
    -1
      common/models/QuotationSearch.php

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

->with($optionsSearch['with']) ->with($optionsSearch['with'])
->joinWith($optionsSearch['join_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')
->groupBy('delivery_note.id');


$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,

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

->with($optionsSearch['with']) ->with($optionsSearch['with'])
->joinWith($optionsSearch['join_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')
->groupBy('invoice.id');


$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,

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

->with($optionsSearch['with']) ->with($optionsSearch['with'])
->joinWith($optionsSearch['join_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')
->groupBy('quotation.id');


$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,

Loading…
Cancel
Save