Package org.jabusuite.transaction

Examples of org.jabusuite.transaction.CreditNote


    InvoicesLocal invoiceManager;
   
    protected boolean invoiceHasCreditNote(Invoice invoice, CreditNote creditNote) {
        Iterator<CreditNote> it = invoice.getCreditNotes().iterator();
        while (it.hasNext()) {
            CreditNote exCreditNote = it.next();
            if (exCreditNote.getId()==creditNote.getId()) {
                exCreditNote=creditNote;
                return true;
            }
        }
        return false;
View Full Code Here


        invoiceLines.add(invoiceLine);
       
        if (this.getDunning().getInvoice().getCreditNotes()!=null) {
            Iterator<CreditNote> itCreditNotes = this.getDunning().getInvoice().getCreditNotes().iterator();
            while (itCreditNotes.hasNext()) {
                CreditNote creditNote = itCreditNotes.next();
                if (!creditNote.isDeleted()) {
                    HashMap cnLine = new HashMap();
                    cnLine.put("invoice.userNumber", creditNote.getUserNumber());
                    cnLine.put("invoice.transactionDate", ClientGlobals.getDateFormat().format(creditNote.getTransactionDate().getTime()));
                    cnLine.put("invoice.transactionName", JbsL10N.getString(creditNote.getClass().getSimpleName()+".name"));
                    cnLine.put("invoice.lastPaymentDate", "");
                    cnLine.put("invoice.salesPriceSumGross", "-"+ClientGlobals.getPriceFormat().format(creditNote.getSalesPriceSumGross()));
                    cnLine.put("invoice.payed", "");
                    cnLine.put("invoice.amountToPay", "");
                    invoiceLines.add(cnLine);
                }
            }
View Full Code Here

       
    }
   
    protected void createCreditNote() {
        try {
            final CreditNote creditNote = new CreditNote();
            String userNumber = getNextUserNumber(CreditNote.class);
            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();
View Full Code Here

    /* (non-Javadoc)
     * @see org.jabusuite.webclient.dataediting.FmEditJbsBaseObject#createJbsBaseObject()
     */
    @Override
    public void createJbsBaseObject() {
        this.setJbsBaseObject(new CreditNote());
    }
View Full Code Here

   
    private Logger logger = Logger.getLogger(PnCreditNoteEdit.class);
   
    public PnCreditNoteEdit() {
        super();
        this.setCreditNote(new CreditNote());
    }
View Full Code Here

        this.setCreditNote(new CreditNote());
    }

    @Override
    public void setJbsBaseObject(JbsBaseObject jbsBaseObject) {
        CreditNote creditNote = (CreditNote) jbsBaseObject;
        //We have to get the positions from the database also
        if ((creditNote != null) && (this.getDlgState() == DlgState.dsEdit)) {
            logger.debug("Retrieving positions for credit-note " + creditNote.getId());
            try {
                CreditNotesRemote creditNotes = (CreditNotesRemote) ClientTools.getRemoteBean(CreditNotesRemote.class);
                CreditNote exDelivNote = creditNotes.findDataset(creditNote.getId(), true);
                creditNote = exDelivNote;
            } catch (NamingException e) {
                logger.error("Error retrieving credit-note.", e);
            }
        }
View Full Code Here

TOP

Related Classes of org.jabusuite.transaction.CreditNote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.