pikerr Posted August 13, 2019 Share Posted August 13, 2019 Dear Team, Im trying to customise the invoice report. Is there a way to filter User ID is not equal ( for example is 10), the rest will be generated. The middle option is Exact Match and Containing which will list the User ID 10 for this scenario. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 13, 2019 Share Posted August 13, 2019 a quick hack would be to edit the report code and change... ? $val . " LIKE '%" . db_escape_string($filterq[$i]) . "%'" to... ? $val . " NOT LIKE '%" . db_escape_string($filterq[$i]) . "%'" that then makes the "Containing" filter into a "Does Not Contain" filter (you can edit the title in the dropdown if you want to)... you could then choose Userid, enter the value 10 and it should show you invoices for all users apart from userid #10 the longer solution would be to have all three options - but that coding is a little more involved. I should also add that if you're editing a core WHMCS report, that you should rename it, because during a WHMCS automatic update, it will probably get overwritten with the core original report file again and your customisation will be lost... and there's nothing to stop you having a separate negative report that uses this "does not contain" option, and leaving the default invoices report as is. 0 Quote Link to comment Share on other sites More sharing options...
pikerr Posted August 14, 2019 Author Share Posted August 14, 2019 Hi Brian, Thanx for your advise, is it possible to retain Exact Match and Containing, meanwhile add one more option does not containing? As I require Containing for the month (2019-07), does not containing user id 10 Thank you 0 Quote Link to comment Share on other sites More sharing options...
pikerr Posted August 14, 2019 Author Share Posted August 14, 2019 Hi Brian, Thanx for your advise, is it possible to retain Exact Match and Containing, meanwhile add one more option does not containing? As I require Exact Match for Status Paid Containing for the month (2019-07) Does not containing user id 10 Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 14, 2019 Share Posted August 14, 2019 7 hours ago, pikerr said: Thanx for your advise, is it possible to retain Exact Match and Containing, meanwhile add one more option does not containing? yes - personally, i'd have done it outside of WHMCS and just queried the table directly, but what you want to do can be done in WHMCS. to save time, I won't bother posting the code changes, but you'll know where to look when you see the attached file - only the filters and the dropdown selection fields have been changed. 7 hours ago, pikerr said: Exact Match for Status Paid Containing for the month (2019-07) Does not containing user id 10 invoices_enhanced.php 0 Quote Link to comment Share on other sites More sharing options...
pikerr Posted September 26, 2019 Author Share Posted September 26, 2019 thanx Brian, it works 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.