CreateInvoiceWithAttachment
To let end users upload attachment to an invoice.
Execute
Create an invoice with attachment:
INSERT INTO InvoiceLineItems#TEMP (Name, Amount) Values ('E', 200 ) EXECUTE CreateInvoiceWithAttachment Atatchment = 'C:\files\log.txt', CustomerId = '33578', CreateDate = '2023-11-06', LinesAggregate= InvoiceLineItems#TEMP
Input
Name | Type | Required | Description |
Attachment | String | False | The full path of the attachment to upload. |
CustomerId | Integer | True | Client Id unique to this system. |
CreateDate | Date | True | Date invoice was created. (YYYY-MM-DD) |
LinesAggregate | String | False | An aggregate of lines associated with an invoice. See the help for the Invoices table for more information on inserting and updating to this field. |
FileName | String | False | Name of the file. If content is not empty. |
OwnerId | Integer | False | Id of the invoice's creator. (writable on create only) |
EstimateId | Integer | False | Id of associated estimate, 0 if none.(writable on create only) |
BasecampId | Integer | False | Id of connected basecamp account, 0 if none.(writable on create only) |
SentId | Integer | False | User Id of user who sent the invoice.(writable on create only) |
Status | String | False | Invoice status.(writable on create only) |
Parent | Integer | False | Id of object this invoice was generated from, 0 if none.(writable on create only) |
CreatedAt | Datetime | False | Time the invoice was created. (YYYY-MM-DD, writable on create only) |
Updated | Datetime | False | Time the invoice was last updated. (YYYY-MM-DD, writable on create only) |
DisplayStatus | String | False | Description of status shown in Freshbooks UI.(writable on create only) |
AutobillStatus | String | False | Description of autobill status.(writable on create only) |
PaymentStatus | String | False | Description of payment status.(writable on create only) |
LastOrderStatus | String | False | Describes the status of the last attempted payment.(writable on create only) |
DisputeStatus | String | False | Description of whether invoice has been disputed.(writable on create only) |
DepositStatus | String | False | Description of deposits applied to invoice.(writable on create only) |
AutoBill | String | False | Whether this invoice has a credit card saved.(writable on create only) |
V3Status | String | False | Description of Invoice status.(writable on create only) |
InvoiceNumber | String | False | User-specified and visible Invoice Id. |
GenerationDate | Date | False | Date invoice was generated from object.(YYYY-MM-DD, or null if not) |
DiscountValue | Decimal | False | Decimal-string amount of discount. |
DiscountDescription | String | False | Public note about discount. |
PONumber | String | False | Reference number for address on invoice. |
Template | String | False | Choice of rendering style. (internal, deprecated) |
CurrencyCode | String | False | Three-letter currency code for invoice. |
Language | String | False | Two-letter language code. |
Terms | String | False | Terms listed on invoice. |
Notes | String | False | Notes listed on invoice. |
Address | String | False | First line of address on invoice. |
ReturnUri | String | False | (deprecated) |
DepositAmount | Decimal | False | Amount required as deposit, null if none. |
DepositPercentage | Decimal | False | Percentage of the invoice's value required as a deposit. |
Gmail | String | False | Whether to send via ground mail. |
ShowAttachments | String | False | Whether attachments on invoice are rendered. |
VisState | Integer | False | Whether active (0) or deleted (1). |
Street | String | False | Street for address on invoice. |
Street2 | String | False | Second line of street for address on invoice. |
City | String | False | City for address on invoice. |
Province | String | False | Province for address on invoice. |
Code | String | False | Zip code for address on invoice. |
Country | String | False | Country for address on invoice. |
Organization | String | False | Name of organization being invoiced. |
FirstName | String | False | First name of client on invoice. |
LastName | String | False | Last name of client on invoice. |
VatName | String | False | Value added tax name, if provided. |
VatNumber | String | False | Value added tax number, if provided. |
DueOffsetDays | Integer | False | Number of days from creation that invoice is due. |
Result Set Columns
Name | Type | Description |
Success | String | True if the image is uploaded successfully. |