Package br.com.visualmidia.persistence

Examples of br.com.visualmidia.persistence.GetOperationByAccountId


  private void updateAmountAccount() {
      try {
        Map<String, Account> accounts = (Map<String, Account>) system.query(new GetAccounts());
        for (Account account : accounts.values()) {
          Money money = new Money(0);
          Map<String, Operation> operations = (Map<String, Operation>) system.query(new GetOperationByAccountId(account.getId()));
          for (Operation operation : operations.values()) {
            if(operation.isCredit()){
              money.credit(operation.getValue());
            }else{
              money.debit(operation.getValue());
View Full Code Here


    @SuppressWarnings("unchecked")
  private Money getBalanceUntilLastDay(String accountId, GDDate beginDate) {
        beginDate.setHourOfDay(0);//(Calendar.HOUR_OF_DAY, 0);
        beginDate.setMinuteOfHour(0);//(Calendar.MINUTE, 0);
        try {
            Map<String, Operation> operationsMap = (Map<String, Operation>) system.query(new GetOperationByAccountId(accountId));
            float balanceUntilLastDay = 0;
           
            for (Operation operation : operationsMap.values()) {
                GDDate operationDateTime = operation.getDateTime();
                if(operationDateTime.beforeDay(beginDate)){
View Full Code Here

    @SuppressWarnings("unchecked")
    private Money getBalanceUntilLastDay(String accountId, GDDate beginDate) {
      beginDate.setHourOfDay(0);//(Calendar.HOUR_OF_DAY, 0);
      beginDate.setMinuteOfHour(0);//(Calendar.MINUTE, 0);
      try {
        Map<String, Operation> operationsMap = (Map<String, Operation>) system.query(new GetOperationByAccountId(accountId));
        //Foi necess�rio alterar os calculos para Money, pois estavammos com problemas de arredondamento.
//      float balanceUntilLastDay = 0;
        Money balanceUntilLastDayMoney = new Money(0.0);

        for (Operation operation : operationsMap.values()) {
View Full Code Here

TOP

Related Classes of br.com.visualmidia.persistence.GetOperationByAccountId

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.