Topic: Is it possible to extend the function get_ctrl in reports_classes.inc?
Is it possible to extend the function get_ctrl in reports_classes.inc?
How can I add a custom report parameter?
I would like a custom report where a GL account range is selected automatically, to the defined gl accounts needed for the report, but the select gl accounts is still available for the user to select a different range of gl accounts.
Currently there is:-
File: \reporting\includes\reports_classes.inc 270: case 'ACCOUNTS': // not used 271: return gl_account_types_list($name, null, _("No Account Group Filter"), true); 272: 273: case 'ACCOUNTS_NO_FILTER': // not used 274: return gl_account_types_list($name); 275: 276: case 'GL_ACCOUNTS': 277: return gl_all_accounts_list($name);
I've tried to add parameters to reports_custom.php:-
_('From Account') => 'GL_ACCOUNTS',
_('To Account') => 'GL_ACCOUNTS',
but nothing worked for me - is this possible?
Another alternative would be to delete the gl account selection parameters and hard code the fromacc to the toacc in the report, but I would prefer a solution to the above.
Any help or advice would be much appreciated