API CreateProductGroup: Porovnání verzí

Z Podpora.nextis.cz
Přejít na: navigace, hledání
 
(Není zobrazeno 9 mezilehlých verzí od stejného uživatele.)
Řádka 1: Řádka 1:
 
==== Description ====
 
==== Description ====
Method allows You to create new branch in system.
+
Method allows You to create new product group in system.
  
 
==== Exact name ====
 
==== Exact name ====
<code>API_CreateBranch</code>
+
<code>API_CreateProductGroup</code>
  
 
==== Type ====
 
==== Type ====
Řádka 16: Řádka 16:
 
!Relation
 
!Relation
 
|-
 
|-
|ProductCode
+
|@ProductCode
 
|nvarchar(40)  
 
|nvarchar(40)  
 +
|
 
|Product code
 
|Product code
 
|
 
|
 
|-
 
|-
|Name
+
|@TecDocCode
|nvarchar(100)  
+
|nvarchar(35)  
|Name
 
 
|
 
|
|-
+
|TecDoc code
|Description
 
|varchar(250)
 
|Description
 
 
|
 
|
 
|-
 
|-
|EshopDescription
+
|@TecDocBrandName
|nvarchar(500)  
+
|nvarchar(80)  
|Eshop description
 
 
|
 
|
|-
+
|TecDoc brand name
|TecDocCode
 
|nvarchar(35)
 
|TecDoc code
 
 
|
 
|
 
|-
 
|-
|TecDocBrandID
+
|@TecDocBrandID
 
|int  
 
|int  
 +
|
 
|TecDoc brand ID
 
|TecDoc brand ID
 
|
 
|
 
|-
 
|-
|TecDocBrandName
+
|@GroupName
|nvarchar(80)  
+
|nvarchar(100)  
|TecDoc brand name
+
|
 +
|Group name
 +
|
 +
|-
 +
|@SubGoupName
 +
|nvarchar(100)
 +
|
 +
|Sub goup name
 
|
 
|
 
|-
 
|-
|VATRate
+
|@AssortmentName
|int
+
|nvarchar(100)
|ID of VAT rates from VAT rates list (see relation)
+
|
|API_GetVATRates.ID
+
|AssortmentName
 +
|
 
|-
 
|-
|MinimumOrderablePieces
+
|@Name
|decimal(18,2)  
+
|nvarchar(100)  
|Minimum orderable pieces
+
|
 +
|Name
 
|
 
|
 
|-
 
|-
|UnitID
+
|@Name2
|int
+
|nvarchar(150)
|ID of unit from units list (see relation)
+
|
|API_GetUnits.ID
+
|Name 2
 +
|
 
|-
 
|-
|IsNew
+
|@IsNew
 
|int  
 
|int  
|Is new
+
|
 +
|Is new:
 +
0 = Off,
 +
 
 +
1 = On
 
|
 
|
 
|-
 
|-
|PurchasePrice
+
|@PurchasePrice
 
|decimal(18,6)  
 
|decimal(18,6)  
 +
|
 
|Purchase price
 
|Purchase price
 
|
 
|
 
|-
 
|-
|RetailPrice
+
|@RetailPrice
 
|decimal(18,6)  
 
|decimal(18,6)  
 +
|
 
|Retail price
 
|Retail price
 
|
 
|
 
|-
 
|-
|GroupID
+
|@SupplierID
 +
|int
 +
|
 +
|Supplier ID
 +
|API_GetCustomers.ID
 +
|-
 +
|@Prefix
 +
|nvarchar(3)
 +
|
 +
|Prefix
 +
|
 +
|-
 +
|@SupplierProductCode
 +
|nvarchar(40)
 +
|
 +
|Supplier product code
 +
|
 +
|-
 +
|@ManufacturerSupplier
 +
|nvarchar(50)
 +
|
 +
|Manufacturer supplier
 +
|
 +
|-
 +
|@SupplierItemName
 +
|nvarchar(300)
 +
|
 +
|Supplier item name
 +
|
 +
|-
 +
|@BasicPrice
 +
|decimal(19,6)
 +
|
 +
|Basic price
 +
|
 +
|-
 +
|@SupplierRetailPrice
 +
|decimal(19,6)
 +
|
 +
|Supplier retail price
 +
|
 +
|-
 +
|@Description
 +
|nvarchar(250)
 +
|
 +
|Description
 +
|
 +
|-
 +
|@EshopDescription
 +
|nvarchar(500)
 +
|
 +
|Eshop description
 +
|
 +
|-
 +
|@VATRate
 
|int  
 
|int  
|GroupID
 
 
|
 
|
 +
|ID of VAT rates from VAT rates list (see relation)
 +
|API_GetVATRates.ID
 
|-
 
|-
|GroupName
+
|@MinimumOrderablePieces
|nvarchar(100)  
+
|decimal(18,2)  
|Group name
+
|
 +
|Minimum orderable pieces
 
|
 
|
 
|-
 
|-
|SubGroupID
+
|@UnitID
 
|int  
 
|int  
|SubGroupID
 
 
|
 
|
 +
|ID of unit from units list (see relation)
 +
|API_GetUnits.ID
 
|-
 
|-
|SubGoupName
+
|@IsSale
|nvarchar(100)
+
|bit
|Sub goup name
+
|
 +
|Is sale:
 +
0 = Off,
 +
 
 +
1 = On
 
|
 
|
 
|-
 
|-
|AssortmentID
+
|@IsHiddenOnEshop
|int
+
|bit
|AssortmentID
+
|
 +
|Is hidden on eshop:
 +
0 = Off,
 +
 
 +
1 = On
 
|
 
|
 
|-
 
|-
|AssortmentName
+
|@InfoReturnOfGoods
|nvarchar(100)  
+
|nvarchar(50)  
|AssortmentName
+
|
 +
|Info return of goods
 
|
 
|
 
|}
 
|}
 +
 +
==== Return ====
 +
0 : OK
 +
100 : Item could not be created
  
 
==== Example ====
 
==== Example ====
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
EXEC [API_CreateBranch] @WorkshopID = 1 ,@Name = 'Name' ,@Street = 'Street' ,@City = 'City' ,@ZIPCode = 'ZIPCode' ,@Country = 'Country' ,@Region = 'Region' ,@State ='Česká republika' ,@StateID = 15797 ,@Phone = '+420 556 621 300' ,@Fax = '+420 596 790 789' ,@MobilePhone = '+420 556 621 301' ,@Email = 'info@nextis.cz' ,@Web = 'www.nextis.cz'
+
DECLARE @return_value int
 +
EXEC @return_value = [API_CreateProductGroup] @ProductCode= '1457429619' ,@TecDocCode= '1 457 429 619' ,@TecDocBrandName= 'BOSCH' ,@TecDocBrandID= 30 ,@GroupName= 'GroupName' ,@SubGoupName= 'SubGoupName' ,@AssortmentName= 'AssortmentName' ,@Name= 'Name' ,@Name2= 'Name2' ,@IsNew= 0 ,@PurchasePrice= 100 ,@RetailPrice= 190 ,@SupplierID= 2 ,@Prefix= '' ,@SupplierProductCode= '1457429619BS' ,@ManufacturerSupplier= 'BOSCH2' ,@SupplierItemName= 'SupplierItemName' ,@BasicPrice= 100 ,@SupplierRetailPrice= 220 ,@Description= 'Description' ,@EshopDescription= 'EshopDescription' ,@VATRate = 16028 ,@MinimumOrderablePieces= 1 ,@UnitID= 148, @IsSale= 0, @IsHiddenOnEshop = 0, @InfoReturnOfGoods = ''
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
==== Notices ====
 
==== Notices ====
 
None.
 
None.

Aktuální verze z 13. 8. 2020, 10:28

Description

Method allows You to create new product group in system.

Exact name

API_CreateProductGroup

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ProductCode nvarchar(40) Product code
@TecDocCode nvarchar(35) TecDoc code
@TecDocBrandName nvarchar(80) TecDoc brand name
@TecDocBrandID int TecDoc brand ID
@GroupName nvarchar(100) Group name
@SubGoupName nvarchar(100) Sub goup name
@AssortmentName nvarchar(100) AssortmentName
@Name nvarchar(100) Name
@Name2 nvarchar(150) Name 2
@IsNew int Is new:

0 = Off,

1 = On

@PurchasePrice decimal(18,6) Purchase price
@RetailPrice decimal(18,6) Retail price
@SupplierID int Supplier ID API_GetCustomers.ID
@Prefix nvarchar(3) Prefix
@SupplierProductCode nvarchar(40) Supplier product code
@ManufacturerSupplier nvarchar(50) Manufacturer supplier
@SupplierItemName nvarchar(300) Supplier item name
@BasicPrice decimal(19,6) Basic price
@SupplierRetailPrice decimal(19,6) Supplier retail price
@Description nvarchar(250) Description
@EshopDescription nvarchar(500) Eshop description
@VATRate int ID of VAT rates from VAT rates list (see relation) API_GetVATRates.ID
@MinimumOrderablePieces decimal(18,2) Minimum orderable pieces
@UnitID int ID of unit from units list (see relation) API_GetUnits.ID
@IsSale bit Is sale:

0 = Off,

1 = On

@IsHiddenOnEshop bit Is hidden on eshop:

0 = Off,

1 = On

@InfoReturnOfGoods nvarchar(50) Info return of goods

Return

0 : OK
100 : Item could not be created

Example

 DECLARE @return_value int
 EXEC @return_value = [API_CreateProductGroup] @ProductCode= '1457429619' ,@TecDocCode= '1 457 429 619' ,@TecDocBrandName= 'BOSCH' ,@TecDocBrandID= 30 ,@GroupName= 'GroupName' ,@SubGoupName= 'SubGoupName' ,@AssortmentName= 'AssortmentName' ,@Name= 'Name' ,@Name2= 'Name2' ,@IsNew= 0 ,@PurchasePrice= 100 ,@RetailPrice= 190 ,@SupplierID= 2 ,@Prefix= '' ,@SupplierProductCode= '1457429619BS' ,@ManufacturerSupplier= 'BOSCH2' ,@SupplierItemName= 'SupplierItemName' ,@BasicPrice= 100 ,@SupplierRetailPrice= 220 ,@Description= 'Description' ,@EshopDescription= 'EshopDescription' ,@VATRate = 16028 ,@MinimumOrderablePieces= 1 ,@UnitID= 148, @IsSale= 0, @IsHiddenOnEshop = 0, @InfoReturnOfGoods = ''

Notices

None.