@@ -115,7 +115,7 @@ $this->addButton(['label' => 'Nouveau bon de livraison <span class="glyphicon gl | |||
'contentOptions' => ['class' => 'column-actions'], | |||
'buttons' => [ | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |
@@ -111,7 +111,7 @@ $this->addButton(['label' => 'Nouvelle facture <span class="glyphicon glyphicon- | |||
]) : ''); | |||
}, | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |
@@ -108,7 +108,7 @@ $this->addButton(['label' => 'Nouveau devis <span class="glyphicon glyphicon-plu | |||
]) : ''); | |||
}, | |||
'send' => function($url, $model) { | |||
return ((!$model->isStatusDraft() && isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
return ((isset($model->user) && strlen($model->user->email) > 0) ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ | |||
'title' => 'Envoyer', 'class' => 'btn btn-default' | |||
]) : ''); | |||
}, |
@@ -60,8 +60,8 @@ $this->addBreadcrumb('Rapports') ; | |||
<div class="content-max-height"> | |||
<ul id="list-users"> | |||
<li v-for="user in usersArray" v-if="!termSearchUser.length || (termSearchUser.length && (user.lastname.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 || user.name.toLowerCase().indexOf(termSearchUser.toLowerCase()) != -1 ))"> | |||
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" @change="reportChange()" /> | |||
<label :for="'user_'+user.user_id" v-html="user.lastname+' '+user.name"></label> | |||
<input type="checkbox" :id="'user_'+user.user_id" v-model="user.checked" @change="reportChange()" /> | |||
<label :for="'user_'+user.user_id" v-html="(user.name_legal_person && user.name_legal_person.length) ? user.name_legal_person : user.lastname+' '+user.name"></label> | |||
</li> | |||
</ul> | |||
</div> |
@@ -64,7 +64,8 @@ class DeliveryNoteSearch extends DeliveryNote | |||
->with($optionsSearch['with']) | |||
->joinWith($optionsSearch['join_with']) | |||
->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([ | |||
'query' => $query, |
@@ -62,7 +62,8 @@ class InvoiceSearch extends Invoice | |||
->with($optionsSearch['with']) | |||
->joinWith($optionsSearch['join_with']) | |||
->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([ | |||
'query' => $query, |
@@ -62,7 +62,8 @@ class QuotationSearch extends Quotation | |||
->with($optionsSearch['with']) | |||
->joinWith($optionsSearch['join_with']) | |||
->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([ | |||
'query' => $query, |