API UpdateProductService

Z Podpora.nextis.cz
Přejít na: navigace, hledání

Description

Method allows You to update product service in system.

Exact name

API_UpdateProductService

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id API_GetProductService.ID
@ProductCode nvarchar(40) Product code
@Name nvarchar(150) Name
@Description nvarchar(250) Description
@UnitID int ID of unit from units list (see relation) API_GetUnits.ID
@VATRate int ID of VAT rates from VAT rates list (see relation) API_GetVATRates.ID
@EshopHide int Eshop hide:

0 = show, 1 = hide

@RetailPrice decimal(19,6) Retail price
@IsArchiving int Is archiving:

0 = No, 1 = Yes

Return

0 : OK
100 : Item could not be updated

Example

 DECLARE @return_value int
 DECLARE  @ID int
 DECLARE  @ProductCode nvarchar(40)
 DECLARE  @Name nvarchar(150)
 DECLARE  @Description nvarchar(250)
 DECLARE  @UnitID int
 DECLARE  @VATRate int
 DECLARE  @EshopHide int
 DECLARE  @RetailPrice decimal(19,6)
 DECLARE  @IsArchiving int
 
 
 SELECT @ID = [ID], 
       @ProductCode = [ProductCode],
       @Name = [Name],
       @Description = [Description],
       @UnitID = [UnitID],
       @VATRate = [VATRate],
       @EshopHide = [EshopHide],
       @RetailPrice = 50.5,
       @IsArchiving = [IsArchiving]
 FROM   [API_GetProductService] 
 WHERE  id = 3

 EXECUTE @return_value = [API_UpdateProductService] 
  @ID,
  @ProductCode,
  @Name,
  @Description,
  @UnitID,
  @VATRate,
  @EshopHide,
  @RetailPrice,
  @IsArchiving

Notices

None.