Package org.jabusuite.transaction

Examples of org.jabusuite.transaction.BusinessTransaction


        this.setState(DlgState.dsInsert);
        this.getPnEditJbsObject().setDlgState(DlgState.dsInsert);
        super.showForm();
       
       
        BusinessTransaction bt = (BusinessTransaction)this.getJbsBaseObject();
       
        bt.setAddress(address);
        
        bt.setName1(address.getName1());
        bt.setName2(address.getName2());
        bt.setName3(address.getName3());
        bt.setStreet(address.getStreet());
        bt.setCity(address.getCity());
        bt.setZip(address.getZip());
        bt.setCountryShort(address.getCountryShort());
       
        bt.setCompany(ClientGlobals.getCompany());
        bt.setGroup(ClientGlobals.getUser().getMainGroup());
        bt.setOwner(ClientGlobals.getUser());
       
        this.setJbsBaseObject(bt);
        //super.showForm(DlgState.dsEdit,this.getJbsBaseObject());
    }
View Full Code Here


   * @return
   */
  @Transient
  public double getSalesPriceSum() {
    double result = 0;
    BusinessTransaction parentTransaction = this.getParentTransaction();
    if ((parentTransaction!=null) && (this.getSubPositions()!=null))
      result = parentTransaction.getSalesPriceSumFromPositions(this.getSubPositions());
    return result;
  }
View Full Code Here

   * @return
   */
  @Transient
  public double getCostPriceSum() {
    double result = 0;
    BusinessTransaction parentTransaction = this.getParentTransaction();
    if ((parentTransaction!=null) && (this.getSubPositions()!=null))
      result = parentTransaction.getCostPriceSumFromPositions(this.getSubPositions());
    return result;
  }
View Full Code Here

    public void updateDataset(EntityManager manager, BusinessTransaction transaction, JbsUser changeUser) throws EJbsObject {
        if (logger.isDebugEnabled()) {
            logger.debug("Updating transaction " + transaction.getId());
            logger.debug("Looking for existing transaction " + transaction.getId());
        }
        BusinessTransaction existingTransaction = manager.find(BusinessTransaction.class, transaction.getId());

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

        this.deleteOldPositions(manager, transaction, existingTransaction.getPositions());
        if (transaction.getPositions() != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Setting sort-indexes.");
            }
            this.setSortIndexes(transaction.getPositions());
View Full Code Here

     * @return the name for the user-numbers to be used
     */
    public abstract String getUserNumberName();

    public BusinessTransaction findDataset(EntityManager manager, Class entityClass, long id, boolean withPositions) {
        BusinessTransaction transaction = (BusinessTransaction) manager.find(entityClass, (long) id);
        if ((withPositions) && (transaction != null)) {
            int posCount = transaction.getPositions().size();
            logger.debug("Positions: " + posCount);
        }
        return transaction;
    }
View Full Code Here

            return 3;
        }

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

TOP

Related Classes of org.jabusuite.transaction.BusinessTransaction

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.