API CreateDeliveryNote: 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 create new delivery note in system. ==== Exact name ==== <code>API_CreateDeliveryNote</code> ==== Type ==== St…“)
 
 
(Není zobrazeno 6 mezilehlých verzí od stejného uživatele.)
Řádka 16: Řádka 16:
 
!Relation
 
!Relation
 
|-  
 
|-  
|StockID
+
|@StockID
 
|int  
 
|int  
 +
|
 
|ID of stock from stock list (see relation)
 
|ID of stock from stock list (see relation)
 
| API_GetStocks.ID
 
| API_GetStocks.ID
 
|-  
 
|-  
|BranchID
+
|@BranchID
 
|int  
 
|int  
 +
|
 
|ID of branch from branch list (see relation)
 
|ID of branch from branch list (see relation)
 
| API_GetBranches.ID
 
| API_GetBranches.ID
 
|-  
 
|-  
|SupplierID
+
|@SupplierID
 
|int  
 
|int  
 +
|
 
|ID of customer from customer list (see relation)
 
|ID of customer from customer list (see relation)
 
| API_GetCustomers.ID
 
| API_GetCustomers.ID
 
|-  
 
|-  
|OrdererID
+
|@OrdererID
 
|int  
 
|int  
 +
|
 
|ID of customer from customer list (see relation)
 
|ID of customer from customer list (see relation)
 
| API_GetCustomers.ID
 
| API_GetCustomers.ID
 
|-  
 
|-  
|RecipientID
+
|@RecipientID
 
|int  
 
|int  
 +
|
 
|ID of customer from customer list (see relation)
 
|ID of customer from customer list (see relation)
 
| API_GetCustomers.ID
 
| API_GetCustomers.ID
 
|-  
 
|-  
|TransportID
+
|@TransportID
 
|int  
 
|int  
 +
|
 
|ID of transport from transport list (see relation)
 
|ID of transport from transport list (see relation)
 
| API_GetTransports.ID
 
| API_GetTransports.ID
 
|-  
 
|-  
|PaymentTypeID
+
|@PaymentTypeID
 
|int  
 
|int  
 +
|
 
|Payment type ID.
 
|Payment type ID.
 
-1 - _NA
 
-1 - _NA
Řádka 64: Řádka 71:
 
|  
 
|  
 
|-  
 
|-  
|CurrencyID
+
|@CurrencyID
 
|int  
 
|int  
 +
|
 
|ID of currency from currency list (see relation)
 
|ID of currency from currency list (see relation)
 
| API_GetCurrency.ID
 
| API_GetCurrency.ID
 
|-  
 
|-  
|_del_Kurz
+
|@Number
|decimal(18,6)  
+
|nvarchar(25)  
|Exchange Rate
+
|
|
 
|-
 
|Number
 
|varchar(25)
 
 
|Number
 
|Number
 
|  
 
|  
 
|-  
 
|-  
|Date
+
|@Date
 
|datetime  
 
|datetime  
 +
|
 
|Date
 
|Date
 
|  
 
|  
 
|-  
 
|-  
|OrdererName
+
|@OrdererName
|varchar(140)  
+
|nvarchar(140)  
 +
|
 
|Orderer name
 
|Orderer name
 
|  
 
|  
 
|-  
 
|-  
|OrdererStreet
+
|@OrdererStreet
|varchar(100)  
+
|nvarchar(100)  
 +
|
 
|Orderer street
 
|Orderer street
 
|  
 
|  
 
|-  
 
|-  
|OrdererCity
+
|@OrdererCity
|varchar(140)  
+
|nvarchar(140)  
 +
|
 
|Orderer city
 
|Orderer city
 
|  
 
|  
 
|-  
 
|-  
|OrdererZIPCode
+
|@OrdererZIPCode
|char(10)  
+
|nvarchar(10)  
 +
|
 
|Orderer ZIP code
 
|Orderer ZIP code
 
|  
 
|  
 
|-  
 
|-  
|OrdererCountry
+
|@OrdererCountry
|varchar(50)  
+
|nvarchar(50)  
 +
|
 
|Orderer country
 
|Orderer country
 
|  
 
|  
 
|-  
 
|-  
|OrdererRegion
+
|@OrdererRegion
|varchar(30)  
+
|nvarchar(30)  
 +
|
 
|Orderer region
 
|Orderer region
 
|  
 
|  
 
|-  
 
|-  
|OrdererState
+
|@OrdererState
|varchar(50)  
+
|nvarchar(50)  
 +
|
 
|Orderer state
 
|Orderer state
 
|  
 
|  
 
|-  
 
|-  
|CompanyRegistrationNumber
+
|@CompanyRegistrationNumber
|char(20)  
+
|nvarchar(20)  
 +
|
 
|Company registration number
 
|Company registration number
 
|  
 
|  
 
|-  
 
|-  
|VATNumber
+
|@VATNumber
|char(20)  
+
|nvarchar(20)  
 +
|
 
|VAT number
 
|VAT number
 
|  
 
|  
 
|-  
 
|-  
|RecipientName
+
|@RecipientName
|varchar(140)  
+
|nvarchar(140)  
 +
|
 
|Recipient name
 
|Recipient name
 
|  
 
|  
 
|-  
 
|-  
|RecipientStreet
+
|@RecipientStreet
|varchar(100)  
+
|nvarchar(100)  
 +
|
 
|Recipient street
 
|Recipient street
 
|  
 
|  
 
|-  
 
|-  
|RecipientCity
+
|@RecipientCity
|varchar(140)  
+
|nvarchar(140)  
 +
|
 
|Recipient city
 
|Recipient city
 
|  
 
|  
 
|-  
 
|-  
|RecipientZIPCode
+
|@RecipientZIPCode
|char(10)  
+
|nvarchar(10)  
 +
|
 
|Recipient ZIP code
 
|Recipient ZIP code
 
|  
 
|  
 
|-  
 
|-  
|RecipientCountry
+
|@RecipientCountry
|varchar(50)  
+
|nvarchar(50)  
 +
|
 
|Recipient country
 
|Recipient country
 
|  
 
|  
 
|-  
 
|-  
|RecipientRegion
+
|@RecipientRegion
|varchar(30)  
+
|nvarchar(30)  
 +
|
 
|Recipient region
 
|Recipient region
 
|  
 
|  
 
|-  
 
|-  
|RecipientState
+
|@RecipientState
|varchar(50)  
+
|nvarchar(50)  
 +
|
 
|Recipient state
 
|Recipient state
 
|  
 
|  
 
|-  
 
|-  
|RecipientNote
+
|@RecipientNote
 
|nvarchar(250)  
 
|nvarchar(250)  
 +
|
 
|Recipient note
 
|Recipient note
 
|  
 
|  
 
|-  
 
|-  
|IsCanceled
+
|@IsCanceled
 
|int  
 
|int  
 +
|
 
|Is canceled
 
|Is canceled
 
|  
 
|  
 
|-  
 
|-  
|IsCancelReason
+
|@IsCancelReason
|varchar(150)  
+
|nvarchar(150)  
 +
|
 
|Is cancel reason
 
|Is cancel reason
 
|  
 
|  
 
|-  
 
|-  
|IsCancelDate
+
|@IsCancelDate
 
|datetime  
 
|datetime  
 +
|
 
|Is cancel date
 
|Is cancel date
 
|  
 
|  
 
|-  
 
|-  
|Note
+
|@Note
|varchar(300)  
+
|nvarchar(300)  
 +
|
 
|Note
 
|Note
 
|  
 
|  
 
|-  
 
|-  
|OrdererPhone
+
|@OrdererPhone
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Orderer phone
 
|Orderer phone
 
|  
 
|  
 
|-  
 
|-  
|OrdererFax
+
|@OrdererFax
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Orderer fax
 
|Orderer fax
 
|  
 
|  
 
|-  
 
|-  
|OrdererMobilePhone
+
|@OrdererMobilePhone
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Orderer mobile phone
 
|Orderer mobile phone
 
|  
 
|  
 
|-  
 
|-  
|OrdererEmail
+
|@OrdererEmail
 
|nvarchar(60)  
 
|nvarchar(60)  
 +
|
 
|Orderer email
 
|Orderer email
 
|  
 
|  
 
|-  
 
|-  
|OrdererUrl
+
|@OrdererUrl
 
|nvarchar(50)  
 
|nvarchar(50)  
 +
|
 
|Orderer url
 
|Orderer url
 
|  
 
|  
 
|-  
 
|-  
|RecipientPhone
+
|@RecipientPhone
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Recipient phone
 
|Recipient phone
 
|  
 
|  
 
|-  
 
|-  
|RecipientFax
+
|@RecipientFax
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Recipient fax
 
|Recipient fax
 
|  
 
|  
 
|-  
 
|-  
|RecipientMobilePhone
+
|@RecipientMobilePhone
 
|nvarchar(30)  
 
|nvarchar(30)  
 +
|
 
|Recipient mobile phone
 
|Recipient mobile phone
 
|  
 
|  
 
|-  
 
|-  
|Recipient email
+
|@RecipientEmail
 
|nvarchar(60)  
 
|nvarchar(60)  
 +
|
 
|Recipient email
 
|Recipient email
 
|  
 
|  
 
|-  
 
|-  
|RecipientUrl
+
|@RecipientUrl
 
|nvarchar(50)  
 
|nvarchar(50)  
 +
|
 
|Recipient url
 
|Recipient url
 
|  
 
|  
 
|-  
 
|-  
|RecipientCompanyRegistrationNumber
+
|@RecipientCompanyRegistrationNumber
|char(20)  
+
|nvarchar(20)  
 +
|
 
|Recipient company registration number
 
|Recipient company registration number
 
|  
 
|  
 
|-  
 
|-  
|RecipientVATNumber
+
|@RecipientVATNumber
|char(20)  
+
|nvarchar(20)  
 +
|
 
|Recipient VAT number
 
|Recipient VAT number
 
|  
 
|  
 
|-  
 
|-  
|OrdererBankName
+
|@OrdererBankName
 
|nvarchar(120)  
 
|nvarchar(120)  
 +
|
 
|Orderer bank name
 
|Orderer bank name
 
|  
 
|  
 
|-  
 
|-  
|OrdererBankAccount
+
|@OrdererBankAccount
 
|nvarchar(50)  
 
|nvarchar(50)  
 +
|
 
|Orderer bank account
 
|Orderer bank account
 
|  
 
|  
 
|-  
 
|-  
|OrdererVATNumber2
+
|@OrdererVATNumber2
|char(20)  
+
|nvarchar(20)  
 +
|
 
|Orderer VAT number 2
 
|Orderer VAT number 2
 
|  
 
|  
 
|-  
 
|-  
|RecipientVATNumber2
+
|@RecipientVATNumber2
|char(20)  
+
|nvarchar(20)  
 +
|
 
|Recipient VAT number 2
 
|Recipient VAT number 2
 
|  
 
|  
 
|-  
 
|-  
|IsPrinted
+
|@IsPrinted
 
|int  
 
|int  
 +
|
 
|Is printed
 
|Is printed
 
|  
 
|  
 
|-  
 
|-  
|PrintedDate
+
|@PrintedDate
 
|date  
 
|date  
 +
|
 
|Printed date
 
|Printed date
 
|  
 
|  
 
|-  
 
|-  
|StornoDocument
+
|@StornoDocument
 
|int  
 
|int  
 +
|
 
|Storno document
 
|Storno document
 
|  
 
|  
 
|-  
 
|-  
|StornoDocumentOriginID
+
|@StornoDocumentOriginID
 
|int  
 
|int  
 +
|
 
|ID of delivery note from delivery note list (see relation)
 
|ID of delivery note from delivery note list (see relation)
 
| API_GetDeliveryNote.ID
 
| API_GetDeliveryNote.ID
 
|-  
 
|-  
|CurrencyInCurrencyID
+
|@CurrencyInCurrencyID
 
|int  
 
|int  
 +
|
 
|ID of currency from currency list (see relation)
 
|ID of currency from currency list (see relation)
 
| API_GetCurrency.ID
 
| API_GetCurrency.ID
 
|-  
 
|-  
|ExchangeRate
+
|@ExchangeRate
 
|decimal(18,2)  
 
|decimal(18,2)  
 +
|
 
|Exchange rate
 
|Exchange rate
 
|  
 
|  
 
|}
 
|}
 +
 +
==== Return ====
 +
0 : OK
 +
100 : Item could not be created
  
 
==== Example ====
 
==== Example ====
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
EXEC [API_CreateDeliveryNote] @Name = 'Name' ,@Description= 'Description'
+
DECLARE @return_value int
 +
DECLARE @d datetime
 +
set @d = getdate()
 +
 
 +
EXEC @return_value = [API_CreateDeliveryNote] @StockID= 1 ,@BranchID= 1 ,@SupplierID= 10 ,@OrdererID= 10 ,@RecipientID= 10 ,@TransportID= -1 ,@PaymentTypeID= 1 ,@CurrencyID= 16034 ,@Number= 'WZ-0001' ,@Date= @d ,@OrdererName= 'OrdererName' ,@OrdererStreet= 'OrdererStreet' ,@OrdererCity= 'OrdererCity' ,@OrdererZIPCode= 'OrdererZIPCode' ,@OrdererCountry= 'OrdererCountry' ,@OrdererRegion= 'OrdererRegion' ,@OrdererState= 'OrdererState' ,@CompanyRegistrationNumber= 'CompanyRegistrationNumber' ,@VATNumber= 'VATNumber' ,@RecipientName= 'RecipientName' ,@RecipientStreet= 'RecipientStreet' ,@RecipientCity= 'RecipientCity' ,@RecipientZIPCode= 'RecipientZIPCode' ,@RecipientCountry= 'RecipientCountry' ,@RecipientRegion= 'RecipientRegion' ,@RecipientState= 'RecipientState' ,@RecipientNote= 'RecipientNote' ,@IsCanceled= 0 ,@IsCancelReason= '' ,@IsCancelDate= NULL ,@Note= '' ,@OrdererPhone= 'OrdererPhone' ,@OrdererFax= 'OrdererFax' ,@OrdererMobilePhone= 'OrdererMobilePhone' ,@OrdererEmail= 'OrdererEmail' ,@OrdererUrl= 'OrdererUrl' ,@RecipientPhone= 'RecipientPhone' ,@RecipientFax= 'RecipientFax' ,@RecipientMobilePhone= 'RecipientMobilePhone' ,@RecipientEmail= 'RecipientEmail' ,@RecipientUrl= 'RecipientUrl' ,@RecipientCompanyRegistrationNumber= 'RecipientCompanyRegistrationNumber' ,@RecipientVATNumber= 'RecipientVATNumber' ,@OrdererBankName= 'OrdererBankName' ,@OrdererBankAccount= 'OrdererBankAccount' ,@OrdererVATNumber2= 'OrdererVATNumber2' ,@RecipientVATNumber2= 'RecipientVATNumber2' ,@IsPrinted= 0 ,@PrintedDate= NULL ,@StornoDocument= -1 ,@StornoDocumentOriginID= -1 ,@CurrencyInCurrencyID= 16034 ,@ExchangeRate= 1
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
==== Notices ====
 
==== Notices ====
 
None.
 
None.

Aktuální verze z 9. 11. 2018, 12:29

Description

Method allows You to create new delivery note in system.

Exact name

API_CreateDeliveryNote

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@StockID int ID of stock from stock list (see relation) API_GetStocks.ID
@BranchID int ID of branch from branch list (see relation) API_GetBranches.ID
@SupplierID int ID of customer from customer list (see relation) API_GetCustomers.ID
@OrdererID int ID of customer from customer list (see relation) API_GetCustomers.ID
@RecipientID int ID of customer from customer list (see relation) API_GetCustomers.ID
@TransportID int ID of transport from transport list (see relation) API_GetTransports.ID
@PaymentTypeID int Payment type ID.

-1 - _NA

1 - Cash

2 - WireTransfer

3 - CreditCard

4 - Before

5 - Voucher

6 - CashOnDelivery

@CurrencyID int ID of currency from currency list (see relation) API_GetCurrency.ID
@Number nvarchar(25) Number
@Date datetime Date
@OrdererName nvarchar(140) Orderer name
@OrdererStreet nvarchar(100) Orderer street
@OrdererCity nvarchar(140) Orderer city
@OrdererZIPCode nvarchar(10) Orderer ZIP code
@OrdererCountry nvarchar(50) Orderer country
@OrdererRegion nvarchar(30) Orderer region
@OrdererState nvarchar(50) Orderer state
@CompanyRegistrationNumber nvarchar(20) Company registration number
@VATNumber nvarchar(20) VAT number
@RecipientName nvarchar(140) Recipient name
@RecipientStreet nvarchar(100) Recipient street
@RecipientCity nvarchar(140) Recipient city
@RecipientZIPCode nvarchar(10) Recipient ZIP code
@RecipientCountry nvarchar(50) Recipient country
@RecipientRegion nvarchar(30) Recipient region
@RecipientState nvarchar(50) Recipient state
@RecipientNote nvarchar(250) Recipient note
@IsCanceled int Is canceled
@IsCancelReason nvarchar(150) Is cancel reason
@IsCancelDate datetime Is cancel date
@Note nvarchar(300) Note
@OrdererPhone nvarchar(30) Orderer phone
@OrdererFax nvarchar(30) Orderer fax
@OrdererMobilePhone nvarchar(30) Orderer mobile phone
@OrdererEmail nvarchar(60) Orderer email
@OrdererUrl nvarchar(50) Orderer url
@RecipientPhone nvarchar(30) Recipient phone
@RecipientFax nvarchar(30) Recipient fax
@RecipientMobilePhone nvarchar(30) Recipient mobile phone
@RecipientEmail nvarchar(60) Recipient email
@RecipientUrl nvarchar(50) Recipient url
@RecipientCompanyRegistrationNumber nvarchar(20) Recipient company registration number
@RecipientVATNumber nvarchar(20) Recipient VAT number
@OrdererBankName nvarchar(120) Orderer bank name
@OrdererBankAccount nvarchar(50) Orderer bank account
@OrdererVATNumber2 nvarchar(20) Orderer VAT number 2
@RecipientVATNumber2 nvarchar(20) Recipient VAT number 2
@IsPrinted int Is printed
@PrintedDate date Printed date
@StornoDocument int Storno document
@StornoDocumentOriginID int ID of delivery note from delivery note list (see relation) API_GetDeliveryNote.ID
@CurrencyInCurrencyID int ID of currency from currency list (see relation) API_GetCurrency.ID
@ExchangeRate decimal(18,2) Exchange rate

Return

0 : OK
100 : Item could not be created

Example

DECLARE @return_value int
DECLARE @d datetime
set @d = getdate()

 EXEC @return_value = [API_CreateDeliveryNote] @StockID= 1 ,@BranchID= 1 ,@SupplierID= 10 ,@OrdererID= 10 ,@RecipientID= 10 ,@TransportID= -1 ,@PaymentTypeID= 1 ,@CurrencyID= 16034 ,@Number= 'WZ-0001' ,@Date= @d ,@OrdererName= 'OrdererName' ,@OrdererStreet= 'OrdererStreet' ,@OrdererCity= 'OrdererCity' ,@OrdererZIPCode= 'OrdererZIPCode' ,@OrdererCountry= 'OrdererCountry' ,@OrdererRegion= 'OrdererRegion' ,@OrdererState= 'OrdererState' ,@CompanyRegistrationNumber= 'CompanyRegistrationNumber' ,@VATNumber= 'VATNumber' ,@RecipientName= 'RecipientName' ,@RecipientStreet= 'RecipientStreet' ,@RecipientCity= 'RecipientCity' ,@RecipientZIPCode= 'RecipientZIPCode' ,@RecipientCountry= 'RecipientCountry' ,@RecipientRegion= 'RecipientRegion' ,@RecipientState= 'RecipientState' ,@RecipientNote= 'RecipientNote' ,@IsCanceled= 0 ,@IsCancelReason= '' ,@IsCancelDate= NULL ,@Note= '' ,@OrdererPhone= 'OrdererPhone' ,@OrdererFax= 'OrdererFax' ,@OrdererMobilePhone= 'OrdererMobilePhone' ,@OrdererEmail= 'OrdererEmail' ,@OrdererUrl= 'OrdererUrl' ,@RecipientPhone= 'RecipientPhone' ,@RecipientFax= 'RecipientFax' ,@RecipientMobilePhone= 'RecipientMobilePhone' ,@RecipientEmail= 'RecipientEmail' ,@RecipientUrl= 'RecipientUrl' ,@RecipientCompanyRegistrationNumber= 'RecipientCompanyRegistrationNumber' ,@RecipientVATNumber= 'RecipientVATNumber' ,@OrdererBankName= 'OrdererBankName' ,@OrdererBankAccount= 'OrdererBankAccount' ,@OrdererVATNumber2= 'OrdererVATNumber2' ,@RecipientVATNumber2= 'RecipientVATNumber2' ,@IsPrinted= 0 ,@PrintedDate= NULL ,@StornoDocument= -1 ,@StornoDocumentOriginID= -1 ,@CurrencyInCurrencyID= 16034 ,@ExchangeRate= 1

Notices

None.