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

Merge branch 'next-2.x' into 'main'

fix: tracking + text article

See merge request !135
Übergeordnete 38cedbbb 636713b5
No related branches found
Tags 2.9.0
2 Merge Requests!135fix: tracking + text article,!117Update 'next-3.x' with latest changes from 'main'
Pipeline #12955 mit Warnungen bestanden mit Phase
in 45 Sekunden
......@@ -79,8 +79,19 @@ public static function parseProduct(Product $Product, $Locale = null): array
public static function parseArticle(QUI\ERP\Accounting\Article $Article, QUI\Locale $Locale = null): array
{
$Product = Products::getProduct($Article->getId());
$item = self::parseProduct($Product);
try {
$Product = Products::getProduct($Article->getId());
$item = self::parseProduct($Product);
} catch (QUI\Exception) {
// text article
$item = [
'item_id' => '',
'item_name' => $Article->getTitle(),
'category' => '',
'manufacturer' => '',
'variant' => ''
];
}
$item['price'] = $Article->getPrice()->getValue();
$item['currency'] = $Article->getPrice()->getCurrency()->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