浏览代码

[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()
] ;
}
}
}
}

正在加载...
取消
保存