Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order tax adjustment is treated as shipping tax #16211

Open
shochdoerfer opened this issue May 2, 2024 · 0 comments
Open

Order tax adjustment is treated as shipping tax #16211

shochdoerfer opened this issue May 2, 2024 · 0 comments

Comments

@shochdoerfer
Copy link
Contributor

Sylius version affected: 1.12

Description
When trying to add a tax adjustment to an order, the tax adjustment is treated as shipping tax by Sylius. This seems to be a known issue as I found this comment in another issue: #11279 (comment)

Steps to reproduce

class CustomTaxAdjustment implements OrderProcessorInterface
{
    public function __construct(private FactoryInterface $adjustmentFactory)
    {
    }

    public function process(OrderInterface $order): void
    {
        /** @var Adjustment $adjustment */
        $adjustmentVat = $this->adjustmentFactory->createNew();
        $adjustmentVat->setType(AdjustmentInterface::TAX_ADJUSTMENT);
        $adjustmentVat->setAmount(475);
        $adjustmentVat->setLabel('Custom Tax adjustment');
        $adjustmentVat->setOriginCode('tax_adjust');
        $adjustmentVat->setNeutral(false);

        $order->addAdjustment($adjustmentVat);
    }
}

Possible Solution
As outlined in the linked comment, the issue could be solved by either:

  • introducing a specific SHIPPING_TAX_ADJUSTMENT
  • TAX_ADJUSTMENT on the Shipment level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant