flagis4creceipts function now handles case where transactions=0