Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 73ffb070 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: set default tax to default shipping

Übergeordneter 6fe6e701
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -591,6 +591,7 @@ protected static function addDefaultShipping(ArticleList $Articles)
if (!$shippingFactor) {
$PriceFactor = Shipping::getInstance()->getDefaultPriceFactor();
$Articles->addPriceFactor($PriceFactor);
$Articles->recalculate();
}
} catch (QUI\Exception $Exception) {
}
......
......@@ -443,9 +443,14 @@ public function getDefaultPriceFactor(): QUI\ERP\Products\Utils\PriceFactor
'currency' => QUI\ERP\Defaults::getCurrency()->getCode()
]);
//$PriceFactor->setSum($price);
$PriceFactor->setNettoSum($price);
// set default vat
$Area = QUI\ERP\Defaults::getArea();
$TaxType = QUI\ERP\Tax\Utils::getTaxTypeByArea($Area);
$TaxEntry = QUI\ERP\Tax\Utils::getTaxEntry($TaxType, $Area);
$PriceFactor->setVat($TaxEntry->getValue());
return $PriceFactor;
}
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren