Custom Quote/ Invoice

I’m looking to customised my quotation template where the 1st section to list all items name with price, while the 2nd section to show the description. I think it’s possible, provided i know the field name to ‘call’? I know html and simple programming. Any hints, references, or suggestions? Thanks.

You do not need to customize anything. Manager already places the section listing line items first. Put any kind of detailed information in the existing Notes field. That field will accept as much information as you want to put in it, including HTML code for formatting, etc.

But, I’m looking at 1st section to list all the items Name, while second section to display Description for each item.
Currently, as Description is entered, my product name just disappeared, only Item Code, then Description.
I’m trying to do like 1st page listed Description for each item in my quotes. Then subsequently page 2 list only Name with Price.
Any idea? Thanks. :slight_smile:

You might be able to do that, but it would be very difficult. I certainly don’t know how. The contents of a line item are an array, not a single variable. You are talking about extracting single elements of the array to present in different places.

Can you show a screen shot of what you’re trying to accomplish? Have you seen this done in other accounting programs? I never have.

As for disappearance of product names, those are really meant for reports. Only if no Description is entered are they substituted for the Description. See the explanation in this Guide:

Also, unless you create a custom theme to use only for quotes, all transaction forms will incorporate the same changes you make there. Themes apply across all forms. You can build in filters with more fancy programming, but you really have to wonder whether it is worth the trouble. You are the first user who has ever expressed a desire to do what you mention.

Hmm… perhaps I can keep my “description” as a new custom field.
Then, have 2 different Themes.
1 Themes is the regular theme, where listed all items name (if i don’t use Description field) with prices.
Then Theme #2 to list only list the Custom field for all these items.
That might bit troublesome as every quote i need to print using 2 different themes. But, I think should able to achieve my expected result.
I certainly don’t have an example, but 1 prospect complain. So, I thought to list all job scope in 1 page before the pricing in later page.
The theme #2, you think possible? Just to call the “custom field”. But, how to call out this custom field only?

You are going well beyond the scope of this forum. You said you had HTML skills. If so, you should have no trouble using the Liquid templating language. Search the internet for various sites explaining syntax.

I am curious about the one customer who complained about your quote format. Why did they complain, seemingly expecting a quote in a format you yourself have never seen. Perhaps you are trying too hard to make an accounting tool function like a word processor. Sometimes businesses need to create proposals/quotes independently.

You can have custom field on Invoice with Drop Down = Type1,Type1
in template you can check what was chosen

{% if type== 'Type1' %}
  html for type1
{% else %}
  html for type2
{% endif %}

That way you need only 1 template and switching is done at invoice level and is saved so keeps its setting

Easiest way to read custom variables on invoice level

First line in theme add:

{% for field in custom_fields %}
    {% if field.label == 'Custom Field Label' %}
        {% assign custom_field= field.text | strip_newlines | rstrip %}
    {% endif %}
    {% if field.label == 'Notes' %}
        {% assign notes = field.text %}
    {% endif %}
{% endfor %}

and then you can use {{ custom_field }} anywhere you want in template

when you say section 1 and section 2 do you mean item line like
| Name | Description | Price |


| Name | Price |
| Descritpion |

if you could made some kind of picture mock-up I could help you with that.

Sorry, but I have very limited HTML knowledge which I learned during my study. I’ll try to look into Liquid templating language, if required. Yes, you are right. This customer is tricky, perhaps looking into trouble. Perhaps I shouldn’t entertain him much. :slight_smile:
Thanks, anyway.

Thanks. I’m actually looking to have the Description and Name in separate page(2 sections). That may be tricky? But, I’m thinking perhaps at least something like this image, where I can have both Name & Description. Any ideas?


You can do that by entering the HTML code into the Description field directly. You don’t even need a custom theme. For example, this input:

Produces this output on a form:

1 Like

But each time you need to remember same html code to include. There is no custom filed on row level.

Tut: From accounting point of view, is it appropriate to use services as non-inventory item?

If we could use non-inventory item we could solve it by custom field only

Hmm… good idea. For easier, i think i use bold instead of span. Thanks, Tut. :wink:

Actually I’m using Inventory items instead of non inventory items…as i need to include both cost and price, which mpst of the field exactly like Inventory Items. Differences is I dont count or check stock. Hmm…Not sure if it’s correct from accounting point of view?

Yes, that is probably the most common use of a non-inventory item. And HTML will work in the Description field of a non-inventory item.

I don’t understand this comment. No custom field was involved in my solution.

If you are not counting, why use inventory items?

Issue with html is that you need to write it all the time
and as non technical user you might not want to do that.

I am offering to write template to solve it using custom field instead of html.
Give me few hours.

Here you go:

1) Create custom field on non-inventory item

Label: Header and make sure show on printed is selected

It should look like that
If you want same fo inventory items just add same custom field on inventory item
2)Create/Edit template
Go to custom themes:

I did base template from first available

Open it and copy all text (CTRL+C)

Go back to themes and create new

And paste all from default template (CTRL+V)
So you should have copy of default template to edit

  1. Editing template

Lines 32 - 36 replace with:

            {% assign column_length = table.columns | size %}
            {% for column in table.columns %}  
                {% if column.label != 'Code' and column.label != 'Header' %}
                    <td style="font-weight: bold; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
                {% else %}
                    {% assign column_length = column_length | minus:1 %}
                {% endif %}
            {% endfor %}

Lines 44-59 replace with

{% for row in table.rows %}
            {% for cell in row.cells %}
                {% if table.columns[forloop.index0].label != 'Code' and table.columns[forloop.index0].label != 'Header' %}
                <td style="padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">
                    {% if table.columns[forloop.index0].label == 'Description' %}
                        {% for column in table.columns %} 
                            {%- if column.label == 'Header' and row.cells[forloop.index0].text.size > 0 and row.cells[forloop.index0].text != '&nbsp;' -%}
                                {{ row.cells[forloop.index0].text | newline_to_br }}
                            {%- endif -%}
                        {% endfor %}
                        {% for column in table.columns %} 
                            {%- if column.label == 'Code' and row.cells[forloop.index0].text.size > 0 and row.cells[forloop.index0].text != '&nbsp;' -%}
                                ({{ row.cells[forloop.index0].text | newline_to_br }})
                            {%- endif -%}
                        {% endfor %}
                        <p style="margin:0; padding:0;">
                        {{ cell.text | newline_to_br }}
                    {% else %}
                        {{ cell.text | newline_to_br }}
                    {% endif %}
                {% endif %}
            {% endfor %}
        {% endfor %}
        {% for column in table.columns %}   
            {% if column.label != 'Code' and column.label != 'Header' %}
                <td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
            {% endif %}
        {% endfor %}
        {% for total in table.totals %}
            <td colspan="{{ column_length | minus:1 }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
            <td style="border-color: #000; border-left-width: 1px; white-space: nowrap; border-right-width: 1px; border-bottom-width: 1px; padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
        {% endfor %}

Update template

4) Create non-inventory item

In the bottom you will see Header (Custom Field) - this will be you header for item
Description - obvious
Code - is optional, but if entered will be next to header in brackets

Create another service without code

5) Creating invoice

Add 3 lines: service with code, wothout code, and just line without selected item

6) Result



All that work produced the same result I illustrated. But my method required no custom fields or themes.

Yes Tut your method is simple and straight forward and perfect in most situations.

If I would be filling all invoices myself I wouldn’t bother, but my other not-technical team members would find hard to not forget how to put that title, each time filling in invoice.


bookmarked! :grin: