This commit is contained in:
EugeneTes
2026-01-29 11:14:15 +01:00
parent a5ee4fc2fe
commit 10c0ca20da
10 changed files with 63 additions and 29 deletions

View File

@@ -8,7 +8,7 @@ public class InvoiceReceipt
public string Phone { get; set; }
public string ReceiptNumber { get; set; }
public DateTime DateTime { get; set; }
public int Guests { get; set; }
public int? Guests { get; set; }
public List<ReceiptItem> Items { get; set; } = new List<ReceiptItem>();
public decimal Total { get; set; }
public string Currency { get; set; }

View File

@@ -34,7 +34,10 @@ public class ReceiptConverter
receiptLine += $"{invoiceReceipt.DateTime:HH:mm dd.MM.yyyy}".PadLeft(_lineWidth / 2);
commands.Add(new PrintCommand(receiptLine,isBold:true));
commands.Add(new PrintCommand($"Guests: {invoiceReceipt.Guests}"));
if(invoiceReceipt.Guests != null)
commands.Add(new PrintCommand($"Guests: {invoiceReceipt.Guests}"));
commands.Add(new PrintCommand(""));
// Items