API CreateProduct: Porovnání verzí
Skočit na navigaci
Skočit na vyhledávání
Bez shrnutí editace |
Bez shrnutí editace |
||
| (Nejsou zobrazeny 2 mezilehlé verze od stejného uživatele.) | |||
| Řádek 15: | Řádek 15: | ||
!Description | !Description | ||
!Relation | !Relation | ||
|- | |- | ||
|@SupplierID | |@SupplierID | ||
|int | |int | ||
| | | | ||
| | |Supplier ID | ||
|API_GetCustomers.ID | |API_GetCustomers.ID | ||
|- | |- | ||
|@ | |@GroupID | ||
|int | |int | ||
| | | | ||
| | |Group ID | ||
|API_GetProductGroups.ID | |||
| | |||
|- | |- | ||
|@ | |@SupplierProductCode | ||
| | |nvarchar(40) | ||
| | | | ||
| | |Supplier product code | ||
| | | | ||
|- | |- | ||
|@ | |@ManufacturerSupplier | ||
| | |nvarchar(50) | ||
| | | | ||
| | |Manufacturer supplier | ||
| | | | ||
|- | |- | ||
|@ | |@Prefix | ||
| | |nvarchar(3) | ||
| | | | ||
| | |Prefix | ||
| | | | ||
|- | |- | ||
| Řádek 71: | Řádek 52: | ||
| | | | ||
|- | |- | ||
|@ | |@MinimumOrderableQuantity | ||
| | |decimal(18,2) | ||
| | | | ||
| | |Minimum orderable quantity | ||
| | | | ||
|- | |- | ||
| Řádek 95: | Řádek 64: | ||
| | | | ||
|- | |- | ||
|@ | |@BasicPrice | ||
|decimal(18,6) | |decimal(18,6) | ||
| | | | ||
| | |Basic price | ||
| | |||
|- | |||
|@InfoReturnOfGoods | |||
|nvarchar(50) | |||
| | |||
|Info return of goods | |||
| | | | ||
|} | |} | ||
==== Return ==== | |||
0 : OK | |||
100 : Item could not be created | |||
==== Example ==== | ==== Example ==== | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
EXEC [API_CreateProduct] @SupplierID= 2 ,@GroupID= 14 ,@SupplierProductCode= '1457429619BS' ,@ManufacturerSupplier= 'BOSCH2' ,@Prefix= '' ,@SupplierItemName= 'SupplierItemName' ,@MinimumOrderableQuantity= 1 ,@ForeignPrice= 110 ,@BasicPrice= 190 | DECLARE @return_value int | ||
EXEC @return_value = [API_CreateProduct] @SupplierID= 2 ,@GroupID= 14 ,@SupplierProductCode= '1457429619BS' ,@ManufacturerSupplier= 'BOSCH2' ,@Prefix= '' ,@SupplierItemName= 'SupplierItemName' ,@MinimumOrderableQuantity= 1 ,@ForeignPrice= 110 ,@BasicPrice= 190, @InfoReturnOfGoods='' | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Notices ==== | ==== Notices ==== | ||
None. | None. | ||
Aktuální verze z 13. 8. 2020, 08:24
Description
Method allows You to create new product in system.
Exact name
API_CreateProduct
Type
Standard executable stored procedure.
Specification
| Parameter | Data type | Value range | Description | Relation |
|---|---|---|---|---|
| @SupplierID | int | Supplier ID | API_GetCustomers.ID | |
| @GroupID | int | Group ID | API_GetProductGroups.ID | |
| @SupplierProductCode | nvarchar(40) | Supplier product code | ||
| @ManufacturerSupplier | nvarchar(50) | Manufacturer supplier | ||
| @Prefix | nvarchar(3) | Prefix | ||
| @SupplierItemName | nvarchar(150) | Supplier item name | ||
| @MinimumOrderableQuantity | decimal(18,2) | Minimum orderable quantity | ||
| @ForeignPrice | decimal(19,6) | Foreign price | ||
| @BasicPrice | decimal(18,6) | Basic price | ||
| @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_CreateProduct] @SupplierID= 2 ,@GroupID= 14 ,@SupplierProductCode= '1457429619BS' ,@ManufacturerSupplier= 'BOSCH2' ,@Prefix= '' ,@SupplierItemName= 'SupplierItemName' ,@MinimumOrderableQuantity= 1 ,@ForeignPrice= 110 ,@BasicPrice= 190, @InfoReturnOfGoods=''
Notices
None.