Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.Money


                String frequence = frequenceCombo.getItem(frequenceCombo.getSelectionIndex());
               
                GDDate date = new GDDate(dateText.getText());
                if(financialInfo != null) {
                  financialGroup.getFinantialInfo().remove(index);
                  financialGroup.getFinantialInfo().add(index, new FinancialInfo(operation.equals("Acr�scimo"), description, frequence, new Money(valueText.getText()), date));
                } else {
                  financialGroup.getFinantialInfo().add(new FinancialInfo(operation.equals("Acr�scimo"), description, frequence, new Money(valueText.getText()), date));
                }
                financialGroup.updateFinantialTable();
               
                close();
            }
View Full Code Here


                                    ? ""
                                    : numberOfAccountText.getText();
                            String responsableName = (responsableAccountNameText.getText() == null)
                                ? ""
                                : responsableAccountNameText.getText();
                            Money limitAccount = (limitAccountText.getText() == null)
                                ? new Money(0)
                                : new Money(limitAccountText.getText());
                            GDDate dateOfOpen = new GDDate((dateOfOpenText.getText() == null)
                                    ? ""
                                    : dateOfOpenText.getText());
                            String bankId = (bankIdText.getText() == null)
                                    ? ""
                                    : bankIdText.getText();
                            String bankName = (bankNameText.getText() == null)
                                    ? ""
                                    : bankNameText.getText();
                            String agencyName = (bankAgencyText.getText() == null)
                                    ? ""
                                    : bankAgencyText.getText();
                            String agencyAddress = (bankAgencyAddressText.getText() == null)
                                    ? ""
                                    : bankAgencyAddressText.getText();
                            String agencyphone = (bankAgencyPhoneText.getText() == null)
                                    ? ""
                                    : bankAgencyPhoneText.getText();
                            String agencyManager = (bankAgencyManagerText.getText() == null)
                                    ? ""
                                    : bankAgencyManagerText.getText();

                            newAccount = (Account) system.executeAndQuery(new AddAccount(accountNameText.getText(), new GDDate(), numberofAccount, responsableName, limitAccount, dateOfOpen, bankId, bankName, agencyName, agencyAddress, agencyphone, agencyManager));
                            new MoneyTransaction().addAccountInicialAmount(newAccount, new Money(amountText.getText()));
                        } else {
                            newAccount = (Account) system.executeAndQuery(new AddAccount(accountNameText.getText(), new GDDate(), (Person) system.query(new GetPersonByName(personCombo.getText()))));
                            new MoneyTransaction().addAccountInicialAmount(newAccount, new Money(amountText.getText()));
                        }
                        accountCotrolCenter.updateTable();
                        close();
                    } else {
                        setMessage("Voc� n�o pode deixar nenhuma informa��o em branco.", IMessageProvider.ERROR);
                        amountText.setFocus();
                    }
                } else {
                    if (!accountNameText.getText().equals("")) {

                        if (account.getAgencyAddress() != null) {
                            system.executeAndQuery(new EditAccount(account.getId(), accountNameText.getText(), bankAgencyAddressText.getText(), bankAgencyManagerText.getText(), bankAgencyPhoneText.getText(), responsableAccountNameText.getText(), new Money(limitAccountText.getText())));
                        } else {
                          system.executeAndQuery(new EditAccount(account.getId(), accountNameText.getText()));
                        }

                        account.setActive(isAccountActive.getSelection());
View Full Code Here

                    page.addElement(divLine(posX+285));
                    page.addElement(insertText(parcel.getParcelDate(), posX+290, 100));
                    page.addElement(divLine(posX+390));
                    page.addElement(insertText(parcel.getNumberOfParcel(), posX+395, 50));
                    page.addElement(divLine(posX+445));
                    page.addElement(insertRightText(new Money(parcel.getParcelValue()).getFormatedValue(), posX+445, 85));
                   
                    posY += 15;
                   
                    totalOfParcels++;
                    valueTotalOfParcels += parcel.getParcelValue();
                    allTotalOfParcels ++;
                    allValueTotalOfParcels += parcel.getParcelValue();
                   
                    if(posY > (convert(290)-25)){
                        jasperPrint.addPage(page);
                        page = new JRBasePrintPage();
                        posY = convert(10);
                    }
                }

               
                page.addElement(insertFooterLeft("Total de Parcelas: "+totalOfParcels));
                page.addElement(insertFooterRight("Valor Total: "+new Money(valueTotalOfParcels).getFormatedValue()));
               
                posY += 25;
               
                page.addElement(drawGrayRectangle(posX, posY, 535, 20, 3));
                page.addElement(insertTitleBox("Alunos Finalizados" + obs));
               
                posY += 25;
               
                totalOfParcels = 0;
                valueTotalOfParcels = 0;
               
                page.addElement(drawRectangle(posX, posY, 535, 15, 0));
                page.addElement(insertCenterBoldText("Nome", posX, 170));
                page.addElement(divLine(posX+170));
                page.addElement(insertCenterBoldText("Telefone", posX+170, 115));
                page.addElement(divLine(posX+285));
                page.addElement(insertCenterBoldText(stringDate, posX+285, 105));
                page.addElement(divLine(posX+390));
                page.addElement(insertCenterBoldText("Parcela", posX+390, 55));
                page.addElement(divLine(posX+445));
                page.addElement(insertCenterBoldText("Valor", posX+445, 90));
               
                posY += 15;
               
                for(ParcelData parcel : parcelDataListFinalization){
                    page.addElement(drawRectangle(posX, posY, 535, 15, 0));
                    page.addElement(insertText((parcel.isRegistrationTax() ? "(*) " : "") + parcel.getStudentName(), posX+5, 165));
                    page.addElement(divLine(posX+170));
                    page.addElement(insertText(parcel.getStudentPhone(), posX+175, 110));
                    page.addElement(divLine(posX+285));
                    page.addElement(insertText(parcel.getParcelDate(), posX+290, 100));
                    page.addElement(divLine(posX+390));
                    page.addElement(insertText(parcel.getNumberOfParcel(), posX+395, 50));
                    page.addElement(divLine(posX+445));
                    page.addElement(insertRightText(new Money(parcel.getParcelValue()).getFormatedValue(), posX+445, 85));
                   
                    posY += 15;
                   
                    totalOfParcels++;
                    valueTotalOfParcels += parcel.getParcelValue();
                    allTotalOfParcels ++;
                    allValueTotalOfParcels += parcel.getParcelValue();
                   
                    if(posY > (convert(290)-25)){
                        jasperPrint.addPage(page);
                        page = new JRBasePrintPage();
                        posY = convert(10);
                       
                        insertHorizontalLine();
                    }
                }
               
                page.addElement(insertFooterLeft("Total de Parcelas: "+totalOfParcels));
                page.addElement(insertFooterRight("Valor Total: "+new Money(valueTotalOfParcels).getFormatedValue()));
               
                posY += 15;
               
                page.addElement(insertFooterLeft("Total Geral de Parcelas: "+allTotalOfParcels));
                page.addElement(insertFooterRight("TOTAL GERAL: "+new Money(allValueTotalOfParcels).getFormatedValue()));
               
                posY += 15;
               
                jasperPrint.addPage(page);
           
View Full Code Here

            x++;
            dateParcel.addDays(1);
        }
        float percent = (((gd.get("interestDeferredPayment") == null) || (gd.get("interestDeferredPayment").equals("")))
                ? 0
                : new Money((String) gd.get("interestDeferredPayment")).getFloatValue());
        Money value = new Money(parcel.getValueAfterParcelDateExpiration());
        Money moraValue = new Money(((value.getFloatValue() / 100) * percent) * x);

        return moraValue;
    }
View Full Code Here

        GDDate today = new GDDate();
        GDDate parcelDate = new GDDate(parcel.getDate());
       
//        if (status == 0) {
          if(parcelDate.afterOrEqualsDay(today)) {
            value = new Money(parcel.getValueBeforeParcelDateExpiration()).getFloatValue();
          } else {
            value = new Money(parcel.getValueAfterParcelDateExpiration()).getFloatValue();
          }
//        } else if (status == 1) {
//            value = new Money(parcel.getPayValue()).getFloatValue();
//        } else {
//            Money ticketValue = getTicketValue(parcel);
View Full Code Here

    private Money getTicketValue(Parcel parcel) {
        gd = GD.getInstance();
        float percent = (((gd.get("fine") == null) || (gd.get("fine").equals("")))
                ? 0
                : new Money((String) gd.get("fine")).getFloatValue());

        Money value = new Money(parcel.getValueAfterParcelDateExpiration());
        Money ticketValue = new Money(((value.getFloatValue() / 100) * percent));

        return ticketValue;
    }
View Full Code Here

       
        page.addElement(insertMiniText("Instru��es", posX, posY+2, 120));
        page.addElement(insertBoldText("Ap�s Vencimento:", posX+3, posY+12, 165));
        page.addElement(insertBoldText("Multa de " + gd.get("fine") + "%", posX+100, posY+12, 165));
        page.addElement(insertBoldText("Juros de " + gd.get("interestDeferredPayment") + "% ao dia", posX+100, posY+27, 165));
        String valueDiscount = new Money(billet.getParcel().getValueAfterParcelDateExpiration()-billet.getParcel().getValueBeforeParcelDateExpiration()).getFormatedValue();
        page.addElement(insertBoldText((billet.getParcel().isRegistrationTax() ? "Valor � ser pago referente a taxa de matr�cula" : "At� Vencimento:          Desconto pontualidade: " + valueDiscount), posX+3, posY+50, 250));
        String responsableName = "";
        if (ResponsableValidator.checkStudentUnderAge(new GDDate(billet.getPerson().getBirthDate()).getFormatedDate())) {
            Student student = (Student) billet.getPerson().getPersonType("student");
            responsableName = student.getResponsableName();
        } else {
            responsableName = billet.getPerson().getName();
        }
        String instructions = "Esta cobran�a � enviada a todos os alunos devidamente matriculados " +
        "conforme condi��es de Contrato de Presta��o de Servi�os assinado por " + responsableName + ", " +
        "a " + gd.get("namefancy") + " reservar� ao aluno, micro-computadores e hor�rios, at� o momento de sua rescis�o " +
        "contratual ou conclus�o do curso.";
        page.addElement(insertNormalText(instructions, posX+3, posY+70, 350, 80));
       
        String idRegistration = billet.getRegistration().getIdRegistration();
        for(int i=0; i<(5-billet.getRegistration().getIdRegistration().length()); i++)
            idRegistration = "0" + idRegistration;
        String idParcel = billet.getParcelId();
        for(int i=0; i<(5-billet.getParcelId().length()); i++)
            idParcel = "0" + idParcel;
       
        page.addElement(createBarcode("300002."+idRegistration+"."+idParcel, posX, posY+140, 230, 30));
       
        page.addElement(drawVerticalLine(posX+365, posY, 175));
       
        page.addElement(drawVerticalLine(posX+534, posY, 175));
       
        page.addElement(drawGrayRectangle(posX+365, posY, 170, 25, 0));
        page.addElement(insertMiniText("Vencimento", posX+370, posY+2, 120));
        page.addElement(insertRightText(billet.getParcel().getDate(), posX+370, posY+10, 160));
       
        posY += 25;
       
        page.addElement(insertMiniText("Valor", posX+370, posY+2, 120));
       
      GDDate today = new GDDate();
        GDDate graceDays = new GDDate(billet.getParcel().getDate());
    graceDays.addDays(Integer.valueOf(system.getProperty("gracedays")));
    Money value = new Money(0.0);
    value = new Money(billet.getParcel().getValueAfterParcelDateExpiration());

    page.addElement(insertRightText(value.getFormatedValue(), posX+370, posY+10, 160));
       
        posY += 25;
        page.addElement(drawHorizontalLine(posX+365, posY, 170));
       
        page.addElement(insertMiniText("(-) Desconto/Abatimento:", posX+370, posY+2, 120));
        Money disccount = new Money(0);
        if( (billet.getTicketAndMora() != null && billet.getDisccount() != null) ) {
          if( new GDDate(billet.getParcel().getDate()).before(new GDDate()) && today.after(graceDays) ) {
            valueDiscount = "0";
          }
          disccount = new Money(billet.getDisccount().getFloatValue() + new Money(valueDiscount).getFloatValue());
          page.addElement(insertRightText(disccount.getFormatedValue(), posX+370, posY+10, 160));
        }
       
        posY += 25;
        page.addElement(drawHorizontalLine(posX+365, posY, 170));
       
        page.addElement(insertMiniText("(-) Outros/Abatimento:", posX+370, posY+2, 120));
       
        posY += 25;
        page.addElement(drawHorizontalLine(posX+365, posY, 170));
       
        page.addElement(insertMiniText("(+) Multa/Mora:", posX+370, posY+2, 120));
        page.addElement(insertRightText(billet.getTicketAndMora() == null ? "" : billet.getTicketAndMora().getFormatedValue(), posX+370, posY+10, 160));
       
        posY += 25;
        page.addElement(drawHorizontalLine(posX+365, posY, 170));
       
        page.addElement(insertMiniText("(+) Outros/Acr�scimo:", posX+370, posY+2, 120));
       
        posY += 25;
        page.addElement(drawHorizontalLine(posX+365, posY, 170));
       
        page.addElement(drawGrayRectangle(posX+365, posY, 170, 25, 0));
        page.addElement(insertMiniText("(=) Valor Cobrado:", posX+370, posY+2, 120));
        if(billet.getTicketAndMora() != null && billet.getDisccount() != null) {
          Money valueTotal = new Money((value.getFloatValue() + billet.getTicketAndMora().getFloatValue()) - disccount.getFloatValue());
          page.addElement(insertRightText(valueTotal.getFloatValue() == 0 ? "" : valueTotal.getFormatedValue(), posX+370, posY+10, 160));
        }
       
        posY += 24;
        page.addElement(drawHorizontalLine(posX, posY, 534));
    }
View Full Code Here

            for (int i = 0; i < items.length; i++) {
              coursesList.add(items[i].getText());
            }
            system.execute(new AddCourse(id, descriptionText
                .getText(), numberOfLessonsText.getText(),
                durationText.getText(), new Money(valueText
                    .getText()).getFloatValue(), false,
                coursesList));
            coursesCotrolCenter.updateCoursesTable();
            close();
                  }catch (TransactionDateException e) {
View Full Code Here

    valueText = new Text(dialog, SWT.SINGLE | SWT.BORDER);
    valueText.setText("0,00");
    Validator.validateNumbers(valueText);
    Validator.validateTextOfMoneyValuesToAvoidEmptyStrings(valueText);
    if (course != null) {
      valueText.setText(new Money(course.getValue()).getFormatedValue());
    }
    valueText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    new MoneyMask(valueText);
  }
View Full Code Here

       Label discountPontuallityLabel = new Label(dialog, SWT.LEFT);
       discountPontuallityLabel.setText("Desconto de pontualidade:");
      
         discountPontuallityText = new Text(dialog, SWT.RIGHT | SWT.SINGLE | SWT.BORDER);
         discountPontuallityText.setEnabled(false);
         discountPontuallityText .setText(new Money(parcel.getValueAfterParcelDateExpiration() - parcel.getValueBeforeParcelDateExpiration()).getFormatedValue());
         new MoneyMask(discountPontuallityText );
        
         GridData data = new GridData(GridData.FILL);
         data.widthHint = 80;
         discountPontuallityText .setLayoutData(data);
View Full Code Here

TOP

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

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.