FiscalPrinter.PrintRecItemAdjustment Method
2/27/2008
Applies and prints a discount or a surcharge to the last receipt item sold.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Sub PrintRecItemAdjustment ( _
adjustmentType As FiscalAdjustment, _
description As String, _
amount As Decimal, _
vatInfo As Integer _
)
public abstract void PrintRecItemAdjustment (
FiscalAdjustment adjustmentType,
string description,
decimal amount,
int vatInfo
)
public:
virtual void PrintRecItemAdjustment (
FiscalAdjustment adjustmentType,
String^ description,
Decimal amount,
int vatInfo
) abstract
public abstract void PrintRecItemAdjustment (
FiscalAdjustment adjustmentType,
String description,
Decimal amount,
int vatInfo
)
public abstract function PrintRecItemAdjustment (
adjustmentType : FiscalAdjustment,
description : String,
amount : decimal,
vatInfo : int
)
Parameters
- adjustmentType
Type of discount.
- description
Text that describes the discount.
- amount
Amount of the discount.
- vatInfo
VAT rate identifier.
Remarks
The vatInfo parameter contains an index to the table of VAT values created by SetVatTable and SetVatValue.
Called to apply and print a discount or a surcharge to the last receipt item sold. This discount can be either a fixed currency amount or a percentage amount that relates to the last item.
If CapOrderAdjustmentFirst is true, PrintRecItemAdjustment must be called before the corresponding PrintRecItem method. If CapOrderAdjustmentFirst is false, PrintRecItemAdjustment must be called after the PrintRecItem.
This discount or surcharge can be either a fixed currency amount or a percentage amount that relates to the last item. If the discount amount is greater than the receipt subtotal, an error occurs because the subtotal can never be negative. In many countries or regions, discount operations cause the printing of a fixed line of text expressing the kind of operation that has been performed.
Fixed amount discounts/surcharges are supported only if CapAmountAdjustment is true.
Percentage discounts are supported only if CapPercentAdjustment is true.
PrintRecItemAdjustment is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.
PrintRecItemAdjustment may cause a PosControlException to be thrown with one of the following values:
Value |
Description |
Busy |
Cannot perform while output is in progress. (Can be returned only if AsyncMode is false.) |
Illegal |
One of the following errors occurred: The printer does not support fixed amount adjustments (see the CapAmountAdjustment property). The printer does not support percentage discounts (see the CapPercentAdjustment property). The adjustmentType parameter is invalid. |
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.) |
ExtendedErrorBadItemAmount |
The discount amount 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 VAT parameter is invalid. (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