Skip to content

Commit

Permalink
Merge pull request #58 from elgentos/WouterSteen-patch-7
Browse files Browse the repository at this point in the history
Changed Tax settings
  • Loading branch information
WouterSteen authored Jul 5, 2024
2 parents 071b2ab + 0937ebe commit aa76a0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Observer/SendPurchaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ public function sendPurchaseEvent($client, DataObject $transactionDataObject, ar
*/
private function getPaidProductPrice(\Magento\Sales\Model\Order\Item $orderItem)
{
return $this->scopeConfig->getValue('tax/display/type') == \Magento\Tax\Model\Config::DISPLAY_TYPE_EXCLUDING_TAX
? $orderItem->getBasePrice()
: $orderItem->getBasePriceInclTax();
return $this->scopeConfig->getValue('tax/display/type') === \Magento\Tax\Model\Config::DISPLAY_TYPE_INCLUDING_TAX
? $orderItem->getBasePriceInclTax()
: $orderItem->getBasePrice();
}

/**
Expand All @@ -201,8 +201,8 @@ private function getPaidProductPrice(\Magento\Sales\Model\Order\Item $orderItem)
*/
private function getPaidShippingCosts(\Magento\Sales\Model\Order\Invoice $invoice)
{
return $this->scopeConfig->getValue('tax/display/type') == \Magento\Tax\Model\Config::DISPLAY_TYPE_EXCLUDING_TAX
? $invoice->getBaseShippingAmount()
: $invoice->getBaseShippingInclTax();
return $this->scopeConfig->getValue('tax/display/type') == \Magento\Tax\Model\Config::DISPLAY_TYPE_INCLUDING_TAX
? $invoice->getBaseShippingInclTax()
: $invoice->getBaseShippingAmount();
}
}

0 comments on commit aa76a0b

Please sign in to comment.