protected void updateInvoice(CreditNote creditNote, JbsUser user) throws EJbsObject {
Invoice invoice = creditNote.getInvoice();
if (invoice!=null) {
if (!this.invoiceHasCreditNote(invoice, creditNote))
invoice.addCreditNote(creditNote);
invoice.calcCreditNoteSum();
invoiceManager.updateDataset(invoice, user);
}
}
/* (non-Javadoc)