private ClubInvoiceModel ConvertToClubInvoiceLines(List <InvoiceLineModel> invoiceLines, InvoiceModel invoice) { ClubInvoiceModel cm = new ClubInvoiceModel(); cm.ClubRecieptDisplayTotalDue = invoice.InvoicePrice.TotalDue.FormatPrice().ToString(); cm.ClubRecieptQuantity = invoiceLines.FirstOrDefault().Quantity.ToString(); cm.ClubRecieptTotalVolumePoints = invoiceLines.FirstOrDefault().TotalVolumePoint.ToString(); cm.ClubRecieptProductName = invoiceLines.FirstOrDefault().ProductName; return(cm); }
public ClubInvoiceModel ConvertToClubInvoiceLines(IEnumerable <MemberInvoiceItem> items, InvoiceModel InvoiceModel) { ClubInvoiceModel cm = new ClubInvoiceModel(); if (InvoiceModel.ReceiptChannel == "ClubSaleReceipt" || InvoiceModel.ReceiptChannel == "Club Visit/Sale") { cm.ClubRecieptDisplayTotalDue = InvoiceModel.InvoicePrice.TotalDue.ToString("0.##"); cm.ClubRecieptQuantity = items.FirstOrDefault().Quantity.ToString(); cm.ClubRecieptTotalVolumePoints = items.FirstOrDefault().TotalVolumePoint.ToString("0.##"); cm.ClubRecieptProductName = items.FirstOrDefault().ProductName; } return(cm); }