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

fix: price factors conversion corrected

Übergeordneter 51c669d4
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -367,6 +367,11 @@ public function recalculate()
}
}
// recalculate price factors
$ArticleList->importPriceFactors(
$Products->getPriceFactors()->toErpPriceFactorList()
);
$ArticleList->calc();
$this->Articles = $ArticleList;
......
......@@ -412,9 +412,12 @@ public function updateOrder()
}
}
$PriceFactors = $Products->getPriceFactors();
QUI::getEvents()->fireEvent(
'quiqqerOrderBasketToOrder',
[$this, $Order, $Products]
);
QUI::getEvents()->fireEvent('quiqqerOrderBasketToOrder', [$this, $Order, $PriceFactors]);
$PriceFactors = $Products->getPriceFactors();
$Order->getArticles()->importPriceFactors(
$PriceFactors->toErpPriceFactorList()
......
......@@ -74,6 +74,15 @@ public function __construct($orderHash, $User = false)
$articles = $data['articles'];
$this->import($articles);
// PriceFactors
$factors = $this->Order->getArticles()->getPriceFactors()->toArray();
foreach ($factors as $factor) {
$this->List->getPriceFactors()->add(
new QUI\ERP\Products\Utils\PriceFactor($factor)
);
}
}
/**
......@@ -221,8 +230,9 @@ public function toArray()
}
return [
'id' => $this->getId(),
'products' => $result
'id' => $this->getId(),
'products' => $result,
'priceFactors' => $Products->getPriceFactors()->toArray()
];
}
......
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