Add a button to assign stock item to customer

This commit is contained in:
Oliver Walters 2020-06-04 11:50:55 +10:00
parent c1da4d5207
commit 4ddabb82ef

View File

@ -71,43 +71,48 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% include "qr_button.html" %} {% include "qr_button.html" %}
{% if item.in_stock %} {% if item.in_stock %}
{% if not item.serialized %} {% if not item.serialized %}
<button type='button' class='btn btn-default' id='stock-add' title='Add to stock'> <button type='button' class='btn btn-default' id='stock-add' title='{% trans "Add to stock" %}'>
<span class='fas fa-plus-circle icon-green'/> <span class='fas fa-plus-circle icon-green'/>
</button> </button>
<button type='button' class='btn btn-default' id='stock-remove' title='Take from stock'> <button type='button' class='btn btn-default' id='stock-remove' title='{% trans "Take from stock" %}'>
<span class='fas fa-minus-circle icon-red''/> <span class='fas fa-minus-circle icon-red''/>
</button> </button>
<button type='button' class='btn btn-default' id='stock-count' title='Count stock'> <button type='button' class='btn btn-default' id='stock-count' title='{% trans "Count stock" %}'>
<span class='fas fa-clipboard-list'/> <span class='fas fa-clipboard-list'/>
</button> </button>
{% if item.part.trackable %} {% if item.part.trackable %}
<button type='button' class='btn btn-default' id='stock-serialize' title='Serialize stock'> <button type='button' class='btn btn-default' id='stock-serialize' title='{% trans "Serialize stock" %}'>
<span class='fas fa-hashtag'/> <span class='fas fa-hashtag'/>
</button> </button>
{% endif %} {% endif %}
{% if item.part.salable %}
<button type='button' class='btn btn-default' id='stock-assign-to-customer' title='{% trans "Assign to Customer" %}'>
<span class='fas fa-user-tie'/>
</button>
{% endif %} {% endif %}
<button type='button' class='btn btn-default' id='stock-move' title='Transfer stock'> {% endif %}
<button type='button' class='btn btn-default' id='stock-move' title='{% trans "Transfer stock" %}'>
<span class='fas fa-exchange-alt icon-blue'/> <span class='fas fa-exchange-alt icon-blue'/>
</button> </button>
<button type='button' class='btn btn-default' id='stock-duplicate' title='Duplicate stock item'> <button type='button' class='btn btn-default' id='stock-duplicate' title='{% trans "Duplicate stock item" %}'>
<span class='fas fa-copy'/> <span class='fas fa-copy'/>
</button> </button>
{% endif %} {% endif %}
{% if item.part.has_variants %} {% if item.part.has_variants %}
<button type='button' class='btn btn-default' id='stock-convert' title="Convert stock to variant"> <button type='button' class='btn btn-default' id='stock-convert' title='{% trans "Convert stock to variant" %}'>
<span class='fas fa-screwdriver'/> <span class='fas fa-screwdriver'/>
</button> </button>
{% endif %} {% endif %}
{% if item.part.has_test_report_templates %} {% if item.part.has_test_report_templates %}
<button type='button' class='btn btn-default' id='stock-test-report' title='Generate test report'> <button type='button' class='btn btn-default' id='stock-test-report' title='{% trans "Generate test report" %}'>
<span class='fas fa-tasks'/> <span class='fas fa-tasks'/>
</button> </button>
{% endif %} {% endif %}
<button type='button' class='btn btn-default' id='stock-edit' title='Edit stock item'> <button type='button' class='btn btn-default' id='stock-edit' title='{% trans "Edit stock item" %}'>
<span class='fas fa-edit icon-blue'/> <span class='fas fa-edit icon-blue'/>
</button> </button>
{% if item.can_delete %} {% if item.can_delete %}
<button type='button' class='btn btn-default' id='stock-delete' title='Edit stock item'> <button type='button' class='btn btn-default' id='stock-delete' title='{% trans "Edit stock item" %}'>
<span class='fas fa-trash-alt icon-red'/> <span class='fas fa-trash-alt icon-red'/>
</button> </button>
{% endif %} {% endif %}