Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        private VATReceived CreateReceived(FakturoidContext context, ExportSetup setup)
        {
            var expenses = context.Expenses.Select().Where(w => w.issued_on >= setup.GetReferenceDate() && w.issued_on < setup.GetEndDate()).ToList();

            return(new VATReceived
            {
                WithoutTaxH = Decimal.Round(expenses.GetTotalWithoutVAT(FakturoidExtensions.VAT_RATE_REGULAR), 0),
                TaxH = Decimal.Round(expenses.GetVAT(FakturoidExtensions.VAT_RATE_REGULAR), 0),
                WithoutTaxL = Decimal.Round(expenses.GetTotalWithoutVAT(FakturoidExtensions.VAT_RATE_LOW), 0),
                TaxL = Decimal.Round(expenses.GetVAT(FakturoidExtensions.VAT_RATE_LOW), 0),
            });
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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),
            });
        }