Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Operation


                   
                  
                    if(categoryId.charAt(0) == '2'){
                        Money valueComp = new Money(valueText.getText());
                        if(balanceValue.getFloatValue() >= valueComp.getFloatValue()){
                            Operation operation = new MoneyTransaction().accountOperation(system.getRegisterMachine(), categoryId, new GDDate(), descriptionText.getText(), new Money(valueText.getText()).getFloatValue(), paymentTypeCombo.getPaymentType());
                            addOperationToTable(operation);
                           
                            clearForNewTransaction();
                        }else{
                            setErrorMessage("Saldo Insuficiente.");
                        }
                    }else{
                        Operation operation = new MoneyTransaction().accountOperation(system.getRegisterMachine(), categoryId, new GDDate(), descriptionText.getText(), new Money(valueText.getText()).getFloatValue(), paymentTypeCombo.getPaymentType());
                        addOperationToTable(operation);

                        clearForNewTransaction();
                    }
                } catch (Exception e) {
View Full Code Here


                    TableItem[] item = checkTable.getCheckTable().getSelection();
                    if (item.length == 0) {
                        setErrorMessage("Voc� deve selecionar pelo menos um cheque.");
                    } else if (item.length == 1) {
                        setErrorMessage("");
                        Operation operation  = ((Operation) system.query(new GetOperation(item[0].getText(1))));
                        PaymentCheck check = (PaymentCheck) operation.getPaymentType();
                        new ObservationCheckDialog(mainPanel.getShell(), check, operation, getMySelf()).open();
                    } else {
                      setErrorMessage("");
                      Map<String, PaymentCheck> checkMap = new HashMap<String, PaymentCheck>();
                      for (TableItem it : item) {
                        Operation operation  = ((Operation) system.query(new GetOperation(it.getText(1))));
                            PaymentCheck check = (PaymentCheck) operation.getPaymentType();
                            checkMap.put(operation.getId(), check);
            }
                      new ObservationCheckDialog(mainPanel.getShell(), checkMap, getMySelf()).open();
                    }
                } catch (Exception e) {
                    logger.error("GetCheckByRegistrationAndParcel exception: ",e);
View Full Code Here

                item.setText(0, extractBankItem.getId().split(" = ")[0]);
        item.setText(1, (account != null ? account.getName() : extractBankItem.getAccountNumber()));
                item.setText(2, extractBankItem.getDate().getFormatedDate());
                item.setText(3, extractBankItem.getDescription());
               
                Operation relatedOperation = extractBankItem.getRelatedOperation();
        if(relatedOperation != null) {
                  item.setText(4, "Opera��o efetuada na conta "+ relatedOperation.getAccount().getName() +": "+ relatedOperation.getDescription());
                }
       
        Incoming relatedIncoming = extractBankItem.getRelatedIncoming();
        if(relatedIncoming != null) {
          item.setText(4, "Receita: "+ relatedIncoming.getDescription());
View Full Code Here

                  } catch (Exception e) {
                    e.printStackTrace();
                  }
                } else if (lineTest.contains("/STMTTRN")) {
                  if(accountId != 0){
                    Operation operation = getRelatedOperation(bankOperationNumber, description, value, date);
                    if(operation != null) {
                      if(!operation.isOperationLinked()) {
                        system.execute(new AddExtractBankItem(bankOperationNumber, description, value, date, operation, accountId));
                      }
                    } else {
                      Incoming incoming = getRelatedIncoming(bankOperationNumber, description, value, date);
                      if(incoming != null) {
View Full Code Here

    }
   

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

        this.billCategoryId = idBillCategory;
    }

    @Override
    protected void execute(PrevalentSystem system) {
        Operation operation = system.getOperations().get(operationId);
        operation.setCategoryId(billCategoryId);
    }
View Full Code Here

        Account account = system.getAccounts().get(accountId);
        Expenditure expenditure = system.getExpenditure().get(expenditureId);
//        Expenditure myExpenditure = new Expenditure(expediture.getId(), expediture.getDescription(), expediture.getNextPaymentDate(), expediture.getFrequency(), expediture.getNumberOfOcurrencies(), expediture.getValue(), expediture.isFixedValue(), expediture.getCategoryId());
//        myExpenditure.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,expenditure.getCategoryId(),date, expenditure.getDescription(),new Money(value).getFloatValue(),typeOfPayment, true, expenditure.getId());
        } else {
            operation = new Operation(idOperation, account,expenditure.getCategoryId(),date, expenditure.getDescription(),new Money(value).getFloatValue(),typeOfPayment, true, expenditure.getId(), idExtractItem);
            operation.setOperationLinked(true);
            system.getExtractItemMap().remove(idExtractItem);
        }
        system.getOperations().put(idOperation, operation);

        expenditure.skip();
View Full Code Here

    }

    @Override
    protected void execute(PrevalentSystem system) throws BusinessException {
      try {
            Operation operation = system.getOperations().get(operationId);
              if(operation != null){
                LinkedOperation linkedOperation = new LinkedOperation(operation);
               
                for (Expenditure bill : system.getExpenditure().values()) {
                  if (bill.isActive() && isRelelated(bill, operation)) {
View Full Code Here

      this.observation = observation;
      this.localization = localization;
    }

    protected void execute(PrevalentSystem system) throws BusinessException {
      Operation operation = system.getOperations().get(operationId);
      PaymentCheck check = (operation.getPaymentType().getType().equals("Cheque"))? (PaymentCheck) operation.getPaymentType() : null;
      if(check != null){
        check.setObservation(observation);
        check.setLocalization(localization);
      }
    }
View Full Code Here

                    Money money = new Money(linkedOperation.getOperation().getValue());
                    GDDate date = new GDDate(linkedOperation.getOperation().getDateTime());
                   
                    Account account = system.accounts.get(accountId);
                   
                    Operation operation = new Operation(id, account, expenditure.getCategoryId(), date, expenditure. getDescription(), money.getFloatValue());
                    system.operations.put(id, operation);
                   
                    bill.skip();
                   
                    if (bill.getFrequency() == 0 || (bill.getLastPaymentDate() == null ? true : bill.getNextPaymentDate().after(bill.getLastPaymentDate()))) {
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.