Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Operation


    }
   

    @Override
    protected void execute(PrevalentSystem system) {
      Operation operation = system.getOperations().get(idOperation);
      operation.setBillId(billId);
    }
View Full Code Here


    this.extractBankId = extractBankId;
  }

  @Override
  protected void execute(PrevalentSystem system) throws BusinessException {
    Operation operation = system.getOperations().get(operationId);
    operation.setIdExtractItem(extractBankId);
    operation.setOperationLinked(true);
    system.getExtractItemMap().remove(extractBankId);
  }
View Full Code Here

        Incoming incoming = system.getIncoming().get(incomingId);
       
//        Incoming myIncoming = new Incoming(incoming.getId(), incoming.getDescription(), incoming.getNextPaymentDate(), incoming.getFrequency(),incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation());
//        myIncoming.setActive(false);

        Operation operation;
       
        if(typeOfPayment == null){
          typeOfPayment = system.getPaymentMoney();
        }else{
          if (typeOfPayment.getType().equals("Dinheiro")) {
            typeOfPayment = system.getPaymentMoney();
      } else if (typeOfPayment.getType().equals("D�bito autom�tico")) {
        typeOfPayment = system.getPaymentAutomaticDebit();
      } else if (typeOfPayment.getType().equals("Pagamento eletr�nico")) {
        typeOfPayment = system.getPaymentEletronic();
      } else if (typeOfPayment.getType().equals("Transfer�ncia eletr�nica")) {
        typeOfPayment = system.getPaymentEletronicTransfer();
      } else if (typeOfPayment.getType().equals("TED")) {
        typeOfPayment = system.getPaymentTED();
      } else if (typeOfPayment.getType().equals("DOC")) {
        typeOfPayment = system.getPaymentDOC();
      } else if (typeOfPayment.getType().equals("Saque cart�o")) {
        typeOfPayment = system.getPaymentGetMoney();
      }
        }
       
        if(idExtractItem == null){
            operation = new Operation(idOperation,account, incoming.getCategoryId(), gdDate, incoming.getDescription(), new Money(value).getFloatValue(),typeOfPayment, false, incoming.getId());
        } else {
            operation = new Operation(idOperation,account,incoming.getCategoryId(),gdDate, incoming.getDescription(),new Money(value).getFloatValue(),typeOfPayment, false, incoming.getId(), idExtractItem);
            operation.setOperationLinked(true);
            system.getExtractItemMap().remove(idExtractItem);
        }
        system.getOperations().put(idOperation, operation);

        incoming.skip();
View Full Code Here

    }
   

    @Override
    protected void execute(PrevalentSystem system) {
      Operation operation = system.getOperations().get(idOperation);
      operation.setOperationLinked(isOperationLinked);
    }
View Full Code Here

    }
   

    @Override
    protected void execute(PrevalentSystem system) {
      Operation operation = system.getOperations().get(idOperation);
      operation.setTypeBill(isExpenditure);
    }
View Full Code Here

            if (Integer.parseInt(id) <= Integer.parseInt(key))
                id = key;
        }
        id = String.valueOf(Integer.parseInt(id) + 1);

        Operation operation = null;

        if(paymentType == null)
            paymentType = system.getPaymentMoney();

        if(paymentType.getType().equals("Dep�sito em Conta")){
           boolean  paymentTypeBankAccountExists = false;
            for (int i = 0; i< system.getPaymentTypeBankAccount().size(); i++) {
                if(system.getPaymentTypeBankAccount().get(i).getAccountId().equals(this.accountId)){
//                    parcel.setPaymenType(system.getPaymentTypeBankAccount().get(i));
                    operation = new Operation(id, system.getAccounts().get(accountId), categoryId, gdDate, description, value, system.getPaymentTypeBankAccount().get(i), _receivedValue);
                    paymentTypeBankAccountExists = true;
                    break;
                }
            }
            if(!paymentTypeBankAccountExists){
                PaymentBankAccountPayed paymentTypeBankAccount = new PaymentBankAccountPayed(this.accountId);
                 system.getPaymentTypeBankAccount().add(paymentTypeBankAccount);
                for (int j=0; j<system.getPaymentTypeBankAccount().size(); j++){
                    if(system.getPaymentTypeBankAccount().get(j).getAccountId().equals( this.accountId)){
//                        parcel.setPaymenType(system.getPaymentTypeBankAccount().get(j));
                        operation = new Operation(id, system.getAccounts().get(accountId), categoryId, gdDate, description, value, system.getPaymentTypeBankAccount().get(j), _receivedValue, discount);
                        break;
                    }
                }
            }
        } else{
          if(idRegistration.equals("")){
        if (paymentType.getType().equals("Dinheiro")) {
           paymentType = system.getPaymentMoney();
        } else if (paymentType.getType ().equals("D�bito autom�tico")) {
           paymentType = system.getPaymentAutomaticDebit();
        } else if (paymentType.getType().equals("Pagamento eletr�nico")) {
          paymentType = system.getPaymentEletronic();
        } else if (paymentType.getType().equals("Transfer�ncia eletr�nica")) {
           paymentType = system.getPaymentEletronicTransfer();
        } else if (paymentType.getType().equals("TED")) {
           paymentType = system.getPaymentTED();
        } else if ( paymentType.getType().equals("DOC")) {
           paymentType = system.getPaymentDOC();
        } else if (paymentType.getType().equals("Saque cart�o")) {
           paymentType = system.getPaymentGetMoney();
        }
          }else{
                  Registration registration = system.getRegistrations ().get(idRegistration);
                  if(registration == null || registration.getParcel(parcelId) == null){
                    paymentType = system.getPaymentMoney();
                  }else{
            Parcel parcel = registration.getParcel(parcelId);
            paymentType = parcel.getPayment();
                  }
          }

            if (this.discount != 0) {
                operation = new Operation(id, system.getAccounts().get(accountId), categoryId, gdDate, description, value, paymentType, _receivedValue, discount);
            } else {
                operation = new Operation(id, system.getAccounts().get(accountId), categoryId, gdDate, description, value, paymentType, _receivedValue);
            }
        }

//        Operation operation = new Operation(id, system.accounts.get(accountId), categoryId, gdDate.getCalendar(), description, value, paymentType);
        if(idExtractItem != null) {
            operation.setIdExtractItem(idExtractItem);
            operation.setOperationLinked(true);
            system.getExtractItemMap().remove(idExtractItem);
        }

        system.getOperations().put(id, operation);
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.Operation

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.