GetExemptList
CDBResult CSaleTax::GetExemptList( array arFilter = Array() );
The method GetExemptList retrieves a filtered set of tax exempt records from the tax exempt registry.
Parameters
Parameter | Description |
---|---|
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
The method returns an instance of the CDBResult class containing the list of associated arrays with parameters:
Key | Description |
---|---|
GROUP_ID | The user group ID whose members have tax exempt rights. |
TAX_ID | The ID of the tax from which the user group is to be relieved. |
Example
<? // Fill an array of tax exempts for current user $arTaxExempt = array(); if ($USER->IsAuthorized()) { $arUserGroups = $USER->GetUserGroupArray(); for ($ig = 0; $ig < count($arUserGroups); $ig++) { $db_tax_ex_tmp = CSaleTax::GetExemptList(Array("GROUP_ID"=>$arUserGroups[$ig])); while ($ar_tax_ex_tmp = $db_tax_ex_tmp->Fetch()) { if (!in_array(IntVal($ar_tax_ex_tmp["TAX_ID"]), $arTaxExempt)) { $arTaxExempt[] = IntVal($ar_tax_ex_tmp["TAX_ID"]); } } } } ?>
© «Bitrix24», 2001-2024