Add lookup-by-sn on part page, too

This commit is contained in:
Oliver 2021-12-02 16:01:28 +11:00
parent 98bbee8159
commit e96ff7fbba

View File

@ -322,7 +322,14 @@
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Latest Serial Number" %}</td>
<td>{{ part.getLatestSerialNumber }}{% include "clip.html"%}</td>
<td>
{{ part.getLatestSerialNumber }}
<div class='btn-group float-right' role='group'>
<a class='btn btn-small btn-outline-secondary text-sm' href='#' id='serial-number-search' title='{% trans "Search for serial number" %}'>
<span class='fas fa-search'></span>
</a>
</div>
</td>
</tr>
{% endif %}
{% if part.default_location %}
@ -577,4 +584,8 @@
$('#collapse-part-details').collapse('show');
}
$('#serial-number-search').click(function() {
findStockItemBySerialNumber({{ part.pk }});
});
{% endblock %}