Commit d4c89c1e authored by Volker Krause's avatar Volker Krause
Browse files

Extract CD ticket code from 1154UT vendor blocks

parent 899bf7a4
Pipeline #265754 passed with stage
in 13 minutes and 15 seconds
......@@ -171,6 +171,8 @@ function parsePdfTicket(content, node, triggerNode) {
if (triggerNode.result[0]['@type'] == 'TrainReservation') {
res = JsonLd.apply(triggerNode.result[0], res);
res.reservationNumber = triggerNode.content.block('1154UT').findSubBlock('KK').content;
res.reservedTicket.ticketNumber = triggerNode.result[0].reservationNumber;
} else {
res.reservedTicket = triggerNode.result[0];
}
......
......@@ -133,7 +133,7 @@ Vendor1154UTSubBlock Vendor1154UTBlock::findSubBlock(const char id[SubBlockTypeS
QVariant Vendor1154UTBlock::findSubBlock(const QString &str) const
{
if (str.size() != 3 || !isValid()) {
if (str.size() != 2 || !isValid()) {
return {};
}
const auto b = findSubBlock(str.toUtf8().constData());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment