fix deposit is net value

This commit is contained in:
viehlieb 2023-09-28 22:42:52 +02:00
parent f29ab603b6
commit 90e06a475f
10 changed files with 75 additions and 34 deletions

View file

@ -64,7 +64,10 @@ describe Article do
article.tax = 12
expect(article.gross_price).to eq((article.price * 1.12).round(2))
article.deposit = 1.20
expect(article.gross_price).to eq(((article.price + 1.20) * 1.12).round(2))
if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits)
expect(article.gross_price_without_deposit).to eq((article.price * 1.12 + 1.20).round(2))
expect(article.gross_price).to eq(((article.price + 1.20) * 1.12).round(2))
end
end
it 'gross price >= net price' do