public static PisemnostDPHKH1VetaB3 CreateIfNeeded(GeneratorContext ctx) { var outAnnonTrans = from t in ctx.Transactions where t.Direction == Transaction.EDirection.Outgoing && t.IsAnnonymousInKH && t.Location == Transaction.ELocation.Domestic select t; var ret = new PisemnostDPHKH1VetaB3(); ret.zakl_dane1 = outAnnonTrans.TotalRoundedValue(); ret.zakl_dane1Specified = true; if (ret.zakl_dane1 == 0) { return(null); } ret.dan1 = outAnnonTrans.TotalRoundedVAT(); ret.dan1Specified = true; return(ret); }
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); }