move automatic invoices to plugin

changes on deposit calculation

tiny changes on group order invoice pdf
This commit is contained in:
viehlieb 2023-10-10 23:11:34 +02:00
parent 42a1773a87
commit e78d1ad072
67 changed files with 5579 additions and 69 deletions

View file

@ -14,25 +14,32 @@ feature 'settling an order', js: true do
let(:goa2) { create(:group_order_article, group_order: go2, order_article: oa) }
before do
Rails.cache.clear
login admin
goa1.update_quantities(3, 0)
goa2.update_quantities(1, 0)
oa.update_results!
oa.reload
order.reload
order.finish!(admin)
goa1.reload
goa2.reload
visit new_finance_order_path(order_id: order.id)
end
before { visit new_finance_order_path(order_id: order.id) }
before { login admin }
after do
Rails.cache.clear
end
it 'has correct order result' do
oa.reload
expect(oa.quantity).to eq(4)
expect(oa.tolerance).to eq(0)
expect(goa1.result).to eq(3)
expect(goa2.result).to eq(1)
end
it 'has product ordered visible' do
it 'has product ordered visible', js: true do
expect(page).to have_content(article.name)
expect(page).to have_selector("#order_article_#{oa.id}")
end