diff --git a/src/QUI/ERP/Shipping/Types/ShippingEntry.php b/src/QUI/ERP/Shipping/Types/ShippingEntry.php index ce1f6c5e6deabca95d7969e5e89353d889e08499..29b32f8ea13296fb08edbe22943baadca0adf480 100644 --- a/src/QUI/ERP/Shipping/Types/ShippingEntry.php +++ b/src/QUI/ERP/Shipping/Types/ShippingEntry.php @@ -187,8 +187,18 @@ public function getShippingType() */ public function getPriceDisplay() { + $PriceFactor = $this->toPriceFactor(); + + // display is incl vat + $vat = $PriceFactor->getVat(); + $price = $this->getPrice(); + + if ($vat) { + $price = $price + ($price * ($vat / 100)); + } + $Price = new QUI\ERP\Money\Price( - $this->getPrice(), + $price, QUI\ERP\Defaults::getCurrency() ); @@ -731,6 +741,10 @@ public function toPriceFactor( $Locale = null, QUI\ERP\Order\AbstractOrder $Order = null ) { + if ($Order === null) { + $Order = $this->Order; + } + $PriceFactor = new QUI\ERP\Products\Utils\PriceFactor([ 'title' => QUI::getLocale()->get('quiqqer/shipping', 'shipping.order.title', [ 'shipping' => $this->getTitle($Locale)