Package br.com.visualmidia.persistence

Examples of br.com.visualmidia.persistence.GetIncoming


            expenditures = (Map<String, Expenditure>) system.query(new GetExpenditures());
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            incomings = (Map<String, Incoming>) system.query(new GetIncoming());
        } catch (Exception e) {
          e.printStackTrace();
        }
    }
View Full Code Here


        fixedValue.select((expenditure.isFixedValue()) ? 0 : 1);
        fixedValue.notifyListeners(SWT.Selection, new Event());
        valueText.setText(expenditure.getValue().getValue() + "");
        observation.setText(expenditure.getObservation());
      } else {
        Incoming incoming = (Incoming) system.query(new GetIncoming(id));
        setOpenAccount(incoming.getId());

        descriptionText.setText(incoming.getDescription());
        nextPaymentDateText.setValue(incoming.getNextPaymentDate().getDate());
        billPlanCombo.select(billPlan.get(incoming.getCategoryId()).getDescription());
View Full Code Here

        TableItem[] item = incomingTable.getAccountTableTree().getSelection();
        String idBill = item[0].getText(0);
        GDDate paymentDayBill = new GDDate(item[0].getText(1));
        if (incomingTable.getAccountTableTree().getSelectionCount() > 0) {
          try {
            Incoming incoming = (Incoming) system.query(new GetIncoming(idBill));
            if (incoming.getNextPaymentDate().beforeDay(paymentDayBill)) {
              MessageBox messageBox = new MessageBox(mainScreen.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
              messageBox.setMessage("Existem Parcelas anteriores em aberto.\nDeseja efetuar o recebimento da parcela vencida?");
              messageBox.setText("Alerta Gerente Digital!");
              int result = messageBox.open();
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  private Incoming getRelatedIncoming(String bankOperationNumber, String description, String value, GDDate date) {
      try {
        Map<String, Incoming> incomings = (Map<String, Incoming>) system.query(new GetIncoming());
       
        for (Incoming incoming : incomings.values()) {
          GDDate incomingDate = new GDDate(incoming.getNextPaymentDate());
          incomingDate.addDays(-3);
         
View Full Code Here

                    }
                }
                SortComparator comparator = new SortComparator();
                Collections.sort(listExpenditure, comparator);
            } else {
              Map<String, Incoming> map = (Map<String, Incoming>) system.query(new GetIncoming());
                listIncoming = new ArrayList<Incoming>();
               
                for (Incoming incoming : map.values()) {
                    if (incoming.isActive()) {
                      GDDate date = new GDDate(incoming.getNextPaymentDate());
View Full Code Here

      
    }

    private void gatherIncomingInformation() {
        try {
            incoming = (Incoming) system.query(new GetIncoming(incomingId));
            incomingDescription = incoming.getDescription();
            incomingTotal = MoneyMask.format(incoming.getValue().getValue());
            incomingDate = new GDDate(incoming.getNextPaymentDate()).getFormatedDate();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        createReceiveIncomingTotalFields();
    }

    private void gatherBillInformation() {
        try {
            incoming = (Incoming) system.query(new GetIncoming(incomingId));
            incomingDescription = incoming.getDescription();
            incomingTotal = MoneyMask.format(incoming.getValue().getValue());
            incomingDate = new GDDate(incoming.getNextPaymentDate()).getFormatedDate();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    @SuppressWarnings("unchecked")
    private void updateExistExpendituresAndIncomingTable() {
      table.removeAll();
      try {
        if(extractBankItem.isCredit()) {
          Map<String, Incoming> incomingMap = (Map<String, Incoming>) system.query(new GetIncoming());
          for (Incoming incoming : incomingMap.values()) {
            if(incoming.isActive()){
              TableItem item = new TableItem(table, SWT.NONE);
             
              item.setText(0, incoming.getId());
View Full Code Here

    @SuppressWarnings("unchecked")
    private void updatePossibleExpendituresAndIncomingTable() {
      table.removeAll();
      try {
        if(extractBankItem.isCredit()) {
          Map<String, Incoming> incomingMap = (Map<String, Incoming>) system.query(new GetIncoming());
          for (Incoming incoming : incomingMap.values()) {
            if(incoming.getValue().getValue() == new Money(extractBankItem.getValue()).getValue()) {
              TableItem item = new TableItem(table, SWT.NONE);
             
              item.setText(0, incoming.getId());
View Full Code Here

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

         
            Map<String, Incoming> map = (Map<String, Incoming>) system.query(new GetIncoming());
            List<Incoming> list = new ArrayList<Incoming>();

            for (Incoming incoming : map.values()) {
                if (incoming.isActive()) {
                  GDDate date = new GDDate(incoming.getNextPaymentDate());
                  int frequency = incoming.getFrequency();
                  if(incoming.getNumberOfOcurrencies() > 0){
                    int i = 1;
                    while (i <= incoming.getNumberOfOcurrencies()) {
                      if ( date.afterOrEqualsDay(fromDate) && date.beforeOrEqualsDay(toDate) ){
//                        Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation());
                        Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation(),incoming.getFirstPaymentDate(),incoming.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) ){
                        Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation(),incoming.getFirstPaymentDate(),incoming.getLastPaymentDate());
                        list.add(myBill);
                      }
                      date = skip(date, frequency);
                      if (date == null) {
                        break;
                      }
                    }
                  }
                }
            }
            SortComparator comparator = new SortComparator();
            Collections.sort(list, comparator);
         
         
            int bgColorControl = 0;

            for (Incoming incoming : list) {
                    if (incoming.isActive()) {
                        TableItem item = new TableItem(incomingTable, 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 nextIncomingDate = incoming.getNextPaymentDate();
                        GDDate today = new GDDate();
                       
                      Incoming incomingToCompare = (Incoming) system.query(new GetIncoming(incoming.getId()));
                        GDDate paymentDayBill = incomingToCompare.getNextPaymentDate();
             
              if (paymentDayBill.beforeDay(nextIncomingDate) && paymentDayBill.beforeDay(today)) {
                item.setImage(new Image(null, "img/icoExpiradNotPayed.png"));
              } else if (nextIncomingDate.beforeOrEqualsDay(todayPlusOneWeek) && nextIncomingDate.afterOrEqualsDay(today)) {
View Full Code Here

TOP

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

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.