public ProfitLoss ConvertGeneralLedgerResponseToProfitLoss(GeneralLedgerResponse generalLedgerResponse, string office) { Type type = Type.Sales; if (generalLedgerResponse.VatType == Type.Purchase.ToString().ToLower()) { type = Type.Purchase; } var g = new ProfitLoss { Office = office, Code = generalLedgerResponse.Code, Name = generalLedgerResponse.Name, Financials = new Financials { Matchtype = MatchType.Notmatchable, Accounttype = "balance", Level = 1 } }; var fin = new VatCode(); fin.Name = generalLedgerResponse.VatName; fin.Type = type; g.Type = generalLedgerResponse.Type; return(g); }
public BalanceSheet ConvertGeneralLedgerResponseToBalanceSheet(GeneralLedgerResponse generalLedgerResponse, string office) { Type type = Type.Sales; if (generalLedgerResponse.VatType == Type.Purchase.ToString().ToLower()) { type = Type.Purchase; } var g = new BalanceSheet { Office = office, Code = generalLedgerResponse.Code, Name = generalLedgerResponse.Name, Financials = new Financials { Matchtype = MatchType.Notmatchable, Accounttype = "balance", Level = 1, Vatcode = new VatCode { Name = generalLedgerResponse.VatName, Type = type } } }; g.Type = generalLedgerResponse.Type; return(g); }