question: private static boolean isInvoiceTypeRecurse ( GenericValue invoiceType , String inputTypeId ) throws GenericEntityException { String invoiceTypeId = invoiceType . getString ( "invoiceTypeId" ) ; String parentTypeId = invoiceType . getString ( "parentTypeId" ) ; if ( parentTypeId == null || invoiceTypeId . equals ( parentTypeId ) ) { return false ; } if ( parentTypeId . equals ( inputTypeId ) ) { return true ; } return isInvoiceTypeRecurse ( invoiceType . getRelatedOne ( "ParentInvoiceType" , false ) , inputTypeId ) ; }
target:  Recurses up invoice type tree via parentTypeId to see if input invoice type ID is in tree.