-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SUPESC-577 Fixed wrong tax set calculation for product items. (#9630)
SUPESC-577 Fixed wrong tax set calculation for product items.
- Loading branch information
1 parent
6219757
commit d34787e
Showing
20 changed files
with
78 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...ommunication/Plugin/TaxProductConnector/CustomerAddressShippingAddressValidatorPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Customer\Communication\Plugin\TaxProductConnector; | ||
|
||
use Generated\Shared\Transfer\AddressTransfer; | ||
use Spryker\Zed\Kernel\Communication\AbstractPlugin; | ||
use Spryker\Zed\TaxProductConnectorExtension\Communication\Dependency\Plugin\ShippingAddressValidatorPluginInterface; | ||
|
||
/** | ||
* @deprecated Exists for Backward Compatibility reasons only. | ||
* | ||
* @method \Spryker\Zed\Customer\CustomerConfig getConfig() | ||
* @method \Spryker\Zed\Customer\Business\CustomerFacadeInterface getFacade() | ||
* @method \Spryker\Zed\Customer\Communication\CustomerCommunicationFactory getFactory() | ||
* @method \Spryker\Zed\Customer\Persistence\CustomerQueryContainerInterface getQueryContainer() | ||
*/ | ||
class CustomerAddressShippingAddressValidatorPlugin extends AbstractPlugin implements ShippingAddressValidatorPluginInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* - Checks if `AddressTransfer.idCustomerAddress` or `AddressTransfer.firstName` and `AddressTransfer.lastName` are not empty. | ||
* | ||
* @api | ||
* | ||
* @param \Generated\Shared\Transfer\AddressTransfer $addressTransfer | ||
* | ||
* @return bool | ||
*/ | ||
public function isValid(AddressTransfer $addressTransfer): bool | ||
{ | ||
return $addressTransfer->getIdCustomerAddress() !== null | ||
|| (trim($addressTransfer->getFirstName()) && trim($addressTransfer->getLastName())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.