Jump to content

Searching invoices client side


Si

Recommended Posts

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.

Link to comment
Share on other sites

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!

 

MyayUYE.png

 

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. :idea:

 

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. :idea:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated