Documentation

Update

int
CSaleTaxRate::Update(
 int ID,
 array arFields
);

The method Update replaces the tax rate parameters with the new ones from the supplied array.

Parameters

ParameterDescription
ID The tax rate ID.
arFields Associated array containing the new tax rate parameters whose keys are the order parameter names, and values are the parameter values.

The following values are possible:
  • TAX_ID - the tax ID;
  • PERSON_TYPE_ID - the payer ID;
  • VALUE - amount of tax (percentage);
  • CURRENCY - currency;
  • IS_PERCENT - always set to "Y";
  • IS_IN_PRICE - product price includes the tax amount;
  • APPLY_ORDER - order in which the tax is applied;
  • ACTIVE - specifies the tax is active (Y/N);
  • TAX_LOCATION - array used to define locations and location groups to which this tax is applicable. Each entry in this array is in its turn an array with the following keys:
    • LOCATION_ID - the ID of location or location group;
    • LOCATION_TYPE - set to "L" for locations and to "G" for location groups.

Returned values

Returns the ID of the updated tax rate on success or false otherwise.

 

© «Bitrix24», 2001-2024
Up