Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.GDDate


//        updateZoomTable(flowGroup.getCashFlowPerformance().getReceivedZoom(new GDDate(flowGroup.getSelectedDate())));
////        zoomGroup.fillWithCredit(new GDDate(flowGroup.getSeletedDate()));
//    }
   
    public void fillZoomWithToReceive() {
      updateZoomTable(flowGroup.getCashFlowPerformance().getToReceiveZoom(new GDDate(flowGroup.getSelectedDate())));
//        zoomGroup.fillWithCredit(new GDDate(flowGroup.getSeletedDate()));
    }
View Full Code Here


//        updateZoomTable(flowGroup.getCashFlowPerformance().getPaidZoom(new GDDate(flowGroup.getSelectedDate())));
////        zoomGroup.fillWithDebit(date);
//    }
   
    public void fillZoomWithToPay() {
      updateZoomTable(flowGroup.getCashFlowPerformance().getToPayZoom(new GDDate(flowGroup.getSelectedDate())));
//        zoomGroup.fillWithDebit(date);
    }
View Full Code Here

      updateZoomTable(flowGroup.getCashFlowPerformance().getToPayZoom(new GDDate(flowGroup.getSelectedDate())));
//        zoomGroup.fillWithDebit(date);
    }
   
    public void fillZoomWithTotal() {
        updateZoomTable(flowGroup.getCashFlowPerformance().getTotalZoom(new GDDate(flowGroup.getSelectedDate())));
//        zoomGroup.fillTotal(date);
    }
View Full Code Here

    public boolean isAnyFlowItemSelected(){
        return flowGroup.isAnyFlowItemSelected();
    }

    public GDDate getStartDate() {
        return new GDDate(filtersGroup.getStartPeriod());
    }
View Full Code Here

    public GDDate getStartDate() {
        return new GDDate(filtersGroup.getStartPeriod());
    }

    public GDDate getEndDate() {
        return new GDDate(filtersGroup.getEndPeriod());
    }
View Full Code Here

              for (Registration registration : registrationMap.values()) {
                  Person person = (Person) system.query(new GetPerson(registration.getIdPerson()));
                  int numberOfParcel = 1;
                  for (Parcel parcel : registration.getParcels()) {
                          if(parcel.isPayed() && parcel.getDiscount() > 0.0f) {
                              parcelPayDate = new GDDate(parcel.getPayDate());
                              if (parcelPayDate.afterOrEqualsDay(startDate) && parcelPayDate.beforeOrEqualsDay(finishDate)) {
                                  createParcelsMap(person, parcel, index , numberOfParcel, registration.isActive(), registration.getIdRegistration());
                                  index++;
                              }
                          }
View Full Code Here

//      SortComparator comparator = new SortComparator();
//      Collections.sort(list, comparator);

      Map<String, Expenditure> map = (Map<String, Expenditure>) system.query(new GetExpenditures());
      List<Expenditure> list = new ArrayList<Expenditure>();
      GDDate date;
      for (Expenditure expenditure : map.values()) {
        if (expenditure.isActive()) {
          date = new GDDate(expenditure.getNextPaymentDate());
          int frequency = expenditure.getFrequency();
          if (expenditure.getNumberOfOcurrencies() > 0) {
            int i = 1;
            while (i <= expenditure.getNumberOfOcurrencies()) {
              if ( date.afterOrEqualsDay(fromDate) && date.beforeOrEqualsDay(toDate) ){
//                Expenditure myBill = new Expenditure(expenditure.getId(), expenditure.getDescription(), new GDDate(date), expenditure.getFrequency(), expenditure.getNumberOfOcurrencies(), expenditure.getValue(), expenditure.isFixedValue(), expenditure.getCategoryId(), expenditure.getObservation());
                Expenditure myBill = new Expenditure(expenditure.getId(), expenditure.getDescription(), new GDDate(date), expenditure.getFrequency(), expenditure.getNumberOfOcurrencies(), expenditure.getValue(), expenditure.isFixedValue(), expenditure.getCategoryId(), expenditure.getObservation(),expenditure.getFirstPaymentDate(),expenditure.getLastPaymentDate());
                list.add(myBill);
              }
              date = skip(date, frequency);
              if (date == null) {
                break;
              }
              i++;
            }
          }else{
            while (date.beforeOrEqualsDay(toDate)){
              if ( date.afterOrEqualsDay(fromDate) && date.beforeOrEqualsDay(toDate) ){
                Expenditure myBill = new Expenditure(expenditure.getId(), expenditure.getDescription(), new GDDate(date), expenditure.getFrequency(), expenditure.getNumberOfOcurrencies(), expenditure.getValue(), expenditure.isFixedValue(), expenditure.getCategoryId(), expenditure.getObservation(),expenditure.getFirstPaymentDate(),expenditure.getLastPaymentDate());
                list.add(myBill);
              }
              date = skip(date, frequency);
              if (date == null) {
                break;
              }
            }
          }
        }
      }
      SortComparator comparator = new SortComparator();
      Collections.sort(list, comparator);

      int bgColorControl = 0;

      for (Expenditure expenditure : list) {
        if (expenditure.isActive()) {
          TableItem item = new TableItem(expenditureTable, SWT.NONE | SWT.MULTI | SWT.WRAP);
          if (bgColorControl == 1) {
            item.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
            bgColorControl = 0;
          } else {
            bgColorControl = 1;
          }
         
          GDDate todayPlusOneWeek = new GDDate();
          todayPlusOneWeek.addDays(7);
          GDDate nextPaymentDate = expenditure.getNextPaymentDate();
          GDDate today = new GDDate();
         
          Expenditure expenditureToCompare = (Expenditure) system.query(new GetExpenditures(expenditure.getId()));
          GDDate paymentDayBill = expenditureToCompare.getNextPaymentDate();
         
          if (paymentDayBill.beforeDay(nextPaymentDate) && paymentDayBill.beforeDay(today)) {
            item.setImage(new Image(null, "img/icoExpiradNotPayed.png"));
          } else if (nextPaymentDate.beforeOrEqualsDay(todayPlusOneWeek) && nextPaymentDate.afterOrEqualsDay(today)) {
            item.setImage(new Image(null, "img/icoWarningExpiration.png"));
          } else if (nextPaymentDate.beforeDay(today)) {
            item.setImage(new Image(null, "img/icoExpirad.png"));
          } else {
            item.setImage(new Image(null, "img/icoNotPay.png"));
          }
          String firstPaymentDate = (expenditure.getFirstPaymentDate() == null) ? ""  : new GDDate(expenditure.getFirstPaymentDate()).getFormatedDate();
          String lastPaymentDate = (expenditure.getLastPaymentDate() == null? "": new GDDate(expenditure.getLastPaymentDate()).getFormatedDate();

          item.setText(0, expenditure.getId());
          item.setText(1, nextPaymentDate.getFormatedDate());
          item.setText(2, expenditure.getDescription());
          item.setText(3, system.getBillPlan().get(expenditure.getCategoryId()).getDescription());
View Full Code Here

        return false;
    }

    private void setFinishDateOfEmployee(List<FinancialInfo> financialInfoList) {
        for (FinancialInfo info : financialInfoList) {
          info.setFinishDate(new GDDate(employmentData.getDismissedDate()));
        }
    }
View Full Code Here

    }
    return null;
    }

    private void verifyIfPosibileAddStudent() {
        GDDate today = new GDDate();
        if(getNumberOfFreeVacancy() == 0 || date.before(today)) {
            addAppointmentButton.setEnabled(false);
            addReplacementButton.setEnabled(false);
        } else if(getNumberOfFreeVacancy() < 0) {
          addAppointmentButton.setEnabled(false);
View Full Code Here

    }
        getAppointmentTableOrder();
  }
 
  private boolean isPossibleAddOrRemovePresence() {
    GDDate now = new GDDate();
    if(now.getHourOfDay() > date.getHourOfDay() && now.getDayOfMonth() >= date.getDayOfMonth() && now.getMonth() >= date.getMonth() && now.getYear() >= date.getYear()) {
      return false;
    } else {
      return true;
    }
  }
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.GDDate

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.