Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Account


        incomingAccountCombo.setLayoutData(data);
       
        incomingAccountCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        try {
          Account account = (Account) system.query(new GetAccountByName(incomingAccountCombo.getText()));
          paymentTypeCombo.update(account);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
View Full Code Here


                  }
                }
                if(accountSelected.equals(accountNameLogged)){
                  new MoneyTransaction().incomingPayment(getIncomingId(), accountId, paidDate.getCalendar(), paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                } else {
                  Account accountDestiny = (Account) system.query(new GetAccountByName(accountSelected));
                  accountId = accountDestiny.getId();
                  if(!accountDestiny.isBankAccount()) {
                    User user = ((User)accountDestiny.getPerson().getPersonType("user"));
                    ConfirmUserAndPasswordDialog dialog = new ConfirmUserAndPasswordDialog(getShell(), user);
                    dialog.open();
                    if(dialog.isCheckPassword()) {
                      new MoneyTransaction().incomingPayment(getIncomingId(), accountId, paidDate.getCalendar(), paidTotal.getValue(), paymentTypeCombo.getPaymentType(), extractBankItem);
                    }
View Full Code Here

        try {
            Map <String, ExtractBankItem> extractBankList = (Map <String, ExtractBankItem>) system.query(new GetExtractBankItem());
           
            for (ExtractBankItem extractBankItem : extractBankList.values()) {
                TableItem item = new TableItem(table, SWT.NONE);
                Account account = extractBankItem.getAccount();
               
                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) {
View Full Code Here

          paymentType = new PaymentDOC();
        } else if (combo.getText().equals("Saque cart�o")) {
          paymentType = new PaymentGetMoney();
        } else if (combo.getText().contains("Dep�sito na conta")) {
          try {
            Account account = (Account) system.query(new GetAccountByName(combo.getText().split("Dep�sito na conta ")[1]));
            paymentType = new PaymentBankAccountPayed(account);
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
View Full Code Here

        accountCombo.setLayoutData(data);
       
        accountCombo.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event arg0) {
        try {
          Account account = (Account) system.query(new GetAccountByName(accountCombo.getText()));
          paymentTypeCombo.update(account);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
View Full Code Here

                }
                     
                      if(accountSelected.equals(accountNameLogged)){
                          paydParcel(accountId);
                      } else {
                        Account accountDestiny;
                  try {
                    accountDestiny = (Account) system.query(new GetAccountByName(accountSelected));
                    accountId = accountDestiny.getId();
                    if(!accountDestiny.isBankAccount()) {
                      User user = ((User)accountDestiny.getPerson().getPersonType("user"));
                      ConfirmUserAndPasswordDialog dialog = new ConfirmUserAndPasswordDialog(getShell(), user);
                      dialog.open();
                      if(dialog.isCheckPassword()) {
                        paydParcel(accountId);
                      }
                    } else if (accountDestiny.isBankAccount()) {
                      List<Person> administrators = new ArrayList<Person>();
                      Map<String, List<String>> groups = (Map<String, List<String>>) system.query(new GetGroup());
                      for (String groupName : groups.keySet()) {
                        Group group = (Group) system.query(new GetGroup(groupName));
                        if (group.getPeopleInThisGroup().size() > 0) {
View Full Code Here

            if (Integer.parseInt(idOperation) <= Integer.parseInt(string))
                idOperation = string;
        }
        idOperation = String.valueOf(Integer.parseInt(idOperation) + 1);
       
        Account account = system.getAccounts().get(accountId);
        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);
View Full Code Here

            if (!amountText.getText().equals("")) {
                Money transferValue = new Money(amountText.getText());

                if(transferValue.getFloatValue() <= (moneyFromAccount.getAmount().getFloatValue() + moneyFromAccount.getLimit().getFloatValue())){
                    try {
                      Account accountDestiny = (Account) system.query(new GetAccountByName(paymentAccountCombo.getText()));
                   
                      if(moneyFromAccount.isBankAccount() && !accountDestiny.isBankAccount()){
                       
                        if(isAdmin(personLogged)){
                          if(!accountDestiny.getPerson().getId().equals(personLogged.getId())){
                            ConfirmUserAndPasswordDialog dialogConfirmAccountDestiny = new ConfirmUserAndPasswordDialog(getShell(), ((User)accountDestiny.getPerson().getPersonType("user")));
                              dialogConfirmAccountDestiny.open();
                             
                              if(dialogConfirmAccountDestiny.isCheckPassword()) {
                                new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                              }
                              close();
                          }else{
                            new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                            close();
                          }
                        }else{
                          Group groupAdmin = (Group) system.query(new GetGroup("Administrador"));
                          ConfirmUserAndPasswordDialog dialogConfirmAccountSource = new ConfirmUserAndPasswordDialog(getShell(), groupAdmin.getPeopleInThisGroup());
                          dialogConfirmAccountSource.open();
                         
                          if(dialogConfirmAccountSource.isCheckPassword()) {
                            new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                          }
                          close();
                        }
                       
                      }else if(!moneyFromAccount.isBankAccount() && accountDestiny.isBankAccount()){
                        if(moneyFromAccount.getPerson().getId().equals(personLogged.getId())){
                          new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                        }else{
                          boolean isOk = false;
                              boolean passwordIsOk = false;
                          if(moneyFromAccount.getId().equals(personLogged.getId())){
                                isOk = true;
                              }else{
                                User userAccountSource = ((User)moneyFromAccount.getPerson().getPersonType("user"));
                                ConfirmUserAndPasswordDialog dialogConfirmAccountSource = new ConfirmUserAndPasswordDialog(getShell(), userAccountSource);
                                dialogConfirmAccountSource.open();
                                passwordIsOk = dialogConfirmAccountSource.isCheckPassword();
                              }
                             
                              if(passwordIsOk || isOk) {
                                new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                              }
                        }
                        close();
                        }else if(moneyFromAccount.isBankAccount() && accountDestiny.isBankAccount()){//Conta Banco para Conta Banco
                           if(isAdmin(personLogged)){
                             new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                        }else{
                          Group groupAdmin = (Group) system.query(new GetGroup("Administrador"));
                          ConfirmUserAndPasswordDialog dialogConfirmAccountSource = new ConfirmUserAndPasswordDialog(getShell(), groupAdmin.getPeopleInThisGroup());
                          dialogConfirmAccountSource.open();
                         
                          if(dialogConfirmAccountSource.isCheckPassword()) {
                            new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                          }
                        }
                           close();
                        }else {//Conta caixa para conta caixa
                          boolean isOk = false;
                          boolean passwordIsOk = false;
                          User userAccountSource = ((User)moneyFromAccount.getPerson().getPersonType("user"));
                          if(moneyFromAccount.getPerson().getId().equals(personLogged.getId())){
                            isOk = true;
                          }else{
                            ConfirmUserAndPasswordDialog dialogConfirmAccountSource = new ConfirmUserAndPasswordDialog(getShell(), userAccountSource);
                            dialogConfirmAccountSource.open();
                            passwordIsOk = dialogConfirmAccountSource.isCheckPassword();
                          }
                         
                          if(isOk || passwordIsOk) {
                if(accountDestiny.getPerson().getId().equals(personLogged.getId())){
                               new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
                             }else{
                               User userAccountDestiny = ((User)accountDestiny.getPerson().getPersonType("user"));
                               ConfirmUserAndPasswordDialog dialogConfirmDestiny = new ConfirmUserAndPasswordDialog(getShell(), userAccountDestiny);
                               dialogConfirmDestiny.open();
                              
                               if(dialogConfirmDestiny.isCheckPassword()) {
                                 new MoneyTransaction().transferMoneyBetweenAccounts(paymentAccountCombo.getText(), moneyFromAccount, transferValue);
View Full Code Here

    }
   

    @Override
    protected void execute(PrevalentSystem system) {
      Account account = system.accounts.get(accountId);
      account.setActive(isActive);
    }
View Full Code Here

    protected void execute(PrevalentSystem system) throws BusinessException {
        int count = 0;
        Money total = new Money(0);
        String idOperation = getIdOperation(system);

        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;
View Full Code Here

TOP

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

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.