Skip to content

Commit c76f4a3

Browse files
committed
Fix bug where a promotion was not applied if a deleted promotion was applied before
1 parent 73a0237 commit c76f4a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Doctrine/ORM/ChannelPricingRepositoryTrait.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ public function resetMultiplier(DateTimeInterface $dateTime, string $bulkIdentif
3333
->andWhere('o.bulkIdentifier != :bulkIdentifier') // this ensures that the loop we are in doesn't turn into an infinite loop
3434
->andWhere(
3535
$qb->expr()->orX(
36-
// if the multiplier is different from 1 we know that it was discounted before
36+
// if the multiplier is different from 1 we know that it was discounted before, and we reset it
3737
'o.multiplier != 1',
3838

3939
// if the previous job timed out, the bulk identifier will be different from the
4040
// bulk identifier for this run. This will ensure that they will also be handled in this run
4141
'o.bulkIdentifier is not null',
42+
43+
// if the applied promotions is not null we know that it was discounted before, and we reset it
44+
'o.appliedPromotions is not null'
4245
)
4346
)
4447
->setParameter('bulkIdentifier', $bulkIdentifier)

0 commit comments

Comments
 (0)