Package org.pau.assetmanager.entities

Examples of org.pau.assetmanager.entities.PropertyIncomeAnnotation


      showVatForQuarterly = expensesAnnotation.getUseQuarterly()
          && expensesAnnotation.getAppliesVAT();
      vat = expensesAnnotation.getVat();
      baseImponible = expensesAnnotation.getBaseImponibleQuarterly();
    } else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
      showVatForQuarterly = incomeAnnotation.getAppliesRetentionAndVAT();
      vat = incomeAnnotation.getVat();
      baseImponible = incomeAnnotation.getBaseImponibleQuarterly();
    }
    if (showVatForQuarterly) {
      Double retentionAmount = baseImponible * vat / 100.0;
      Double retentionPercentage = vat;
      return NumberFomatter.formatMoney(retentionAmount) + " ("
View Full Code Here


  @NotifyChange({ "annotations" })
  @Command
  public void addPropertyAnnotation() {
    Annotation annotation = null;
    if (annotationType.equals(AnnotationType.INCOME)) {
      PropertyIncomeAnnotation incomeAnnotation = new PropertyIncomeAnnotation();
      incomeAnnotation.setUpDefaults();
      annotation = incomeAnnotation;
      addDefaultValuesToAnnotation(annotation,
          bookSelection.getSelectedBook(), currentYear,
          annotationsFilter);
    } else {
View Full Code Here

      String concept = annotationImport.getConcept();
      Annotation annotationToCreate = null;
      if (annotationImportBook instanceof PropertyBook) {
        // property book
        if (annotationImport.getTwoDecimalLongCodifiedAmount() >= 0) {
          PropertyIncomeAnnotation propertyIncomeAnnotation = new PropertyIncomeAnnotation();
          propertyIncomeAnnotation.setUpDefaults();
          annotationToCreate = propertyIncomeAnnotation;
        } else {
          PropertyExpensesAnnotation propertyExpensesAnnotation = new PropertyExpensesAnnotation();
          propertyExpensesAnnotation.setUpDefaults();
          annotationToCreate = propertyExpensesAnnotation;
View Full Code Here

  @Override
  public String coerceToUi(Annotation annotation, Label label,
      BindContext bindContext) {
    if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
      if (incomeAnnotation.getAppliesRetentionAndVAT()) {
        Double retentionAmount = incomeAnnotation.getRetentionAmountYearly();
        Double retentionPercentage = incomeAnnotation.getRetention();
        return NumberFomatter.formatMoney(retentionAmount) + " ("
            + NumberFomatter.formatPercentage(retentionPercentage)
            + "%)";
      }
    }
View Full Code Here

          + "% de "
          + NumberFomatter.formatMoney(expensesAnnotation
              .getBaseImponibleYearly()) + " )";
      return mainString;
    }else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
      String mainString = NumberFomatter.formatMoney(propertyIncomeAnnotation
          .getDeclaredYearly());
      return mainString;
    }
    return "";
  }
View Full Code Here

    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()
              .getName();
    } else {
      bookString += "@" + annotation.getBook().getName();
    }
    return bookString;
View Full Code Here

      BindContext bindContext) {
    Boolean hasVAT = false;
    Double vat = 0.0;
    Double baseImponible = 0.0;
    if (annotation instanceof PropertyIncomeAnnotation) {
      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();
View Full Code Here

          return NumberFomatter.formatMoney(expensesAnnotation
              .getBaseImponibleYearly());
        }
      }
    } else if (annotation instanceof PropertyIncomeAnnotation) {
      PropertyIncomeAnnotation incomeAnnotation = (PropertyIncomeAnnotation) annotation;
      if (incomeAnnotation.getAppliesRetentionAndVAT()) {
        return NumberFomatter.formatMoney(incomeAnnotation
            .getBaseImponibleYearly())
            + " ("
            + NumberFomatter.formatPercentage(incomeAnnotation.getVat())
            + "%  IVA, "
            + NumberFomatter.formatPercentage(incomeAnnotation
                .getRetention()) + "% IRPF )";
      } else {
        return NumberFomatter.formatMoney(incomeAnnotation
            .getBaseImponibleYearly());
      }
    }
    return "";
  }
View Full Code Here

              // deductible > 0
              return propertyExpensesAnnotation
                  .getDeductiblePercentage() > 0.0;
            }
            if (annotation instanceof PropertyIncomeAnnotation) {
              PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
              // done
              return propertyIncomeAnnotation.getDone();
            }
            if(annotation.getBook() instanceof StocksBook){
              return true;
            }
            return false;
View Full Code Here

                  .getDeductiblePercentage() > 0.0
                  && propertyExpensesAnnotation
                      .getUseQuarterly();
            }
            if (annotation instanceof PropertyIncomeAnnotation) {
              PropertyIncomeAnnotation propertyIncomeAnnotation = (PropertyIncomeAnnotation) annotation;
              // done and [ ( premise ) or ( tenment and for_company) ]
              return propertyIncomeAnnotation.getDone()
                  && (propertyIncomeAnnotation
                      .getPropertyBook().getProperty()
                      .getType()
                      .equals(PropertyType.PREMISE) ||
                      (
                        propertyIncomeAnnotation
                        .getPropertyBook().getProperty()
                        .getType()
                        .equals(PropertyType.TENEMENT)
                          &&
                        propertyIncomeAnnotation.getForCompany()
                      )
                      );
            }
            return false;
          }
View Full Code Here

TOP

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

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.