Side Menu
 
   

iVend Retail – Fiscal Printer Integration

iVend Retail - Fiscal Printer Integration

Who should be reading this document?

This document is intended for partners who are willing to undertake source code modification under license from CitiXsys to pursue customizations should be reading this document.

This document provides a complete overview of hardware devices integrated with iVend and their integration methodology in iVend Retail. This serves as a guide to implementing a new hardware device in iVend Retail.

What is a Fiscal Printer?

Fiscal printer is an electronic device used by governments to control tax revenues. The devices are usually shipped in sealed (tamper proof) packages and conform strictly to the government specifications. When a sale transaction is made at the POS (cash register) an exact record is also created (or logged) in the configured Fiscal Printer containing details of the sale transaction including sale tax components.

Sample Code

Refer to the attachment to get the code sample for integrating new Fiscal Printer with iVend POS.

Fiscal Printer Integration in iVend Retail

Fiscal Printer integration follows the hardware integration philosophy and exists in the same CXS.Hardware namespace.

Since fiscal printer implementations follow the strict specifications of bodies governing the tax laws of countries, they are specialized further in order to adhere to the application regulations. Hence, fiscal printer integration in iVend is found in the CXS.Hardware.FiscalPrinter namespace.

iVend Retail has the following three fiscal printers integrated in the product:

  • Bematech (FI32)
  • Datec FP300 and
  • Epson

For a complete reference to the code layout and object references please go through the Hardware Integration documentation.

Fiscal Printer Implementation Code OverviewiVend Retail - Fiscal Printer Integration-200by 200

The following sections describe the fiscal printer code structure in the ‘CXS.Hardware’ namespace.

Add a New Folder under the Fiscal Printer Project

To add a new fiscal printer, create a new folder structure under the existing namespace CXS.Hardware.FiscalPrinter

Use a vendor specific logical name to identify the folder as used in the illustration e.g. Bematech.

Use the existing Code Structure

Copy the existing classes and control from the available code:

 

 

The following tables lists the existing Bematech fiscal printer integration implementation classes that are recommended to be followed for implementing a new fiscal printer integration.

Class Name Description
BemaFI32 Implementation class for the Bematech provided fiscal printer containing constants, functions and message mapping routines specific Bematech compliant fiscal printers.
ConfigInfo Contains configuration information for globalized messages.
FiscalPrinter Class that implements the IFiscalPrinter interface members for providing in built functionality for fiscal printer implementation.
SetupControl View (user control) implementation that inherits from ‘BaseOPOSHardwareSetupView’ class to provide the user interface elements to the fiscal printer in the product.

 

Add an XML Node for the Fiscal Printer – FiscalPrinter.global.xml

Create a node in the XML file with the same namespace as the one used in the Setup control implementation.

Note: The ‘Message’ and the ‘Payment Message’ values for the m_RowMessage and m_RowPaymentMessage tags are mapped to the row properties of the ‘Setup’ control as well as implemented in the ‘ConfigInfo’ class. Other tags under this node represent the rows of the grid in the user control and the names must be exactly the same.

Components of the FiscalPrinter Class

The FiscalPrinter class uses the standard structure for a typical fiscal printer defined in the CXS.Hardware.FiscalPrinterHelper code file. This file standardizes the structure under different classes as shown below:

 

 

The same classes are invoked in the specific fiscal printer class implementation i.e. FiscalPrinter, with the required logic and data implementation.

 

Context to the iVend POS Code

The Hardware library is initialized and subsequently used in the iVend POS code as shown below:

 

Hence, as long as the fiscal printer implementation implements from the IFiscalPrinter interface, it will be automatically invoked and consumed in the POS as a registered hardware type.

The ‘CXS.Subsystem.Printing.PrintManager’ class uses the FiscalReceiptResponse class internally to get the complete payload from the fiscal printer and print the contents as required.

No Comment

Sorry, the comment form is closed at this time.