Sequential Invoice Numbering

Discussion in 'Customization & add-ons' started by leahn88, Jun 26, 2013.

  1. leahn88

    leahn88 New Member

    Joined:
    Nov 9, 2012
    Messages:
    5
    I found a thread where someone was asking if it's possible to have sequential numbering on the invoice. I customized a bit my invoice but I want to add sequential numbering on it.
    I also found this on the docs: http://www.amember.com/docs/How_to_set_up_custom_invoice_numbering

    I've done that but my invoices show up exactly the same. I would like to know if I have to modify /library/Am/Pdf/invoice.php and include something there in order to show the numbering.

    Also I would like to know if someone could help me set the invoice count and start from 0 and have like 6 or 9 digits for the invoice. I want to display the invoice number on the PDF file just like the invoice ID

    I attached a screenshot for more details.

    Spanish laws require me to have sequential invoice numbers and I don't know how to do it.

    Attached Files:

  2. leahn88

    leahn88 New Member

    Joined:
    Nov 9, 2012
    Messages:
    5
    My bad, the code found on the docs actually works but only for new invoices which is ok for me. All I needed to do is change:

    Code:
    $invoice->public_id = date('Y_m_')
    to
    Code:
    $invoice->public_id = date('Y-')
    so the code renders like this: 2013-1. 2013-2. 2013-3 etc, but only for new invoices.

    This code will be rendered by $invoice->public_id which is located inside amember/library/Am/Pdf/invoice.php

    So instead of having an invoice ID like: Invoice: 7C3ME
    you will have something like: Invoice: 2013-1

    Hope this helps someone out there

Share This Page