private void exportToJournal() {
		// TODO save movements (and counterparties) into accounting [or with different button]
		int[] rows = tabel.getSelectedRows();
		if (checkAccountAndSelection(rows)) {
			if (checkCounterParties(rows)) {
				Object[] accountList = accounts.getBusinessObjects().toArray();
				Account bankAccount = (Account) JOptionPane.showInputDialog(this, "Select Bank account",
						"Select account", JOptionPane.INFORMATION_MESSAGE, null, accountList, null);
				Journal journal;
				Object[] journalsList = journals.getBusinessObjects().toArray();
				if (journals.getBusinessObjects().size() == 1) {
					journal = (Journal) journalsList[0];
				} else {
					journal = (Journal) JOptionPane.showInputDialog(this, "Select Journal", "Select journal",
							JOptionPane.INFORMATION_MESSAGE, null, journalsList, null);
				}
				if (bankAccount != null && journal != null) {
                    for(int i : rows) {
                        BusinessObject counterParty = (BusinessObject) tabel.getValueAt(i, 4);
                        Account account = ((CounterParty)counterParty).getAccount();
                        boolean debet = tabel.getValueAt(i, 2).equals("D");
                        if (account == null) {
                            BusinessObject counterParty2 = counterParties.getBusinessObject(counterParty.getName());
                            if (counterParty2 != null) {
                                counterParty = counterParty2;
                                account = ((CounterParty)counterParty2).getAccount();
                            }
                        }
                        while (account == null) {
                            account = (Account) JOptionPane.showInputDialog(this, "Select account", "Select account",
                                    JOptionPane.INFORMATION_MESSAGE, null, accountList, null);
                            ((CounterParty)counterParty).setAccount(account);
                        }
                        BigDecimal amount = (BigDecimal) tabel.getValueAt(i, 3);
                        Transaction transaction = journals.getCurrentObject().getCurrentObject();
                        Booking booking1 = new Booking(account, amount, debet);
                        Booking booking2 = new Booking(bankAccount, amount, !debet);
                        transaction.addBusinessObject(booking1);
                        transaction.addBusinessObject(booking2);
                        String cal = (String) tabel.getValueAt(i, 1);
                        Calendar date = Utils.toCalendar(cal);
                        transaction.setDate(date);
                        String description = (String) tabel.getValueAt(i, 6);
                        transaction.setDescription(description);
                        journal.addBusinessObject(transaction);

                        transaction = new Transaction(accounts, date, "");
                        // take the same date as previous transaction
                        // leave the description empty

                        journals.getCurrentObject().setCurrentObject(transaction);
                    }
                }
			}
		}
		refresh();
	}