discount
This commit is contained in:
@@ -10,19 +10,19 @@ using System.Text.Json;
|
||||
// ============================================================================
|
||||
// FINAL RECEIPT - HTML PRINTER
|
||||
// ============================================================================
|
||||
//var receipt = TestHelpers.BuildSampleFinalReceipt(true);
|
||||
//var serializedReceipt = JsonSerializer.Serialize(receipt, new JsonSerializerOptions { WriteIndented = true });
|
||||
var receipt = TestHelpers.BuildSampleFinalReceipt(true);
|
||||
var serializedReceipt = JsonSerializer.Serialize(receipt, new JsonSerializerOptions { WriteIndented = true });
|
||||
|
||||
//var converter = new FinalReceiptConverter(lineWidth: 48, bigFontLineWidth: 24);
|
||||
//var printCommands = converter.Convert(serializedReceipt);
|
||||
var converter = new FinalReceiptConverter(lineWidth: 48, bigFontLineWidth: 24);
|
||||
var printCommands = converter.Convert(serializedReceipt);
|
||||
|
||||
//TestHelpers.PrintCommandsToConsole(printCommands);
|
||||
TestHelpers.PrintCommandsToConsole(printCommands);
|
||||
|
||||
//var printer = await TestHelpers.CreateHtmlPrinterAsync();
|
||||
//await TestHelpers.PrintCommandsToHtmlPrinterAsync(
|
||||
// printer,
|
||||
// printCommands,
|
||||
// logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
|
||||
var printer = await TestHelpers.CreateHtmlPrinterAsync();
|
||||
await TestHelpers.PrintCommandsToHtmlPrinterAsync(
|
||||
printer,
|
||||
printCommands,
|
||||
logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
|
||||
|
||||
|
||||
// ============================================================================
|
||||
@@ -43,20 +43,20 @@ using System.Text.Json;
|
||||
// ============================================================================
|
||||
// INVOICE RECEIPT - HTML PRINTER
|
||||
// ============================================================================
|
||||
var receipt = TestHelpers.BuildSampleInvoiceReceipt();
|
||||
//var serializedReceipt = JsonSerializer.Serialize(receipt, new JsonSerializerOptions { WriteIndented = true });
|
||||
var fileContent = File.ReadAllText("invoice.json");
|
||||
var serializedReceipt = JsonSerializer.Deserialize<string>(fileContent);
|
||||
var converter = new InvoiceReceiptConverter(lineWidth: 48, bigFontLineWidth: 24);
|
||||
var printCommands = converter.Convert(serializedReceipt);
|
||||
//var receipt = TestHelpers.BuildSampleInvoiceReceipt();
|
||||
////var serializedReceipt = JsonSerializer.Serialize(receipt, new JsonSerializerOptions { WriteIndented = true });
|
||||
//var fileContent = File.ReadAllText("invoice.json");
|
||||
//var serializedReceipt = JsonSerializer.Deserialize<string>(fileContent);
|
||||
//var converter = new InvoiceReceiptConverter(lineWidth: 48, bigFontLineWidth: 24);
|
||||
//var printCommands = converter.Convert(serializedReceipt);
|
||||
|
||||
TestHelpers.PrintCommandsToConsole(printCommands);
|
||||
//TestHelpers.PrintCommandsToConsole(printCommands);
|
||||
|
||||
var printer = await TestHelpers.CreateHtmlPrinterAsync();
|
||||
await TestHelpers.PrintCommandsToHtmlPrinterAsync(
|
||||
printer,
|
||||
printCommands,
|
||||
logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
|
||||
//var printer = await TestHelpers.CreateHtmlPrinterAsync();
|
||||
//await TestHelpers.PrintCommandsToHtmlPrinterAsync(
|
||||
// printer,
|
||||
// printCommands,
|
||||
// logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
|
||||
|
||||
|
||||
// ============================================================================
|
||||
|
||||
@@ -112,7 +112,10 @@ public static class TestHelpers
|
||||
},
|
||||
DiscountInfo = new DiscountInfo()
|
||||
{
|
||||
|
||||
Amount = -50.00m,
|
||||
Currency = "CHF",
|
||||
Description = "Fine Dine",
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user