public Receipt GenerateReceipt() { var recipt = new Receipt(_taxRate) { Company = Company, InvoiceNumber = new Random().Next(1000, 10000), //Just a randon invoice number, we'd use a primary key or a generated number for the invoice number Date = DateTime.UtcNow //in a real system we would convert this to the correct timezone. }; ProcessLineItems(recipt); recipt.ReconcileTotal(); return recipt; }
public Receipt GenerateReceipt() { var recipt = new Receipt(_taxRate) { Company = Company, InvoiceNumber = new Random().Next(1000, 10000), //Just a randon invoice number, we'd use a primary key or a generated number for the invoice number Date = DateTime.UtcNow //in a real system we would convert this to the correct timezone. }; ProcessLineItems(recipt); recipt.ReconcileTotal(); return(recipt); }