Examples of Invoice


Examples of org.jabusuite.transaction.Invoice

        if (logger.isDebugEnabled()) {
            logger.debug("Saving invoice " + invoice.getId());
            logger.debug("Looking for existing invoice " + invoice.getId());
        }
       
        Invoice existingInvoice = manager.find(Invoice.class, invoice.getId());

        if (logger.isDebugEnabled()) {
            logger.debug("Position-Count: " + existingInvoice.getPayments().size());
            logger.debug("Deleting positions that no longer exist.");
        }

        this.deleteOldPayments(manager, invoice, existingInvoice.getPayments());
       
        invoice.calcPaymentSum();
        invoice.calcLastPaymentDate();
        super.updateDataset(manager, invoice, changeUser);
    }
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

            Component component = null;

            TblInvoicesForDunning tblInvoices = (TblInvoicesForDunning) table;
            final boolean selectable = tblInvoices.isSelectable();
            final TblMInvoicesForDunning tableModel = (TblMInvoicesForDunning)tblInvoices.getModel();
            final Invoice invoice = (Invoice) tblInvoices.getJbsBaseObjects().get(row);

            switch (column) {
                case 0:
                    if (selectable) {
                        final CheckBox checkBox = new CheckBox("");
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

            InvoicesRemote invoices = (InvoicesRemote) ClientTools.getRemoteBean(InvoicesRemote.class);
            List invoiceList = invoices.getInvoicesForDunning(1, 7, ClientGlobals.getUser(), ClientGlobals.getCompany(), 0, 0);

            Iterator it = invoiceList.iterator();
            while (it.hasNext()) {
                Invoice invoice = (Invoice) it.next();
                logger.debug(invoice.getUserNumber());
            }

        } catch (NamingException e) {
            logger.error("Error getting invoices for dunning.", e);
        }
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

     * Creates the panel in insert-mode and creates a new instance of <code>Offer</code> to work with.
     *
     */
    public PnInvoiceEdit() {
        super();
        this.setInvoice(new Invoice());
    }
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

        this.setInvoice(new Invoice());
    }

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

Examples of org.jabusuite.transaction.Invoice

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

Examples of org.jabusuite.transaction.Invoice

            return 4;
        }

        public Object getValueAt(int column, int row) {
            if (row < getJbsObjects().size()) {
                Invoice invoice = (Invoice)getJbsBaseObjects().get(row);
                switch (column) {
                    case 0:
                        String userNo = invoice.getUserNumber();
                        if (userNo == null) {
                            userNo = "";
                        }
                        return userNo;
                    case 1:
                        String name1 = invoice.getName1();
                        if (name1 == null) {
                            name1 = "";
                        }
                        return name1;
                    case 2:
                        return ClientGlobals.getPriceFormat().format(invoice.getSalesPriceSum());
                    case 3:
                        return ClientGlobals.getPriceFormat().format(invoice.getAmountToPay());
                    default:
                        return "";
                }
            } else {
                return null;
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

        });
    }

    protected void createInvoice() {
        try {
            final Invoice invoice = new Invoice();
            String userNumber = getNextUserNumber(Invoice.class);
            invoice.setDataFromTransaction(getOffer(), userNumber);
            JbsOptionPane dialog = JbsOptionPane.showMessageDialog(this, JbsL10N.getString("Offer.msgToInvoice"), JbsL10N.getString("Offer.messageBoxTitle"), JbsOptionPane.INFORMATION_MESSAGE);
            dialog.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent arg0) {
                    FmInvoiceEdit fmInvoiceEdit = new FmInvoiceEdit();
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

    }
   
    public void swapSelection() {
        Iterator<JbsBaseObject> it = this.getJbsBaseObjects().iterator();
        while (it.hasNext()) {
            Invoice invoice = (Invoice)it.next();
            if (isInvoiceSelected(invoice))
                deSelectInvoice(invoice);
            else
                selectInvoice(invoice);
        }
View Full Code Here

Examples of org.jabusuite.transaction.Invoice

    public boolean isInvoiceSelected(Invoice invoice) {
        boolean found = false;
        if (this.getSelectedInvoices()!=null) {
            Iterator<Invoice> it = this.getSelectedInvoices().iterator();
            while ((!found) && (it.hasNext())) {
                Invoice selInvoice = it.next();
                found=(selInvoice.getId()==invoice.getId());
            }
        }
        return found;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.