add money return / credit note receipt type with HTML test

This commit is contained in:
EugeneTes
2026-07-06 14:51:23 +02:00
parent 398a3e3db8
commit 91d2d18c80
8 changed files with 467 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ using Inspectron.Epson.PrintServer.Printers.Utils.BarReceipt;
using Inspectron.Epson.PrintServer.Printers.Utils.FinalRecipe;
using Inspectron.Epson.PrintServer.Printers.Utils.InvoiceReceipt;
using Inspectron.Epson.PrintServer.Printers.Utils.KitchenReceipt;
using Inspectron.Epson.PrintServer.Printers.Utils.MoneyReturnReceipt;
using Inspectron.Epson.PrintServer.Printers.Utils.OrderItems;
namespace EpsonTest;
@@ -462,6 +463,66 @@ public static class TestHelpers
};
}
// Mirrors money_return_receipt_data.json plus the credit-note specific fields
// shown in money_return_receipt.jpg (original invoice reference, refund type, tip).
public static MoneyReturnReceipt BuildSampleMoneyReturnReceipt()
{
var receipt = new MoneyReturnReceipt
{
CompanyName = "Big Mac Bistro",
Address1 = "Zelena 186",
Address2 = "79000 Lviv",
Phone = "080 039 47 69",
ReceiptNumber = "25",
DateTime = new DateTime(2026, 7, 4, 11, 8, 13),
Guests = 1,
Total = 20.00m,
Currency = "CHF",
PaymentMethod = "Cash",
PaymentAmount = 13.00m,
WaiterName = "Ronald McDonald",
VatNumber = " MWST",
ThankYouMessage = "Thank you for your order!",
GoodbyeMessageLine1 = "Auf Wiedersehen.",
GoodbyeMessageLine2 = "Powered by James",
// Credit-note specific fields
OriginalInvoiceNumber = "773",
OriginalDateTime = new DateTime(2026, 7, 4, 11, 7, 0),
RefundType = "Full refund",
Tip = 7.00m
};
receipt.Items.Add(new MoneyReturnReceiptItem
{
Quantity = 1,
Description = "Cloudy Bay Sauvignon Blanc 2024",
UnitPrice = 13.00m,
TotalPrice = 13.00m,
TaxCategory = "D"
});
receipt.Items.Add(new MoneyReturnReceiptItem
{
Quantity = 1,
Description = "Trinkgeld",
UnitPrice = 7.00m,
TotalPrice = 7.00m,
TaxCategory = "D"
});
receipt.TaxBreakdown.Add(new MoneyReturnTaxInfo
{
Category = "D",
Rate = 0m,
Gross = 20.00m,
Net = 20.00m,
TaxAmount = 0.00m,
Currency = "CHF"
});
return receipt;
}
#endregion
#region Print Helpers