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

Find more reservation number variants in SNCF TER PDF tickets

parent edbf8922
Pipeline #113498 passed with stage
in 2 minutes and 46 seconds
...@@ -250,7 +250,7 @@ function parseSecutixPdf(pdf, node, triggerNode) ...@@ -250,7 +250,7 @@ function parseSecutixPdf(pdf, node, triggerNode)
var pnr = text.match(res.reservationNumber + '[^\n]* ([A-Z0-9]{6})\n'); var pnr = text.match(res.reservationNumber + '[^\n]* ([A-Z0-9]{6})\n');
var layoutVersion = 1; var layoutVersion = 1;
if (!pnr) { if (!pnr) {
pnr = text.match(/PAO\s*:\s*([A-Z0-9]{6})\n/); pnr = text.match(/(?:PAO|REF)\s*:\s*([A-Z0-9]{6,8})\n/);
layoutVersion = 2; layoutVersion = 2;
} }
res.reservationNumber = pnr[1]; res.reservationNumber = pnr[1];
......
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