Package org.pau.assetmanager.entities

Examples of org.pau.assetmanager.entities.PropertyExpensesAnnotation


        if (annotationImport.getTwoDecimalLongCodifiedAmount() >= 0) {
          PropertyIncomeAnnotation propertyIncomeAnnotation = new PropertyIncomeAnnotation();
          propertyIncomeAnnotation.setUpDefaults();
          annotationToCreate = propertyIncomeAnnotation;
        } else {
          PropertyExpensesAnnotation propertyExpensesAnnotation = new PropertyExpensesAnnotation();
          propertyExpensesAnnotation.setUpDefaults();
          annotationToCreate = propertyExpensesAnnotation;
        }
      } else if (annotationImportBook instanceof StocksBook) {
        // stocks book
        if (annotationImport.getTwoDecimalLongCodifiedAmount() >= 0) {
View Full Code Here


  @Override
  public String coerceToUi(Annotation annotation, Label label,
      BindContext bindContext) {
    if (annotation instanceof PropertyExpensesAnnotation) {
      PropertyExpensesAnnotation expensesAnnotation = (PropertyExpensesAnnotation) annotation;
      String mainString = NumberFomatter.formatMoney(expensesAnnotation
          .getDeclaredYearly());
      mainString += " ("
          + NumberFomatter.formatPercentage(expensesAnnotation
              .getDeductiblePercentage())
          + "% de "
          + NumberFomatter.formatMoney(expensesAnnotation
              .getBaseImponibleYearly()) + " )";
      return mainString;
    }else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
      String mainString = NumberFomatter.formatMoney(propertyIncomeAnnotation
View Full Code Here

  }

  private String getStringCodeForAnnotation(Annotation annotation){
    String bookString = annotation.getBook().getClass().getSimpleName();
    if (annotation instanceof PropertyExpensesAnnotation) {
      PropertyExpensesAnnotation expensesannotation = (PropertyExpensesAnnotation) annotation;
      bookString += "@"+expensesannotation.getPropertyBook().getProperty()
          .getName();
    }else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
      bookString += "@"
          + incomeAnnotation.getPropertyBook().getProperty()
View Full Code Here

      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
      hasVAT = incomeAnnotation.getAppliesRetentionAndVAT();
      vat = incomeAnnotation.getVat();
      baseImponible = incomeAnnotation.getBaseImponibleQuarterly();
    } else if (annotation instanceof PropertyExpensesAnnotation) {
      PropertyExpensesAnnotation propertyExpensesAnnotation = (PropertyExpensesAnnotation) annotation;
      hasVAT = true;
      vat = propertyExpensesAnnotation.getVat();
      baseImponible = propertyExpensesAnnotation.getBaseImponibleQuarterly();
    }
    if (hasVAT) {
      return NumberFomatter.formatMoney(baseImponible * vat / 100.0) + " ("
          + NumberFomatter.formatPercentage(vat) + "%)";
    } else {
View Full Code Here

  @Override
  public String coerceToUi(Annotation annotation, Label label,
      BindContext bindContext) {
    if (annotation instanceof PropertyExpensesAnnotation) {
      PropertyExpensesAnnotation expensesAnnotation = (PropertyExpensesAnnotation) annotation;
      if (expensesAnnotation.getAppliesVAT()) {
        return NumberFomatter.formatMoney(expensesAnnotation
            .getBaseImponibleYearly())
            + " ("
            + NumberFomatter.formatPercentage(expensesAnnotation
                .getVat()) + "%  IVA )";
      } else {
        if (expensesAnnotation.getCommunity()) {
          return NumberFomatter.formatMoney(expensesAnnotation
              .getBaseImponibleYearly())+" ( Comunidad )";
        } else {
          return NumberFomatter.formatMoney(expensesAnnotation
              .getBaseImponibleYearly());
        }
      }
    } else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
View Full Code Here

    Collection<Annotation> yearlyAnnotations = Collections2.filter(
        annotaitons, new Predicate<Annotation>() {
          @Override
          public boolean apply(Annotation annotation) {
            if (annotation instanceof PropertyExpensesAnnotation) {
              PropertyExpensesAnnotation propertyExpensesAnnotation = (PropertyExpensesAnnotation) annotation;     
              // deductible > 0
              return propertyExpensesAnnotation
                  .getDeductiblePercentage() > 0.0;
            }
            if (annotation instanceof PropertyIncomeAnnotation) {
              PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
              // done
View Full Code Here

    Collection<Annotation> quarterlyAnnotations = Collections2.filter(
        annotaitons, new Predicate<Annotation>() {
          @Override
          public boolean apply(Annotation annotation) {
            if (annotation instanceof PropertyExpensesAnnotation) {
              PropertyExpensesAnnotation propertyExpensesAnnotation = (PropertyExpensesAnnotation) annotation;     
              // deductible > 0 and use_quaterly
              return propertyExpensesAnnotation
                  .getDeductiblePercentage() > 0.0
                  && propertyExpensesAnnotation
                      .getUseQuarterly();
            }
            if (annotation instanceof PropertyIncomeAnnotation) {
              PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
              // done and [ ( premise ) or ( tenment and for_company) ]
View Full Code Here

TOP

Related Classes of org.pau.assetmanager.entities.PropertyExpensesAnnotation

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.