LineItemGroups Class
Properties Methods Events Configuration Settings Errors
Generates a group aggregate for use in another component's Update request.
Class Name
InQB_LineItemGroups
Procedural Interface
inqb_lineitemgroups_open(); inqb_lineitemgroups_close($res); inqb_lineitemgroups_register_callback($res, $id, $function); inqb_lineitemgroups_get_last_error($res); inqb_lineitemgroups_get_last_error_code($res); inqb_lineitemgroups_set($res, $id, $index, $value); inqb_lineitemgroups_get($res, $id, $index); inqb_lineitemgroups_do_config($res, $configurationstring); inqb_lineitemgroups_do_getgroupupdateaggregate($res); inqb_lineitemgroups_do_parseaggregate($res, $aggregate); inqb_lineitemgroups_do_reset($res);
Remarks
There is not exposed a way to directly edit the contents of a line item group when submitting an Update request with a class from this package. You can change the Quantity, but you cannot change the line items contained inside the group line. The LineItemGroups class is used to parse a line item group aggregate. You may then make changes to the individual line items, and then call the GetGroupUpdateAggregate to return an xml aggregate containing your changes. This is then set to the Aggregate property of the line you wish to modify in your Update.
For instance, the following code changes the BillableStatus of all line items and line item groups in the Bill retrieved from QuickBooks.
Bill.Get("123456"); for (int i = 0; i < Bill1.LineItems.Count; i++) { if (!Bill.LineItems[i].GroupName.Equals("")) { // this is a group line LineItemGroups.GroupType = gtBill; LineItemGroups.ParseAggregate(Bill.LineItems[0].Aggregate); for (int j = 0; j < LineItemGroups.LineItems.Count) { LineItemGroups.LineItems[j].BillableStatus = bsHasBeenBilled; } LineItemGroups.QBXMLVersion = Bill.QBXMLVersion; // so that the proper fields are included in the update aggregate. Bill1.LineItems[i].Aggregate = LineItemGroups.GetGroupUpdateAggregate(); } else { // regular line item Bill.LineItems[i].BillableStatus = bsHasBeenBilled; } } Bill.Update();
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
Description | A string description of the item group specified by GroupName or GroupId . |
GroupId | Reference to a group of line items. |
GroupName | Reference to a group of line items. |
GroupType | The type of line item group aggregate to create. |
LineId | Identification number of the transaction line group, used for Updates. |
ItemCount | The number of records in the Item arrays. |
ItemAggregate | Contains an XML aggregate of the line item. |
ItemAmount | Line item property: the total amount of this item. |
ItemBillableStatus | Line item property: Billing status of this item. |
ItemClassId | Line item property: Reference to the class of the item. |
ItemClassName | Line item property: Reference to the class of the item. |
ItemCost | Line item property: Unit cost for item. |
ItemCustomerId | Line item property: A reference to customer for whom the item was ordered. |
ItemCustomerName | Line item property: A reference to customer for whom the item was ordered. |
ItemDescription | Line item property: Description of item. |
ItemId | Line item property: Reference to the kind of item. |
ItemName | Line item property: Reference to the kind of item. |
ItemLineId | Identification number of the transaction line, used for Updates. |
ItemManuallyClosed | Indicates if the line item has been manually closed. |
ItemOther1 | Standard QuickBooks Custom Field available for transaction line items. |
ItemOther2 | Standard QuickBooks Custom Field available for transaction line items. |
ItemOverrideAccountId | An account which will override the default account for the line item. |
ItemOverrideAccountName | An account which will override the default account for the line item. |
ItemPriceLevelId | Line Item property: Used to specify custom pricing for specific customers. |
ItemPriceLevelName | Line Item property: Specify custom pricing for specific customers. |
ItemQuantity | Line item property: Quantity of item or item group. |
ItemRate | Unit rate of item. |
ItemRatePercent | Line item property: A markup or discount percentage. |
ItemServiceDate | Line item property: Date of service. |
ItemTaxCodeId | Line item property: Sales tax information for this item. |
ItemTaxCodeName | Line item property: Sales tax information for this item. |
ItemUnitOfMeasure | Unit of measure describing the Quantity . |
PrintItemsInGroup | Indicates whether line items will be shown on printed forms. |
QBXMLVersion | The version of QBXML used to generate the update aggregate. |
Quantity | The quantity of this line item group. |
TotalAmount | The total amount of this group of line items. |
UnitOfMeasure | Unit of measure describing the Quantity . |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
GetGroupUpdateAggregate | Generates a group aggregate for use in another component's Update request. |
ParseAggregate | Parses the aggregate returned from another component's ItemAggregate property. |
Reset | Resets this component to its default state. |
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.
Error | Information about errors during data delivery. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
CodePage | The system code page used for Unicode to Multibyte translations. |