Package br.com.visualmidia.persistence.add

Examples of br.com.visualmidia.persistence.add.AddAndReturnOperation


           
            Parcel parcel = (Parcel) system.executeAndQuery(new ParcelPayment(system.getLogged(), registration.getIdRegistration(), parcelId, ticket, mora, discount, payValue, payDate.getCalendar(), paymentType, receivedValue.getFloatValue()));
            String desc = (parcel.isRegistrationTax() ? "Taxa da matr�cula de " : "Mensalidade de ");
//      if(paymentType instanceof PaymentBankAccountPayed){
//                String accountId = ((PaymentBankAccountPayed)paymentType).getAccountId();
                Operation operation = (Operation) system.executeAndQuery(new AddAndReturnOperation(accountId, parcelPaymenBillPlanCategory, payDate, desc + registration.getStudent().getName(), payValue, parcel, receivedValue.getFloatValue(), registration.getIdRegistration(), parcelId));
                system.execute(new AccountAmountControl(accountId, payValue, 0));
              
                // Quando um desconto for concedido � criado uma nova opera��o sobre o desconto da mensalidade e assim
                // essa opera��o de desconto � adicionado no LinkedOperation como uma despesa
                if(discount != 0.0f){
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

        }
    }
   
    public Operation accountOperation(Account account, String categoryId, GDDate date, String description, float value, TypeOfPayment paymentType) {
        try {
            Operation operation = (Operation) system.executeAndQuery(new AddAndReturnOperation(account, categoryId, date, description, value, paymentType));
           
            if(operation.isCredit()) {
                system.execute(new AccountAmountControl(account, new Money(value), new Money("0")));
            } else {
                system.execute(new AccountAmountControl(account, new Money(0), new Money(value)));
View Full Code Here

        return null;
    }
   
    public void accountOperationAndLinkExtractItem(Account account, String categoryId, GDDate date, String description, float value, TypeOfPayment paymentType, String idExtractItem) {
        try {
            Operation operation = (Operation) system.executeAndQuery(new AddAndReturnOperation(account, categoryId, date, description, value, paymentType, idExtractItem));
           
            if(operation.isCredit()) {
                system.execute(new AccountAmountControl(account, new Money(value), new Money("0")));
            } else {
                system.execute(new AccountAmountControl(account, new Money(0), new Money(value)));
View Full Code Here

    public void addAccountInicialAmount(Account account, Money value) {
        try {
            //O id da abertura de conta
            String accountOpenCategory = "1.2.5";
           
            system.executeAndQuery(new AddAndReturnOperation(account, accountOpenCategory, new GDDate(), "Saldo inicial", value.getFloatValue(), new PaymentMoney()));
            system.execute(new AccountAmountControl(account, new Money(value), new Money("0")));
        } 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

TOP

Related Classes of br.com.visualmidia.persistence.add.AddAndReturnOperation

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.