Example #1
0
        public EreloonNotaFactuur(IQueryable <EreloonNota> _ereloonNotas, decimal _totaal) :
            base(_ereloonNotas.First().Wie, _ereloonNotas.First().DossierNummer, _ereloonNotas.First().DossierNaam,
                 _ereloonNotas.First().Partij, 0)
        {
            foreach (var ereloonNota in _ereloonNotas)
            {
                Dactylo          += (short)(ereloonNota.Dactylo);
                Fotokopie        += (short)(ereloonNota.Fotokopie);
                Fax              += (short)(ereloonNota.Fax);
                Verplaatsing     += (short)(ereloonNota.Verplaatsing);
                BijkomendeKosten += ereloonNota.BijkomendeKosten;
                EreloonUren      += ereloonNota.EreloonUren;
                WachtUren        += ereloonNota.WachtUren;
                BTW               = ereloonNota.BTW;
                Rolzetting       += ereloonNota.Rolzetting;
                Dagvaarding      += ereloonNota.Dagvaarding;
                Betekening       += ereloonNota.Betekening;
                Uitvoering       += ereloonNota.Uitvoering;
                Anderen          += ereloonNota.Anderen;
                Derden           += ereloonNota.Derden;
                Totaal           += ereloonNota.Totaal;

                if (ereloonNota.Facturen != null)
                {
                    Dactylo          -= (short)(ereloonNota.Facturen.Sum(f => f.Dactylo));
                    Fotokopie        -= (short)(ereloonNota.Facturen.Sum(f => f.Fotokopie));
                    Fax              -= (short)(ereloonNota.Facturen.Sum(f => f.Fax));
                    Verplaatsing     -= (short)(ereloonNota.Facturen.Sum(f => f.Verplaatsing));
                    BijkomendeKosten -= ereloonNota.Facturen.Sum(f => f.BijkomendeKosten);
                    EreloonUren      -= TimeSpan.FromHours(ereloonNota.Facturen.Sum(f => f.EreloonUren.TotalHours));
                    WachtUren        -= TimeSpan.FromHours(ereloonNota.Facturen.Sum(f => f.WachtUren.TotalHours));
                    BTW               = ereloonNota.BTW - ereloonNota.Facturen.Sum(f => f.BTW);
                    Rolzetting       -= ereloonNota.Facturen.Sum(f => f.Rolzetting);
                    Dagvaarding      -= ereloonNota.Facturen.Sum(f => f.Dagvaarding);
                    Betekening       -= ereloonNota.Facturen.Sum(f => f.Betekening);
                    Uitvoering       -= ereloonNota.Facturen.Sum(f => f.Uitvoering);
                    Anderen          -= ereloonNota.Facturen.Sum(f => f.Anderen);
                    Derden           -= ereloonNota.Facturen.Sum(f => f.Derden);
                    Totaal           -= ereloonNota.Facturen.Sum(f => f.Totaal);
                }

                if (KostenSchema is null && !(ereloonNota.KostenSchema is null))
                {
                    KostenSchema  = ereloonNota.KostenSchema;
                    BTWpercentage = KostenSchema.BTW;
                }
Example #2
0
        private void Toevoeg_knop(object sender, EventArgs e)
        {
            this.SplitContainer.Panel2Collapsed = true;
            if (null == Schemas)
            {
                Schemas = new List <KostenSchema>();
            }
            var NieuwKostenSchema = new KostenSchema
            {
                Naam         = KSNaam.Text,
                Prestaties   = decimal.Parse(KSPrestaties.Text, NumberStyles.Currency, Culture),
                Wacht        = decimal.Parse(KSWacht.Text, NumberStyles.Currency, Culture),
                Verplaatsing = decimal.Parse(KSVerplaatsing.Text, NumberStyles.Currency, Culture),
                Mail         = decimal.Parse(KSMail.Text, NumberStyles.Currency, Culture),
                Fotokopie    = decimal.Parse(KSFotokopie.Text, NumberStyles.Currency, Culture),
                Dactylo      = decimal.Parse(KSDactylo.Text, NumberStyles.Currency, Culture),
                BTW          = BTW,
                Archive      = false
            };

            KostenSchemaSource.Add(NieuwKostenSchema);
            Schemas.Add(NieuwKostenSchema);
            KostenSchemaForm_Load(sender, e);
        }