The next AR reference number needs to be update. You can run this sql statement to do so:

update "main_init" set ar_next_reference_no = (select max(reference_no) from "ar_posted_trxs") + 1;