new receipt formats
This commit is contained in:
@@ -46,7 +46,7 @@ public class KitchenReceiptConverter
|
||||
|
||||
|
||||
// Gangs
|
||||
|
||||
|
||||
foreach (Gang gang in kitchenReceipt.Gangs)
|
||||
{
|
||||
|
||||
@@ -55,6 +55,13 @@ public class KitchenReceiptConverter
|
||||
{
|
||||
PrintDish(dish, commands);
|
||||
}
|
||||
|
||||
if (gang != kitchenReceipt.Gangs.Last())
|
||||
{
|
||||
commands.Add(new PrintCommand(""){IsCut = true});
|
||||
commands.Add(new PrintCommand(""));
|
||||
commands.Add(new PrintCommand(""));
|
||||
}
|
||||
}
|
||||
|
||||
if (kitchenReceipt.Gangs.Count > 0)
|
||||
@@ -96,7 +103,11 @@ public class KitchenReceiptConverter
|
||||
private static void PrintDish(Dish dish, List<PrintCommand> commands)
|
||||
{
|
||||
string dishLine = $"{dish.Number}x {dish.Name}";
|
||||
commands.Add(new PrintCommand(dishLine){IsTall = true});
|
||||
string guestInfo = dish.GuestId.HasValue ? $"{dish.GuestId.Value} " : "";
|
||||
|
||||
//todo: add word wrap if guest id is present and guestInfo + dish line too long. add spaces in front of continued lines to align with dish name start position
|
||||
|
||||
commands.Add(new PrintCommand(guestInfo+dishLine) {IsTall = true});
|
||||
// Modifications
|
||||
if (dish.Modifications != null && (dish.Modifications.Removed.Any() || dish.Modifications.Added.Any()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user