2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Added company details tab

This commit is contained in:
Oliver
2018-04-22 22:44:49 +10:00
parent d44a4e174b
commit 4ebd8cd6b1
5 changed files with 99 additions and 8 deletions

View File

@ -19,9 +19,6 @@
<h4>{{ company.name }}</h4>
<p>{{ company.description }}</p>
</div>
<div class='container-fluid'>
<a href="{% url 'company-edit' company.id %}"><button class="btn btn-info">Edit Company Details</button></a>
</div>
</div>
</div>
<div class="col-sm-6">

View File

@ -1,15 +1,15 @@
{% extends "delete_obj.html" %}
{% block del_title %}
Are you sure you want to delete supplier '{{ supplier.name }}'?
Are you sure you want to delete company '{{ company.name }}'?
{% endblock %}
{% block del_body %}
{% if supplier.part_count > 0 %}
<p>There are {{ supplier.part_count }} parts sourced from this supplier.<br>
{% if company.part_count > 0 %}
<p>There are {{ company.part_count }} parts sourced from this company.<br>
If this supplier is deleted, these supplier part entries will also be deleted.</p>
<ul class='list-group'>
{% for part in supplier.parts.all %}
{% for part in company.parts.all %}
<li class='list-group-item'><b>{{ part.SKU }}</b><br><i>Part - {{ part.part.name }}</i></li>
{% endfor %}
</ul>

View File

@ -4,4 +4,29 @@
{% include 'company/tabs.html' with tab='details' %}
<h3>Company Details</h3>
<table class='table table-striped'>
<tr>
<td>Customer</td>
<td>{% include 'yesnolabel.html' with value=company.is_customer %}</td>
</tr>
<tr>
<td>Supplier</td>
<td>{% include 'yesnolabel.html' with value=company.is_supplier %}</td>
</tr>
</table>
{% if company.notes %}
<div class="panel panel-default">
<div class="panel-heading"><b>Notes</b></div>
<div class="panel-body">{{ company.notes }}</div>
</div>
{% endif %}
<div class='container-fluid'>
<a href="{% url 'company-edit' company.id %}"><button class="btn btn-info">Edit Company</button></a>
<a href="{% url 'company-delete' company.id %}"><button class="btn btn-danger">Delete Company</button></a>
</div>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends "create_edit_obj.html" %}
{% block obj_title %}
Edit details for supplier '{{ supplier.name }}'
Edit details for company '{{ company.name }}'
{% endblock %}