Examples of GDDate


Examples of br.com.visualmidia.business.GDDate

                   
                  
                    if(categoryId.charAt(0) == '2'){
                        Money valueComp = new Money(valueText.getText());
                        if(balanceValue.getFloatValue() >= valueComp.getFloatValue()){
                            Operation operation = new MoneyTransaction().accountOperation(system.getRegisterMachine(), categoryId, new GDDate(), descriptionText.getText(), new Money(valueText.getText()).getFloatValue(), paymentTypeCombo.getPaymentType());
                            addOperationToTable(operation);
                           
                            clearForNewTransaction();
                        }else{
                            setErrorMessage("Saldo Insuficiente.");
                        }
                    }else{
                        Operation operation = new MoneyTransaction().accountOperation(system.getRegisterMachine(), categoryId, new GDDate(), descriptionText.getText(), new Money(valueText.getText()).getFloatValue(), paymentTypeCombo.getPaymentType());
                        addOperationToTable(operation);

                        clearForNewTransaction();
                    }
                } catch (Exception e) {
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    @SuppressWarnings(value = { "unchecked" })
    public void updateTable() {
        accountTable.removeAll();

        try {
            GDDate date = new GDDate(initialDateText.getText());
           
          balanceValue = getBalanceUntilLastDay(system.getRegisterMachine().getId(), date);
            GDDate initialDate = new GDDate(initialDateText.getText());
            GDDate finishDate = new GDDate(finishDateText.getText());
           
            if(initialDate.afterDay(finishDate)){
              setErrorMessage("A data inicial deve ser anterior a data final.");
            } else {
              Map<String, Operation> map = (Map<String, Operation>) system.query(new GetOperationByPersonId(system.getLogged().getId()));
              List<Operation> list = new ArrayList<Operation>();
              for (Operation operation : map.values()) {
                if(initialDate.beforeOrEqualsDay(operation.getDateTime()) && finishDate.afterOrEqualsDay(operation.getDateTime()))
                  list.add(operation);
              }
             
              SortComparator comparator = new SortComparator();
              Collections.sort(list, comparator);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        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)){
                    float inMoney = (!operation.isCredit()) ? 0f : operation.getValue();
                    float outMoney = (operation.isCredit()) ? 0f : operation.getValue()* -1;
                    balanceUntilLastDay += inMoney + outMoney;
                }
            }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        periodLabel = new Label(composite, SWT.NULL);
        periodLabel.setText("Per�odo:");
        periodLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        periodLabel.setEnabled(true);

        GDDate today = new GDDate();
        startPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER);
        startPeriodText.setValue(today.getDate());
        startPeriodText.setEnabled(true);

        final Label atLabel = new Label(composite, SWT.NULL);
        atLabel.setText("�");
        atLabel.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        atLabel.setEnabled(true);

        endPeriodText = new DateText(composite, SWT.SINGLE | SWT.BORDER);
        endPeriodText.setValue(today.getDate());
        endPeriodText.setEnabled(true);

        combo.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                if (combo.getSelectionIndex() == 0) {
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

            }
        });
    }

    protected void setPeriod(int option) {
        GDDate start = new GDDate();
        GDDate end = new GDDate();

        switch(option){
        case 1://M�s Atual
            start.setFirstDayOfMonth();
            end.setLastDayOfMonth();
            break;
           
        case 2: //M�s Anterior
            start.addMonth(-1);
            end.addMonth(-1);
            start.setFirstDayOfMonth();
            end.setLastDayOfMonth();
            break;
       
        case 3: //2 �ltimos meses
           start.addMonth(-2);
             break;
        }
       
        startPeriodText.setValue(start.getDate());
        endPeriodText.setValue(end.getDate());
    }
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

    protected void updateFilters() {
        if ((startPeriodText.getText().equals("")) || (endPeriodText.getText().equals(""))) {
            flowBankAccountControlCenter.setErrorMessage("Per�odo Incorreto.");
        } else {
            GDDate startDate = new GDDate(startPeriodText.getText());
            GDDate endDate = new GDDate(endPeriodText.getText());
           
            if (endDate.beforeDay(startDate)) {
                flowBankAccountControlCenter.setErrorMessage("Per�odo Incorreto.");
            } else {
                flowBankAccountControlCenter.setErrorMessage("");
                flowBankAccountControlCenter.updateInitialCash("0,00");
                flowBankAccountControlCenter.updateFlowBankAccountTable();
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        monthCombo.add("Agosto");
        monthCombo.add("Setembro");
        monthCombo.add("Outubro");
        monthCombo.add("Novembro");
        monthCombo.add("Dezembro");
        monthCombo.select(new GDDate().getMonth()-1);
       
        FormData data = new FormData();
        data.top = new FormAttachment(0,0);
        data.left = new FormAttachment(monthLabel,5);
        monthCombo.setLayoutData(data);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

      });
    }

    private void createEndDateText() {
        endDateText = new DateText(student, SWT.BORDER |SWT.READ_ONLY);
        endDateText.setValue(new GDDate().getDate());
        endDateText.setEditable(false);
       
        FormData data = new FormData();
        data.top = new FormAttachment(endDateLabel, 1);
        data.left = new FormAttachment(initialDateText, 5);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

        createEndDateText();
    }
   
    private void createInitialDateText() {
      initialDateText = new DateText(student, SWT.BORDER | SWT.READ_ONLY);
      initialDateText.setValue(new GDDate().getDate());
      initialDateText.setEditable(false);
       
        FormData data = new FormData();
        data.top = new FormAttachment(inicialDateLabel, 1);
        data.left = new FormAttachment(0, 0);
View Full Code Here

Examples of br.com.visualmidia.business.GDDate

       
        Button print = new Button(buttons, SWT.PUSH);
        print.setText("Visualizar");
        print.addListener(SWT.MouseDown, new Listener(){
            public void handleEvent(Event arg0) {
                GDDate initialDate = new GDDate(initialDateText.getText());
                GDDate endDate = new GDDate(endDateText.getText());
                if(endDate.afterOrEqualsDay(initialDate)){
                  setScreenMessage("");
                    CreateReports.createParcelsReport(initialDateText.getText(), endDateText.getText(), statusSelect);
                } else {
                    setErrorMessage("A data final deve ser maior que a inicial.");
                }
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.