Commit c1086fb3 authored by Volker Krause's avatar Volker Krause

Use "Référence de dossier" as reservation number for SNCF TER tickets

Unlike the ticket number this has practical use, and it works equally well
for the purpose of merging for us.
parent 5e51f13e
......@@ -192,6 +192,8 @@ function parseSecutixPdf(pdf)
res.underName.givenName = code.substr(395, 19);
var text = pdf.pages[Context.pdfPageNumber].text;
var pnr = text.match(res.reservationNumber + '[^\n]* ([A-Z0-9]{6})\n');
res.reservationNumber = pnr[1];
var dep = text.match(/Départ [^ ]+ (\d+\.\d+\.\d+) à (\d+:\d+) [^ ]+ (.*)\n/);
var arr = text.match(/Arrivée [^ ]+ (\d+\.\d+\.\d+) à (\d+:\d+) [^ ]+ (.*)\n\s+(.*)\n/);
res.reservationFor.departureStation.name = dep[3];
......
Markdown is supported
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