print server with new concept
This commit is contained in:
@@ -83,9 +83,6 @@ public class ReceiptConverter
|
||||
commands.Add(new PrintCommand(""));
|
||||
|
||||
// Footer info
|
||||
//commands.Add(new PrintCommand(Center($"Bedient von: {finalReceipt.WaiterName}", false)));
|
||||
//commands.Add(new PrintCommand(Center($"Terminal: {finalReceipt.Terminal}", false)));
|
||||
//commands.Add(new PrintCommand(Center($"Tisch: {finalReceipt.TableNumber}", false)));
|
||||
commands.Add(new PrintCommand($"Bedient von:".PadLeft(_lineWidth / 2) + $" {finalReceipt.WaiterName}"));
|
||||
commands.Add(new PrintCommand($"Terminal:".PadLeft(_lineWidth / 2) + $" {finalReceipt.Terminal}"));
|
||||
commands.Add(new PrintCommand($"Tisch:".PadLeft(_lineWidth / 2)+$" {finalReceipt.TableNumber}"));
|
||||
@@ -94,6 +91,33 @@ public class ReceiptConverter
|
||||
|
||||
// VAT number
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.VatNumber, false)));
|
||||
commands.Add(new PrintCommand(""));
|
||||
|
||||
// Payment Terminal Receipt
|
||||
if (finalReceipt.TerminalReceipt != null)
|
||||
{
|
||||
var terminal = finalReceipt.TerminalReceipt;
|
||||
|
||||
commands.Add(new PrintCommand(Center(terminal.ReceiptType, false)));
|
||||
commands.Add(new PrintCommand(Center(terminal.BookingType, false)));
|
||||
commands.Add(new PrintCommand(Center(terminal.PaymentSystem, false)));
|
||||
commands.Add(new PrintCommand(terminal.TransactionNumber));
|
||||
commands.Add(new PrintCommand($"{terminal.TransactionDateTime:dd.MM.yyyy}".PadRight(_lineWidth/2) + $"{terminal.TransactionDateTime:HH:mm:ss}".PadLeft(_lineWidth/2)));
|
||||
|
||||
commands.Add(new PrintCommand($"Trm-Id:".PadRight(_lineWidth/2) + $"{terminal.TerminalId}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"AID:".PadRight(_lineWidth/2) + $"{terminal.AID}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Trx. Seq-Cnt:".PadRight(_lineWidth/2) + $"{terminal.TransactionSeqCount}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Trx. Ref-No:".PadRight(_lineWidth/2) + $"{terminal.TransactionRefNo}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Auth. Code:".PadRight(_lineWidth/2) + $"{terminal.AuthCode}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Acq-Id:".PadRight(_lineWidth/2) + $"{terminal.AcquirerId}".PadLeft(_lineWidth/2)));
|
||||
|
||||
commands.Add(new PrintCommand($"EFT {terminal.Currency}:".PadRight(_lineWidth/2) + $"{terminal.EftAmount:F2}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Trinkgeld {terminal.Currency}:".PadRight(_lineWidth/2) + $"{terminal.TipAmount:F2}".PadLeft(_lineWidth/2)));
|
||||
commands.Add(new PrintCommand($"Total-EFT {terminal.Currency}:".PadRight(_lineWidth/2) + $"{terminal.TotalEftAmount:F2}".PadLeft(_lineWidth/2)));
|
||||
|
||||
commands.Add(new PrintCommand(new string('-', _lineWidth)));
|
||||
commands.Add(new PrintCommand(""));
|
||||
}
|
||||
|
||||
// Thank you message
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.ThankYouMessage, false)));
|
||||
|
||||
Reference in New Issue
Block a user