Double-entry bookkeeping, in accounting, is a system of bookkeeping so named because every entry to an account requires a corresponding and opposite entry to a different account. For instance, recording a sale of $100 might require making two entries: a debit of $100 to an account named "Cash" and a credit of $100 to an account named "Revenue."
The accounting equation, , serves as an error detection tool; if at any point the sum of debits for all accounts does not equal the corresponding sum of credits for all accounts, an error has occurred. However, that the equation is satisfied is no guarantee that there are no errors; the ledger may still "balance" even if the wrong ledger accounts may have been debited or credited.
The oldest record of a complete double-entry system is the Messari (Italian: Treasurer's) accounts of the Republic of Genoa in 1340. The Messari accounts contain debits and credits journalised in a form, and include balances carried forward from the preceding year, and therefore enjoy general recognition as a double-entry system. By the end of the 15th century, the bankers and merchants of Florence, Genoa, Venice and Lübeck used this system widely.
However, the double-entry accounting method was said to be developed independently earlier in Korea during the Goryeo dynasty (918-1392) when Kaesong was a center of trade and industry at that time. The Four-element bookkeeping system was said to be originated in the 11th or 12th century.