FiscalPrinter.PrintRecItem Method
2/27/2008
Prints a receipt item for a sold item on the station specified by the FiscalReceiptStation property.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Sub PrintRecItem ( _
description As String, _
price As Decimal, _
quantity As Integer, _
vatInfo As Integer, _
unitPrice As Decimal, _
unitName As String _
)
public abstract void PrintRecItem (
string description,
decimal price,
int quantity,
int vatInfo,
decimal unitPrice,
string unitName
)
public:
virtual void PrintRecItem (
String^ description,
Decimal price,
int quantity,
int vatInfo,
Decimal unitPrice,
String^ unitName
) abstract
public abstract void PrintRecItem (
String description,
Decimal price,
int quantity,
int vatInfo,
Decimal unitPrice,
String unitName
)
public abstract function PrintRecItem (
description : String,
price : decimal,
quantity : int,
vatInfo : int,
unitPrice : decimal,
unitName : String
)
Parameters
- description
Text describing the item sold.
- price
Price of the line item.
- quantity
Number of items. If zero, a single item is assumed.
- vatInfo
VAT rate identifier. If not used, a zero is transferred.
- unitPrice
Price of each item. If not used, a zero is transferred.
- unitName
Name of the unit; for example, "kg" or "ltr" or "pcs". If not used, an empty string ("") is transferred.
Remarks
If the quantity parameter is zero, a single item quantity is assumed.
The vatId parameter contains a VAT table identifier if CapHasVatTable is true.
Minimum parameters are description and price or description, price, quantity, and unitPrice. Most countries or regions require quantity and vatRate and some countries or regions also require unitPrice and unitName.
PrintRecItem is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.
If CapPostPreLine is true, additional application-specific lines defined by the PostLine and PreLine properties will be printed. After printing these lines PostLine and PreLine are reset to an empty string.
PrintRecItem may cause a PosControlException to be thrown with the following ErrorCode:
Value |
Description |
Busy |
Cannot perform while output is in progress. (Can only be returned if AsyncMode is false.) |
ExtendedErrorWrongState |
The printer is not in the FiscalReceipt state. |
ExtendedErrorCoverOpen |
The printer cover is open. (Can be returned only if AsyncMode is false.) |
ExtendedErrorJournalEmpty |
The journal station is out of paper. (Can be returned only if AsyncMode is false.) |
ExtendedErrorReceiptEmpty |
The receipt station is out of paper. (Can be returned only if AsyncMode is false.) |
ExtendedErrorBadItemQuantity |
The quantity is invalid. (Can be returned only if AsyncMode is false.) |
ExtendedErrorBadPrice |
The unit price is invalid. (Can be returned only if AsyncMode is false.) |
ExtendedErrorBadItemDescription |
The discount description is too long or contains a reserved word. (Can be returned only if AsyncMode is false.) |
ExtendedErrorBadVat |
The vatRate parameter is invalid. (Can be returned only if AsyncMode is false.) |
ExtendedErrorReceiptTotalOverflow |
The receipt total has overflowed. (Can be returned only if AsyncMode is false.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
FiscalPrinter Class
FiscalPrinter Members
Microsoft.PointOfService Namespace
SetVatTable
SetVatValue