public static string GetQuotePdfPath(PdfQuoteModel model) { model.ReportPath = GetReportPath(); var htmlUrl = GetQuoteHtmlUrl(model); if (string.IsNullOrEmpty(htmlUrl)) { return(string.Empty); } /* page settings */ var converter = new HtmlToPdf(); converter.Options.PdfPageSize = PdfPageSize.A4; converter.Options.PdfPageOrientation = PdfPageOrientation.Portrait; converter.Options.MarginTop = 24; converter.Options.MarginLeft = 10; converter.Options.MarginRight = 10; converter.Options.MarginBottom = 0; /* footer settings */ converter.Options.DisplayFooter = true; converter.Footer.DisplayOnFirstPage = true; converter.Footer.DisplayOnOddPages = true; converter.Footer.DisplayOnEvenPages = true; converter.Footer.Height = 24; converter.Footer.Add(new PdfTextSection(0, -10, "Page: {page_number} of {total_pages}", new Font("Arial", 6)) { HorizontalAlign = PdfTextHorizontalAlign.Center }); /* new pdf */ var pdfPath = string.Format(@"{0}\{1}.pdf", model.ReportPath, model.FileName); var fullPath = string.Format(@"{0}\{1}", MapPath, pdfPath); var doc = converter.ConvertUrl(htmlUrl); doc.Save(fullPath); doc.Close(); return(fullPath); }
public string TestGetQuotePdfPath() { var model = new PdfQuoteModel { RootUrl = Request.RequestUri.GetLeftPart(UriPartial.Authority), TemplatePath = System.Configuration.ConfigurationManager.AppSettings["Template_JobQuote"], FileName = string.Format("jobquote{0:mmssfffff}", DateTime.UtcNow), HeadContact = "HeadContact", HeadDeliverTo = "HeadDeliverTo11", HeadQuoteTo = "HeadQuoteTo111", HeadQuoteDate = "HeadQuoteDate1111", HeadQuotation = "HeadQuotation111", HeadAccountManager = "HeadAccountManager111", SumSubTotal = "$55500.50", SumGst = "$10000.00", SumAmount = "$65500.50", QuoteDetailList = new List <PdfQuoteDetailModel> { new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Page1-End", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, /* Page1 = 26 */ new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Page2-End", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, /* Page2 = 38 */ new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, } }; return(Common.PdfHelper.GetQuotePdfPath(model)); }
public async Task CreateQuotePdfAndSendEmail(string rootUrl, int managerId, OrderInfoModel model, Order order, string name, string isTripleEmail = null) { try { var manager = await _managerRepository.GetById(managerId); var orderAddr = model.ToOrderAddrModel(); var pdfModel = new PdfQuoteModel { RootUrl = rootUrl, TemplatePath = System.Configuration.ConfigurationManager.AppSettings["Template_JobQuote"], FileName = string.Format("quote{0}", order.QuoteCode), HeadContact = "PO Box 1111" + "<br>" + "Burswood WA 6100 " + "<br>" + "T (08) 9470 7300" + "<br>" + "F (08) 9362 6210" + "<br>" + "<br>" + "E [email protected]" + "<br>" + "www.datanet.com.au" + "<br>" + "<br>" + "ABN: 56 123 914 616", HeadDeliverTo = order.ContactName + (!string.IsNullOrEmpty(order.ContactName) ? "<br>" : "") + order.CompanyName + (!string.IsNullOrEmpty(order.CompanyName) ? "<br>" : "") + orderAddr?.Addr1 + (!string.IsNullOrEmpty(orderAddr?.Addr1) ? "<br>" : "") + orderAddr?.Addr2 + (!string.IsNullOrEmpty(orderAddr?.Addr2) ? "<br>" : "") + orderAddr?.Addr3 + (!string.IsNullOrEmpty(orderAddr?.Addr3) ? "<br>" : "") + orderAddr?.State + " " + orderAddr?.PostCode, HeadQuoteTo = order.CompanyName, HeadQuoteDate = order.CreateTime?.AddHours(model.TimeZone).ToString("dd'/'MM'/'yyyy"), HeadQuotation = order.QuoteCode, HeadAccountManager = order.ManagerName + "<br>" + manager?.Phone + "<br>" + "<a href='mailto:" + manager?.Email + "'>" + manager?.Email + "</a>", SumSubTotal = (order.Amount - order.GST)?.ToString("c2", CulturesHelper.Australia), SumGst = order.GST?.ToString("c2", CulturesHelper.Australia), SumAmount = order.Amount?.ToString("c2", CulturesHelper.Australia), QuoteDetailList = new List <PdfQuoteDetailModel>() { } }; foreach (var productItem in model.OrderProducts) { var product = await _productRepository.GetById(productItem.ProductId); pdfModel.QuoteDetailList.Add(new PdfQuoteDetailModel() { StockCode = product.Code, Description = product.ShortDesc, Qty = productItem.Quantity.ToString() + ".00", UnitPrice = productItem.Price?.ToString("c2", CulturesHelper.Australia), LineTotal = ((productItem.Quantity * productItem.Price)?.ToString("c2", CulturesHelper.Australia)) }); } pdfModel.QuoteDetailList.Add(new PdfQuoteDetailModel() { StockCode = "DELIVERY", Description = "Delivery", Qty = "1.00", UnitPrice = model.DeliveryCharge.ToString("c2", CulturesHelper.Australia), LineTotal = model.DeliveryCharge.ToString("c2", CulturesHelper.Australia) }); order.PDFPath = PdfHelper.GetQuotePdfPath(pdfModel); await _orderRepositroy.AddOrUpdate(order); // await SendEmailById(order.Id, rootUrl, isTripleEmail); var sendEmailResult = await SendEmailById(order.Id, rootUrl, isTripleEmail); if (sendEmailResult.Status != 0) { throw new Exception(sendEmailResult.Message); } } catch (Exception ex) { //add order history var history = new OrderHistory { Id = 0, CreateTime = DateTime.UtcNow, CreateBy = name, TableName = "", FieldName = "", OldValue = "", NewValue = "", Note = Constants.OrderHistoryAddQuote, Operator = Constants.OrderHistoryErrorOperator, OrderId = order.Id }; await _orderHistoryRepository.AddOrUpdate(history); Logger.WriteErrorLogForOrder("OrderService", "CreateQuotePdfAndSendEmail", ex, order.Id); } }
private static string GetQuoteHtmlUrl(PdfQuoteModel model) { var htmlUrl = string.Format(@"{0}/{1}", model.RootUrl, model.TemplatePath); var request = (HttpWebRequest)WebRequest.Create(htmlUrl); var response = (HttpWebResponse)request.GetResponse(); if (response.StatusCode != HttpStatusCode.OK) { return(string.Empty); } var responseStream = response.GetResponseStream(); if (responseStream == null) { return(string.Empty); } var readStream = response.CharacterSet == null ? new StreamReader(responseStream) : new StreamReader(responseStream, Encoding.GetEncoding(response.CharacterSet)); var content = readStream.ReadToEnd(); /* Value Replacement */ content = content.Replace("{{head_contact}}", model.HeadContact); content = content.Replace("{{head_quote_date}}", model.HeadQuoteDate); content = content.Replace("{{head_quotation}}", model.HeadQuotation); content = content.Replace("{{head_account_manager}}", model.HeadAccountManager); content = content.Replace("{{head_quote_to}}", model.HeadQuoteTo); content = content.Replace("{{head_deliver_to}}", model.HeadDeliverTo); content = content.Replace("{{sum_sub_total}}", model.SumSubTotal); content = content.Replace("{{sum_gst}}", model.SumGst); content = content.Replace("{{sum_amount}}", model.SumAmount); #region Build Quote Table var needManualClosed = false; var totalCount = model.QuoteDetailList.Count; const string rowPageBreak = @"<div class='row'><div style='page-break-before: always'></div></div>"; const string tableHead = @"<div class='row'><div class='col-xs-12 table_right_angled' style='padding-top: 2px;'> <table class='table table-bordered right_angled'> <thead> <tr> <th style='width: 250px;'>STOCKCODE</th> <th>DESCRIPTION</th> <th style='width: 80px;'>QTY</th> <th style='width: 120px;'>UNIT PRICE</th> <th style='width: 120px;'>LINE TOTAL</th> </tr> </thead> <tbody>" ; const string tableRow = @"<tr><td>{0}</td><td>{1}</td><td class='text-right'>{2}</td><td class='text-right'>{3}</td><td class='text-right'>{4}</td></tr>"; const string tableFoot = @"</tbody></table></div></div>"; var sbDetailList = new StringBuilder(tableHead); foreach (var item in model.QuoteDetailList) { sbDetailList.AppendLine(string.Format(tableRow, item.StockCode, item.Description, item.Qty, item.UnitPrice, item.LineTotal)); var currentNumber = model.QuoteDetailList.IndexOf(item) + 1; var otherPageRemainder = (currentNumber - 26) % 38; #region Page Break /* Bank Panel */ var pageBreakBank = totalCount >= 20 && totalCount <= 25 || otherPageRemainder >= 32 && otherPageRemainder <= 37 ? rowPageBreak : string.Empty; content = content.Replace("{{page_break_bank}}", pageBreakBank); /* Terms Panel */ var pageBreakTerm = totalCount >= 17 && totalCount <= 19 || otherPageRemainder >= 29 && otherPageRemainder <= 31 ? rowPageBreak : string.Empty; content = content.Replace("{{page_break_term}}", pageBreakTerm); #endregion needManualClosed = currentNumber == 26 || otherPageRemainder == 0; if (!needManualClosed) { continue; } sbDetailList.AppendLine(tableFoot); sbDetailList.AppendLine(rowPageBreak); if (currentNumber >= totalCount) { continue; } sbDetailList.AppendLine(tableHead); } if (!needManualClosed) { sbDetailList.AppendLine(tableFoot); } #endregion content = content.Replace("{{table_details}}", sbDetailList.ToString()); var htmlPath = string.Format(@"{0}\{1}.html", model.ReportPath, model.FileName); var fullPath = string.Format(@"{0}\{1}", MapPath, htmlPath); File.WriteAllText(fullPath, content); readStream.Close(); response.Close(); return(string.Format(@"{0}/{1}", model.RootUrl, htmlPath)); }
public void GeneratePdfTest() { var model = new PdfQuoteModel { RootUrl = "/", TemplatePath = System.Configuration.ConfigurationManager.AppSettings["Template_JobQuote"], FileName = string.Format("jobquote{0:mmssfffff}", DateTime.UtcNow), HeadContact = "HeadContact", HeadDeliverTo = "HeadDeliverTo", HeadQuoteTo = "HeadQuoteTo", HeadQuoteDate = "HeadQuoteDate", HeadQuotation = "HeadQuotation", HeadAccountManager = "HeadAccountManager", SumSubTotal = "$555.50", SumGst = "$100.00", SumAmount = "$655.50", QuoteDetailList = new List <PdfQuoteDetailModel> { new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, new PdfQuoteDetailModel { StockCode = "Product-A", Description = "Description-A", Qty = "$10.00", UnitPrice = "$1.01", LineTotal = "$10.10" }, new PdfQuoteDetailModel { StockCode = "Product-B", Description = "Description-B", Qty = "$20.00", UnitPrice = "$2.02", LineTotal = "$40.40" }, new PdfQuoteDetailModel { StockCode = "Product-C", Description = "Description-C", Qty = "$30.00", UnitPrice = "$3.03", LineTotal = "$90.90" }, new PdfQuoteDetailModel { StockCode = "Product-D", Description = "Description-D", Qty = "$40.00", UnitPrice = "$4.04", LineTotal = "$161.60" }, new PdfQuoteDetailModel { StockCode = "Product-E", Description = "Description-E", Qty = "$50.00", UnitPrice = "$5.05", LineTotal = "$252.50" }, } }; var result = Common.PdfHelper.GetQuotePdfPath(model); Assert.IsNotNull(result); }