mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Updated SupplierPriceBreak page
This commit is contained in:
parent
150bc1e674
commit
52c3a63c61
@ -6,7 +6,7 @@
|
||||
|
||||
<h3>Companies</h3>
|
||||
<div id='button-toolbar'>
|
||||
<h3><button style='float: right;' class="btn btn-success" id='new-company'>New Company</button></h3>
|
||||
<button style='float: right;' class="btn btn-success" id='new-company'>New Company</button>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped' id='company-table' data-toolbar='#button-toolbar'>
|
||||
|
@ -44,10 +44,43 @@
|
||||
<tr><td>Manufacturer</td><td>{{ part.manufacturer }}</td></tr>
|
||||
<tr><td>MPN</td><td>{{ part.MPN }}</td></tr>
|
||||
{% endif %}
|
||||
{% if part.note %}
|
||||
<tr><td>Note</td><td>{{ part.note }}</td></tr>
|
||||
{% endif %}
|
||||
<tr><th colspan='2'>Pricing</th></tr>
|
||||
<tr><td>Single Price</td><td>{{ part.single_price }}</td></tr>
|
||||
{% if part.multiple > 1 %}
|
||||
<tr><td>Order Multiple</td><td>{{ part.multiple }}</td></tr>
|
||||
{% endif %}
|
||||
{% if part.base_cost > 0 %}
|
||||
<tr><td>Base Price (Flat Fee)</td><td>{{ part.base_cost }}</td></tr>
|
||||
{% endif %}
|
||||
{% if part.minimum > 1 %}
|
||||
<tr><td>Minimum Order Quantity</td><td>{{ part.minimum }}</td></tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<h3>Price Breaks</h3>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th>Quantity</th>
|
||||
<th>Price</th>
|
||||
</tr>
|
||||
{% for pb in part.price_breaks.all %}
|
||||
<tr>
|
||||
<td>{{ pb.quantity }}</td>
|
||||
<td>{{ pb.cost }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<button class='btn btn-primary' type='button'>New Price Break</button>
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -99,4 +99,11 @@ class EditSupplierPartForm(HelperForm):
|
||||
'URL',
|
||||
'manufacturer',
|
||||
'MPN',
|
||||
'note',
|
||||
'single_price',
|
||||
'base_cost',
|
||||
'multiple',
|
||||
'minimum',
|
||||
'packaging',
|
||||
'lead_time'
|
||||
]
|
||||
|
24
InvenTree/part/migrations/0010_auto_20190417_0045.py
Normal file
24
InvenTree/part/migrations/0010_auto_20190417_0045.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Generated by Django 2.2 on 2019-04-16 14:45
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0009_auto_20190417_0019'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='supplierpart',
|
||||
name='minimum',
|
||||
field=models.PositiveIntegerField(default=1, help_text='Minimum order quantity (MOQ)', validators=[django.core.validators.MinValueValidator(1)]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='supplierpart',
|
||||
name='multiple',
|
||||
field=models.PositiveIntegerField(default=1, help_text='Order multiple', validators=[django.core.validators.MinValueValidator(1)]),
|
||||
),
|
||||
]
|
@ -488,10 +488,10 @@ class SupplierPart(models.Model):
|
||||
packaging = models.CharField(max_length=50, blank=True, help_text='Part packaging')
|
||||
|
||||
# multiple that the part is provided in
|
||||
multiple = models.PositiveIntegerField(default=1, validators=[MinValueValidator(0)], help_text='Order multiple')
|
||||
multiple = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)], help_text='Order multiple')
|
||||
|
||||
# Mimumum number required to order
|
||||
minimum = models.PositiveIntegerField(default=1, validators=[MinValueValidator(0)], help_text='Minimum order quantity (MOQ)')
|
||||
minimum = models.PositiveIntegerField(default=1, validators=[MinValueValidator(1)], help_text='Minimum order quantity (MOQ)')
|
||||
|
||||
# lead time for parts that cannot be delivered immediately
|
||||
lead_time = models.DurationField(blank=True, null=True)
|
||||
|
Loading…
Reference in New Issue
Block a user