create fn_fi_report_childs stored procedure to avoid recursive call function get_amount