When the Batch is initially created, include Reference as a field. Commit the Batch as the pledge payment and this will create a reference. Then open the Batch again and remove the data from the Reference column. Commit the Batch again as cash gifts and the reference is now blank.

OR

Mark the option to ‘Automatically apply gifts to pledges and recurring gifts’ when committing the pledge payments instead of manually linking the gifts to the pledges. Then the second time, unmark this option. The reference will be blank for the cash-only gifts in this scenario.