cash record function