From f5ff78e60ec8422d19d83cb5745f0426b8a1b1f5 Mon Sep 17 00:00:00 2001 From: yurii Date: Fri, 26 Jun 2026 13:36:44 +0100 Subject: [PATCH] added voucher field to the guest receipt --- cmd/hardlink/main.go | 2 +- internal/printer/printer.go | 6 ++++++ release notes.md | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/hardlink/main.go b/cmd/hardlink/main.go index 762855e..6dc798a 100644 --- a/cmd/hardlink/main.go +++ b/cmd/hardlink/main.go @@ -29,7 +29,7 @@ import ( ) const ( - buildVersion = "1.2.9" + buildVersion = "1.2.10" serviceName = "hardlink" pollingFrequency = 8 * time.Second ) diff --git a/internal/printer/printer.go b/internal/printer/printer.go index 676b04a..39ed3bc 100644 --- a/internal/printer/printer.go +++ b/internal/printer/printer.go @@ -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) diff --git a/release notes.md b/release notes.md index ebfe3ba..ce0d5c1 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ builtVersion is a const in main.go +#### 1.2.10 - 02 June 2026 +added voucher field to the guest receipt + #### 1.2.9 - 02 June 2026 added Dormakaba lock server integration