How to remove Item Code from the Layout

A company doesn’t want to show the Item Codes on the Sales and Purchase Invoices, just a Description, any idea how to remove the Item Codes from the Layouts?

Use a custom theme.

Yes indeed but how to remove the items?

If you don’t have the programming skills, you will need to hire a local programmer to write the theme.

Yes true but unfortunately not many ppl have knowledge of Liquid coding…

Like other solutions Manager should be flexible in terms of designing layouts, this is a real challenge and several businesses need that…

3 Likes

why not simply include the item code in the Item name field itself?
batch updating the inventory items will be a quick solution.

1 Like

@sharpdrivetek thanks for the idea actually the co. having codes came from their suppliers and they need to select them during the invoicing, however, don’t want to show them to the customers on the invoice.

item codes when included in the item name will still serve the same purpose in your use case.
Code001 - NameFruits entered in the Item name field will still be available to select as Code001 in the transaction line. there is no change to work procedure in this case.

Thank you all for your comments, let’s try this!

@Mark
Great, it worked, however, it has an effect on the last column, any idea how to rectify it?

Send me the complete custom theme code or paste it here using preformatted text (Ctrl+E) and I (and I know some other members will do so too) will have a look at it.

@Mark sure will be sending you in pvt.

Maybe it’s better to paste it here so some other forum members can have a look at it too and others can benefit from it 'cos that’s the goal of this forum.

2 Likes

Yes sharing is caring, here you go, header and footer removed due to customer specific info:

		</header>
	</br>
</head>
<table style="padding: 20px">
	<thead>
		<tr>
			<td colspan="99">
				<table style="margin-bottom: 5px; padding-top: 5px">
					<tr>
						<td style="padding-left: 20px; padding-top: 5px; padding-bottom: 5px; width: 150px">
							<div style="text-ALIGN:left;background-color:#FFFFFFF;font-weight: bold;color:#000000; font-size: 32px; white-space: nowrap;text-transform: uppercase;">{{ title }}</div>
							<p style="color:#ffffff;">.</p>
						</td>
						<tr></tr>
						<tr></tr>
						<tr>
							<td colspan="99">
								<div style="border-top-width: 1px; border-color: #cfd1d3; background-color: #cfd1d3; color: #ffffff"></div>
							</td>
						</tr>
					</tr>
				</table>
				<table style="margin-bottom: 5px">
					<tr>
						<td style="padding-left: 30px">
							<div style="font-weight: bold">
								<p>Client: {{ recipient.name }}</p>
							</div>
							<div>{{ recipient.address | newline_to_br }}</div>
							<div>{{ recipient.identifier }}</div>
						</td>
						<td style="padding-right: 30px; font-size: 15px; text-align: right">

{% for field in fields %}
{% if (field.label != ‘Invoice number’) %}{% continue %}{% endif %}

							<div>
								<b>{{ field.label }}:</b> {{ field.text }}
							</div>

{% endfor %}
{% for field in fields %}
{% if (field.label == ‘Invoice number’) %}{% continue %}{% endif %}

							<div>
								<b>{{ field.label }}:</b> {{ field.text }}
							</div>

{% endfor %}

						</td>
					</tr>
				</table>
				<tr>
					<td colspan="99">
						<div style="border-top-width: 1px; border-color: #cfd1d3; background-color: #cfd1d3; color: #ffffff"></div>
					</td>
				</tr>
				<td style="font-weight: bold; padding: 5px 10px; text-align: center; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px; width: 1px">S.No.</td>
            {% for column in table.columns %}            
            {% if forloop.first %}{% continue %}{% endif %}
				<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>
            {% endfor %}
        
			</tr>
		</thead>
		<tbody>
        {% for row in table.rows %}
        
			<tr>
				<td style="padding: 5px 10px; text-align: center; border-left-width: 1px; width: 1px">{{ forloop.index0 | plus:1 }}</td>
            {% for cell in row.cells %}
            
				<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 %}">{{ cell.text | newline_to_br }}</td>
            {% endfor %}
        
			</tr>
        {% endfor %}
        
			<tr>
				<td style="border-bottom-width: 1px; border-left-width: 1px">&nbsp;</td>
        {% for column in table.columns %}            
        {% if forloop.first %}{% continue %}{% endif %}    
				<td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
        {% endfor %}
        
			</tr>
        {% for total in table.totals %}
        
			<tr>
				<td colspan="{{ table.columns | size }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
				<td style="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>
			</tr>
        {% endfor %}
        {% for field in custom_fields %}
    
			<tr>
				<td colspan="99">
					<div style="font-weight: bold; padding-top: 20px">{{ field.label }}</div>
					<div>{{ field.text | newline_to_br }}</div>
				</td>
			</tr>
    {% endfor %}
    
			<tr>
				<td colspan="99">
            {% if emphasis.text != null and emphasis.positive %}
            
					<div style="text-align: center; margin-top: 40px">
						<span style="color: #006400; border-width: 5px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span>
					</div>
            {% endif %}
            {% if emphasis.text != null and emphasis.negative %}
            
					<div style="text-align: center; margin-top: 40px">
						<span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span>
					</div>
            {% endif %}
        
				</td>
			</tr>
		</tbody>
	</table>
	<footer >

style=“margin-top:200px;”>

That’s a weird copy/paste… But as I thought so, you forgot to paste the code {% if forloop.first %}{% continue %}{% endif %} after the code line {% for cell in row.cells %}

1 Like

Those were added already that’s why the item codes were removed (as per earlier screenshots), however it effects the Total column only…

Well, in the code you’ve pasted I don’t see it:
image

The code of the total column misses minus:1 after size:
image

It should be: {{ table.columns | size | minus:1 }}

because @danowagroup is using the modified plain theme provided in guides which implements the line numbers.

for the code provided in post#9 to work in the default plain theme, the above code should be
{{ table.columns | size | minus:2 }}

I know but the custom theme code pasted in post #15 needs {{ table.columns | size | minus:1 }}

1 Like

Attaching the file here
Sales Invoice - Customized.pdf (118.6 KB)