Examples of debit()


Examples of br.com.visualmidia.business.Money.debit()

          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());
            }
          }
          system.execute(new SetAmountOfAccount(money, account.getId()));
        }
      } catch (Exception e) {
View Full Code Here

Examples of br.com.visualmidia.business.Money.debit()

                for (Operation operation : operations) {
                    if(operation.isCredit()) {
                        balanceValueCredit.credit(operation.getValue());
                        balanceValueTotal.credit(operation.getValue());
                    } else {
                        balanceValueTotal.debit(operation.getValue());
                        balanceValueDebit.credit(operation.getValue());
                    }
                    page.addElement(drawRectangle(posX, posY, convert(190), 15, 0));
                    page.addElement(insertNormalText(operation.getId(), posX+2, posY, 35, 15));
                    page.addElement(drawVerticalLine(posX+40, posY, 15));
View Full Code Here

Examples of br.com.visualmidia.business.Money.debit()

//          float outMoney = (operation.isCredit()) ? 0f : operation.getValue() * -1;
//          balanceUntilLastDay += (inMoney + outMoney);
            if (operation.isCredit()){
              balanceUntilLastDayMoney.credit(operation.getValue());
            }else{
              balanceUntilLastDayMoney.debit(operation.getValue());
            }
          }
        }
//      return new Money(balanceUntilLastDay);
        return balanceUntilLastDayMoney;
View Full Code Here

Examples of br.com.visualmidia.business.Money.debit()

    if (!additionText.getText().equals(""))
      calculation.credit(new Money(additionText.getText()));
    if ((!discountingText.getText().equals(""))
        && (getDiscounting() <= totalToPayMoney.getFloatValue())) {
      calculation.debit(new Money(discountingText.getText()));
    } else if (discountingText.getText().equals(""))
      setMessage("", IMessageProvider.NONE);
    else
      setMessage("Valor do desconto superior ao valor da Parcela",
          IMessageProvider.ERROR);
View Full Code Here

Examples of br.com.visualmidia.business.Money.debit()

                page.addElement(insertRightText(totalDebit.getFormatedValue(), posX+462, posY, 67));
               
                posY += 20;
               
                Money total = new Money(totalCredit);
                total.debit(totalDebit);
                page.addElement(insertBoldText("Total L�quido: R$ " + total.getFormatedValue() , posX+370, posY, convert(190)-370));
               
                posY += 35;
                page.addElement(insertNormalText("Recebi a importancia de R$ " + total.getFormatedValue() + " dando plena, geral e irrevog�vel quita��o referente aos itens acima descritos:", posX, posY, convert(190), 30));
                posY += 35;
View Full Code Here

Examples of core.Bank.debit()

    StubBank target = new StubBank();
    LoggingAdvice advice = new LoggingAdvice();
    ProxyFactory pf = new ProxyFactory(target);
    pf.addAdvice(advice);
    Bank bank = (Bank) pf.getProxy();
    bank.debit("abc", 100);
    bank.credit("abc", 200);
  }

}
View Full Code Here

Examples of core.Bank.debit()

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("config.xml", AnnotationDemo.class);
    Bank bank = context.getBean(Bank.class);
    bank.credit("abc", 100);
    bank.debit("abc", 99.99);
  }

}
View Full Code Here

Examples of org.jboss.narayana.blacktie.examples.integration1.ejb.DebitRemote.debit()

    String resp = "NAMINGERROR";
    try {
      Context ctx = new InitialContext();
      DebitRemote bean = (DebitRemote) ctx.lookup("DebitBean/remote");
      log.debug("resolved DebitBean");
      resp = bean.debit(acct_no, amount);
    } catch (NamingException e) {
      log.error("Got a naming error: " + e.getMessage(), e);
    }
    log.trace("Returning: " + resp);
    X_OCTET buffer = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET",
View Full Code Here

Examples of org.jboss.test.ejb3.nointerface.AccountManager.debit()

     
      assertEquals("Unexpected account balance after credit", 150, currentBalance);
     
      // now let's debit 10 dollars (Note that the current balance is again hard coded in the bean to 100).
      // So after debiting, the current balance is going to be 90
      currentBalance = accountMgr.debit(dummyAccountNumber, 10);
     
      assertEquals("Unexpected account balance after debit", 90, currentBalance);
   }
  
View Full Code Here

Examples of org.jboss.test.ejb3.singleton.AccountManager.debit()

            AccountManagerBean.JNDI_NAME);
      int balanceAfterCredit = anotherAccountManagerInstance.balance();
      assertEquals("Unexpected balance after credit", 100, balanceAfterCredit);

      // debit
      anotherAccountManagerInstance.debit(50);

      int balanceAfterDebit = accountManager.balance();
      assertEquals("Unexpected balance after debit", 50, balanceAfterDebit);

   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.