Add function to retrieve company address as JSON and update invoice procedures
- Created a new function `fds__getCompanyAddressJson` to return a company's postal address as a structured JSON object. - Modified stored procedures `fds__createInvoice`, `fds__setInvoice`, and `fds__prepInvoice` to include a new parameter `@SendToAddressJson` for handling the address data. - Updated the invoice table and user-defined types to accommodate the new `SendToAddressJson` field. - Ensured that the address data is properly retrieved and stored in the invoice records.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
[IsCanceled] AS (CONVERT([bit],case when [DateCancelled] IS NULL then (0) else (1) end)),
|
||||
[Replaces_InvId] VARCHAR (50) NULL,
|
||||
[CustomValues] NVARCHAR (MAX) NULL,
|
||||
[SendToAddressJson] NVARCHAR (MAX) NULL,
|
||||
[DateSent] DATETIME NULL,
|
||||
[UserSent] VARCHAR (25) NULL,
|
||||
[DateFinalized] DATETIME NULL,
|
||||
|
||||
Reference in New Issue
Block a user