Price composition
This commit is contained in:
@@ -2600,9 +2600,10 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
line.linked_unit = None
|
||||
line.unit = Mock(rec_name='MT')
|
||||
line.unit_price = Decimal('2525')
|
||||
line.amount = Decimal('62493.75')
|
||||
line.price_composition = [
|
||||
Mock(component='FOB', price=Decimal('2500')),
|
||||
Mock(component='FREIGHT', price=Decimal('25')),
|
||||
Mock(component='FREIGHT', price=None),
|
||||
]
|
||||
|
||||
sale = Sale()
|
||||
@@ -2619,7 +2620,10 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
sale.report_price_composition_rows,
|
||||
[
|
||||
{'label': 'FOB value in EUR', 'amount': Decimal('2500')},
|
||||
{'label': 'FREIGHT value in EUR', 'amount': Decimal('25')},
|
||||
{
|
||||
'label': 'FREIGHT value in EUR',
|
||||
'amount': Decimal('59993.75'),
|
||||
},
|
||||
])
|
||||
|
||||
def test_invoice_report_rate_lines_prefers_sale_price_composition(self):
|
||||
|
||||
Reference in New Issue
Block a user