Exemple #1
0
        //public InvoiceService()//Just for messing about with SpecFlow
        //{
        //}

        public void PostInvoiceDTO(InvoiceDTO dto, int customerId, int productId)
        {
            CustomerDTO customerDTO = _customerService.ReturnCustomerByIdOld(customerId);
            ProductDTO  productDTO  = _productService.ReturnProductById(productId);

            //So would the tax calculation go here??
            dto = EFCorePoC.Helpers.TaxService.calculateTotalNet(dto);
            dto = EFCorePoC.Helpers.TaxService.calculateTax(dto);
            dto = EFCorePoC.Helpers.TaxService.calculateTotalGross(dto);

            _repository.PostInvoice(dto.ConvertDTOToInvoice(dto, customerDTO, productDTO));
        }