public CustomerDetailViewModel Detail(int?id)
        {
            CustomerViewModel       customer       = _customerLogic.FindById(id);
            List <InvoiceViewModel> invoices       = _invoiceLogic.GetAll();
            CustomerDetailViewModel customerDetail = new CustomerDetailViewModel()
            {
                Customer = customer,
                Invoices = invoices
            };

            return(customerDetail);
        }
        public InvoiceDetailViewModel GetDetail(int?id)
        {
            InvoiceViewModel           invoice       = FindById(id);
            List <DetailLineViewModel> detailLines   = _detailLineBusinessLogic.FindByInvoice(invoice);
            InvoiceDetailViewModel     invoiceDetail = new InvoiceDetailViewModel()
            {
                Invoice     = invoice,
                DetailLines = detailLines,
                TotalAmount = GetTotalAmount(detailLines),
                Discount    = GetDiscount(detailLines),
                VAT         = GetVAT(detailLines),
                FinalTotal  = GetTotalPrice(detailLines)
            };

            invoiceDetail.Customer = _customerBusinessLogic.FindById(invoice.CustomerId);
            return(invoiceDetail);
        }