private List <KHInvoice> CreateInvoices(FakturoidContext context, ExportSetup setup) { var invoices = context.Invoices.Select().Where(w => w.issued_on >= setup.GetReferenceDate() && w.issued_on < setup.GetEndDate()); return(invoices.Select(s => new KHInvoice { InvoiceNumber = s.number, InvoiceDate = s.issued_on.Value.ToString("dd.MM.yyyy"), PartnerVATNumber = s.client_registration_no, PriceWithoutTaxH = s.subtotal, PriceTaxH = s.total - s.subtotal, }).ToList()); }
private List <KHInvoicedExpense> CreateInvoicedExpenses(FakturoidContext context, ExportSetup setup) { var expenses = context.Expenses.Select().Where(w => w.issued_on >= setup.GetReferenceDate() && w.issued_on < setup.GetEndDate() && w.total > 10000).ToList(); return(expenses.Select(s => new KHInvoicedExpense { PriceWithoutTaxH = s.subtotal, PriceTaxH = s.total - s.subtotal, }).ToList()); }
private KHSmallExpenses CreateSummedExpense(FakturoidContext context, ExportSetup setup) { var expenses = context.Expenses.Select().Where(w => w.issued_on >= setup.GetReferenceDate() && w.issued_on < setup.GetEndDate() && w.total < 10000).ToList(); return(new KHSmallExpenses { PriceWithoutTaxH = expenses.GetTotalWithoutVAT(21), PriceTaxH = expenses.GetVAT(21), PriceWithoutTaxL = expenses.GetTotalWithoutVAT(15), PriceTaxL = expenses.GetVAT(15), //PriceWithoutTaxN = GetTotalWithVAT(expenses, 0), //PriceTaxN = GetVAT(expenses, 0), }); }
private VATInvoiced CreateInvoiced(FakturoidContext context, ExportSetup setup) { var invoices = context.Invoices.Select() .Where(w => w.issued_on >= setup.GetReferenceDate() && w.issued_on < setup.GetEndDate()).ToList(); return(new VATInvoiced { WithoutTaxH = Decimal.Round(invoices.GetTotalWithoutVAT(FakturoidExtensions.VAT_RATE_REGULAR), 0), TaxH = Decimal.Round(invoices.GetVAT(FakturoidExtensions.VAT_RATE_REGULAR), 0), WithoutTaxL = Decimal.Round(invoices.GetTotalWithoutVAT(FakturoidExtensions.VAT_RATE_LOW), 0), TaxL = Decimal.Round(invoices.GetVAT(FakturoidExtensions.VAT_RATE_LOW), 0), }); }