Prefix for Invoice Number

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.

@lubos, based on @tut explanation the reason behind removal of append prefix feature. It’s fair to leave a simple guide to append via custom template. I don’t think IT illiterate want to touch a set of codes for a simple useful changes. A unique identifier.

I had to look back to prefix due to how I’m handling project accounts. Where I had to separate the business file to actually track the money flow for different project where the name will be under the same company.

Then consolidate the project accounts for final report. It is confusing if there is no unique identifier when actually using manager sale invoice document generator. For example if the multiple client asking about our sale invoice from different projects how do I differentiate them easily?

@acecombat2, you are looking at an explanation from almost 3 years ago about a change made almost 5 years ago. And it is not clear you read the rest of this thread. You can still add your project-specific prefixes to any reference number, including on sales invoices. You would need to enter this for your individual projects on an invoice by invoice basis anyway. So entering it via edit does not seem any more difficult or any less prone to forgetting. Additionally, setting an invoice prefix as was first suggested in the thread would give all your invoices the same prefix. And that is not what you want anyway.

{% for field in fields %} {% if field.label == "Invoice number" %}
{{ field.label }}
{{ reference | prepend:"FA/2019-20/" }}
{% endif %}
1 Like

Entering Prefix inside reference is a recipe for auto increment to go haywire. which I like to avoid. I’m using the auto reference heavily so to reduce the need the triple check which is the last serial number. No matter how old the post. If there is the room for improvement that yet to discover. Is still relevant. I appreciate the idea @Tut

@manishkumarshivam Thank You! just what I need.

I think a lot of users would like to use this a an option and therefore I would kindly request that support looks into this as an option and write it in the system so that it can appear in all documents. If users don’t want to use the prefix then it could be their option not to use it. Please please write this in the system? Also for Purchase orders Credit Notes etc.

1 Like

@Xavas, I recommend reading the entire thread before adding to it. In post #6 you will learn that prefixes to reference numbers were actually removed from the program back in 2014.

Me too

Gentlemen two of our Australian businesses requested a prefix to be added for their Invoice Numbers and we can up with this. Placing these lines in a custom theme works well. In this example IV- is the prefix to the Invoice number.

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

Do not forget to set / enable your custom theme in settings => Form Defaults

Also be aware that the prefix is not searchable, just the invoice number is searchable.

1 Like