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

Refunding shipments with taxes #242

Merged
merged 9 commits into from
Jan 19, 2021

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented Jan 13, 2021

Partially fixes #110

@GSadee GSadee added the Bug Confirmed bugs or bugfixes. label Jan 13, 2021
@GSadee GSadee requested a review from a team as a code owner January 13, 2021 08:40
@GSadee GSadee force-pushed the refunding-shipments-with-taxes branch 2 times, most recently from a3e2a6c to fdf0a3d Compare January 14, 2021 06:06
@GSadee GSadee changed the title [WIP] Refunding shipments with taxes Refunding shipments with taxes Jan 14, 2021
lchrusciel added a commit to Sylius/Sylius that referenced this pull request Jan 14, 2021
This PR was merged into the 1.9-dev branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | after #12116 and associated with Sylius/RefundPlugin#242
| License         | MIT


Commits
-------

066364b [Behat] Reproduce error with dirty entity
c849cde [OrderProcessor] Fix clearing tax adjustments
2060b09 [Behat] Add different scenario to cover issue with clearing tax adjustments
spec/TaxesApplicator/OrderItemUnitsTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
spec/TaxesApplicator/OrderItemsTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
spec/TaxesApplicator/OrderItemsTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
spec/TaxesApplicator/OrderItemsTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
spec/TaxesApplicator/OrderShipmentTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
'Sylius\RefundPlugin\Migrations' => [
'Sylius\Bundle\CoreBundle\Migrations',
'Sylius\Bundle\AdminApiBundle\Migrations',
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add functional test for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but not in this PR imo

spec/TaxesApplicator/OrderItemsTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
spec/TaxesApplicator/OrderShipmentTaxesApplicatorSpec.php Outdated Show resolved Hide resolved
src/Migrations/Version20201208105207.php Outdated Show resolved Hide resolved
src/TaxesApplicator/OrderItemUnitsTaxesApplicator.php Outdated Show resolved Hide resolved
Comment on lines +83 to +87
$unitTaxAdjustment->setDetails([
'taxRateCode' => $taxRate->getCode(),
'taxRateName' => $taxRate->getName(),
'taxRateAmount' => $taxRate->getAmount(),
]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previously it seems like an obvious candidate to have keys as consts + creation of this structure could be extracted to separate service

@GSadee GSadee force-pushed the refunding-shipments-with-taxes branch 2 times, most recently from 762b948 to 4336015 Compare January 18, 2021 05:51
src/Entity/ShipmentTrait.php Outdated Show resolved Hide resolved
@GSadee GSadee force-pushed the refunding-shipments-with-taxes branch from e76b710 to ce19c38 Compare January 18, 2021 15:42
lchrusciel added a commit to Sylius/Sylius that referenced this pull request Jan 19, 2021
…adee)

This PR was merged into the 1.9-dev branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master
| Bug fix?        | yes?
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | after #12116
| License         | MIT

According to Sylius/RefundPlugin#242 (comment)

Commits
-------

60cc71d [Migrations] Use adding SQL instead of query execution
{
parent::__construct();

/** @var ArrayCollection<array-key, BaseAdjustmentInterface> $this->adjustments */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a minor thing, but BaseAdjustmentInterface does not exist in the namespaces

@lchrusciel lchrusciel merged commit e23ab6f into Sylius:master Jan 19, 2021
@lchrusciel
Copy link
Member

Thanks, Grzegorz! 🥇

@GSadee GSadee deleted the refunding-shipments-with-taxes branch January 20, 2021 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with tax and shipments
5 participants