Package org.jabusuite.accounting.dunning.session

Examples of org.jabusuite.accounting.dunning.session.DunningsRemote


    @Override
    public void doSave() throws EJbsObject {
        logger.debug("Saving data...");

        try {
            DunningsRemote dunnings = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class);

            super.doSave();
            if (this.getDlgState() == DlgState.dsInsert) {
                logger.debug("Adding new entity " + this.getDunning().getId() + ".");
                dunnings.createDataset(this.getDunning(), ClientGlobals.getUser(), ClientGlobals.getCompany());
            } else if (this.getDlgState() == DlgState.dsEdit) {
                logger.debug("Saving existing entity " + this.getDunning().getId() + ".");
                dunnings.updateDataset(this.getDunning(), ClientGlobals.getUser());
            }
            logger.debug("Entity saved.");
        } catch (NamingException e) {
            logger.error("Error saving payment-term.", e);
        }
View Full Code Here


        this.setUser(user);
        this.setCompany(company);
    }
   
    public void addUnprintedDunnings() throws NamingException {
        DunningsRemote dunningsManager = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class.getName());
        List unprintedDunnings = dunningsManager.getUnprintedDunnings(this.getUser(), this.getCompany());
        this.getDunnings().addAll(unprintedDunnings);
    }
View Full Code Here

            cb.addTemplate(origPage, 0, 0);
        }
    }
   
    protected void setDunningsPrinted() throws NamingException, EJbsObject {
        DunningsRemote dunningsManager = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class.getName());
        dunningsManager.setDunningsPrinted(dunnings, this.getUser());
    }
View Full Code Here

    }
   
    @Override
    public List<JbsBaseObject> getDataFromServer(int startIndex, int resultCount) {
        try {
            DunningsRemote dunningManager = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class);
            return dunningManager.getDatasets(this.getFilter(), this.getOrderFields(), this.getUser(), this.getCompany(), startIndex, resultCount);
        } catch (Exception e) {
            logger.error("Error fetching dunnings.", e);
            return null;
        }
    }
View Full Code Here

    }

    @Override
    public int getListSize() {
        try {
            DunningsRemote dunningManager = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class);
            return (int) dunningManager.getDatasetCount(this.getFilter(), this.getUser(), this.getCompany());
        } catch (Exception e) {
            logger.error("Error fetching dunning-count.", e);
            return 0;
        }
    }
View Full Code Here

    protected ArrayList<Dunning> createDunnings() {
        ArrayList<Dunning> createdDunnings = new ArrayList<Dunning>();
        try {
            logger.debug("Creating dunnings");
           
            DunningsRemote dunningsRemote = (DunningsRemote)ClientTools.getRemoteBean(DunningsRemote.class);

            for (int i=0; i<this.getDunningWizard().getMaxDunningLevel(); i++) {
                List<Invoice> invoices = this.getDunningWizard().getInvoicePanels().get(i).getSelectedInvoices();
                createdDunnings.addAll(dunningsRemote.createDunnings(invoices, i+1, ClientGlobals.getUser(), ClientGlobals.getCompany()));
            }
           
        } catch (Exception e) {
            logger.error("Error creating dunnings.", e);
        }
View Full Code Here

TOP

Related Classes of org.jabusuite.accounting.dunning.session.DunningsRemote

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.