added voucher field to the guest receipt
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user