Package br.com.visualmidia.persistence

Examples of br.com.visualmidia.persistence.GetBillCategory


    system.execute(new RemoveAllPresences());
  }

  private void updateBillPlan(String parentDescription, String description){
    try {
      BillCategory bill = (BillCategory) system.query(new GetBillCategory(parentDescription));
      int i = 0;
      for (BillCategory b : bill.getAll()) {
        if(b.getDescription().equals(description)) {
          i++;
        }
View Full Code Here


        this.description = description;
        this.value = value;
        this.categoryId = categoryId;
        try {
          GDSystem system = GDSystem.getInstance();
            billCategory = (BillCategory) system.query(new GetBillCategory(categoryId));
        } catch (Exception e) {
          logger.warn("N�o foi poss�vel recuperar a categoria do Plano de Contas!", e);
        }
    }
View Full Code Here

    public void transferMoneyBetweenAccounts(String tranferMoneyToAccount, Account moneyFromAccount, Money transferValue) {
        try {
            Account accountToTransferMoney = (Account) system.query(new GetAccountByName(tranferMoneyToAccount));

            system.executeAndQuery(new AddAndReturnOperation(accountToTransferMoney, ((BillCategory) system.query(new GetBillCategory("Transfer�ncia entre contas"))).getId(), new GDDate(), "Tranfer�ncia da conta: "+ moneyFromAccount.getName(), transferValue.getFloatValue(), new PaymentMoney()));
            system.execute(new AccountAmountControl(accountToTransferMoney, transferValue, new Money(0)));
           
            system.executeAndQuery(new AddAndReturnOperation(moneyFromAccount, ((BillCategory) system.query(new GetBillCategory("Transfer�ncia entre contas "))).getId(), new GDDate(), "Tranfer�ncia para conta: "+ accountToTransferMoney.getName(), transferValue.getFloatValue(), new PaymentMoney()));
            system.execute(new AccountAmountControl(moneyFromAccount, new Money(0), transferValue));
        } catch (TransactionDateException e) {
      MessageBox box = new MessageBox(GDWindowControl.getInstance().getMainScreen().getShell(), IMessageProvider.INFORMATION);
        box.setText("Data Inv�lida");
        box.setMessage(MessageConstants.TRANSACTION_DATE_EXCEPTION);
View Full Code Here

        system.execute(new AddBillCategory(parentDescription, description));
    }

    public BillCategory get(String description) {
        try {
            return (BillCategory) system.query(new GetBillCategory(description));
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
View Full Code Here

                    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));
          page.addElement(insertNormalText(new SimpleDateFormat("dd/MM/yyyy HH:mm").format(operation.getDateTime().getDate()), posX+42, posY, 75, 15));
                    page.addElement(drawVerticalLine(posX+120, posY, 15));
                    BillCategory billCategory = (BillCategory) system.query(new GetBillCategory(operation.getCategoryId()));
                    page.addElement(insertNormalText( operation.getDescription().trim().equals("") ? billCategory.getDescription() : operation.getDescription() , posX+122, posY, 217, 15));
                    page.addElement(drawVerticalLine(posX+335, posY, 15));
                    page.addElement(insertRightText(operation.isCredit() ? new Money(operation.getValue()).getFormatedValue():"", posX+337, posY, 60));
                    page.addElement(drawVerticalLine(posX+400, posY, 15));
                    page.addElement(insertRightText(operation.isCredit() ? "" : new Money(operation.getValue()).getFormatedValue(), posX+402, posY, 60));
View Full Code Here

TOP

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

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.