The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
Quick Search by invoice number
  • mgmlmgml July 2010

    Hello All!!

    If my question was answered elsewhere, then my apologies. Here is what I found today: I use the quick search under Money / Invoices and do a search for invoice number 1 though to 20 with no problems, but above 20, it brings the number + 1? I'll try to explain:

    In Quick Search I type number 23 and invoice ID return is 24? similarly, I enter invoice number 24 and 25 is return.

    Any pointers on how to fix this?

  • jmruasjmruas July 2010

    I believe we never can't get the invoice number, just the invoice ID.

    The reason is simple: if we have (or can have) some different types of invoices, each of them can have the same number.

    The ID makes no sense in the search, because we never know an ID to search.
    Much important will be to add the possibility user search for a customer field.

    Jos

  • bcaa8rabcaa8ra July 2010

    I does look like in the other screens i.e. people, products the drop down menu has "ID" to allow searching for the ID field.
    Jason,
    I would like to suggest for continuity that Invoice Search get modified to match the other screens and also add invoice number search. I can see where this will be very useful.

    Invoice Number - should search for si_invoices index_id field
    ID - should search the si_invoices.id field

    For a test I did a quick modification to \modules\invoice\manage.js.php

    around line 48
    changed.........
    searchitems : [
    {display: '{/literal}{$LANG.invoice_number}{literal}', name : 'iv.id'},
    {display: '{/literal}{$LANG.biller}{literal}', name : 'b.name'},
    {display: '{/literal}{$LANG.customer}{literal}', name : 'c.name', isdefault: true}
    ],

    to........
    searchitems : [
    {display: 'ID', name : 'iv.id'},
    {display: '{/literal}{$LANG.invoice_number}{literal}', name : 'iv.index_id'},
    {display: '{/literal}{$LANG.biller}{literal}', name : 'b.name'},
    {display: '{/literal}{$LANG.customer}{literal}', name : 'c.name', isdefault: true}
    ],


    this did exactly as expected.

  • mgmlmgml July 2010

    Hi All!

    I think the issue here is, the Invoices "Quick Search" when set to search "Invoice Number" is actually searching the Invoice ID instead of "Index_ID". Example:
    I changed the Invoicing number to start from 900. Therefore, created 2 invoices, 901, 902. If I search for "Invoice Number" 901 or 902 the grid returns bank. However, if I do a search for 1 or 2, it returns 901 or 902.

    I can see where it is piking the fields from si_invoices table.

    Where can I change the Select statement to point to Index_ID ?

  • bcaa8rabcaa8ra July 2010

    You can just change the one field in the file I mentioned in the previous post.

    \modules\invoice\manage.js.php

    around line 48
    change ..................

    searchitems : [
    {display: '{/literal}{$LANG.invoice_number}{literal}', name : 'iv.id'},
    {display: '{/literal}{$LANG.biller}{literal}', name : 'b.name'},
    {display: '{/literal}{$LANG.customer}{literal}', name : 'c.name', isdefault: true}
    ],

    to........
    searchitems : [
    {display: '{/literal}{$LANG.invoice_number}{literal}', name : 'iv.index_id'},
    {display: '{/literal}{$LANG.biller}{literal}', name : 'b.name'},
    {display: '{/literal}{$LANG.customer}{literal}', name : 'c.name', isdefault: true}
    ],


    Bernie

  • mgmlmgml July 2010

    Thank you bcaa8ra.

    Much better now. Once the change is in place, the quick search for "invoice number" returns the desired outcome.

    Case close!

  • ydmlogydmlog March 2011

    Euhm, I don't see a search field in my SI.
    Is this an option I need to enable somewhere?
    I really miss the possibility to search on invoice nr.

    Tnx

  • ydmlogydmlog March 2011

    Ok, found it !
    Damn that magnifying glass was pretty hidden, never noticed it ;-)
    Feeling pretty stupid now ;-)

    kind regards

  • beattiebeattie June 2011

    I'm trying to add a search option to the quick search so that I can search invoice descriptions by keywords such as "conference" or "A4 booklet" etc. I have tried adding a line to 'searchitems' in the 'manage.js.php' file as suggested in the post above but I can't seem to get it to work. Just to be clear, the database column I would like to search is 'description' which is in the 'si_invoice_items' table.

    This doesn't work: {display: '{/literal}{$LANG.description}{literal}', name : 'iv.description'},

    Neither does, many other combinations I have tried? Can anyone help please?

  • coolman128coolman128 February 2013

    @bcaa8ra
    if i want to search with custom_field1, how to do ?

Categories