public static IReceiptBuilder GetBuilder(ReceiptTypes type) { switch (type) { case ReceiptTypes.Html: return(new HtmlReceiptBuilder()); default: return(new PaperReceiptBuilder()); } }
public string Receipt(ReceiptTypes type, bool showDiscountCode = false) { return(ReceiptBuilderFactory.GetBuilder(type) .ForCompany(Company) .WithHeader() .WithLineItems(_lines, showDiscountCode) .WithSubTotal() .WithTax(TaxRate) .WithTotal() .WithFooter() .Build()); }
public static IReceipt GetReceipt(ReceiptTypes type, Guid walletId, Guid accountId, string accountAddr, string txId, bool loadtxdetails = true, bool loadCurrencyDetails = true) { switch (type) { case ReceiptTypes.Bitcoin: return(null); break; case ReceiptTypes.Neblio: var rcp = new NeblioReceipt(txId, walletId, accountId, accountAddr, loadtxdetails, loadCurrencyDetails); return(rcp); } return(null); }