ItemType Property
The type of item to search for.
Syntax
objsearch.getItemType([callback]) objsearch.setItemType( itemType, [callback])
Possible Values
0 (sitAll), 1 (sitService), 2 (sitInventory), 3 (sitNonInventory), 4 (sitPayment), 5 (sitDiscount), 6 (sitSalesTax), 7 (sitSubtotal), 8 (sitOtherCharge), 9 (sitInventoryAssembly), 10 (sitGroup), 11 (sitSalesTaxGroup), 12 (sitFixedAsset)
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 to search for. Applies only to searches for items. If set to itAll (the default) the class will search for all types of items.
Data Type
Integer