Skip to content
Code-Schnipsel Gruppen Projekte
Commit 23ebc3f9 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: consider text article in vat calc

Übergeordneter e6e735f6
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -559,6 +559,13 @@ public function addToOrder(QUI\ERP\Order\OrderInProcess $Order)
$priceFactors = [];
$articles = [];
$calculations = $Order->getArticles()->getCalculations();
$vatArray = $calculations['vatArray'];
$vat = false;
if (\count($vatArray) === 1) {
$vat = \array_key_first($vatArray);
}
foreach ($coupons as $coupon) {
/* @var $Coupon CouponCode */
......@@ -578,6 +585,11 @@ public function addToOrder(QUI\ERP\Order\OrderInProcess $Order)
foreach ($discounts as $Discount) {
$PriceFactor = $Discount->toPriceFactor();
if ($vat !== false) {
$PriceFactor->setVat($vat);
}
$PriceFactor->setTitle(
QUI::getLocale()->get('quiqqer/coupons', 'coupon.discount.title', [
'code' => $Coupon->getCode()
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren