Ticket archive and reprint
Review/update the xml structure of a ticket for archive and reprinting.
Archive are required for LF2016 to prevent any modification of the tickets, even across database upgrades. All tickets should be registered into read-only tables (but can also be registered in a more structured format in other tables too for data analysis). These are referred as fiscal tickets in specifications.
The image headers are stored in a read-only dedicated table, xml can then only mention an id to reduce space.
These records are also chained to detect any corruption or alteration. A checksum is computed with the id, the content and the checksum of the previous ticket. The first record holds only the checksum of it's own data.
Affected tickets are sales tickets and Z tickets.
The xml should embed a reference to the dtd or version used at generation time. Printers (either on screen or for printers) can reprint the original ticket as is.