ZenMagick 0.9.6


org.zenmagick.model.ZMTaxRate

Class ZMTaxRate

ZMObject
|
+--ZMTaxRate

public class ZMTaxRate
extends ZMObject

Info for a single tax rate.

The tax rate id is build from the tax classId, countryId and zoneId to make it unique.

Author:
DerManoMann
Version:
$Id: ZMTaxRate.php 2054 2009-03-12 03:41:22Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMTaxRate()

Create new instance.

Method Summary
double

addTax(double amount)

Add tax to the given amount.

double

calculateTax(double amount)

Caclulate tax for the given amount.

int

getClassId()

Get the tax class id.

int

getCountryId()

Get the country id.

string

getDescription()

Get the tax descrption.

string

getId()

Get the tax rate idendtifier

float

getRate()

Get the tax rate.

int

getZoneId()

Get the zone id.

void

setClassId(int classId)

Set the tax class id.

void

setCountryId(int countryId)

Set the country id.

void

setDescription(string description)

Set the tax description.

void

setId(string id)

Set the tax rate idendtifier

void

setRate(float rate)

Set the tax rate.

void

setZoneId(int zoneId)

Set the zone id.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMTaxRate

public ZMTaxRate()

Create new instance. /


Method Detail

addTax

public double addTax(double amount)

Add tax to the given amount.

Parameters:
amount - The amount.
Returns:
The amount incl. tax.

calculateTax

public double calculateTax(double amount)

Caclulate tax for the given amount.

Parameters:
amount - The amount.
Returns:
The tax value.

getClassId

public int getClassId()

Get the tax class id.

Returns:
The tax class id or 0.

getCountryId

public int getCountryId()

Get the country id.

Returns:
The country id or 0.

getDescription

public string getDescription()

Get the tax descrption.

Returns:
The tax description.

getId

public string getId()

Get the tax rate idendtifier

Returns:
The tax rate idendtifier.

getRate

public float getRate()

Get the tax rate.

Returns:
The tax rate.

getZoneId

public int getZoneId()

Get the zone id.

Returns:
The zone id or 0.

setClassId

public void setClassId(int classId)

Set the tax class id.

Parameters:
classId - The tax class id.

setCountryId

public void setCountryId(int countryId)

Set the country id.

Parameters:
countryId - The country id.

setDescription

public void setDescription(string description)

Set the tax description.

Parameters:
description - The tax description.

setId

public void setId(string id)

Set the tax rate idendtifier

Parameters:
id - The tax rate idendtifier.

setRate

public void setRate(float rate)

Set the tax rate.

Parameters:
rate - The tax rate.

setZoneId

public void setZoneId(int zoneId)

Set the zone id.

Parameters:
zoneId - The zone id.

ZenMagick 0.9.6