ソースを参照

[backend] Distributions : gestion des abonnements manquants

dev
Guillaume 3年前
コミット
e48a7fb910
1個のファイルの変更9行の追加5行の削除
  1. +9
    -5
      backend/controllers/DistributionController.php

+ 9
- 5
backend/controllers/DistributionController.php ファイルの表示

@@ -363,11 +363,15 @@ class DistributionController extends BackendController
// abonnements manquants
$arraySubscriptions = Subscription::searchByDate($date);
$json['missing_subscriptions'] = [] ;
foreach ($arraySubscriptions as $subscription) {
if (!$subscription->hasOrderAlreadyExist($ordersArrayObject)) {
$json['missing_subscriptions'][] = [
'username' => $subscription->getUsername()
] ;
if($distribution->active) {
foreach ($arraySubscriptions as $subscription) {
if(!$subscription->hasOrderAlreadyExist($ordersArrayObject)
&& $subscription->productSubscription && count($subscription->productSubscription)) {

$json['missing_subscriptions'][] = [
'username' => $subscription->getUsername()
] ;
}
}
}
}

読み込み中…
キャンセル
保存