Package com.knowgate.math

Examples of com.knowgate.math.Money


  @Validate(converter=BigDecimalTypeConverter.class)
  public BigDecimal getVatAlt() {
    if (getVat()==null) return null;
    for (String c : currencies) {
      if (!"EUR".equalsIgnoreCase(c)) {
        return new Money(getVat(), CurrencyCode.EUR).convertTo(c).round2();
      }
    }
    return null;
  }
View Full Code Here


  @Validate(converter=BigDecimalTypeConverter.class)
  public BigDecimal getBaseAmountAlt() {
    if (getBaseAmount()==null) return null;
    for (String c : currencies) {
      if (!"EUR".equalsIgnoreCase(c)) {
        return new Money(getBaseAmount(), CurrencyCode.EUR).convertTo(c).round2();
      }
    }
    return null;
  }
View Full Code Here

  @Validate(converter=BigDecimalTypeConverter.class)
  public BigDecimal getTotalAmountAlt() {
    if (getTotalAmount()==null) return null;
    for (String c : currencies) {
      if (!"EUR".equalsIgnoreCase(c)) {
        return new Money(getTotalAmount(), CurrencyCode.EUR).convertTo(c).round2();
      }
    }
    return null;
  }
View Full Code Here

            if (!oTck.getTotalAmount().equals(BigDecimal.ZERO))
              oTotalAmount = oTotalAmount.add(oTck.getTotalAmount());
        } else {       
          if (oTck.getStringNull("vat","").length()>0)
            if (!oTck.getVat().equals(BigDecimal.ZERO))
              oVAT = oVAT.add(new Money(oTck.getVat(), sCur).convertTo(CurrencyCode.EUR));
          if (oTck.getStringNull("base_amount","").length()>0)
            if (!oTck.getBaseAmount().equals(BigDecimal.ZERO))         
              oBaseAmount = oBaseAmount.add(new Money(oTck.getBaseAmount(), sCur).convertTo(CurrencyCode.EUR));
          if (oTck.getStringNull("final_amount","").length()>0)
            if (!oTck.getTotalAmount().equals(BigDecimal.ZERO))
              oTotalAmount = oTotalAmount.add(new Money(oTck.getTotalAmount(), sCur).convertTo(CurrencyCode.EUR));
        }
      }
    } // next
    Log.out.debug("VAT is "+oVAT.toString());
    Log.out.debug("Base is "+oBaseAmount.toString());
View Full Code Here

          oBaseAmount = oBaseAmount.add(oTck.getBaseAmount());
          oTotalAmount = oTotalAmount.add(oTck.getTotalAmount());
        } else {       
          if (oTck.getStringNull("vat","").length()>0)
            if (!oTck.getVat().equals(BigDecimal.ZERO))         
              oVAT = oVAT.add(new Money(oTck.getVat(), sCur).convertTo(CurrencyCode.EUR));
          oBaseAmount = oBaseAmount.add(new Money(oTck.getBaseAmount(), sCur).convertTo(CurrencyCode.EUR));
          oTotalAmount = oTotalAmount.add(new Money(oTck.getTotalAmount(), sCur).convertTo(CurrencyCode.EUR));
        }
        oTck.put("is_open", "0");
        oTck.save(oSes);
        DAO.log(oSes, oTck.getDocument(), Ticket.class, "CLOSE TICKET", AtrilEvent.Level.INFO, oTck.getDocument().id()+";"+oTck.getString("taxpayer"));
      }
View Full Code Here

TOP

Related Classes of com.knowgate.math.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.