ePages 6.11.0 - DE_EPAGES/Tax/API/Table/TaxRate.pm

Package DE_EPAGES::Tax::API::Table::TaxRate

interface for table TaxRate

@EXPORT_OK
InsertTaxRate
UpdateTaxRate
DeleteTaxRate
GetAllPKeyTaxRates
GetAllInfoTaxRates
GetInfoTaxRate
ExistsTaxRate
GetPKeyTaxRatesByTaxAreaID
GetInfoTaxRatesByTaxAreaID
GetPKeyTaxRatesByTaxClassID
GetInfoTaxRatesByTaxClassID

Functions

DeleteTaxRate
ExistsTaxRate
GetAllInfoTaxRates
GetAllPKeyTaxRates
GetInfoTaxRate
GetInfoTaxRatesByTaxAreaID
GetInfoTaxRatesByTaxClassID
GetPKeyTaxRatesByTaxAreaID
GetPKeyTaxRatesByTaxClassID
InsertTaxRate
UpdateTaxRate

DeleteTaxRate

Deletes a(n) TaxRate.

Syntax
DeleteTaxRate($TaxAreaID, $TaxClassID);
DeleteTaxRate($hTaxRate); # if $hTaxRate includes TaxAreaID, TaxClassID
Input
$TaxAreaID (int)
tax area id (part of primary key)
$TaxClassID (int)
tax class id (part of primary key)

ExistsTaxRate

Returns true if the TaxRate exists.

Syntax
$exists = ExistsTaxRate($TaxAreaID, $TaxClassID);
Input
$TaxAreaID (int)
tax area id
$TaxClassID (int)
tax class id
Return
$exists (boolean)
1/0 the TaxRate exists (yes/no)

GetAllInfoTaxRates

Returns all objects of TaxRate.

Syntax
$ahTaxRates = GetAllInfoTaxRates();
Return
$ahTaxRates (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id (part of primary key)- int
  • TaxClassID - tax class id (part of primary key)- int
  • Rate - tax rate of class in area - float

GetAllPKeyTaxRates

Returns all TaxRate identifiers.

Syntax
$ahTaxRateIDs = GetAllPKeyTaxRates();
Return
$ahTaxRateIDs (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id - int
  • TaxClassID - tax class id - int

GetInfoTaxRate

Returns the TaxRate by identifier.

Syntax
$hTaxRate = GetInfoTaxRate($TaxAreaID, $TaxClassID);
Input
$TaxAreaID (int)
tax area id (part of primary key)
$TaxClassID (int)
tax class id (part of primary key)
Return
$hTaxRate (reference to hash)
with following keys:
  • TaxAreaID - tax area id (part of primary key)- int
  • TaxClassID - tax class id (part of primary key)- int
  • Rate - tax rate of class in area - float

GetInfoTaxRatesByTaxAreaID

Returns objects of TaxRate by primary key element TaxAreaID.

Syntax
$ahTaxRates = GetInfoTaxRatesByTaxAreaID($TaxAreaID);
Input
$TaxAreaID (int)
tax area id
Return
$ahTaxRates (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id (part of primary key)- int
  • TaxClassID - tax class id (part of primary key)- int
  • Rate - tax rate of class in area - float

GetInfoTaxRatesByTaxClassID

Returns objects of TaxRate by alternate key TaxClassID.

Syntax
$ahTaxRates = GetInfoTaxRatesByTaxClassID($TaxClassID);
Input
$TaxClassID (int)
tax class id
Return
$ahTaxRates (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id (part of primary key)- int
  • TaxClassID - tax class id (part of primary key)- int
  • Rate - tax rate of class in area - float

GetPKeyTaxRatesByTaxAreaID

Returns primary keys of TaxRate by primary key element TaxAreaID.

Syntax
$ahKeys = GetPKeyTaxRatesByTaxAreaID($TaxAreaID);
Input
$TaxAreaID (int)
tax area id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id - int
  • TaxClassID - tax class id - int

GetPKeyTaxRatesByTaxClassID

Returns primary keys of TaxRate by alternate key TaxClassID.

Syntax
$ahKeys = GetPKeyTaxRatesByTaxClassID($TaxClassID);
Input
$TaxClassID (int)
tax class id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • TaxAreaID - tax area id - int
  • TaxClassID - tax class id - int

InsertTaxRate

Creates an entry of TaxRate.

Syntax
InsertTaxRate($hTaxRate);
Input
$hTaxRate (reference to hash)
with following keys:
  • TaxAreaID - tax area id (part of primary key)- int
  • TaxClassID - tax class id (part of primary key)- int
  • Rate - tax rate of class in area - float

UpdateTaxRate

Updates a(n) TaxRate if any element was changed.

Syntax
UpdateTaxRate($TaxAreaID, $TaxClassID, $hTaxRate);
UpdateTaxRate($hTaxRate); # if $hTaxRate includes TaxAreaID, TaxClassID
Input
$TaxAreaID (int)
tax area id (part of primary key)
$TaxClassID (int)
tax class id (part of primary key)
$hTaxRate (reference to hash)
with following keys:
  • Rate - tax rate of class in area - float