2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Fixture fix

This commit is contained in:
Oliver
2023-05-19 15:01:16 +10:00
parent 72cd897021
commit 2373efb47a
4 changed files with 9 additions and 9 deletions

View File

@ -66,4 +66,4 @@
part: 4
supplier: 2
SKU: 'R_4K7_0603.100PCK'
pack_size: 100
pack_units: '100'

View File

@ -162,11 +162,11 @@ src="{% static 'img/blank_image.png' %}"
<td>{{ part.packaging }}{% include "clip.html" %}</td>
</tr>
{% endif %}
{% if part.pack_size != 1.0 %}
{% if part.pack_units %}
<tr>
<td><span class='fas fa-box'></span></td>
<td>{% trans "Pack Quantity" %}</td>
<td>{% decimal part.pack_size %} {% include "part/part_units.html" with part=part.part %}</td>
<td>{% trans "Units" %}</td>
<td>{% part.pack_units %} {% include "part/part_units.html" with part=part.part %}</td>
</tr>
{% endif %}
{% if part.note %}

View File

@ -228,7 +228,7 @@ class OrderTest(TestCase):
part=prt,
supplier=sup,
SKU='SKUx10',
pack_size=10,
pack_units='10',
)
# Create a new supplier part with smaller pack size
@ -236,7 +236,7 @@ class OrderTest(TestCase):
part=prt,
supplier=sup,
SKU='SKUx0.1',
pack_size=0.1,
pack_units='0.1',
)
# Record values before we start

View File

@ -63,14 +63,14 @@ class PartPricingTests(InvenTreeTestCase):
supplier=self.supplier_2,
part=self.part,
SKU='SUP_2',
pack_size=2.5,
pack_units='2.5',
)
self.sp_3 = company.models.SupplierPart.objects.create(
supplier=self.supplier_2,
part=self.part,
SKU='SUP_3',
pack_size=10
pack_units='10'
)
company.models.SupplierPriceBreak.objects.create(
@ -322,7 +322,7 @@ class PartPricingTests(InvenTreeTestCase):
# $5 AUD each
line_1 = po.add_line_item(self.sp_2, quantity=10, purchase_price=Money(5, 'AUD'))
# $30 CAD each (but pack_size is 10, so really $3 CAD each)
# $30 CAD each (but pack_units is 10, so really $3 CAD each)
line_2 = po.add_line_item(self.sp_3, quantity=5, purchase_price=Money(30, 'CAD'))
pricing.update_purchase_cost()