API UpdateProductGroup: Porovnání verzí
Z Podpora.nextis.cz
(Není zobrazeno 6 mezilehlých verzí od stejného uživatele.) | |||
Řádka 20: | Řádka 20: | ||
| | | | ||
|Internal system id | |Internal system id | ||
− | | | + | |API_GetProductGroups.ID |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|@ProductCode | |@ProductCode | ||
|nvarchar(40) | |nvarchar(40) | ||
| | | | ||
− | | | + | |Product code |
| | | | ||
|- | |- | ||
Řádka 37: | Řádka 31: | ||
|nvarchar(35) | |nvarchar(35) | ||
| | | | ||
− | | | + | |TecDoc code |
| | | | ||
|- | |- | ||
Řádka 43: | Řádka 37: | ||
|nvarchar(80) | |nvarchar(80) | ||
| | | | ||
− | | | + | |TecDoc brand name |
| | | | ||
|- | |- | ||
Řádka 49: | Řádka 43: | ||
|int | |int | ||
| | | | ||
− | | | + | |TecDoc brand ID |
| | | | ||
|- | |- | ||
Řádka 55: | Řádka 49: | ||
|nvarchar(100) | |nvarchar(100) | ||
| | | | ||
− | | | + | |Group name |
| | | | ||
|- | |- | ||
Řádka 61: | Řádka 55: | ||
|nvarchar(100) | |nvarchar(100) | ||
| | | | ||
− | | | + | |Sub goup name |
| | | | ||
|- | |- | ||
Řádka 67: | Řádka 61: | ||
|nvarchar(100) | |nvarchar(100) | ||
| | | | ||
− | | | + | |AssortmentName |
| | | | ||
|- | |- | ||
Řádka 73: | Řádka 67: | ||
|nvarchar(100) | |nvarchar(100) | ||
| | | | ||
− | | | + | |Name |
| | | | ||
|- | |- | ||
|@Name2 | |@Name2 | ||
− | | | + | |nvarchar(150) |
− | |||
| | | | ||
+ | |Name2 | ||
| | | | ||
|- | |- | ||
Řádka 85: | Řádka 79: | ||
|bit | |bit | ||
| | | | ||
− | | | + | |Is new: |
+ | 0 = Off, | ||
+ | |||
+ | 1 = On | ||
| | | | ||
|- | |- | ||
Řádka 91: | Řádka 88: | ||
|decimal(19,6) | |decimal(19,6) | ||
| | | | ||
− | | | + | |Purchase price |
| | | | ||
|- | |- | ||
Řádka 97: | Řádka 94: | ||
|decimal(19,6) | |decimal(19,6) | ||
| | | | ||
+ | |Retail price | ||
+ | | | ||
+ | |- | ||
+ | |@IsArchiving | ||
+ | |int | ||
| | | | ||
+ | |Is archiving | ||
| | | | ||
|- | |- | ||
Řádka 103: | Řádka 106: | ||
|int | |int | ||
| | | | ||
− | | | + | |Supplier ID |
− | | | + | |API_GetCustomers.ID |
|- | |- | ||
|@Prefix | |@Prefix | ||
|nvarchar(3) | |nvarchar(3) | ||
| | | | ||
− | | | + | |@Prefix |
| | | | ||
|- | |- | ||
Řádka 115: | Řádka 118: | ||
|nvarchar(40) | |nvarchar(40) | ||
| | | | ||
− | | | + | |Supplier product code |
| | | | ||
|- | |- | ||
Řádka 121: | Řádka 124: | ||
|nvarchar(50) | |nvarchar(50) | ||
| | | | ||
− | | | + | |Manufacturer supplier |
| | | | ||
|- | |- | ||
Řádka 127: | Řádka 130: | ||
|nvarchar(300) | |nvarchar(300) | ||
| | | | ||
− | | | + | |Supplier item name |
| | | | ||
|- | |- | ||
Řádka 133: | Řádka 136: | ||
|decimal(19,6) | |decimal(19,6) | ||
| | | | ||
− | | | + | |Basic price |
| | | | ||
|- | |- | ||
Řádka 139: | Řádka 142: | ||
|decimal(19,6) | |decimal(19,6) | ||
| | | | ||
+ | |Supplier retail price | ||
+ | | | ||
+ | |- | ||
+ | |@SupplierIsArchiving | ||
+ | |int | ||
| | | | ||
+ | |Supplier is archiving | ||
| | | | ||
|- | |- | ||
|@Description | |@Description | ||
− | | | + | |nvarchar(250) |
− | |||
| | | | ||
+ | |Description | ||
| | | | ||
|- | |- | ||
Řádka 151: | Řádka 160: | ||
|nvarchar(500) | |nvarchar(500) | ||
| | | | ||
− | | | + | |Eshop description |
| | | | ||
|- | |- | ||
Řádka 157: | Řádka 166: | ||
|int | |int | ||
| | | | ||
− | | | + | |ID of VAT rates from VAT rates list (see relation) |
− | | | + | |API_GetVATRates.ID |
|- | |- | ||
|@MinimumOrderablePieces | |@MinimumOrderablePieces | ||
|decimal(18,2) | |decimal(18,2) | ||
| | | | ||
− | | | + | |Minimum orderable pieces |
| | | | ||
|- | |- | ||
Řádka 169: | Řádka 178: | ||
|int | |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 updated | ||
==== Example ==== | ==== Example ==== | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
+ | DECLARE @return_value int | ||
DECLARE @ID int | DECLARE @ID int | ||
DECLARE @ProductCode nvarchar(40) | DECLARE @ProductCode nvarchar(40) | ||
Řádka 185: | Řádka 222: | ||
DECLARE @AssortmentName nvarchar(100) | DECLARE @AssortmentName nvarchar(100) | ||
DECLARE @Name nvarchar(100) | DECLARE @Name nvarchar(100) | ||
− | DECLARE @Name2 | + | DECLARE @Name2 nvarchar(150) |
DECLARE @IsNew bit | DECLARE @IsNew bit | ||
DECLARE @PurchasePrice decimal(19,6) | DECLARE @PurchasePrice decimal(19,6) | ||
DECLARE @RetailPrice decimal(19,6) | DECLARE @RetailPrice decimal(19,6) | ||
+ | DECLARE @IsArchiving int | ||
DECLARE @SupplierID int | DECLARE @SupplierID int | ||
DECLARE @Prefix nvarchar(3) | DECLARE @Prefix nvarchar(3) | ||
Řádka 196: | Řádka 234: | ||
DECLARE @BasicPrice decimal(19,6) | DECLARE @BasicPrice decimal(19,6) | ||
DECLARE @SupplierRetailPrice decimal(19,6) | DECLARE @SupplierRetailPrice decimal(19,6) | ||
− | DECLARE @Description | + | DECLARE @SupplierIsArchiving int |
+ | DECLARE @Description nvarchar(250) | ||
DECLARE @EshopDescription nvarchar(500) | DECLARE @EshopDescription nvarchar(500) | ||
DECLARE @VATRate int | DECLARE @VATRate int | ||
DECLARE @MinimumOrderablePieces decimal(18,2) | DECLARE @MinimumOrderablePieces decimal(18,2) | ||
DECLARE @UnitID int | DECLARE @UnitID int | ||
+ | DECLARE @IsSale bit | ||
+ | DECLARE @IsHiddenOnEshop bit | ||
+ | DECLARE @InfoReturnOfGoods nvarchar(50) | ||
Řádka 221: | Řádka 263: | ||
@VATRate = [VATRate], | @VATRate = [VATRate], | ||
@MinimumOrderablePieces = [MinimumOrderablePieces], | @MinimumOrderablePieces = [MinimumOrderablePieces], | ||
− | @UnitID = [UnitID] | + | @UnitID = [UnitID], |
+ | @IsArchiving = [IsArchiving], | ||
+ | @IsSale = [IsSale], | ||
+ | @IsHiddenOnEshop = [IsHiddenOnEshop] | ||
FROM [API_GetProductGroups] | FROM [API_GetProductGroups] | ||
WHERE id = 3 | WHERE id = 3 | ||
Řádka 232: | Řádka 277: | ||
@SupplierItemName = [SupplierItemName], | @SupplierItemName = [SupplierItemName], | ||
@BasicPrice = [BasicPrice], | @BasicPrice = [BasicPrice], | ||
− | @SupplierRetailPrice = [RetailPrice] | + | @SupplierRetailPrice = [RetailPrice], |
+ | @SupplierIsArchiving = [IsArchiving], | ||
+ | @InfoReturnOfGoods = [InfoReturnOfGoods] | ||
FROM [API_GetProducts] | FROM [API_GetProducts] | ||
WHERE GroupID = @ID and SupplierID = @SupplierID | WHERE GroupID = @ID and SupplierID = @SupplierID | ||
− | EXECUTE [API_UpdateProductGroup] | + | EXECUTE @return_value = [API_UpdateProductGroup] |
@ID, | @ID, | ||
@ProductCode, | @ProductCode, | ||
Řádka 251: | Řádka 298: | ||
@PurchasePrice, | @PurchasePrice, | ||
@RetailPrice, | @RetailPrice, | ||
+ | @IsArchiving, | ||
@SupplierID, | @SupplierID, | ||
@Prefix, | @Prefix, | ||
Řádka 258: | Řádka 306: | ||
@BasicPrice, | @BasicPrice, | ||
@SupplierRetailPrice, | @SupplierRetailPrice, | ||
+ | @SupplierIsArchiving, | ||
@Description, | @Description, | ||
@EshopDescription, | @EshopDescription, | ||
@VATRate, | @VATRate, | ||
@MinimumOrderablePieces, | @MinimumOrderablePieces, | ||
− | @UnitID | + | @UnitID, |
+ | @IsSale, | ||
+ | @IsHiddenOnEshop, | ||
+ | @InfoReturnOfGoods | ||
</syntaxhighlight> | </syntaxhighlight> |
Aktuální verze z 13. 8. 2020, 09:37
Description
Method allows You to update product group in system.
Exact name
API_UpdateProductGroup
Type
Standard executable stored procedure.
Specification
Parameter | Data type | Value range | Description | Relation |
---|---|---|---|---|
@ID | int | Internal system id | API_GetProductGroups.ID | |
@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) | Name2 | ||
@IsNew | bit | Is new:
0 = Off, 1 = On |
||
@PurchasePrice | decimal(19,6) | Purchase price | ||
@RetailPrice | decimal(19,6) | Retail price | ||
@IsArchiving | int | Is archiving | ||
@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 | ||
@SupplierIsArchiving | int | Supplier is archiving | ||
@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 updated
Example
DECLARE @return_value int
DECLARE @ID int
DECLARE @ProductCode nvarchar(40)
DECLARE @TecDocCode nvarchar(35)
DECLARE @TecDocBrandName nvarchar(80)
DECLARE @TecDocBrandID int
DECLARE @GroupName nvarchar(100)
DECLARE @SubGoupName nvarchar(100)
DECLARE @AssortmentName nvarchar(100)
DECLARE @Name nvarchar(100)
DECLARE @Name2 nvarchar(150)
DECLARE @IsNew bit
DECLARE @PurchasePrice decimal(19,6)
DECLARE @RetailPrice decimal(19,6)
DECLARE @IsArchiving int
DECLARE @SupplierID int
DECLARE @Prefix nvarchar(3)
DECLARE @SupplierProductCode nvarchar(40)
DECLARE @ManufacturerSupplier nvarchar(50)
DECLARE @SupplierItemName nvarchar(300)
DECLARE @BasicPrice decimal(19,6)
DECLARE @SupplierRetailPrice decimal(19,6)
DECLARE @SupplierIsArchiving int
DECLARE @Description nvarchar(250)
DECLARE @EshopDescription nvarchar(500)
DECLARE @VATRate int
DECLARE @MinimumOrderablePieces decimal(18,2)
DECLARE @UnitID int
DECLARE @IsSale bit
DECLARE @IsHiddenOnEshop bit
DECLARE @InfoReturnOfGoods nvarchar(50)
SELECT @ID = [ID],
@ProductCode = [ProductCode],
@TecDocCode = [TecDocCode],
@TecDocBrandName = [TecDocBrandName],
@TecDocBrandID = [TecDocBrandID],
@GroupName = [GroupName],
@SubGoupName = [SubGoupName],
@AssortmentName = [AssortmentName],
@Name = 'Name 2',
@Name2 = [Name2],
@IsNew = [IsNew],
@PurchasePrice = [PurchasePrice],
@RetailPrice = [RetailPrice],
@Description = [Description],
@EshopDescription = [EshopDescription],
@VATRate = [VATRate],
@MinimumOrderablePieces = [MinimumOrderablePieces],
@UnitID = [UnitID],
@IsArchiving = [IsArchiving],
@IsSale = [IsSale],
@IsHiddenOnEshop = [IsHiddenOnEshop]
FROM [API_GetProductGroups]
WHERE id = 3
SELECT @SupplierID = [SupplierID],
@Prefix = [Prefix],
@SupplierProductCode = [SupplierProductCode],
@ManufacturerSupplier = [ManufacturerSupplier],
@SupplierItemName = [SupplierItemName],
@BasicPrice = [BasicPrice],
@SupplierRetailPrice = [RetailPrice],
@SupplierIsArchiving = [IsArchiving],
@InfoReturnOfGoods = [InfoReturnOfGoods]
FROM [API_GetProducts]
WHERE GroupID = @ID and SupplierID = @SupplierID
EXECUTE @return_value = [API_UpdateProductGroup]
@ID,
@ProductCode,
@TecDocCode,
@TecDocBrandName,
@TecDocBrandID,
@GroupName,
@SubGoupName,
@AssortmentName,
@Name,
@Name2,
@IsNew,
@PurchasePrice,
@RetailPrice,
@IsArchiving,
@SupplierID,
@Prefix,
@SupplierProductCode,
@ManufacturerSupplier,
@SupplierItemName,
@BasicPrice,
@SupplierRetailPrice,
@SupplierIsArchiving,
@Description,
@EshopDescription,
@VATRate,
@MinimumOrderablePieces,
@UnitID,
@IsSale,
@IsHiddenOnEshop,
@InfoReturnOfGoods
Notices
None.