Why do I have invoices with the same Reference number in the Debtors section of Cashbook?
You can have references with the same number if you want.
However if a warning is not coming up that a reference number has already been used, check in the Setup tab of Debtors and make sure that the box for Warn if Duplicate Invoice Number is Used is ticked.