public void Generate(GeneratorContext ctx)
        {
            VetaD?.Generate(ctx);

            VetaA1 = null;
            VetaA2 = PisemnostDPHKH1VetaA2.CreateVetaA2Array(ctx);
            VetaA3 = null;
            VetaA4 = PisemnostDPHKH1VetaA4.CreateVetaA4Array(ctx);
            VetaA5 = PisemnostDPHKH1VetaA5.CreateIfNeeded(ctx);

            VetaB1 = null;
            VetaB2 = PisemnostDPHKH1VetaB2.CreateVetaB2Array(ctx);
            VetaB3 = PisemnostDPHKH1VetaB3.CreateIfNeeded(ctx);

            VetaC = new PisemnostDPHKH1VetaC();
            VetaC.Generate(ctx);
        }
        public static PisemnostDPHKH1VetaA5 CreateIfNeeded(GeneratorContext ctx)
        {
            var inAnnonTrans =
                from t in ctx.Transactions
                where t.Direction == Transaction.EDirection.Incoming && t.IsAnnonymousInKH
                select t;

            var ret = new PisemnostDPHKH1VetaA5();

            ret.zakl_dane1          = inAnnonTrans.TotalRoundedValue();
            ret.zakl_dane1Specified = true;

            if (ret.zakl_dane1 == 0)
            {
                return(null);
            }

            ret.dan1          = inAnnonTrans.TotalRoundedVAT();
            ret.dan1Specified = true;

            return(ret);
        }