src/Sylius/Component/Order/Model/OrderItem.php 1 location
|
@@ 302-309 (lines=8) @@
|
| 299 |
|
/** |
| 300 |
|
* {@inheritdoc} |
| 301 |
|
*/ |
| 302 |
|
public function removeAdjustment(AdjustmentInterface $adjustment) |
| 303 |
|
{ |
| 304 |
|
if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) { |
| 305 |
|
$this->adjustments->removeElement($adjustment); |
| 306 |
|
$this->subtractFromAdjustmentsTotal($adjustment); |
| 307 |
|
$adjustment->setAdjustable(null); |
| 308 |
|
} |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
/** |
| 312 |
|
* {@inheritdoc} |
src/Sylius/Component/Order/Model/OrderItemUnit.php 1 location
|
@@ 115-125 (lines=11) @@
|
| 112 |
|
/** |
| 113 |
|
* {@inheritdoc} |
| 114 |
|
*/ |
| 115 |
|
public function removeAdjustment(AdjustmentInterface $adjustment) |
| 116 |
|
{ |
| 117 |
|
if ($adjustment->isLocked() || !$this->hasAdjustment($adjustment)) { |
| 118 |
|
return; |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
$this->adjustments->removeElement($adjustment); |
| 122 |
|
$this->subtractFromAdjustmentsTotal($adjustment); |
| 123 |
|
$this->orderItem->recalculateUnitsTotal(); |
| 124 |
|
$adjustment->setAdjustable(null); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
/** |
| 128 |
|
* {@inheritdoc} |
src/Sylius/Component/Order/Model/Order.php 1 location
|
@@ 418-425 (lines=8) @@
|
| 415 |
|
/** |
| 416 |
|
* {@inheritdoc} |
| 417 |
|
*/ |
| 418 |
|
public function removeAdjustment(AdjustmentInterface $adjustment) |
| 419 |
|
{ |
| 420 |
|
if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) { |
| 421 |
|
$this->adjustments->removeElement($adjustment); |
| 422 |
|
$this->subtractFromAdjustmentsTotal($adjustment); |
| 423 |
|
$adjustment->setAdjustable(null); |
| 424 |
|
} |
| 425 |
|
} |
| 426 |
|
|
| 427 |
|
/** |
| 428 |
|
* {@inheritdoc} |