API UpdateBasketItem

Z Podpora.nextis.cz
Přejít na: navigace, hledání

Description

Method allows You to update uasket item in system.

Exact name

API_UpdateBasketItem

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id
@CustomerID int ID of customer from customers list (see relation) API_GetCustomers.ID
@CustomerWorkshopID int ID of workshops from workshops list (see relation) API_GetWorkshops.ID = API_GetCustomers.WorkshopID
@GroupID int ID of product groups from product groups list (see relation) API_GetProductGroups.ID
@ProductID int ID of product from product list (see relation) API_GetProducts.ID
@StorageCardID int ID of stock dispositions from stock dispositions list (see relation) API_GetStockDispositions.ID
@OrderID int ID of orders from orders list (see relation) API_GetOrders.ID
@GroupCode nvarchar(40) Group code
@ProductCode nvarchar(40) Product code
@ManufacturerCode nvarchar(40) Manufacturer code
@SupplierCode nvarchar(40) Supplier code
@Brand nvarchar(50) Brand
@Desription nvarchar(250) Desription
@OrderedQuantity decimal(18,2) Ordered quantity
@PricePerPiece decimal(18,3) Price per piece
@PricePerPieceWithVAT decimal(18,3) Price per piece with VAT
@PurchasePricePerPiece decimal(18,3) Purchase price per piece
@PurchasePricePerPieceWithVAT decimal(18,3) Purchase price per piece with VAT
@TotalPrice decimal(18,3) Total price
@TotalPriceWithVAT decimal(18,3) Total price with VAT
@TotalPurchasePrice decimal(18,3) Total purchase Price
@TotalPurchasePriceWithVAT decimal(18,3) Total purchase price with VAT
@DiscountInPercent decimal(18,3) DiscountIn percent
@DiscountPrice decimal(18,3) Discount price
@SurchargesPrice decimal(18,2) Surcharges price
@SurchargePriceWithVAT decimal(18,2) Surcharge price with VAT
@PricePerPieceInCurrency decimal(18,3) Price per piece in currency
@PricePerPieceWithVATInCurrency decimal(18,3) Price per piece with VAT in currency
@PurchasePricePerPieceInCurrency decimal(18,3) Purchase price per piece in currency
@PurchasePricePerPieceWithVATInCurrency decimal(18,3) Purchase price per piece with VAT in currency
@TotalPriceInCurrency decimal(18,3) Total price in currency
@TotalPriceWithVATInCurrency decimal(18,3) Total price with VAT in currency
@TotalPurchasePriceInCurrency decimal(18,3) Total purchase price in currency
@TotalPurchasePriceWithVATInCurrency decimal(18,3) Total purchase price with VAT in currency
@DiscountPriceInCurrency decimal(18,3) Discount price in currency
@SurchargesPriceInCurrency decimal(18,3) Surcharges price in currency
@SurchargesPriceWithVATInCurrency decimal(18,3) Surcharges price with VAT in currency
@CurrencyID int ID of currency from currency list (see relation) API_GetCurrency.ID
@ForeignCurrencyID int ID of currency from currency list (see relation) API_GetCurrency.ID
@Note nvarchar(50) Note
@VATRate decimal(18,2) VAT rate
@HistoryInfo nvarchar(300) History info
@ActionPrice int Action price
@ChildPricePerPieceInCurrency decimal(18,3) Child price per piece in currency
@ChildPricePerPieceWithVATInCurrency decimal(18,3) Child price per piece with VAT in currency
@ChildPurchasePricePerPieceInCurrency decimal(18,3) Child purchase price per piece in currency
@ChildPurchasePricePerPieceWithVATInCurrency decimal(18,3) Child purchase price per piece with VAT in currency
@ChildDiscountInCurrency decimal(18,3) Child discount in currency

Return

0 : OK
100 : Item could not be updated

Example

 DECLARE @return_value int
 DECLARE @ID int
 DECLARE @CustomerID int
 DECLARE @CustomerWorkshopID int
 DECLARE @GroupID int
 DECLARE @ProductID int
 DECLARE @StorageCardID int
 DECLARE @OrderID int
 DECLARE @GroupCode nvarchar(40)
 DECLARE @ProductCode nvarchar(40)
 DECLARE @ManufacturerCode nvarchar(40)
 DECLARE @SupplierCode nvarchar(40)
 DECLARE @Brand nvarchar(50)
 DECLARE @Desription nvarchar(250)
 DECLARE @OrderedQuantity decimal(18,2)
 DECLARE @PricePerPiece decimal(18,3)
 DECLARE @PricePerPieceWithVAT decimal(18,3)
 DECLARE @PurchasePricePerPiece decimal(18,3)
 DECLARE @PurchasePricePerPieceWithVAT decimal(18,3)
 DECLARE @TotalPrice decimal(18,3)
 DECLARE @TotalPriceWithVAT decimal(18,3)
 DECLARE @TotalPurchasePrice decimal(18,3)
 DECLARE @TotalPurchasePriceWithVAT decimal(18,3)
 DECLARE @DiscountInPercent decimal(18,3)
 DECLARE @DiscountPrice decimal(18,3)
 DECLARE @SurchargesPrice decimal(18,2)
 DECLARE @SurchargePriceWithVAT decimal(18,2)
 DECLARE @PricePerPieceInCurrency decimal(18,3)
 DECLARE @PricePerPieceWithVATInCurrency decimal(18,3)
 DECLARE @PurchasePricePerPieceInCurrency decimal(18,3)
 DECLARE @PurchasePricePerPieceWithVATInCurrency decimal(18,3)
 DECLARE @TotalPriceInCurrency decimal(18,3)
 DECLARE @TotalPriceWithVATInCurrency decimal(18,3)
 DECLARE @TotalPurchasePriceInCurrency decimal(18,3)
 DECLARE @TotalPurchasePriceWithVATInCurrency decimal(18,3)
 DECLARE @DiscountPriceInCurrency decimal(18,3)
 DECLARE @SurchargesPriceInCurrency decimal(18,3)
 DECLARE @SurchargesPriceWithVATInCurrency decimal(18,3)
 DECLARE @CurrencyID int
 DECLARE @ForeignCurrencyID int
 DECLARE @Note nvarchar(50)
 DECLARE @VATRate decimal(18,2)
 DECLARE @HistoryInfo nvarchar(300)
 DECLARE @ActionPrice int
 DECLARE @ChildPricePerPieceInCurrency decimal(18,3)
 DECLARE @ChildPricePerPieceWithVATInCurrency decimal(18,3)
 DECLARE @ChildPurchasePricePerPieceInCurrency decimal(18,3)
 DECLARE @ChildPurchasePricePerPieceWithVATInCurrency decimal(18,3)
 DECLARE @ChildDiscountInCurrency decimal(18,3)
 
 SELECT @ID = [ID], 
       @CustomerID = 3,
       @CustomerWorkshopID = [CustomerWorkshopID],
       @GroupID = [GroupID],
       @ProductID = [ProductID],
       @StorageCardID = [StorageCardID],
       @OrderID = [OrderID],
       @GroupCode = [GroupCode],
       @ProductCode = [ProductCode],
       @ManufacturerCode = [ManufacturerCode],
       @SupplierCode = [SupplierCode],
       @Brand = [Brand],
       @Desription = [Desription],
       @OrderedQuantity = [OrderedQuantity],
       @PricePerPiece = [PricePerPiece],
       @PricePerPieceWithVAT = [PricePerPieceWithVAT],
       @PurchasePricePerPiece = [PurchasePricePerPiece],
       @PurchasePricePerPieceWithVAT = [PurchasePricePerPieceWithVAT],
       @TotalPrice = [TotalPrice],
       @TotalPriceWithVAT = [TotalPriceWithVAT],
       @TotalPurchasePrice = [TotalPurchasePrice],
       @TotalPurchasePriceWithVAT = [TotalPurchasePriceWithVAT],
       @DiscountInPercent = [DiscountInPercent],
       @DiscountPrice = [DiscountPrice],
       @SurchargesPrice = [SurchargesPrice],
       @SurchargePriceWithVAT = [SurchargePriceWithVAT],
       @PricePerPieceInCurrency = [PricePerPieceInCurrency],
       @PricePerPieceWithVATInCurrency = [PricePerPieceWithVATInCurrency],
       @PurchasePricePerPieceInCurrency = [PurchasePricePerPieceInCurrency],
       @PurchasePricePerPieceWithVATInCurrency = [PurchasePricePerPieceWithVATInCurrency],
       @TotalPriceInCurrency = [TotalPriceInCurrency],
       @TotalPriceWithVATInCurrency = [TotalPriceWithVATInCurrency],
       @TotalPurchasePriceInCurrency = [TotalPurchasePriceInCurrency],
       @TotalPurchasePriceWithVATInCurrency = [TotalPurchasePriceWithVATInCurrency],
       @DiscountPriceInCurrency = [DiscountPriceInCurrency],
       @SurchargesPriceInCurrency = [SurchargesPriceInCurrency],
       @SurchargesPriceWithVATInCurrency = [SurchargesPriceWithVATInCurrency],
       @CurrencyID = [CurrencyID],
       @ForeignCurrencyID = [ForeignCurrencyID],
       @Note = [Note],
       @VATRate = [VATRate],
       @HistoryInfo = [HistoryInfo],
       @ActionPrice = [ActionPrice],
       @ChildPricePerPieceInCurrency = [ChildPricePerPieceInCurrency],
       @ChildPricePerPieceWithVATInCurrency = [ChildPricePerPieceWithVATInCurrency],
       @ChildPurchasePricePerPieceInCurrency = [ChildPurchasePricePerPieceInCurrency],
       @ChildPurchasePricePerPieceWithVATInCurrency = [ChildPurchasePricePerPieceWithVATInCurrency],
       @ChildDiscountInCurrency = [ChildDiscountInCurrency]
 FROM   [API_GetBasketItems] 
 WHERE  id = 3
 
 EXECUTE @return_value = [API_UpdateBasketItem] 
  @ID, 
  @CustomerID,
  @CustomerWorkshopID,
  @GroupID,
  @ProductID,
  @StorageCardID,
  @OrderID,
  @GroupCode,
  @ProductCode,
  @ManufacturerCode,
  @SupplierCode,
  @Brand,
  @Desription,
  @OrderedQuantity,
  @PricePerPiece,
  @PricePerPieceWithVAT,
  @PurchasePricePerPiece,
  @PurchasePricePerPieceWithVAT,
  @TotalPrice,
  @TotalPriceWithVAT,
  @TotalPurchasePrice,
  @TotalPurchasePriceWithVAT,
  @DiscountInPercent,
  @DiscountPrice,
  @SurchargesPrice,
  @SurchargePriceWithVAT,
  @PricePerPieceInCurrency,
  @PricePerPieceWithVATInCurrency,
  @PurchasePricePerPieceInCurrency,
  @PurchasePricePerPieceWithVATInCurrency,
  @TotalPriceInCurrency,
  @TotalPriceWithVATInCurrency,
  @TotalPurchasePriceInCurrency,
  @TotalPurchasePriceWithVATInCurrency,
  @DiscountPriceInCurrency,
  @SurchargesPriceInCurrency,
  @SurchargesPriceWithVATInCurrency,
  @CurrencyID,
  @ForeignCurrencyID,
  @Note,
  @VATRate,
  @HistoryInfo,
  @ActionPrice,
  @ChildPricePerPieceInCurrency,
  @ChildPricePerPieceWithVATInCurrency,
  @ChildPurchasePricePerPieceInCurrency,
  @ChildPurchasePricePerPieceWithVATInCurrency,
  @ChildDiscountInCurrency

Notices

None.