Prefix for Invoice Number

Hi,

Can you please make it possible to add prefix to invoice numbers, i know that you can do it in the invoices by editing the html code, however its not in the reports you run (eg: in customer statements ),therefore, it needs to be implemented in the software itself. @lubos

For example , like this:

Statements report the full invoice number, including any prefix, that is in the Invoice Number field. For example, this input:

produces this output:

The reason a prefix implemented in the HTML of a theme doesn’t appear in the statement is that it is not the invoice number. It is merely text prepended to the invoice number.

I am curious why you want to insert the “INV” prefix when the form clearly says “Invoice number” directly above.

its an example, i actually want my company name initials to be there for example: ‘CI160001’

CI- Company Initial
16 - Year
0001 - Invoice Number

I tried using prefix but the next auto generated invoice number doesn’t include it, it just show ‘160002’.

True. The automatic number generation is purely numerical. But you can still edit the invoices to include your prefix. You just cannot include it automatically.

yeh. Thats why i am requesting for it :slight_smile:

I would not hold out hope. That is actually a feature that was removed from the program a couple years ago.

Why was it removed?

It was removed when custom view templates for sales invoices were introduced. It was no longer necessary. You could still have it with a custom theme if you really want it.

how?

That’s beyond the intended scope of this forum. You need someone with HTML/Liquid knowledge who can implement conditional instructions to insert your prefix ahead of the invoice number field text in the correct circumstances in whichever table contains the invoice number, remembering that there may be several field labels and text elements, depending on the particular form. Which table is involved will depend on the rest of your custom theme design. This might be considered a roundabout way of saying that if you have to ask, you won’t be able to do it yourself. Expert coders will probably find the job trivial. Occasional code tinkerers could well be overwhelmed.

I think i got what you mean… to change the code in the customer statement right?

therefore, i will need to change the cell.text of the invoice number in the statement … however i dont knw if its cell.label = ‘Invoice number’ or something else or even if its ‘cell.label’… can someone help me?

Not right. There is no way to edit just customer statement code. Themes apply to all “forms.” That basically means anything except the classical accounting reports like P&L or balance sheet. Your questions seem to indicate you do not have the experience necessary to make a change like this. I recommend getting a little professional help locally. But I go back to my original question: is this really worth it to have your company initials in front of an invoice number when your company name is always right there?

Hey, i have decided not to go with a prefix for the invoice . However , it is possible to have different custom theme for different forms as i have tried it with this code:

{% if title == "Quotation" %}
(html code for quotation)
{% endif %}
{% if title == "Payment" %}
(html code for payment)
{% endif %}
{% if title == "Receipt" %}
 (html code for receipt)
{% endif %}
{% if title == "Statement" %}
 (html code for statement)
{% endif %}
{% if title == "Invoice" %}
 (html code for Invoice)
{% endif %}

Hope this helped others.

4 Likes

3 posts were split to a new topic: Changing reference field title on sales quote

@lubos why u are not giving this feature !! It will help others …
Users who want this will enable otherwise no problem !!
Also if a user is issuing two invoices with different numbering will also get help from that.
Why not to use hash or array kinda thing to remember two or more series of invoice and print on sales invoice …
Again this should be a feature which we requested very badly from you . Hope u will consider this …
Thanks a lot for this beautiful peace of software.

<td style="border-right-width: 1px; padding-right: 20px; text-align: right">
                    {% for field in fields %}                            
                        {% if field.label != 'Invoice number' %}
                            <div style="font-weight: bold">{{ field.label }}</div>
                            <div style="margin-bottom: 10px">{{ field.text }}</div>
                        {% endif %}
                        
                        {% if field.label == 'Invoice number' %}
                            <div style="font-weight: bold">{{ field.label }}</div>
                            <div>{% for field in fields %}{% if field.label == 'Invoice date' %}{{ field.text | date:'20%y'}}{% endif %}{% endfor %}{{ field.text }}{{ recipient.code }}</div>                                                                 
                        {% endif %}
                    {% endfor %}                       
                </td>

You can use this code, it works for me. When you are using an other language than English change the field labels accordingly. The output is 2016+invoice nr.+client reference and you can change the order if you like.

3 Likes

Thanks will try it :slight_smile:

The answer, BTW, is “Yes, it really is worth it.”

Companies that I work with want my document number 24 from some other company’s document number 24. I get this more with Purchase Orders and Shipping Notices than invoices, but they have specifically asked if I can put a unique identifier in front of my document numbers.

Well, you’ve always been able to include such things by editing.

That feature would be really nice in Manager. Just to have a simple field for prefix value in the form. No html programming.