Counting was invented before negative numbers, but "double-entry accounting", which is what people refer to when they say debit and credit, was only invented in the 18th century, IIRC.
https://en.m.wikipedia.org/wiki/Double-entry_bookkeeping