Share via


FiscalPrinter.PrintRecItemVoid Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Cancels one or more items that has been added to the receipt and prints a void description on the station defined by the FiscalReceiptStation property.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustOverride Sub PrintRecItemVoid ( _
    description As String, _
    price As Decimal, _
    quantity As Integer, _
    vatInfo As Integer, _
    unitPrice As Decimal, _
    unitName As String _
)
public abstract void PrintRecItemVoid (
    string description,
    decimal price,
    int quantity,
    int vatInfo,
    decimal unitPrice,
    string unitName
)
public:
virtual void PrintRecItemVoid (
    String^ description, 
    Decimal price, 
    int quantity, 
    int vatInfo, 
    Decimal unitPrice, 
    String^ unitName
) abstract
public abstract void PrintRecItemVoid (
    String description, 
    Decimal price, 
    int quantity, 
    int vatInfo, 
    Decimal unitPrice, 
    String unitName
)
public abstract function PrintRecItemVoid (
    description : String, 
    price : decimal, 
    quantity : int, 
    vatInfo : int, 
    unitPrice : decimal, 
    unitName : String
)

Parameters

  • description
    Text describing the item to be voided.
  • price
    Price of the item to be voided.
  • quantity
    Quantity of item to be voided. If zero, a single item is assumed.
  • vatInfo
    VAT rate identifier.
  • unitPrice
    Price of each item. If not used, a zero must be transferred.
  • unitName
    Name of the unit (for example: "kg" or "ltr" or "pcs"). If not used, an empty string ("") must be transferred.

Remarks

Cancels one or more items that has been added to the receipt and prints a void description on the station defined by the FiscalReceiptStation property. Minimum parameters are description and price or description, quantity, and unitPrice. Most countries or regions require quantity and vatInfo and some countries or regions also require unitPrice and unitName.

If price is a positive number, it is printed as a negative and is decremented from the totals registers. In some countries or regions, price is ignored, instead the computation from quantity and unitPrice are printed as a negative amount.

The vatInfo parameter contains a VAT table identifier if CapHasVatTable is true. Otherwise, it contains a VAT amount.

If CapOnlyVoidLastItem is true, only the last item transferred to the Fiscal Printer can be voided exclusive an adjustment line for this item.

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 will be reset to an empty string.

This method is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.

PrintRecItemVoid can raise general exceptions as well as the following specific exceptions:

Value

Meaning

Busy

Cannot perform while output is in progress. (Only applies if AsyncMode is false.)

Illegal

Canceling is not allowed at this ticket state. May be because no item has been sold previously.

(See CapOnlyVoidLastItem.)

ExtendedErrorWrongState

The Fiscal Printer is not currently 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.)

ExtendedErrorSlipEmpty

The slip station was specified, but a form is not inserted. (Applies only if AsyncMode is false.)

ExtendedErrorBadItemAmount

The price is invalid. (Can be returned only if AsyncMode is false.)

ExtendedErrorBadItemQuantity

The quantity is invalid. (Can be returned only if AsyncMode is false.)

ExtendedErrorBadVat

The VAT information is invalid. (Can be returned only if AsyncMode is false.)

ExtendedErrorBadItemDescription

The description is too long or contains a reserved word. (Can be returned only if AsyncMode is false.)

ExtendedErrorNegativeTotal

The computed total is less than zero. (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