SupplierPart detail page now splits details into two columns

- Price details in right-hand column
This commit is contained in:
Oliver Walters 2019-05-02 01:15:26 +10:00
parent 88cc3b7bc2
commit 08b429fdb8

View File

@ -23,59 +23,66 @@
<hr> <hr>
<table class="table table-striped table-condensed"> <div class='row'>
<tr><td>Supplier</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr> <div class='col-sm-6'>
<tr><td>SKU</td><td>{{ part.SKU }}</tr></tr> <table class="table table-striped table-condensed">
<tr> <tr><td>Supplier</td><td><a href="{% url 'company-detail-parts' part.supplier.id %}">{{ part.supplier.name }}</a></td></tr>
<td>Internal Part</td> <tr><td>SKU</td><td>{{ part.SKU }}</tr></tr>
<td> <tr>
{% if part.part %} <td>Internal Part</td>
<a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.name }}</a> <td>
{% if part.part %}
<a href="{% url 'part-suppliers' part.part.id %}">{{ part.part.name }}</a>
{% endif %}
</td>
</tr>
{% if part.URL %}
<tr><td>URL</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr>
{% endif %} {% endif %}
</td> {% if part.description %}
</tr> <tr><td>Description</td><td>{{ part.description }}</td></tr>
{% if part.URL %} {% endif %}
<tr><td>URL</td><td><a href="{{ part.URL }}">{{ part.URL }}</a></td></tr> {% if part.manufacturer %}
{% endif %} <tr><td>Manufacturer</td><td>{{ part.manufacturer }}</td></tr>
{% if part.description %} <tr><td>MPN</td><td>{{ part.MPN }}</td></tr>
<tr><td>Description</td><td>{{ part.description }}</td></tr> {% endif %}
{% endif %} {% if part.note %}
{% if part.manufacturer %} <tr><td>Note</td><td>{{ part.note }}</td></tr>
<tr><td>Manufacturer</td><td>{{ part.manufacturer }}</td></tr> {% endif %}
<tr><td>MPN</td><td>{{ part.MPN }}</td></tr> </table>
{% endif %} </div>
{% if part.note %}
<tr><td>Note</td><td>{{ part.note }}</td></tr> <div class='col-sm-6'>
{% endif %} <table class="table table-striped table-condensed">
<tr><th colspan='2'>Pricing</th></tr> <tr><th colspan='2'>Pricing</th></tr>
<tr><td>Single Price</td><td>{{ part.single_price }}</td></tr> <tr><td>Single Price</td><td>{{ part.single_price }}</td></tr>
{% if part.multiple > 1 %} {% if part.multiple > 1 %}
<tr><td>Order Multiple</td><td>{{ part.multiple }}</td></tr> <tr><td>Order Multiple</td><td>{{ part.multiple }}</td></tr>
{% endif %} {% endif %}
{% if part.base_cost > 0 %} {% if part.base_cost > 0 %}
<tr><td>Base Price (Flat Fee)</td><td>{{ part.base_cost }}</td></tr> <tr><td>Base Price (Flat Fee)</td><td>{{ part.base_cost }}</td></tr>
{% endif %} {% endif %}
{% if part.minimum > 1 %} {% if part.minimum > 1 %}
<tr><td>Minimum Order Quantity</td><td>{{ part.minimum }}</td></tr> <tr><td>Minimum Order Quantity</td><td>{{ part.minimum }}</td></tr>
{% endif %} {% endif %}
</table> {% if part.price_breaks.all %}
<tr><th colspan='2'>Price Breaks</th></tr>
<br>
<h3>Price Breaks</h3>
<table class="table table-striped table-condensed">
<tr> <tr>
<th>Quantity</th> <th>Quantity</th>
<th>Price</th> <th>Price</th>
</tr> </tr>
{% for pb in part.price_breaks.all %} {% for pb in part.price_breaks.all %}
<tr> <tr>
<td>{{ pb.quantity }}</td> <td>{{ pb.quantity }}</td>
<td>{{ pb.cost }}</td> <td>{{ pb.cost }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endif %}
</table> </table>
</div>
</div>
<br>
<div> <div>
<button class='btn btn-primary' type='button'>New Price Break</button> <button class='btn btn-primary' type='button'>New Price Break</button>