Debits and credits are the opposing sides of an accounting journal entry . They are used to change the ending balances in the general ledger accounts.