get payment terms function fix for edit page