API UpdatePayment: Porovnání verzí

Z Podpora.nextis.cz
Přejít na: navigace, hledání
(Založena nová stránka s textem „==== Description ==== Method allows You to update payment in system. ==== Exact name ==== <code>API_UpdatePayment</code> ==== Type ==== Standard executab…“)
 
 
Řádka 59: Řádka 59:
 
|-
 
|-
 
|@Note
 
|@Note
|varchar(150)
+
|nvarchar(150)
 
|
 
|
 
|Note
 
|Note
Řádka 65: Řádka 65:
 
|-
 
|-
 
|@Purpose
 
|@Purpose
|varchar(150)
+
|nvarchar(150)
 
|
 
|
 
|Purpose
 
|Purpose
Řádka 85: Řádka 85:
 
  DECLARE @Price decimal(19, 4)
 
  DECLARE @Price decimal(19, 4)
 
  DECLARE @PriceInCurrency decimal(18, 4)
 
  DECLARE @PriceInCurrency decimal(18, 4)
  DECLARE @Note  varchar(150)
+
  DECLARE @Note  nvarchar(150)
  DECLARE @Purpose varchar(150)
+
  DECLARE @Purpose nvarchar(150)
 
   
 
   
  

Aktuální verze z 9. 11. 2018, 15:27

Description

Method allows You to update payment in system.

Exact name

API_UpdatePayment

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id API_GetPayments.ID
@DocumentID int ID of invoices from invoices list (see relation) API_GetInvoices.ID
@CurrencyID int ID of currency from currency list (see relation) API_GetCurrency.ID
@CurrencyIDInCurrency int ID of currency from currency list (see relation) API_GetCurrency.ID
@ExchangeRate decimal(18,6) Exchange rate
@Price decimal(19,4) Price
@PriceInCurrency decimal(18,4) Price in currency
@Note nvarchar(150) Note
@Purpose nvarchar(150) Purpose

Return

0 : OK
100 : Item could not be updated


Example

 DECLARE @return_value int
 DECLARE @ID int 
 DECLARE @CurrencyID int
 DECLARE @CurrencyIDInCurrency int
 DECLARE @ExchangeRate decimal(18, 6)
 DECLARE @Price decimal(19, 4)
 DECLARE @PriceInCurrency decimal(18, 4)
 DECLARE @Note  nvarchar(150)
 DECLARE @Purpose nvarchar(150)
 

 
 SELECT @ID = [ID],
 @CurrencyID = [CurrencyID]
 @CurrencyIDInCurrency = [CurrencyIDInCurrency]
 @ExchangeRate = [ExchangeRate]
 @Price = 0
 @PriceInCurrency = 0
 @Note = ''
 @Purpose = ''
 FROM   [API_GetPayments] 
 WHERE  DocumentID = 1
 
 
 EXECUTE @return_value = [API_UpdatePayment] 
  @ID, 
  @CurrencyID 
  @CurrencyIDInCurrency
  @ExchangeRate
  @Price
  @PriceInCurrency
  @Note
  @Purpose

Notices

None.