|
|
|
|
|
|
|
|
$distributionsIncomingArray = $this->distributionRepository->findDistributionsIncoming(true); |
|
|
$distributionsIncomingArray = $this->distributionRepository->findDistributionsIncoming(true); |
|
|
foreach($distributionsIncomingArray as $distribution) { |
|
|
foreach($distributionsIncomingArray as $distribution) { |
|
|
ProductDistribution::updateAll([ |
|
|
ProductDistribution::updateAll([ |
|
|
|
|
|
'active' => false |
|
|
|
|
|
], [ |
|
|
'id_product' => $product->id, |
|
|
'id_product' => $product->id, |
|
|
'id_distribution' => $distribution->id, |
|
|
'id_distribution' => $distribution->id, |
|
|
'active' => false |
|
|
|
|
|
]); |
|
|
]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |