creditNote.setDataFromTransaction(getInvoice(), userNumber);
JbsOptionPane dialog = JbsOptionPane.showMessageDialog(this, JbsL10N.getString("Invoice.msgToCreditNote"), JbsL10N.getString("Offer.messageBoxTitle"), JbsOptionPane.INFORMATION_MESSAGE);
dialog.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
FmCreditNoteEdit fmCreditNoteEdit = new FmCreditNoteEdit();
fmCreditNoteEdit.showForm(DlgState.dsCopy, creditNote);
addAction(PnInvoiceEdit.ACTION_TOCREDITNOTE);
}
});
} catch (Exception e) {
logger.error("Error creating creditNote.", e);