You have to define a number range interval for cash journal documents. Each document then receives a unique number that does not clash with the G/L document number.
Note: This number range assigns a unique number per company code to each cash journal document. In addition, the cash journal documents are numbered sequentially per company code and cash journal.
Use the Tcode: FBCJA1 or the IMG path > Financial Accounting > Bank Accounting > Business Transactions > Cash Journal > Define Number Range Interval For Cash Journal Document.