Package br.com.visualmidia.persistence

Examples of br.com.visualmidia.persistence.AccountAmountControl


    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)));
                system.execute(new AddLinkedOperation(operation));
            }
           
            return operation;
        } catch (TransactionDateException e) {
View Full Code Here


    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)));
                system.execute(new AddLinkedOperation(operation));
            }
        } catch (TransactionDateException e) {
      MessageBox box = new MessageBox(GDWindowControl.getInstance().getMainScreen().getShell(), IMessageProvider.INFORMATION);
        box.setText("Data Inv�lida");
View Full Code Here

        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);
        box.open();
View Full Code Here

TOP

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

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.