Skip to content

Commit 0f488ab

Browse files
committed
fix(BO): fix order tax update
1 parent 7922ac1 commit 0f488ab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Adapter/Order/CommandHandler/ChangeOrderDeliveryAddressHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function handle(ChangeOrderDeliveryAddressCommand $command)
114114
$this->synchronizeOrderWithCart($order, $cart, $comparator);
115115

116116
$order->id_address_delivery = $address->id;
117-
$this->orderDetailTaxUpdater->updateOrderDetailsTaxes($order);
117+
// Tax update is now handled centrally in OrderAmountUpdater::update()
118118
$this->orderAmountUpdater->update($order, $cart);
119119
} finally {
120120
$this->contextStateManager->restorePreviousContext();

src/Adapter/Order/CommandHandler/ChangeOrderInvoiceAddressHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function handle(ChangeOrderInvoiceAddressCommand $command)
8181
$cart->update();
8282

8383
$order->id_address_invoice = $address->id;
84-
$this->orderDetailTaxUpdater->updateOrderDetailsTaxes($order);
84+
// Tax update is now handled centrally in OrderAmountUpdater::update()
8585
$this->orderAmountUpdater->update($order, $cart);
8686
}
8787
}

src/Adapter/Order/OrderAmountUpdater.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ public function update(
147147
$modifiedProducts = $productsComparator->getModifiedProducts();
148148
$this->updateOrderModifiedProducts($modifiedProducts, $cart, $order);
149149

150+
// Update order detail taxes (must be done after all product updates and before totals calculation)
151+
$this->orderDetailUpdater->updateOrderDetailsTaxes($order);
152+
150153
// Update order totals
151154
$this->updateOrderTotals($order, $cart, $computingPrecision);
152155

0 commit comments

Comments
 (0)