public BudgetCashflowDivisionItemDto(string currencyIdString, string currencyCode, double currencyRate, string divisionIdString, string unitIdString, double total, BudgetCashflowCategoryLayoutOrder layoutOrder) { int.TryParse(currencyIdString, out var currencyId); CurrencyId = currencyId; int.TryParse(unitIdString, out var unitId); UnitId = unitId; int.TryParse(divisionIdString, out var divisionId); DivisionId = divisionId; if (currencyCode != "IDR") { CurrencyNominal = total; ActualNominal = total * currencyRate; } else { Nominal = total; ActualNominal = total; } LayoutOrder = layoutOrder; LayoutName = layoutOrder.ToDescriptionString(); }
public BudgetCashflowItemDto(int id, int currencyId, double currencyNominal, double nominal, double actualNominal, BudgetCashflowCategoryLayoutOrder layoutOrder) { Id = id; CurrencyId = currencyId; CurrencyNominal = currencyNominal; Nominal = nominal; ActualNominal = actualNominal; LayoutOrder = layoutOrder; LayoutName = layoutOrder.ToDescriptionString(); }
public BudgetCashflowDivisionItemDto(int currencyId, int divisionId, int unitId, double nominal, double currencyNominal, double actualNominal, BudgetCashflowCategoryLayoutOrder layoutOrder) { CurrencyId = currencyId; CurrencyNominal = currencyNominal; Nominal = nominal; ActualNominal = actualNominal; LayoutOrder = layoutOrder; LayoutName = layoutOrder.ToDescriptionString(); UnitId = unitId; DivisionId = divisionId; }