Support » Plugin: WP-Invoice - Web Invoice and Billing » Invoice ID issues

  • Say I create Invoice #500. A number of weird things happen:

    • The invoice ID will show in the post notification as #1080 (or some similar two-digit number)
    • Using %invoice_id% in an email template displays 83592127 (or some similar eight-digit number)
    • This same number will display alongside the invoice ID in the advanced area of the Publish section, although the invoice ID itself is correct
    • The auto-generated invoice number will (occasionally, I haven’t been able to reproduce this consistently) generate as the previous eight-digit number plus one rather than the invoice ID plus one.

    The invoice ID otherwise shows up correctly in the PDF and the published invoice page.

    Any ideas?

    https://wordpress.org/plugins/wp-invoice/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Hello,

    1080 is probably post_ID if the invoice object.

    83592127 is invoice id for reference in payment systems or receipts etc.

    There are several numbers associated with each invoice.

    post_ID
    The 1080 is likely the post_ID as Anton said – i.e. the number of the actual post within the database. (This is an id as per other normal posts/pages etc).

    invoice_id
    I think the eight digit number (invoice_id) is generated at random for each invoice and used for ‘reference in payment systems or receipts etc’.

    custom_id
    There is also a custom_id that can be set – this is in addition to the invoice_id and is stored with each invoice as metadata. (if its not set by user I think it gets set to invoice_id by wp-invoice).

    The invoice number that you see when creating an invoice / the number that you change it too is its custom_id. The invoice_id will still be a separately generated random number per invoice (as shown in publish section). You can change the custom_id of an invoice to anything that you want, however, wp-invoice creates new invoices by searching for the highest custom_id and then adds one.

    I have posted separately about a temporary fix for the %invoice_id% in emails here – custom id in emails
    The %invoice_id%

    Thread Starter rogerwilco2000

    (@rogerwilco2000)

    Gazzamit, thanks for the help and the tips.

    83592127 is invoice id for reference in payment systems or receipts etc.

    Not sure why there would need to be both an invoice ID (custom_id) generated for the invoice and a separate, hidden, random invoice ID (invoice_id) for payment reference. The customer and I are both using custom_id for payment reference. The payment gateway gets the custom_id, too, right?

    The invoice_id is a random number associated with an invoice that once generated cannot be changed. The custom_id can be changed at will.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invoice ID issues’ is closed to new replies.