GetList
CDBResult CSaleTaxRate::GetList( array arOrder = Array("APPLY_ORDER"=>"ASC"), array arFilter = Array() );
The method GetList returns an optionally sorted and filtered list of tax rates.
Parameters
Parameter | Description |
---|---|
arOrder | Assosiated array used to sort records. The sorting is performed
consequently on each pair "key-value". Keys are the parameter
names. Values are sort direction constants. The following keys are possible:
|
arFilter | Associated array used to filter records. Only the records which satisfy
the filter are included in the returned list. Keys are the parameter names,
and the values are conditions. The following keys are possible:
|
Returned values
Returns a CDBResult instance containing a set of associated arrays with the following keys.
Key | Description |
---|---|
ID | The tax rate ID. |
TAX_ID | The tax ID. |
PERSON_TYPE_ID | The payer type ID. |
VALUE | Amount of tax (percentage). |
CURRENCY | Currency. |
IS_PERCENT | Always set to "Y". |
IS_IN_PRICE | Product price includes the tax amount (Y/N). |
APPLY_ORDER | Order in which the tax is applied. |
TIMESTAMP_X | The date the record was last modified. |
LID | The ID of the site for which the tax is applicable. |
NAME | Tax name. |
CODE | Tax mnemonic code. |
DESCRIPTION | Tax description. |
ACTIVE | Specifies the tax is active (Y/N). |
Example
<? // Get the array of active tax rates for the current site // for payer type $PERSON_TYPE and location $TAX_LOCATION $arTaxList = array(); $arTaxFilter = array( "LID" => SITE_ID, "PERSON_TYPE_ID" => $PERSON_TYPE, "ACTIVE" => "Y", "LOCATION" => $TAX_LOCATION ); $db_tax_rate_tmp = CSaleTaxRate::GetList(array("APPLY_ORDER"=>"ASC"), $arTaxFilter); while ($ar_tax_rate_tmp = $db_tax_rate_tmp->Fetch()) { $arTaxList[] = $ar_tax_rate_tmp; } ?>
© «Bitrix24», 2001-2024