• Resolved Tesa Iglesias

    (@tesaiglesias)


    Hi, How can I customize the invoice number in Jetpack CRM? I would like to add the current year as a prefix with two digits, and the invoice number as a suffix with four digits. Can you please provide instructions or examples of how to do this? thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    You can add a Prefix and Suffix to the Invoice numbers from Jetpack CRM > CRM Settings > Invoices page.

    The setting you are looking for can be found under Reference type: section on that page.

    Best,

    Thread Starter Tesa Iglesias

    (@tesaiglesias)

    Thanks. Yes I found the site, but I don’t know what I have to put to make it work.

    I need my invoice to have this format 0001FCE23. Where 0001 is the next four-digit invoice number, FCE is a key, and 23 is the current year
    I write this:
    next number 0001
    suffix FCEYY
    The result I get is 1FCEYY

    how should i put it?

    Hi @tesaiglesias!

    Unfortunately, YY will not change to the current year which is 23. So you should put the exact number as it is: FCE23.

    As for the next number, I understand that you need to have the format 0001, however, the zeroes are getting omitted. I have created an enhancement request for this to allow the zeroes at the start of the invoice number. We don’t have any ETA for when or if this will be implemented, but we can certainly let you know once we have an update.

    For now, you can write the numbers as:

    Next number: 1
    Suffix: FCE23

    Thank you!

    Thread Starter Tesa Iglesias

    (@tesaiglesias)

    Thanks for your answer, let me try again.
    I have this code, in which I have to replace “sliced_invoice_number_prefix”
    Do you know what I should put there?

    function agregar_ano_prefijo_factura($prefijo) {
      // Obtiene el a?o actual
      $ano = date('Y');
      // Agrega el a?o al prefijo de la factura
      $prefijo = $prefijo . '-' . $ano;
      return $prefijo;
    }
    add_filter('sliced_invoice_number_prefix', 'agregar_ano_prefijo_factura');
    
    • This reply was modified 2 years, 2 months ago by Tesa Iglesias.

    Hi @tesaiglesias,

    At present, we do not have a hook for sliced_invoice_number_prefix Therefore the code snippet you are trying to make is not working.

    We have an enhancement request for allowing the zeroes at the start of the invoice number. We don’t have any ETA for when or if this will be implemented, but we can certainly let you know once we have an update.

    Best,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘customize the invoice number’ is closed to new replies.