API ProductGroups BULK
Z Podpora.nextis.cz
Obsah
Description
Method allows You to update and create new product groups in system.
Exact name
API_ProductGroups_BULK
Type
Standard executable stored procedure with table-Valued Parameters.
Table-Valued Parameters Specification
Columns name | 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 | bit | 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 | ||
ID | int | Internal system id. If you create it, set it to null | API_GetProductGroups.ID | |
IsArchiving | int | Is archiving. If you create it, set it to null | ||
SupplierIsArchiving | int | Supplier is archiving. If you create it, set it to null |
Return
0 : OK 100 : Error
Example
DECLARE @return_value int
Declare @ProductGroups dbo.APIsProductGroups
INSERT INTO @ProductGroups
SELECT G.[ProductCode],
G.[TecDocCode],
G.[TecDocBrandName],
G.[TecDocBrandID],
G.[GroupName],
G.[SubGoupName],
G.[AssortmentName],
G.[Name],
G.[Name2],
1, --G.[IsNew],
G.[PurchasePrice],
G.[RetailPrice],
P.[SupplierID],
P.[Prefix],
P.[SupplierProductCode],
P.[ManufacturerSupplier],
P.[SupplierItemName],
P.[BasicPrice],
P.[RetailPrice],
G.[Description],
G.[EshopDescription],
G.[VATRate],
G.[MinimumOrderablePieces],
G.[UnitID],
G.[IsSale],
G.[IsHiddenOnEshop],
P.[InfoReturnOfGoods],
G.[ID],
G.[IsArchiving],
P.[IsArchiving]
FROM [API_GetProductGroups] G
LEFT JOIN [API_GetProducts] P ON G.ID = P.GroupID
WHERE G.ID in (7,9)
union
SELECT '1457429619', '1 457 429 619', 'BOSCH', 30, 'BOSCH', null, null, 'Name', '', 1, 100, 190, 7, '', '1457429619BOS', 'BOSCH', '', 100, 220, '', '', 16028, 1, 148, 0, 0, '', null, 0, 0
exec @return_value = dbo.[API_ProductGroups_BULK] @ProductGroups
Notices
API_ProductGroups_BULK procedure uses own data type called ProductGroups (dbo.APIsProductGroups).