namespace AccountsDAL.DTO.AccountsReports { // A ledger row is an AccountRegister detail row plus the running-balance-per-account fields that // distinguish a ledger/statement-of-account from a flat register, and the currency-basis/report // currency conversion fields (Ledger supports all four TVOUCHERDETAIL currency axes; AccountRegister // only ever showed the transaction-currency columns already on the base DTO). public class AccountLedgerDetailReportDTO : AccountRegisterDetailReportDTO { // Account's balance immediately before PeriodFromDate, in the requested CurrencyBasis. public decimal AccountOpeningBalance { get; set; } // Running balance after this row, computed per-account (PARTITION BY VoucherAccountId) ordered // by VoucherDate/Slno — the defining feature of a ledger vs a register. public decimal RunningBalance { get; set; } // 0 = OU/base, 1 = Transaction, 2 = Customer/party, 3 = Group — echoes back the basis this row's // Debit/Credit/AccountOpeningBalance/RunningBalance were computed against. public int CurrencyBasis { get; set; } // 0 = no conversion requested. When set and a VEXCHANGEDATEWISE rate was found for this voucher's // date, ReportConversionRate/ReportConvertedAmount are populated; otherwise both are null (no // rate available for that date/currency pair, or the basis doesn't carry its own currency id — // see AccountLedgerReportsQB's FROM_CURRENCY_EXPR comment). public int ReportCurrencyId { get; set; } public decimal? ReportConversionRate { get; set; } public decimal? ReportConvertedAmount { get; set; } } }