Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }