Si Posted July 17, 2017 Share Posted July 17, 2017 Hi, Does anyone know how I can make the client side search on the invoices page, include searching for domain names (i.e. for hosting services or domains themselves) - i.e. the invoice items. currently when clients type in 'mydomain.com' (without quotes) it returns a blank. Yet there are invoices with this information. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 17, 2017 Share Posted July 17, 2017 Does anyone know how I can make the client side search on the invoices page, include searching for domain names (i.e. for hosting services or domains themselves) - i.e. the invoice items.currently when clients type in 'mydomain.com' (without quotes) it returns a blank. Yet there are invoices with this information. you've semi-answered your own question. that existing table is just an array of invoices, and the invoices database table doesn't contain ANY items/descriptions... so that's why it returns a blank - you're asking for information it doesn't have access to. you'd have to create a new (or replace the existing) array, e.g by querying the database and specifically tblinvoiceitems with perhaps a join to tblinvoices - it will depend on which details you want to show to the client... with a quick hook and some template changes, you can create something along the line you want to - though ignore the eccentric USD pricing I have in the v7.2.2 dev! and if you wanted to see the search function working - Unable to display content. Adobe Flash is required. i've taken some nasty/lazy shortcuts to save time writing this demo code - namely i'm formatting the date and currency in the template, which ideally you'd do in the hook, but that was irrelevant when writing as I just wanted to ensure the search function worked correctly on descriptions. so in summary, you'll have to do this in two parts - query the database via a hook to create a new array for use in the template, and then modify the template code to output that new array. 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.