Skip to content

Commit

Permalink
Change OneStopShopVatRateDataProvider to accept also ActiveRow as…
Browse files Browse the repository at this point in the history
… payment

item type.

remp/crm#3245
  • Loading branch information
lubos-michalik committed Jul 9, 2024
1 parent 8911df2 commit b7084b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Models/OneStopShop/OneStopShop.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public function adjustPaymentItemContainerVatRates(
return;
}


foreach ($paymentItemContainer->items() as $paymentItem) {
$vatRate = $this->getCountryVatRate($paymentCountry, $paymentItem);
// Currently, VAT is stored as int in payment_items table
Expand Down Expand Up @@ -188,7 +187,7 @@ public function getFrontendData(bool $enableRequestCache = true): OneStopShopFro
return $data;
}

public function getCountryVatRate(ActiveRow $paymentCountry, PaymentItemInterface $paymentItem): float|int
public function getCountryVatRate(ActiveRow $paymentCountry, PaymentItemInterface|ActiveRow $paymentItem): float|int
{
$vatRates = $this->vatRatesRepository->getByCountry($paymentCountry);
if (!$vatRates) {
Expand Down

0 comments on commit b7084b3

Please sign in to comment.