Logic hook "after_ui_frame" not trigger in sub-panel

I have created two custom modules – HT_Employee and HT_WorkDate and they are under the same module package in Module Builder. HT_WorkDate module has three fields – StartDate, EndDate, TotalDate. HT_Employee module has two fields – FirstName and LastName. Moreover, HT_Employee has a one-to-many relationship with HT_WorkDate (ie Each Employee can have many WorkDate records).

:frowning: :frowning:

When user clicks one of the HT_Employee records to go to employee detail view, the HT_WorkDate will be shown as a subpanel in the detail view. At that time I want to display the total sum of the TotalDate column at the bottom at the HT_WorkDate.

I have followed the example at https://suitecrm.com/forum/suitecrm-7-0-discussion/3215-add-calculation-total-on-accounts-module . I have created logic hook files, logic_hooks.php and logic_hook_class.php, and put them in “custom/modules/HT_Employee/” folder. Both process_record and after_ui_frame have been called successfully. But when I moved the logic hook files to “custom/modules/HT_WorkDate” folder (the sub-panel folder), ONLY process_record has been called. In order to show the total sum of TotalDate, the logic hook files must be in “custom/modules/HT_WorkDate” folder and after_ui_frame event must be called.

I am using SuiteCRM 7.6.4, PHP 7 and IIS 8. Please see attachments for logic hook files content.

Please help to show me the how to solve this problem.

Application hooks do not make use of the $bean argument.