ItemType Property
The type of item.
Syntax
item.getItemType([callback]) item.setItemType( itemType, [callback])
Possible Values
0 (itUnknown), 1 (itService), 2 (itInventory), 3 (itNonInventory), 4 (itPayment), 5 (itDiscount), 6 (itSalesTax), 7 (itSubtotal), 8 (itOtherCharge), 9 (itInventoryAssembly), 10 (itGroup), 11 (itSalesTaxGroup), 12 (itFixedAsset)
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getItemType([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setItemType([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
The type of item. It is necessary to specify this before invoking Add or Update. It is not necessary to specify before a call to Get however.
The following values are permitted:
itUnknown | 0 |
itService | 1 |
itInventory | 2 |
itNonInventory | 3 |
itPayment | 4 |
itDiscount | 5 |
itSalesTax | 6 |
itSubtotal | 7 |
itOtherCharge | 8 |
itInventoryAssembly | 9 |
itGroup | 10 |
itSalesTaxGroup | 11 |
itFixedAsset | 12 |
The following properties may be specified for each type of item. Required properties are in bold, reference (Name or Id) properties are starred, and special fields are in italics.
Service Items | ItemName, Description, Parent*, IsActive, SalesTaxCode*, Price, PricePercent, Account*, PurchaseCost, PurchaseDescription, PurchasePreferredVendor*, PurchaseExpenseAccount*. |
Non-Inventory Items | Same as for service items. |
Inventory Items | ItemName, Description, Parent*, IsActive, SalesTaxCode*, Price, PricePercent, Account*, PurchaseCost, PurchaseDescription, PurchasePreferredVendor*, PurchaseAssetAccount*, PurchaseCOGSAccount*, InventoryReorderPoint, InventoryQuantityOnHand, InventoryAverageCost, InventoryQuantityOnOrder, InventoryQuantityOnSalesOrder, InventoryDate. |
Payment Items | ItemName, IsActive, Description, Account*, PaymentMethod*. |
Discount Items | ItemName, IsActive, Parent*, SalesTaxCode*, Description, Price, PricePercent, Account*. |
Sales Tax Items | ItemName, IsActive, Description, TaxRate, TaxVendor*. |
Subtotal Items | ItemName, IsActive, Description. |
Other Charge Items | Same as for service items. |
This property is required.
Data Type
Integer