StatementCharge Class
Properties Methods Events Configuration Settings Errors
The STATEMENTCHARGE class allows you to add and modify individual charges on a customer's statement.
Syntax
class inqb.StatementCharge
Remarks
The StatementCharge class provides the functionality found in the Statement Charge form in the QuickBooks UI. Statement charges are similar to individual line items for Bill or Invoice transactions, but considerably simpler. They consist of a single Item (designated by item_name or item_id) to be added and an Accounts Receivable account (specified by ar_account_name or ar_account_id) where the funds will end up after a payment is received from the Customer (indicated by customer_name or customer_id).
Add a charges for every item you wish to be on the customer's statement. The billed_date allows you to add charges to a particular statement. (Changing billed_date will create a new statement or add charges to an older one).
Required Fields (Add): Customer (customer_name or customer_id), and an Item (item_name or item_id).
Supported Methods:add, get (Id), cancel, and delete
Example:
StatementCharge1.CustomerName = "Baker, Chris"; StatementCharge1.ItemName = "Hardware"; StatementCharge1.Amount = "90.00"; StatementCharge1.Rate = "10.00"; StatementCharge1.ARAccountName = "Accounts Receivable"; StatementCharge1.BilledDate = "2009-06-20"; StatementCharge1.ClassName = "Remodel"; StatementCharge1.CustomerName = "Baker, Chris"; StatementCharge1.Description = "Test transaction"; StatementCharge1.DueDate = "2009-07-04"; StatementCharge1.Quantity = "9"; StatementCharge1.RefNumber = "543"; StatementCharge1.TransactionDate = "2009-06-24"; StatementCharge1.Add();
The class supports a variety of other operations as well. The class's get, cancel, and delete methods may be used to retrieve, cancel, and delete StatementCharges, respectively. The ObjSearch Class may be used to search for StatementCharges in the QuickBooks database.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
amount | The total amount (price) of the items in this statement. |
ar_account_id | Reference to the Accounts Receivable account where money goes. |
ar_account_name | Reference to the Accounts Receivable account where money goes. |
balance_remaining | Balance remaining. |
billed_date | Date when statement was billed. |
class_id | Reference to the class of the charge. |
class_name | Reference to the class of the charge. |
customer_id | A reference to the customer or customer job. |
customer_name | A reference to the customer or customer job. |
description | Description of this statement charge. |
due_date | Date when payment is due. |
is_paid | Indicates whether this bill has been paid. |
item_id | Item being added to the statement. |
item_name | Item being added to the statement. |
linked_txn_count | The number of records in the LinkedTxn arrays. |
linked_txn_amount | The amount of the linked transaction. |
linked_txn_date | The date of the linked transaction. |
linked_txn_link_type | Indicates the nature of the link between the transactions. |
linked_txn_ref_number | This is the reference number assigned to the linked transaction. |
linked_txn_id | This property can be used by another class to reference the original transaction which is linked to the current response. |
linked_txn_type | This property indicates which type of linked transaction has been returned. |
qb_connection_string | An aggregate consisting of various QuickBooks connection properties. |
qb_request_aggregate | The request aggregate. |
qb_request_id | The Id of the next message to be sent to QuickBooks. |
qb_request_mode | Defines whether the request is made online or stored offline. |
qb_response_aggregate | The last QBXML response aggregate received from QuickBooks. |
qbxml_version | The version of QBXML used in the outgoing message. |
quantity | Quantity of items in this statement. |
rate | Unit rate of item. |
ref_id | An alphanumerical identifier generated by the server. |
ref_number | Reference number for the transaction. |
transaction_date | Date of transaction. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
add | Adds the record into QuickBooks. |
cancel | Cancels (voids) the transaction. |
check_request_status | Checks whether or not the specified request was processed by QuickBooks. |
close_qb_connection | Closes a persistent connection to QuickBooks. |
config | Sets or retrieves a configuration setting. |
delete | Deletes the record from QuickBooks. |
get | Gets a single record from QuickBooks. |
get_custom_field | Gets a custom field value from QuickBooks. |
import_qbxml | Imports a QBXML response aggregate. |
open_qb_connection | Opens a persistent connection to QuickBooks. |
reset | Resets all properties to their defaults. |
set_custom_field | Sets a custom field value within QuickBooks. |
update | Updates the bill in QuickBooks. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_error | Information about errors during data delivery. |
on_ssl_server_authentication | Fired after the server presents its certificate to the client. |
on_ssl_status | Shows the progress of the secure connection. |
on_status | Shows the progress of the QuickBooks connection. |
on_warning | Fired when a warning occurs. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
AppendAfter | Appends an XML tag after the specified QBXML element. |
AuthFlags | Connection Flags (use for QuickBooks Simple Start). |
EditSequence | An identifier for this copy of the object. |
EnforceMaxLength | Indicates whether to enforce max lengths for QB Fields. |
GetHighestVersion | Highest QBXMLVersion supported by the installed instance of QuickBooks. |
GetRequestProcessorDLLVersion | Returns the version of the QB Request Processor that is installed on your system. |
GetSupportedVersions | Returns a list of QBXMLVersions that are supported by QuickBooks. |
IsReadOnly | This causes the QuickBooks authorization dialog to display text informing the user that its access will be read-only. |
PersonalDataPref | Whether the connecting application will require access to personal data such as SSN or credit card information. |
QBConnectionMode | The mode of connection to QuickBooks. |
QBFileStatus | The status of the company file as it pertains to accepting connections. |
QBOpenCompanyFile | The file currently open in QuickBooks. |
SendRawXML | Sends specified XML to quickbooks without modification. |
SSLAcceptServerCert | The SSL certificate being used by the Remote Connector. |
SSLAcceptServerCertFile | The SSL certificate file being used by the Remote Connector. |
StopOnError | Specifies how QuickBooks is to proceed if an error occurs in processing of the current request. |
TimeCreated | The time the object was created. |
TimeModified | The time the object was created. |
UnattendedModePref | Whether connecting while QuickBooks is closed is required or optional for the user. |
WarningCodes | A comma-separated list of QuickBooks warning codes that should not result in an exception. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |