70 likes | 89 Views
GL trial balance check. <xbrli:xbrl> <gl-cor:accountingEntries> <gl-cor:entryHeader> <gl-cor:qualifierEntry …> balance-brought-forward </ …> <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …"> D </ …> </gl-cor:entryDetail> …
E N D
GL trial balance check <xbrli:xbrl> <gl-cor:accountingEntries> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>balance-brought-forward</ …> <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> … </ gl-cor:entryHeader> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>standard</ …> <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> … </ gl-cor:entryHeader> </ gl-cor:accountingEntries> </ xbrli:xbrl> accountbalances D – debit C - credit period’schanges Check if sections are in balance: sum(amts with ‘D’ siblings) = sum(amts with ‘C’ siblings)
General filter • Just an XPath 2 expression • Need to test if sibling of amount is credit code <gl-cor:entryDetail> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> </gl-cor:entryDetail> • test=“../gl-cor:debitCreditCode eq ‘D’”
Value filter • Value matches an XPath 2 expression • Not Nil test • Nil test • Precision expression
GL ending balance computation <xbrli:xbrl> <gl-cor:accountingEntries> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>balance-brought-forward</ …> <gl-cor:entryDetail> <gl-cor:account> <gl-cor:accountMainID …>5100</ …> <gl-cor:accountMainDescription …>Supplies</ …> <gl-cor:accountType …>account</ …> </gl-cor:account> <gl-cor:amount …>242678.26</ …> <gl-cor:debitCreditCode …">D</ …> <gl-cor:xbrlInfo> <gl-cor:xbrlInclude …>beginning_balance</…> </gl-cor:xbrlInfo> </gl-cor:entryDetail> … </ gl-cor:entryHeader> <gl-cor:entryHeader> <gl-cor:qualifierEntry …>standard</ …> <gl-cor:entryDetail> … </gl-cor:entryDetail> … </ gl-cor:entryHeader> </ gl-cor:accountingEntries> </ xbrli:xbrl> aggregate by account skip ending_balances
GL ending balance test • Added 2 more variables • For each account • Get amount for ending-balance entry with ‘C’ (credit) code • Get amount for ending-balance entry with ‘D’ (debit) code • Change equation to test • Sum (credits which are not ending-balance - debits which are not ending-balance + credit which is ending-balance – debit which is not ending-balance) < 1.00