added voucher field to the guest receipt

This commit is contained in:
2026-06-26 13:36:44 +01:00
parent ffd814e076
commit f5ff78e60e
3 changed files with 10 additions and 1 deletions
+6
View File
@@ -39,6 +39,7 @@ type (
Name string `xml:"customername"`
Checkout string `xml:"checkoutdatetime"`
RoomID string `xml:"roomno"`
Voucher string `xml:"voucher"`
Map string `xml:"roommap"`
Directions string `xml:"roomdirections"`
}
@@ -141,6 +142,11 @@ func BuildRoomTicket(details RoomDetailsRec) ([]byte, error) {
write([]byte{ESC, 'a', CENTER})
writeStr(Layout.HotelSpecificDetails + "\n\n")
if details.Voucher != "" {
s := strings.Repeat("*", 44)
writeStr(fmt.Sprintf("%s\n\n%s\n\n%s\n\n", s, details.Voucher, s))
}
// 8) Room map image
mapPath := filepath.Join(Layout.RoomMapFolderPath, details.Map)
mapBytes, err := printMap(mapPath)