mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Recalculate order adjustments total after adjustment is added or removed from order.
This commit is contained in:
parent
a8419bbdf2
commit
6b69753689
1 changed files with 4 additions and 0 deletions
|
|
@ -237,6 +237,8 @@ class Order implements OrderInterface
|
|||
$this->addToAdjustmentsTotal($adjustment);
|
||||
$adjustment->setAdjustable($this);
|
||||
}
|
||||
|
||||
$this->recalculateAdjustmentsTotal();
|
||||
}
|
||||
|
||||
public function removeAdjustment(AdjustmentInterface $adjustment): void
|
||||
|
|
@ -246,6 +248,8 @@ class Order implements OrderInterface
|
|||
$this->subtractFromAdjustmentsTotal($adjustment);
|
||||
$adjustment->setAdjustable(null);
|
||||
}
|
||||
|
||||
$this->recalculateAdjustmentsTotal();
|
||||
}
|
||||
|
||||
public function hasAdjustment(AdjustmentInterface $adjustment): bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue