fix w kalkulacji last price
This commit is contained in:
@@ -349,3 +349,16 @@ def test_orlen_comparison_filters_to_one_fuel(tmp_path):
|
||||
assert '4.5000' in html
|
||||
assert '4.1000' in html
|
||||
assert '>DIESEL</td>' not in html
|
||||
|
||||
|
||||
def test_last_price_uses_only_non_deductible_vat():
|
||||
from app.domain.costs import calculate_net_price_costs
|
||||
result = calculate_net_price_costs(5.484, 23, 50)
|
||||
assert round(float(result["invoice_gross"]), 4) == 6.7453
|
||||
assert round(float(result["effective_cost"]), 4) == 6.1147
|
||||
|
||||
|
||||
def test_last_price_zero_and_full_vat_deduction():
|
||||
from app.domain.costs import calculate_net_price_costs
|
||||
assert round(float(calculate_net_price_costs(10, 23, 0)["effective_cost"]), 2) == 12.30
|
||||
assert round(float(calculate_net_price_costs(10, 23, 100)["effective_cost"]), 2) == 10.00
|
||||
|
||||
Reference in New Issue
Block a user