mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add 'stock' tab for supplier page
This commit is contained in:
parent
c1224048ad
commit
1b06cd23af
@ -72,6 +72,11 @@ InvenTree | Company - {{ company.name }}
|
|||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js_load %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
|
|
||||||
enableDragAndDrop(
|
enableDragAndDrop(
|
||||||
|
25
InvenTree/company/templates/company/detail_stock.html
Normal file
25
InvenTree/company/templates/company/detail_stock.html
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{% extends "company/company_base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block details %}
|
||||||
|
|
||||||
|
{% include "company/tabs.html" with tab='stock' %}
|
||||||
|
|
||||||
|
<h3>Supplier Stock</h3>
|
||||||
|
|
||||||
|
<table class='table table-striped table-condensed' id='stock-table'>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% block js_ready %}
|
||||||
|
{{ block.super }}
|
||||||
|
|
||||||
|
loadStockTable($('#stock-table'),
|
||||||
|
{
|
||||||
|
url: "{% url 'api-stock-list' %}",
|
||||||
|
params: {
|
||||||
|
supplier: {{ company.id }},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -6,6 +6,9 @@
|
|||||||
<li{% if tab == 'parts' %} class='active'{% endif %}>
|
<li{% if tab == 'parts' %} class='active'{% endif %}>
|
||||||
<a href="{% url 'company-detail-parts' company.id %}">Supplier Parts <span class='badge'>{{ company.part_count }}</span></a>
|
<a href="{% url 'company-detail-parts' company.id %}">Supplier Parts <span class='badge'>{{ company.part_count }}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li{% if tab == 'stock' %} class='active'{% endif %}>
|
||||||
|
<a href="{% url 'company-detail-stock' company.id %}">Stock <span class='badge'>{{ company.stock_count }}</a>
|
||||||
|
</li>
|
||||||
{% if 0 %}
|
{% if 0 %}
|
||||||
<li{% if tab == 'po' %} class='active'{% endif %}>
|
<li{% if tab == 'po' %} class='active'{% endif %}>
|
||||||
<a href="#">Purchase Orders</a>
|
<a href="#">Purchase Orders</a>
|
||||||
|
@ -16,6 +16,7 @@ company_detail_urls = [
|
|||||||
# url(r'orders/?', views.CompanyDetail.as_view(template_name='company/orders.html'), name='company-detail-orders'),
|
# url(r'orders/?', views.CompanyDetail.as_view(template_name='company/orders.html'), name='company-detail-orders'),
|
||||||
|
|
||||||
url(r'parts/?', views.CompanyDetail.as_view(template_name='company/detail_part.html'), name='company-detail-parts'),
|
url(r'parts/?', views.CompanyDetail.as_view(template_name='company/detail_part.html'), name='company-detail-parts'),
|
||||||
|
url(r'stock/?', views.CompanyDetail.as_view(template_name='company/detail_stock.html'), name='company-detail-stock'),
|
||||||
|
|
||||||
url(r'thumbnail/?', views.CompanyImage.as_view(), name='company-image'),
|
url(r'thumbnail/?', views.CompanyImage.as_view(), name='company-image'),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user