Examples of TaxConfig


Examples of org.bigk.invoices.services.taxesconfig.TaxConfig

      new HashMap<Double, InvoicePositionSummary>(5);

    // create List with keys of summaries
    List<Double> calculatedSummariesKeys = new ArrayList<Double>(4);
   
    TaxConfig tc = taxesConfigService.getTaxConfigByDate(invoice.getSoldDate());
    if (tc != null) {
      List<Double> availTaxes = tc.getAvailTaxes();
      for (Double at : availTaxes) {
        calculatedSummariesKeys.add(at);
        calculatedSummaries.put(at, new InvoicePositionSummary(at));
      }
    }
View Full Code Here

Examples of org.bigk.invoices.services.taxesconfig.TaxConfig

  private Collection<Double> taxesAvailableForDate(Date date) {
    Collection<Double> availTaxes = null;
   
    if (date != null) {
      TaxConfig tc = taxesConfigService.getTaxConfigByDate(date);
      logger.debug("listAllItems(Date) - read TaxConfig - tc=[{}]", tc);

      if (tc != null) {
        availTaxes = new ArrayList<Double>();
        availTaxes.add(NumberUtils.DOUBLE_ZERO);
        availTaxes.addAll(tc.getAvailTaxes());
       
        logger.debug("listAllItems(Date) - availTaxes=[{}]", availTaxes);
      }
    }
    return availTaxes;
View Full Code Here

Examples of org.bigk.invoices.services.taxesconfig.TaxConfig

    List<Double> listBefore2011 = new ArrayList<Double>();
    listBefore2011.add(new Double(0.22));
    listBefore2011.add(new Double(0.07));
    listBefore2011.add(new Double(0.03));
    taxesConfigs.add(
        new TaxConfig(parseDate("01-01-1990"), listBefore2011));
   
    List<Double> listAfter2011 = new ArrayList<Double>();
    listAfter2011.add(new Double(0.23));
    listAfter2011.add(new Double(0.08));
    listAfter2011.add(new Double(0.05));
    taxesConfigs.add(
        new TaxConfig(parseDate("01-01-2011"), listAfter2011));
   
  }
View Full Code Here

Examples of org.bigk.invoices.services.taxesconfig.TaxConfig

   * @param date
   *            date for which taxes will be returned
   * @return taxes configuration
   */
  public TaxConfig getTaxConfigByDate(Date date) {
    TaxConfig tc = null;

    if (taxesConfigs != null) {
      for (TaxConfig tci : this.taxesConfigs) {
        if (tci.getStartDate().compareTo(date) <= 0) {
          tc = tci;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.