API UpdateProduct: Porovnání verzí
Z Podpora.nextis.cz
(Založena nová stránka s textem „==== Description ==== Method allows You to update product in system. ==== Exact name ==== <code>API_UpdateProduct</code> ==== Type ==== Standard executab…“) |
|||
(Nejsou zobrazeny 4 mezilehlé verze od stejného uživatele.) | |||
Řádka 20: | Řádka 20: | ||
| | | | ||
|Internal system id | |Internal system id | ||
− | | | + | |API_GetProducts.ID |
|- | |- | ||
|@SupplierID | |@SupplierID | ||
Řádka 62: | Řádka 62: | ||
| | | | ||
|Minimum orderable quantity | |Minimum orderable quantity | ||
+ | | | ||
+ | |- | ||
+ | |@SupplierIsArchiving | ||
+ | |int | ||
+ | | | ||
+ | |Supplier is archiving | ||
| | | | ||
|- | |- | ||
Řádka 74: | Řádka 80: | ||
| | | | ||
|Basic price | |Basic price | ||
+ | | | ||
+ | |- | ||
+ | |@InfoReturnOfGoods | ||
+ | |nvarchar(50) | ||
+ | | | ||
+ | |Info return of goods | ||
| | | | ||
|} | |} | ||
+ | ==== Return ==== | ||
+ | 0 : OK | ||
+ | 100 : Item could not be updated | ||
==== Example ==== | ==== Example ==== | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
+ | DECLARE @return_value int | ||
DECLARE @ID3 int | DECLARE @ID3 int | ||
DECLARE @SupplierID int | DECLARE @SupplierID int | ||
Řádka 88: | Řádka 104: | ||
DECLARE @SupplierItemName nvarchar(150) | DECLARE @SupplierItemName nvarchar(150) | ||
DECLARE @MinimumOrderableQuantity decimal(18,2) | DECLARE @MinimumOrderableQuantity decimal(18,2) | ||
+ | DECLARE @SupplierIsArchiving int | ||
DECLARE @ForeignPrice decimal(19,6) | DECLARE @ForeignPrice decimal(19,6) | ||
DECLARE @BasicPrice decimal(19,6) | DECLARE @BasicPrice decimal(19,6) | ||
+ | DECLARE @InfoReturnOfGoods nvarchar(50) | ||
Řádka 100: | Řádka 118: | ||
@SupplierItemName = [SupplierItemName], | @SupplierItemName = [SupplierItemName], | ||
@MinimumOrderableQuantity = [MinimumOrderableQuantity], | @MinimumOrderableQuantity = [MinimumOrderableQuantity], | ||
+ | @SupplierIsArchiving = [IsArchiving] | ||
@ForeignPrice = [ForeignPrice], | @ForeignPrice = [ForeignPrice], | ||
− | @BasicPrice = [ | + | @BasicPrice = 200, |
+ | @InfoReturnOfGoods = [InfoReturnOfGoods] | ||
FROM [API_GetProducts] | FROM [API_GetProducts] | ||
WHERE id = 3 | WHERE id = 3 | ||
− | EXECUTE [API_UpdateProduct] | + | EXECUTE @return_value = [API_UpdateProduct] |
@ID3, | @ID3, | ||
@SupplierID, | @SupplierID, | ||
Řádka 114: | Řádka 134: | ||
@SupplierItemName, | @SupplierItemName, | ||
@MinimumOrderableQuantity, | @MinimumOrderableQuantity, | ||
+ | @SupplierIsArchiving, | ||
@ForeignPrice, | @ForeignPrice, | ||
@BasicPrice | @BasicPrice | ||
+ | @InfoReturnOfGoods | ||
</syntaxhighlight> | </syntaxhighlight> |
Aktuální verze z 13. 8. 2020, 09:32
Description
Method allows You to update product in system.
Exact name
API_UpdateProduct
Type
Standard executable stored procedure.
Specification
Parameter | Data type | Value range | Description | Relation |
---|---|---|---|---|
@ID3 | int | Internal system id | API_GetProducts.ID | |
@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 | ||
@SupplierIsArchiving | int | Supplier is archiving | ||
@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 updated
Example
DECLARE @return_value int
DECLARE @ID3 int
DECLARE @SupplierID int
DECLARE @GroupID int
DECLARE @SupplierProductCode nvarchar(40)
DECLARE @ManufacturerSupplier nvarchar(50)
DECLARE @Prefix nvarchar(3)
DECLARE @SupplierItemName nvarchar(150)
DECLARE @MinimumOrderableQuantity decimal(18,2)
DECLARE @SupplierIsArchiving int
DECLARE @ForeignPrice decimal(19,6)
DECLARE @BasicPrice decimal(19,6)
DECLARE @InfoReturnOfGoods nvarchar(50)
SELECT @ID3 = [ID],
@SupplierID = [SupplierID],
@GroupID = [GroupID],
@SupplierProductCode = [SupplierProductCode],
@ManufacturerSupplier = [ManufacturerSupplier],
@Prefix = [Prefix],
@SupplierItemName = [SupplierItemName],
@MinimumOrderableQuantity = [MinimumOrderableQuantity],
@SupplierIsArchiving = [IsArchiving]
@ForeignPrice = [ForeignPrice],
@BasicPrice = 200,
@InfoReturnOfGoods = [InfoReturnOfGoods]
FROM [API_GetProducts]
WHERE id = 3
EXECUTE @return_value = [API_UpdateProduct]
@ID3,
@SupplierID,
@GroupID,
@SupplierProductCode,
@ManufacturerSupplier,
@Prefix,
@SupplierItemName,
@MinimumOrderableQuantity,
@SupplierIsArchiving,
@ForeignPrice,
@BasicPrice
@InfoReturnOfGoods
Notices
None.