Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipergate.locale.es
Class TaxCalculatorEs

    java.lang.Object
      com.knowgate.hipergate.locale.es.TaxCalculatorEs

All Implemented Interfaces:
  ITaxCalculator

    public class TaxCalculatorEs

extends java.lang.Object
implements ITaxCalculator

IVA, IGI and IPSI taxes calculator for Spain

Field Summary
`static java.math.BigDecimal` | `IGICCanarias` IGI Canarias 5%
`static java.math.BigDecimal` | `IPSICeuta` IPSI Ceuta 3%
`static java.math.BigDecimal` | `IPSIMelilla` IPSI Melilla 4%
`static java.math.BigDecimal` | `IVAPeninsula` IVA Península y Baleares 16%

Constructor Summary
`TaxCalculatorEs()`

Method Summary
`java.math.BigDecimal` | `getTax(java.math.BigDecimal oBasePrice, java.lang.String sCodPost, java.lang.String sItemType)` Get tax amount for a base price
`java.math.BigDecimal` | `getTaxPct(java.lang.String sTaxZone, java.lang.String sItemType)` Get tax percentage that applies for a given zone and item type
`static java.math.BigDecimal` | `pctTasa(java.lang.String sCodPost, java.lang.String sTipo)` Get tax that applies to a given zip code.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IPSICeuta

    public static final java.math.BigDecimal IPSICeuta

  IPSI Ceuta 3%

### IPSIMelilla

    public static final java.math.BigDecimal IPSIMelilla

  IPSI Melilla 4%

### IGICCanarias

    public static final java.math.BigDecimal IGICCanarias

  IGI Canarias 5%

### IVAPeninsula

    public static final java.math.BigDecimal IVAPeninsula

  IVA Península y Baleares 16%

Constructor Detail

### TaxCalculatorEs

    public TaxCalculatorEs()

Method Detail

### pctTasa

    public static java.math.BigDecimal pctTasa(java.lang.String sCodPost,
                                               java.lang.String sTipo)

  Get tax that applies to a given zip code.

  Parameters:
    `sCodPost` - String Código Postal o Nombre de Provincia
    `sTipo` - String Tax type (currently not used)
  Returns:
    BigDecimal IGICCanarias if sCodPost IN {'38','35',TENERIFE','PALMAS, LAS','LAS PALMAS','GRAN CANARIA'} IPSICeuta if sCodPost IN {'51','CEUTA'} IPSIMelilla if sCodPost IN {'52','MELILLA'} else IVAPeninsula.
    If sCodPost is null then IVAPeninsula is returned.

### getTaxPct

    public java.math.BigDecimal getTaxPct(java.lang.String sTaxZone,
                                          java.lang.String sItemType)
                                   throws java.lang.NullPointerException,
                                          java.lang.IllegalArgumentException

  Description copied from interface: `ITaxCalculator`
  Get tax percentage that applies for a given zone and item type

  Specified by:
    `getTaxPct` in interface `ITaxCalculator`
  Parameters:
    `sTaxZone` - String Tax Zone
    `sItemType` - String Type of tax (standard, reduced, tax-free, etc.)
  Returns:
    BigDecimal Typicalle a percentage, expressed as a quantity between 0 and 1
  Throws:
    `java.lang.NullPointerException`
    `java.lang.IllegalArgumentException`
  See Also:
    `pctTasa`

### getTax

    public java.math.BigDecimal getTax(java.math.BigDecimal oBasePrice,
                                       java.lang.String sCodPost,
                                       java.lang.String sItemType)
                                throws java.lang.NullPointerException,
                                       java.lang.IllegalArgumentException

  Get tax amount for a base price

  Specified by:
    `getTax` in interface `ITaxCalculator`
  Parameters:
    `oBasePrice` - BigDecimal Base Price
    `sCodPost` - String Código Postal o Nommbre de Provincia
    `sItemType` - String Not used
  Returns:
    BigDecimal oBasePrice * getTaxPct(sCodPost, sItemType)
  Throws:
    `java.lang.NullPointerException`
    `java.lang.IllegalArgumentException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD