Browse Source

Merge branch 'dev'

prodstable
Guillaume 4 years ago
parent
commit
a2870a3520
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      common/models/Subscription.php

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

->where('id_producer = :id_producer') ->where('id_producer = :id_producer')
->andWhere('date >= :date_begin') ->andWhere('date >= :date_begin')
->andWhere('date >= :date_earliest_order'); ->andWhere('date >= :date_earliest_order');
$incomingDistributions = Distribution::filterDistributionsByDateDelay($incomingDistributions) ;


if ($this->date_end) { if ($this->date_end) {
$incomingDistributions->andWhere('date < :date_end'); $incomingDistributions->andWhere('date < :date_end');
$incomingDistributions->params($params); $incomingDistributions->params($params);
$incomingDistributionsArray = $incomingDistributions->all(); $incomingDistributionsArray = $incomingDistributions->all();


$incomingDistributions = Distribution::filterDistributionsByDateDelay($incomingDistributionsArray) ;

$matchedIncomingDistributionsArray = []; $matchedIncomingDistributionsArray = [];
foreach ($incomingDistributionsArray as $incomingDistribution) { foreach ($incomingDistributionsArray as $incomingDistribution) {
if ($this->matchWith($incomingDistribution->date)) { if ($this->matchWith($incomingDistribution->date)) {

Loading…
Cancel
Save