1.0.3
This commit is contained in:
@@ -22,7 +22,10 @@ public class ReceiptConverter
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.Phone, false)));
|
||||
commands.Add(new PrintCommand(""));
|
||||
commands.Add(new PrintCommand(""));
|
||||
|
||||
if (finalReceipt.IsDebtor)
|
||||
{
|
||||
commands.Add(new PrintCommand("Debitorenrechnung"));
|
||||
}
|
||||
// FinalReceipt info
|
||||
string receiptLine = $"Rechnung Nr. {finalReceipt.ReceiptNumber}".PadRight(_lineWidth/2)+$"{finalReceipt.DateTime:HH:mm dd.MM.yyyy}".PadLeft(_lineWidth/2);
|
||||
commands.Add(new PrintCommand(receiptLine,isBold:true));
|
||||
@@ -41,6 +44,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("")); // Reini
|
||||
@@ -91,6 +103,12 @@ public class ReceiptConverter
|
||||
string taxDetail = ($"{tax.Category}:"+ $"{tax.Rate}%".PadLeft(5)).PadRight(_lineWidth / 4) + $"{tax.Gross:F2} {tax.Currency}".PadLeft(_lineWidth/4)+$"{tax.Net:F2} {tax.Currency}".PadLeft(_lineWidth/4)+$"{tax.TaxAmount:F2} {tax.Currency}".PadLeft(_lineWidth / 4);
|
||||
commands.Add(new PrintCommand(taxDetail));
|
||||
}
|
||||
|
||||
if (finalReceipt.TaxBreakdown.Count(x => x.Category.ToLower()!="d")==0)
|
||||
{
|
||||
commands.Add(new PrintCommand("Nicht mehrwertsteuerpflichtig"));
|
||||
}
|
||||
|
||||
commands.Add(new PrintCommand(""));
|
||||
|
||||
// Footer info
|
||||
@@ -135,6 +153,16 @@ public class ReceiptConverter
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.ThankYouMessage, false)));
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.GoodbyeMessageLine1, false)));
|
||||
commands.Add(new PrintCommand(Center(finalReceipt.GoodbyeMessageLine2, false)));
|
||||
if (finalReceipt.IsDebtor)
|
||||
{
|
||||
commands.Add(new PrintCommand(""));
|
||||
commands.Add(new PrintCommand(""));
|
||||
commands.Add(new PrintCommand(""));
|
||||
commands.Add(new PrintCommand("".PadRight(_lineWidth, '-')));
|
||||
commands.Add(new PrintCommand("Unterschrift"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
return commands;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user