예제 #1
0
        public static IReceiptBuilder GetBuilder(ReceiptTypes type)
        {
            switch (type)
            {
            case ReceiptTypes.Html:
                return(new HtmlReceiptBuilder());

            default:
                return(new PaperReceiptBuilder());
            }
        }
예제 #2
0
 public string Receipt(ReceiptTypes type, bool showDiscountCode = false)
 {
     return(ReceiptBuilderFactory.GetBuilder(type)
            .ForCompany(Company)
            .WithHeader()
            .WithLineItems(_lines, showDiscountCode)
            .WithSubTotal()
            .WithTax(TaxRate)
            .WithTotal()
            .WithFooter()
            .Build());
 }
예제 #3
0
        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);
        }