feat: add the product code to the travel export

This commit is contained in:
fromme committed 2026-10-15 17:26:12 +02:00
1 parent 6f6bf3695c
commit 6d2db1b258
3 files changed
+27

No files matched your search

+5
View File
@@ -157,9 +157,14 @@ class TravelExportBuilder
$pickupsWithoutMasterData,
);
// The product a date belongs to, from the enclosing <reise>. Not derivable from the
// date code: DWWMP runs dates coded DWWMW…, and group travels carry each group's code.
$productNode = $node->getNode(0)?->parentNode;
$travel = [
'busProId' => $travelId,
'code' => $node->attr('code'),
'productCode' => $productNode instanceof \DOMElement ? $this->trimOrNull($productNode->getAttribute('code')) : null,
'product' => $this->trimOrNull($this->getStringOrNullValue($node->filterXPath('.//text'))),
'dateFrom' => $dateFrom->format('Y-m-d'),
'dateTo' => $dateTo->format('Y-m-d'),