GetList
CDBResult CSaleOrderTax::GetList( array arOrder = Array("TAX_NAME"=>"ASC"), array arFilter = Array() );
The method GetList returns an optionally sorted and filtered list of tax amounts.
Parameters
Parameter | Description |
---|---|
arOrder | Associated 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 | Assosiated 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:
|
Return Values
Returns a CDBResult instance containing a set of associated arrays with the following keys.
Key | Description |
---|---|
ID | The tax amount ID. |
ORDER_ID | The order ID. |
TAX_NAME | Tax name. |
VALUE | Tax rate. |
VALUE_MONEY | Amount of tax. |
APPLY_ORDER | Order in which this tax is applied relative to other ones. |
CODE | Mnemonic tax code. |
IS_IN_PRICE | Specifies (Y/N) that the tax in included in the product price. |
IS_PERCENT | Always "Y". |
Example
<? $arTaxList = array(); // Select all tax amounts for order $ORDER_ID $db_tax_list = CSaleOrderTax::GetList(array("APPLY_ORDER"=>"ASC"), Array("ORDER_ID"=>$ORDER_ID)); $iNds = -1; $i = 0; while ($ar_tax_list = $db_tax_list->Fetch()) { $arTaxList[$i] = $ar_tax_list; // find VAT by its mnemonic code if ($arTaxList[$i]["CODE"] == "VAT") $iNds = $i; $i++; } ?>
© «Bitrix24», 2001-2024