API UpdateVATRate: Porovnání verzí

Z Podpora.nextis.cz
Přejít na: navigace, hledání
(Založena nová stránka s textem „==== Description ==== Method allows You to update branch in system. ==== Exact name ==== <code>API_UpdateBranch</code> ==== Type ==== Standard executable…“)
 
 
(Nejsou zobrazeny 4 mezilehlé verze od stejného uživatele.)
Řádka 1: Řádka 1:
 
==== Description ====
 
==== Description ====
Method allows You to update branch in system.
+
Method allows You to update VAT rate in system.
  
 
==== Exact name ====
 
==== Exact name ====
<code>API_UpdateBranch</code>
+
<code>API_UpdateVATRate</code>
  
 
==== Type ====
 
==== Type ====
Řádka 20: Řádka 20:
 
|
 
|
 
|Internal system id
 
|Internal system id
|API_GetBranches.ID
+
|
 +
|-
 +
|@Name
 +
|nvarchar(50)
 +
|
 +
|Name
 +
|
 
|-
 
|-
|@WorkshopID
+
|@Value
|int
+
|decimal(18,2)
 +
|
 +
|Value
 
|
 
|
|Workshops ID
 
ID of workshops from workshops list (see relation)
 
|API_GetWorkshops.ID
 
 
|-
 
|-
|@Name
+
|@IsActive
|nvarchar(100)
+
|int
 
|
 
|
|Branch name
+
|Is active
 
|
 
|
 
|}
 
|}
  
 +
==== Return ====
 +
0 : OK
 +
100 : Item could not be updated
  
 
==== Example ====
 
==== Example ====
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
DECLARE @ID INT
+
DECLARE @return_value int
DECLARE @WorkshopID INT
+
DECLARE @ID int
 +
DECLARE @Name nvarchar(50)
 +
DECLARE @Value decimal(18,2)
 +
DECLARE @IsActive int
 
   
 
   
  SELECT @ID = id,
+
  SELECT @ID = [ID]
      @WorkshopID = [workshopid],
+
        @Name = [Name]
      @Name = 'Name2',
+
        @Value = 15
 
+
        @IsActive = [IsActive]
  FROM  [api_getbranches]  
+
  FROM  [API_GetVATRates]  
  WHERE  id = 3
+
  WHERE  id = 10
 
   
 
   
  EXECUTE [Api_updatebranch]  
+
  EXECUTE @return_value = [API_UpdateVATRate]  
   @ID,  
+
   @ID,
   @WorkshopID,  
+
   @Name,
 +
  @Value,
 +
  @IsActive
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Aktuální verze z 22. 9. 2017, 09:45

Description

Method allows You to update VAT rate in system.

Exact name

API_UpdateVATRate

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id
@Name nvarchar(50) Name
@Value decimal(18,2) Value
@IsActive int Is active

Return

0 : OK
100 : Item could not be updated

Example

DECLARE @return_value int
DECLARE @ID int
DECLARE @Name nvarchar(50)
DECLARE @Value decimal(18,2)
DECLARE @IsActive int
 
 SELECT @ID = [ID]
        @Name = [Name]
        @Value = 15
        @IsActive = [IsActive]
 FROM   [API_GetVATRates] 
 WHERE  id = 10
 
 EXECUTE @return_value = [API_UpdateVATRate] 
  @ID,
  @Name,
  @Value,
  @IsActive

Notices

None.