apply highlighting and showing supplier name to invoice pdf
This commit is contained in:
parent
45db0575b1
commit
a65120eefc
9 changed files with 96 additions and 72 deletions
|
|
@ -120,6 +120,10 @@ feature OrdergroupInvoice, type: :feature, js: true do
|
|||
click_link_or_button I18n.t('activerecord.attributes.group_order_invoice.links.generate_with_date')
|
||||
sleep 1
|
||||
expect(OrdergroupInvoice.all.count).to eq(2)
|
||||
|
||||
expect(page).not_to have_checked_field("sepa_downloaded_multi_#{OrdergroupInvoice.last.id}")
|
||||
|
||||
#check boxes sepa downloaded
|
||||
check("sepa_downloaded_all_multi_#{multi_order.id}")
|
||||
sleep 1
|
||||
expect(page).to have_checked_field("sepa_downloaded_multi_#{OrdergroupInvoice.last.id}")
|
||||
|
|
@ -127,5 +131,32 @@ feature OrdergroupInvoice, type: :feature, js: true do
|
|||
check("paid_all_multi_#{multi_order.id}")
|
||||
expect(page).to have_checked_field("paid_multi_#{OrdergroupInvoice.first.id}")
|
||||
expect(page).to have_checked_field("paid_multi_#{OrdergroupInvoice.last.id}")
|
||||
|
||||
|
||||
#sepa selects
|
||||
select_box = find("#all_sepa_sequence_type_multi_#{multi_order.id}")
|
||||
expect(select_box.value).to eq("RCUR")
|
||||
expect(find("#sepa_sequence_type_multi_#{OrdergroupInvoice.last.id}").value).to eq("RCUR")
|
||||
select "Erst-Lastschrift", from: "sepa_sequence_type_multi_#{OrdergroupInvoice.last.id}"
|
||||
sleep 1
|
||||
expect(find("#sepa_sequence_type_multi_#{OrdergroupInvoice.last.id}").value).to eq("FRST")
|
||||
end
|
||||
|
||||
it 'downloads sepa and toggles checkboxes' do
|
||||
multi_order = create(:multi_order, orders: [order, order1])
|
||||
sepa_account_holder = create(:sepa_account_holder, user: admin, group: admin.ordergroup)
|
||||
FoodsoftConfig[:group_order_invoices] = {iban: "DE89370400440532013000", bic: "DEUTDEFF", creditor_identifier:"DE98ZZZ09999999999"}
|
||||
visit finance_order_index_path
|
||||
expect(page).to have_selector(:link_or_button, "Multi Bestellung auflösen")
|
||||
click_link_or_button 'Toggle details'
|
||||
expect(page).to have_selector(:link_or_button, I18n.t('activerecord.attributes.group_order_invoice.links.generate_with_date'))
|
||||
click_link_or_button I18n.t('activerecord.attributes.group_order_invoice.links.generate_with_date')
|
||||
sleep 1
|
||||
expect(OrdergroupInvoice.all.count).to eq(2)
|
||||
expect(page).to have_selector(:link_or_button, I18n.t('activerecord.attributes.group_order_invoice.links.download'))
|
||||
# admin is the last multi_group_order
|
||||
multi_group_order = multi_order.multi_group_orders.last
|
||||
check("group_order_#{multi_group_order.id}_included_in_sepa")
|
||||
expect(page).to have_selector(:link_or_button, 'Sammellastschrift für ausgewählt (.xml)')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue