API UpdateCustomer: Porovnání verzí
Skočit na navigaci
Skočit na vyhledávání
Bez shrnutí editace |
Bez shrnutí editace |
||
| (Není zobrazeno 7 mezilehlých verzí od stejného uživatele.) | |||
| Řádek 100: | Řádek 100: | ||
| | | | ||
|- | |- | ||
|@ | |@Region | ||
| | |nvarchar(30) | ||
| | |||
|Region | |||
| | |||
|- | |||
|@Country | |||
|nvarchar(50) | |||
| | |||
|Country | |||
| | |||
|- | |||
|@FileMarkText | |||
|nvarchar(200) | |||
| | |||
|File mark text | |||
| | | | ||
|- | |- | ||
|@BranchID | |@BranchID | ||
| Řádek 129: | Řádek 141: | ||
|ID of currency from currency list (see relation) | |ID of currency from currency list (see relation) | ||
|API_GetCurrency.ID | |API_GetCurrency.ID | ||
|- | |||
|@State | |||
|int | |||
| | |||
|ID of country from country list (see relation) | |||
|API_GetCountry.ID | |||
|- | |- | ||
|@SendOrderConfirmationEmail | |@SendOrderConfirmationEmail | ||
| Řádek 164: | Řádek 182: | ||
| | | | ||
|Is supplier | |Is supplier | ||
| | | | ||
|- | |- | ||
| Řádek 182: | Řádek 188: | ||
| | | | ||
|Is competition | |Is competition | ||
| | | | ||
|- | |- | ||
| Řádek 266: | Řádek 266: | ||
| | | | ||
|ParentID | |ParentID | ||
| | |||
|- | |||
|@IsArchiving | |||
|int | |||
| | |||
|Is archiving | |||
| | |||
|- | |||
|@VisibleProductsAmountOnStockLimit | |||
|int | |||
| | |||
|Visible products amount on stock limit | |||
-1 = Default, | |||
0 = Picture, | |||
5 = up to 5 products, | |||
10 = up to 10 products, | |||
1000 = full amount | |||
| | |||
|- | |||
|@AreOrdersVisible | |||
|int | |||
| | |||
|Are visible orders: | |||
-1 = Default, | |||
0 = Off, | |||
1 = On | |||
| | |||
|- | |||
|@DeliveryAddressID | |||
|int | |||
| | |||
|ID of delivery address from customer list (see relation). | |||
-1 = Default | |||
|API_GetCustomers.ID | |||
|- | |||
|@DefaultPaymentType | |||
|int | |||
| | |||
|Default payment type: | |||
0 = Default - cash, | |||
1 = cash, | |||
2 = transfer | |||
| | |||
|- | |||
|@DueType | |||
|int | |||
| | |||
|IF @DefaultPaymentType = 2. Due type: | |||
0 = Default - Global setting, | |||
1 = Global setting, | |||
2 = Individual setting | |||
| | |||
|- | |||
|@DueDays | |||
|int | |||
| | |||
|If @DefaultPaymentType = 2 and @DueType = 2. Due days: | |||
0 = Default | |||
| | |||
|- | |||
|@CorrectionPaymentType | |||
|int | |||
| | |||
|Correction payment type: | |||
1 = Default - cash, | |||
2 = transfer | |||
| | |||
|- | |||
|@CorrectionPaymentRange | |||
|int | |||
| | |||
|If @CorrectionPaymentType = 2. Correction payment range: | |||
0 = Default - Global setting, | |||
1 = Individual setting | |||
| | |||
|- | |||
|@CorrectionPaymentRangeDays | |||
|int | |||
| | |||
|If @CorrectionPaymentType = 2 and @CorrectionPaymentRange = 1. Correction payment range days: | |||
0 = Default | |||
| | | | ||
|} | |} | ||
==== 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 @ShortName nvarchar(30) | DECLARE @ShortName nvarchar(30) | ||
| Řádek 314: | Řádek 411: | ||
DECLARE @GPSLongitude nvarchar(20) | DECLARE @GPSLongitude nvarchar(20) | ||
DECLARE @ParentID int | DECLARE @ParentID int | ||
DECLARE @IsArchiving int | |||
DECLARE @VisibleProductsAmountOnStockLimit int | |||
DECLARE @AreOrdersVisible int | |||
DECLARE @DeliveryAddressID int | |||
DECLARE @DefaultPaymentType int | |||
DECLARE @DueType int | |||
DECLARE @DueDays int | |||
DECLARE @CorrectionPaymentType int | |||
DECLARE @CorrectionPaymentRange int | |||
DECLARE @CorrectionPaymentRangeDays int | |||
SELECT @ID = [ID], | SELECT @ID = G.[ID], | ||
@ShortName = [ShortName], | @ShortName = G.[ShortName], | ||
@CompanyName = [CompanyName], | @CompanyName = G.[CompanyName], | ||
@CompanyRegistrationNumber = [CompanyRegistrationNumber], | @CompanyRegistrationNumber = G.[CompanyRegistrationNumber], | ||
@VATNumber = [VATNumber], | @VATNumber = G.[VATNumber], | ||
@VATNumber2 = [VATNumber2], | @VATNumber2 = G.[VATNumber2], | ||
@VATPayer = [VATPayer], | @VATPayer = G.[VATPayer], | ||
@TransportID = [TransportID], | @TransportID = G.[TransportID], | ||
@Username = [Username], | @Username = G.[Username], | ||
@Password = [Password], | @Password = G.[Password], | ||
@OrderConfirmationPassword = [OrderConfirmationPassword], | @OrderConfirmationPassword = G.[OrderConfirmationPassword], | ||
@Street = [Street], | @Street = G.[Street], | ||
@City = [City], | @City = G.[City], | ||
@ZIPCode = [ZIPCode], | @ZIPCode = G.[ZIPCode], | ||
@Region = [Region], | @Region = G.[Region], | ||
@Country = [Country], | @Country = G.[Country], | ||
@FileMarkText = [FileMarkText], | @FileMarkText = G.[FileMarkText], | ||
@BranchID = [BranchID], | @BranchID = G.[BranchID], | ||
@WorkshopID = [WorkshopID], | @WorkshopID = G.[WorkshopID], | ||
@StockID = [StockID], | @StockID = G.[StockID], | ||
@CurrencyID = [CurrencyID], | @CurrencyID = G.[CurrencyID], | ||
@State = [State], | @State = G.[State], | ||
@SendOrderConfirmationEmail = [SendOrderConfirmationEmail], | @SendOrderConfirmationEmail = G.[SendOrderConfirmationEmail], | ||
@OrderConfirmationEmail = [OrderConfirmationEmail], | @OrderConfirmationEmail = G.[OrderConfirmationEmail], | ||
@Email = [Email], | @Email = G.[Email], | ||
@EShopEMails = [EShopEMails], | @EShopEMails = G.[EShopEMails], | ||
@IsBuyer = [IsBuyer], | @IsBuyer = G.[IsBuyer], | ||
@IsSupplier = [IsSupplier], | @IsSupplier = G.[IsSupplier], | ||
@IsCompetition = [IsCompetition], | @IsCompetition = G.[IsCompetition], | ||
@IsWSInvoicesExportAllowed = [IsWSInvoicesExportAllowed], | @IsWSInvoicesExportAllowed = G.[IsWSInvoicesExportAllowed], | ||
@IsWSDeliveryNotesExportAllowed = [IsWSDeliveryNotesExportAllowed], | @IsWSDeliveryNotesExportAllowed = G.[IsWSDeliveryNotesExportAllowed], | ||
@IsWSImportOrdersAllowed = [IsWSImportOrdersAllowed], | @IsWSImportOrdersAllowed = G.[IsWSImportOrdersAllowed], | ||
@StoreBackOrder = [StoreBackOrder], | @StoreBackOrder = G.[StoreBackOrder], | ||
@IsSupplierIndividualOrders = [IsSupplierIndividualOrders], | @IsSupplierIndividualOrders = G.[IsSupplierIndividualOrders], | ||
@IsSupplierShortcut = [IsSupplierShortcut], | @IsSupplierShortcut = G.[IsSupplierShortcut], | ||
@Note = [Note], | @Note = G.[Note], | ||
@Note2 = [Note2], | @Note2 = G.[Note2], | ||
@GlobalPricing = [GlobalPricing], | @GlobalPricing = G.[GlobalPricing], | ||
@OrderGroup = [OrderGroup], | @OrderGroup = G.[OrderGroup], | ||
@GPSLatitude = [GPSLatitude], | @GPSLatitude = G.[GPSLatitude], | ||
@GPSLongitude = [GPSLongitude], | @GPSLongitude = G.[GPSLongitude], | ||
@ParentID = [ParentID] | @ParentID = G.[ParentID], | ||
FROM [API_GetCustomers] | @IsArchiving = G.[IsArchiving], | ||
WHERE | @VisibleProductsAmountOnStockLimit = G.[VisibleProductsAmountOnStockLimit], | ||
@AreOrdersVisible = G.[AreOrdersVisible], | |||
@DeliveryAddressID = G.[DeliveryAddressID], | |||
@DefaultPaymentType = S.[DefaultPaymentType], | |||
@DueType = S.[DueType], | |||
@DueDays = S.[DueDays], | |||
@CorrectionPaymentType = S.[CorrectionPaymentType], | |||
@CorrectionPaymentRange = S.[CorrectionPaymentRange], | |||
@CorrectionPaymentRangeDays = S.[CorrectionPaymentRangeDays] | |||
FROM [API_GetCustomers] G | |||
LEFT JOIN [API_GetCustomerSettings] S ON G.ID = S.CustomerID | |||
WHERE G.ID = 3 | |||
EXECUTE [API_UpdateCustomer] | EXECUTE @return_value = [API_UpdateCustomer] | ||
@ID, | @ID, | ||
@ShortName, | @ShortName, | ||
| Řádek 403: | Řádek 520: | ||
@GPSLatitude, | @GPSLatitude, | ||
@GPSLongitude, | @GPSLongitude, | ||
@ParentID | @ParentID, | ||
@IsArchiving, | |||
@VisibleProductsAmountOnStockLimit, | |||
@AreOrdersVisible, | |||
@DeliveryAddressID, | |||
@DefaultPaymentType, | |||
@DueType, | |||
@DueDays, | |||
@CorrectionPaymentType, | |||
@CorrectionPaymentRange, | |||
@CorrectionPaymentRangeDays | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Aktuální verze z 13. 8. 2020, 10:24
Description
Method allows You to update customer in system.
Exact name
API_UpdateCustomer
Type
Standard executable stored procedure.
Specification
| Parameter | Data type | Value range | Description | Relation |
|---|---|---|---|---|
| @ID | int | Internal system id | API_GetCustomers.ID | |
| @ShortName | nvarchar(30) | Short name | ||
| @CompanyName | nvarchar(250) | Company name | ||
| @CompanyRegistrationNumber | nvarchar(20) | Company registration number | ||
| @VATNumber | nvarchar(20) | VAT number | ||
| @VATNumber2 | nvarchar(15) | VAT number 2 | ||
| @VATPayer | int | VATPayer | ||
| @TransportID | int | ID of transport from transport list (see relation) | API_GetTransports.ID | |
| @Username | nvarchar(255) | Username | ||
| @Password | nvarchar(25) | Password | ||
| @OrderConfirmationPassword | nvarchar(25) | Order confirmation password | ||
| @Street | nvarchar(100) | Street | ||
| @City | nvarchar(80) | City | ||
| @ZIPCode | nvarchar(15) | ZIP code | ||
| @Region | nvarchar(30) | Region | ||
| @Country | nvarchar(50) | Country | ||
| @FileMarkText | nvarchar(200) | File mark text | ||
| @BranchID | int | ID of branche from branch list (see relation) | API_GetBranches.ID | |
| @WorkshopID | int | ID of workshop from workshop list (see relation) | API_GetWorkshops.ID | |
| @StockID | int | ID of stock from stock list (see relation) | API_GetStocks.ID | |
| @CurrencyID | int | ID of currency from currency list (see relation) | API_GetCurrency.ID | |
| @State | int | ID of country from country list (see relation) | API_GetCountry.ID | |
| @SendOrderConfirmationEmail | int | Send order confirmation email | ||
| @OrderConfirmationEmail | nvarchar(100) | Order confirmation email | ||
| nvarchar(100) | ||||
| @EshopEmails | nvarchar(400) | Eshop emails | ||
| @IsBuyer | int | Is buyer | ||
| @IsSupplier | int | Is supplier | ||
| @IsCompetition | int | Is competition | ||
| @IsWSInvoicesExportAllowed | bit | Is WS invoices export allowed | ||
| @IsWSDeliveryNotesExportAllowed | bit | Is WS delivery notes export Allowed | ||
| @IsWSImportOrdersAllowed | bit | Is WS import orders Allowed | ||
| @StoreBackOrder | int | Store backorder | ||
| @IsSupplierIndividualOrders | int | Is supplier individual orders | ||
| @IsSupplierShortcut | nvarchar(10) | Is supplier shortcut | ||
| @Note | nvarchar(500) | Note | ||
| @Note2 | nvarchar(500) | Note 2 | ||
| @GlobalPricing | int | Global pricing | ||
| @OrderGroup | nvarchar(10) | Order group | ||
| @GPSLatitude | nvarchar(20) | GPS latitude | ||
| @GPSLongitude | nvarchar(20) | GPS longitude | ||
| @ParentID | int | ParentID | ||
| @IsArchiving | int | Is archiving | ||
| @VisibleProductsAmountOnStockLimit | int | Visible products amount on stock limit
-1 = Default, 0 = Picture, 5 = up to 5 products, 10 = up to 10 products, 1000 = full amount |
||
| @AreOrdersVisible | int | Are visible orders:
-1 = Default, 0 = Off, 1 = On |
||
| @DeliveryAddressID | int | ID of delivery address from customer list (see relation).
-1 = Default |
API_GetCustomers.ID | |
| @DefaultPaymentType | int | Default payment type:
0 = Default - cash, 1 = cash, 2 = transfer |
||
| @DueType | int | IF @DefaultPaymentType = 2. Due type:
0 = Default - Global setting, 1 = Global setting, 2 = Individual setting |
||
| @DueDays | int | If @DefaultPaymentType = 2 and @DueType = 2. Due days:
0 = Default |
||
| @CorrectionPaymentType | int | Correction payment type:
1 = Default - cash, 2 = transfer |
||
| @CorrectionPaymentRange | int | If @CorrectionPaymentType = 2. Correction payment range:
0 = Default - Global setting, 1 = Individual setting |
||
| @CorrectionPaymentRangeDays | int | If @CorrectionPaymentType = 2 and @CorrectionPaymentRange = 1. Correction payment range days:
0 = Default |
Return
0 : OK 100 : Item could not be updated
Example
DECLARE @return_value int
DECLARE @ID int
DECLARE @ShortName nvarchar(30)
DECLARE @CompanyName nvarchar(250)
DECLARE @CompanyRegistrationNumber nvarchar(20)
DECLARE @VATNumber nvarchar(20)
DECLARE @VATNumber2 nvarchar(15)
DECLARE @VATPayer int
DECLARE @TransportID int
DECLARE @Username nvarchar(20)
DECLARE @Password nvarchar(25)
DECLARE @OrderConfirmationPassword nvarchar(25)
DECLARE @Street nvarchar(100)
DECLARE @City nvarchar(80)
DECLARE @ZIPCode nvarchar(15)
DECLARE @Region nvarchar(30)
DECLARE @Country nvarchar(50)
DECLARE @FileMarkText nvarchar(200)
DECLARE @BranchID int
DECLARE @WorkshopID int
DECLARE @StockID int
DECLARE @CurrencyID int
DECLARE @State int
DECLARE @SendOrderConfirmationEmail int
DECLARE @OrderConfirmationEmail nvarchar(100)
DECLARE @Email nvarchar(100)
DECLARE @EShopEMails nvarchar(400)
DECLARE @IsBuyer bit
DECLARE @IsSupplier bit
DECLARE @IsCompetition bit
DECLARE @IsWSInvoicesExportAllowed bit
DECLARE @IsWSDeliveryNotesExportAllowed bit
DECLARE @IsWSImportOrdersAllowed bit
DECLARE @StoreBackOrder bit
DECLARE @IsSupplierIndividualOrders bit
DECLARE @IsSupplierShortcut nvarchar(10)
DECLARE @Note nvarchar(500)
DECLARE @Note2 nvarchar(500)
DECLARE @GlobalPricing bit
DECLARE @OrderGroup nvarchar(10)
DECLARE @GPSLatitude nvarchar(20)
DECLARE @GPSLongitude nvarchar(20)
DECLARE @ParentID int
DECLARE @IsArchiving int
DECLARE @VisibleProductsAmountOnStockLimit int
DECLARE @AreOrdersVisible int
DECLARE @DeliveryAddressID int
DECLARE @DefaultPaymentType int
DECLARE @DueType int
DECLARE @DueDays int
DECLARE @CorrectionPaymentType int
DECLARE @CorrectionPaymentRange int
DECLARE @CorrectionPaymentRangeDays int
SELECT @ID = G.[ID],
@ShortName = G.[ShortName],
@CompanyName = G.[CompanyName],
@CompanyRegistrationNumber = G.[CompanyRegistrationNumber],
@VATNumber = G.[VATNumber],
@VATNumber2 = G.[VATNumber2],
@VATPayer = G.[VATPayer],
@TransportID = G.[TransportID],
@Username = G.[Username],
@Password = G.[Password],
@OrderConfirmationPassword = G.[OrderConfirmationPassword],
@Street = G.[Street],
@City = G.[City],
@ZIPCode = G.[ZIPCode],
@Region = G.[Region],
@Country = G.[Country],
@FileMarkText = G.[FileMarkText],
@BranchID = G.[BranchID],
@WorkshopID = G.[WorkshopID],
@StockID = G.[StockID],
@CurrencyID = G.[CurrencyID],
@State = G.[State],
@SendOrderConfirmationEmail = G.[SendOrderConfirmationEmail],
@OrderConfirmationEmail = G.[OrderConfirmationEmail],
@Email = G.[Email],
@EShopEMails = G.[EShopEMails],
@IsBuyer = G.[IsBuyer],
@IsSupplier = G.[IsSupplier],
@IsCompetition = G.[IsCompetition],
@IsWSInvoicesExportAllowed = G.[IsWSInvoicesExportAllowed],
@IsWSDeliveryNotesExportAllowed = G.[IsWSDeliveryNotesExportAllowed],
@IsWSImportOrdersAllowed = G.[IsWSImportOrdersAllowed],
@StoreBackOrder = G.[StoreBackOrder],
@IsSupplierIndividualOrders = G.[IsSupplierIndividualOrders],
@IsSupplierShortcut = G.[IsSupplierShortcut],
@Note = G.[Note],
@Note2 = G.[Note2],
@GlobalPricing = G.[GlobalPricing],
@OrderGroup = G.[OrderGroup],
@GPSLatitude = G.[GPSLatitude],
@GPSLongitude = G.[GPSLongitude],
@ParentID = G.[ParentID],
@IsArchiving = G.[IsArchiving],
@VisibleProductsAmountOnStockLimit = G.[VisibleProductsAmountOnStockLimit],
@AreOrdersVisible = G.[AreOrdersVisible],
@DeliveryAddressID = G.[DeliveryAddressID],
@DefaultPaymentType = S.[DefaultPaymentType],
@DueType = S.[DueType],
@DueDays = S.[DueDays],
@CorrectionPaymentType = S.[CorrectionPaymentType],
@CorrectionPaymentRange = S.[CorrectionPaymentRange],
@CorrectionPaymentRangeDays = S.[CorrectionPaymentRangeDays]
FROM [API_GetCustomers] G
LEFT JOIN [API_GetCustomerSettings] S ON G.ID = S.CustomerID
WHERE G.ID = 3
EXECUTE @return_value = [API_UpdateCustomer]
@ID,
@ShortName,
@CompanyName,
@CompanyRegistrationNumber,
@VATNumber,
@VATNumber2,
@VATPayer,
@TransportID,
@Username,
@Password,
@OrderConfirmationPassword,
@Street,
@City,
@ZIPCode,
@Region,
@Country,
@FileMarkText,
@BranchID,
@WorkshopID,
@StockID,
@CurrencyID,
@State,
@SendOrderConfirmationEmail,
@OrderConfirmationEmail,
@Email,
@EShopEMails,
@IsBuyer,
@IsSupplier,
@IsCompetition,
@IsWSInvoicesExportAllowed,
@IsWSDeliveryNotesExportAllowed,
@IsWSImportOrdersAllowed,
@StoreBackOrder,
@IsSupplierIndividualOrders,
@IsSupplierShortcut,
@Note,
@Note2,
@GlobalPricing,
@OrderGroup,
@GPSLatitude,
@GPSLongitude,
@ParentID,
@IsArchiving,
@VisibleProductsAmountOnStockLimit,
@AreOrdersVisible,
@DeliveryAddressID,
@DefaultPaymentType,
@DueType,
@DueDays,
@CorrectionPaymentType,
@CorrectionPaymentRange,
@CorrectionPaymentRangeDays
Notices
None.