Pārlūkot izejas kodu

[backend] Abonnements : ordre produits

dev
Guillaume Bourgeois pirms 5 gadiem
vecāks
revīzija
ac3585532f
1 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. +7
    -3
      backend/controllers/SubscriptionController.php

+ 7
- 3
backend/controllers/SubscriptionController.php Parādīt failu

@@ -117,7 +117,9 @@ class SubscriptionController extends BackendController
}
// produits
$productsArray = Product::searchAll() ;
$productsArray = Product::searchAll([], [
'orderby' => 'product.order ASC'
]) ;
if ($model->load(Yii::$app->request->post()) && $model->validate()
&& $model->save())
@@ -191,7 +193,9 @@ class SubscriptionController extends BackendController
}

// produits
$productsArray = Product::searchAll() ;
$productsArray = Product::searchAll([], [
'orderby' => 'product.order ASC'
]) ;

if ($model->load(Yii::$app->request->post()) && $model->validate()) {
if (!strlen($model->date_end)) {
@@ -270,7 +274,7 @@ class SubscriptionController extends BackendController
}]) ;
}
$productsArray = $productsQuery->asArray()->all() ;
$productsArray = $productsQuery->asArray()->orderBy('order ASC')->all() ;
foreach($productsArray as &$theProduct) {
$theProduct['unit_save'] = $theProduct['unit'] ;

Notiek ielāde…
Atcelt
Saglabāt