mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 20:15:44 +00:00
Fixture fix
This commit is contained in:
@ -66,4 +66,4 @@
|
|||||||
part: 4
|
part: 4
|
||||||
supplier: 2
|
supplier: 2
|
||||||
SKU: 'R_4K7_0603.100PCK'
|
SKU: 'R_4K7_0603.100PCK'
|
||||||
pack_size: 100
|
pack_units: '100'
|
||||||
|
@ -162,11 +162,11 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
<td>{{ part.packaging }}{% include "clip.html" %}</td>
|
<td>{{ part.packaging }}{% include "clip.html" %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.pack_size != 1.0 %}
|
{% if part.pack_units %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-box'></span></td>
|
<td><span class='fas fa-box'></span></td>
|
||||||
<td>{% trans "Pack Quantity" %}</td>
|
<td>{% trans "Units" %}</td>
|
||||||
<td>{% decimal part.pack_size %} {% include "part/part_units.html" with part=part.part %}</td>
|
<td>{% part.pack_units %} {% include "part/part_units.html" with part=part.part %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.note %}
|
{% if part.note %}
|
||||||
|
@ -228,7 +228,7 @@ class OrderTest(TestCase):
|
|||||||
part=prt,
|
part=prt,
|
||||||
supplier=sup,
|
supplier=sup,
|
||||||
SKU='SKUx10',
|
SKU='SKUx10',
|
||||||
pack_size=10,
|
pack_units='10',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create a new supplier part with smaller pack size
|
# Create a new supplier part with smaller pack size
|
||||||
@ -236,7 +236,7 @@ class OrderTest(TestCase):
|
|||||||
part=prt,
|
part=prt,
|
||||||
supplier=sup,
|
supplier=sup,
|
||||||
SKU='SKUx0.1',
|
SKU='SKUx0.1',
|
||||||
pack_size=0.1,
|
pack_units='0.1',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Record values before we start
|
# Record values before we start
|
||||||
|
@ -63,14 +63,14 @@ class PartPricingTests(InvenTreeTestCase):
|
|||||||
supplier=self.supplier_2,
|
supplier=self.supplier_2,
|
||||||
part=self.part,
|
part=self.part,
|
||||||
SKU='SUP_2',
|
SKU='SUP_2',
|
||||||
pack_size=2.5,
|
pack_units='2.5',
|
||||||
)
|
)
|
||||||
|
|
||||||
self.sp_3 = company.models.SupplierPart.objects.create(
|
self.sp_3 = company.models.SupplierPart.objects.create(
|
||||||
supplier=self.supplier_2,
|
supplier=self.supplier_2,
|
||||||
part=self.part,
|
part=self.part,
|
||||||
SKU='SUP_3',
|
SKU='SUP_3',
|
||||||
pack_size=10
|
pack_units='10'
|
||||||
)
|
)
|
||||||
|
|
||||||
company.models.SupplierPriceBreak.objects.create(
|
company.models.SupplierPriceBreak.objects.create(
|
||||||
@ -322,7 +322,7 @@ class PartPricingTests(InvenTreeTestCase):
|
|||||||
# $5 AUD each
|
# $5 AUD each
|
||||||
line_1 = po.add_line_item(self.sp_2, quantity=10, purchase_price=Money(5, 'AUD'))
|
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'))
|
line_2 = po.add_line_item(self.sp_3, quantity=5, purchase_price=Money(30, 'CAD'))
|
||||||
|
|
||||||
pricing.update_purchase_cost()
|
pricing.update_purchase_cost()
|
||||||
|
Reference in New Issue
Block a user