how to automatically apply tenant credits to rent invoices