This commit is contained in:
EugeneTes
2026-01-26 10:53:09 +01:00
parent 70466d1007
commit 53cf40c5e3
7 changed files with 70 additions and 24 deletions

View File

@@ -21,4 +21,5 @@ public class ReceiptItem
public decimal UnitPrice { get; set; }
public decimal TotalPrice { get; set; }
public string TaxCategory { get; set; }
public List<string> SubItems { get; set; }
}

View File

@@ -41,6 +41,15 @@ public class ReceiptConverter
string itemLine = quantityDesc + new string(' ', spacesNeeded) + prices;
commands.Add(new PrintCommand(itemLine));
// SubItems
if (item.SubItems != null)
{
foreach (var subItem in item.SubItems)
{
commands.Add(new PrintCommand($" - {subItem}"));
}
}
}
commands.Add(new PrintCommand(""));