previous

Fiscal Folio Printer Requirements

The fiscal folio printing feature is made available when the Cashiering>Fiscal Folio Printing application parameter is set to Y. This feature may be applied in jurisdictions where the use of a third-party fiscal printer is mandated. Specific information about fiscal folio requirements may be found in the OPERA Country Specifics document for these countries:

Argentina

El Salvador

Taiwan

Belize

Guatemala

Turkey

Bolivia

Honduras

Uruguay

Brazil

Mexico

Venezuela

Chile

Nicaragua

 

Colombia

Panama

 

Costa Rica

Poland

 

Dominica

Puerto Rico

 

Dominican Republic

Romania

 

Ecuador

Russia

 

The fiscal printer is connected to the OPERA workstation through a serial port. (This is a one-to-one connection, which does not run through the OPERA network.) The workstation runs an application called the local fiscal application that communicates with the fiscal printer.

Note: Workstations from which the local fiscal program can be launched must have the Fiscal Printer Attached check box selected on the Workstations screen (Configuration>Setup>Workstations). See Workstations for details.

Fiscal folio functionality is a two-way communication. During folio generation, OPERA will start the local fiscal application and will send an XML file with the required information to the fiscal printer. After the printing is complete, the application sends another XML file to OPERA including message status, errors, fiscal information, etc.

For each folio print task that prints fiscal folios, you  must specify the  layout of the fiscal information sent to the printer (that is, the types of information and their sequence within the message record), and the response message back to OPERA. Both are configured by selecting the Layout button from the Edit Folio Print Tasks screen. (See Folio XML Layout for details.) The definition of the XML tags that will identify the XML data elements available for fiscal folio layouts are set in Configuration> Setup> Folio XML Configuration. (See Folio XML Configuration for details.) Both the folio XML configuration and the folio XML layout are configured with defaults by the installation program for the local fiscal application. You may wish to edit these defaults for your specific needs.

The local fiscal application is identified by the Cashiering>Fiscal Program Name application setting.

The local fiscal application must be stored in a directory that is named in the PC workstation's  environment variables. To edit the PC's environment variables, take these steps: From the PC's Control Panel select System. From the System Properties window select the Advanced tab. From the Advanced tab select the Environment Variables button to display the Environment Variable window.

Note: To allow the local fiscal application to recognize the type of charge that is being passed to the fiscal printer (and thereby to properly tag it for the XML file),  the Fiscal Transaction Code Type must be set for each transaction code on the Transaction Code Edit screen (Configuration>Cashiering> Codes> Transaction Codes). See Transaction Codes for details.

Note: To send information (non-fiscal) folios to the fiscal printer, set the Cashiering>Print Fiscal Information Folio application parameter to Y.

Local Fiscal Application Startup Parameters

The command used to launch the local fiscal application accepts three parameters, which differ depending on whether the local fiscal application is running on the web or in a client- server environment. These startup parameters are automatically configured by the local fiscal application installation program.

Local Fiscal Applications on the Web

For local fiscal applications running on the web, the parameters are:

The local fiscal application reads the file provided by the first parameter and feeds the information to the fiscal printer. The program returns the response values replacing the blank values in the second parameter with relevant values and calls the URL in the third parameter using the POST method.

For example, the following command might be used to launch a local fiscal application:

fiscal http://PMSAPP/webtemp/v21_smoke_integ/FISCAL145.xml "in_url=in_sid=48174524351@in_resort=!POLAND!@in_mesg_code=!FISCAL!@in_bill_no=!145!@in_mesg_status=!null!@in_mesg_text=!null!@in_fiscal_bill_no=!null!" http://PMSAPP/pls/v21_smoke_integ/printlog.print_response

Parameter 1http://PMSAPP/webtemp/v21_smoke_integ/FISCAL145.xml

Parameter 2 = in_url=in_sid=48174524351@in_resort=!POLAND!@in_mesg_code=!FISCAL!@in_bill_no=!145!@in_mesg_status=!null!@in_mesg_text=!null!@in_fiscal_bill_no=!null!

Blank values are replaced with relevant values in parameter 2

In_mesg_status=!null! replaced with in_mesg_status=!Error!

In_mesg_text=!null! replaced with in_mesg_text=!Fiscal_Printer_Demo_error!

In_fiscal_bill_no=!null! replaced with in_fiscal_bill_no=!fiscal_printer_demo_error!

And append parameter 2 to parameter 3 with a ?

Parameter 3 = http://PMSAPP/pls/v21_smoke_integ/printlog.print_response

In reply, the  local fiscal application should call the URL if printing is an error:

http://pmsapp/pls/v21_smoke_integ/printlog.print_response?in_url=in_sid=48174524351@in_resort=!poland!@in_mesg_code=!fiscal!@in_bill_no=!145!@in_mesg_status=!Error!@in_mesg_text=!Fiscal_Printer_DEMO_Error!@in_fiscal_bill_no=!Fiscal_Printer_DEMO_Error!

Local Fiscal Applications in Client Server Environments

For local fiscal applications running in client server, the execution parameters are:

The local fiscal application should write the parsed  parameter 2 to the file provided in the parameter 3.

Sample XML File Layouts and Examples

Following are the sample layouts and examples for Facturas, Credit Bills, and Info Folios.

Factura and Credit Bill Sample Layout

Info Folio Sample Layout

Print Factura A Instruction Example

Print Factura B Instruction Example

Print Folio Instruction Example

Print Credit Bill Instruction Example

Print Info Folio Instruction Example

Response File

As an answer to any call from OPERA, a response file will be generated by the local fiscal application to return status information to OPERA from the application and the fiscal printer. The message, if any, is displayed in OPERA.

In the event of a factura or credit bill print out, fiscal information will be added to the file. This information includes factura or credit bill numbers, queue, totals, and VAT amounts. All of these values might be different from the values sent by OPERA (rounding procedures). In order to keep these values, OPERA will add them to the rest of the information for that document and store them in the table FISCAL_FOLIO_TAX.

Whenever a factura or credit bill takes more than one page, the response file will contain one <fiscal_folio_number> element per page, and in FISCAL_FOLIO_TAX, OPERA will store one record per page with the last one including the totals.

In the event of an error during a print folio command, the bill number will be voided and nullified to ensure that the financial tables are consistent with the FISCAL_FOLIO_TAX table.

Sample Response File Layout and Examples

Following is a sample layout and examples for a response file.

Response File Sample Layout

Response File to a Print Factura Instruction Example

Response File to a Print Credit Bill Instruction Example

Response File to a Print Daily Close Instruction (Error) Example

Response File to a Print Folio Instruction (Error) Example

Fiscal Printing Application Parameters

Following is a summary of the application parameters that play a part in fiscal folio printing.

Cashiering>Fiscal Folio Printing

Parameter

Enable the fiscal printing. Set to Y to enable fiscal folio printing and to display parameters that follow.

Cashiering>Fiscal Program Name

Setting

Identify the local fiscal application program filename (e.g., fiscal). Do not include ".exe" on the filename specified here.

Cashiering>Print Fiscal Information Folio

Parameter

Print fiscal folio when generating an information folio.

Cashiering>Print Information Folio Layout

Setting

Identify the folio print task to be used when generating fiscal information folio

Cashiering>Fiscal XML Language Creation

Setting

Select the language to be used for fiscal XML files. The default is the property base language.

See Also