Previous Topic

Next Topic

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:  If you wish 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

Following are the sample layouts for Facturas, Credit Bills, and Info Folios. The next section provides some examples of these files populated with sample data.

Factura and Credit Bill Sample Layout

Note: In the case of a Factura values as associated_bill_no will be left blank.

<? xml version = "1.0" ?>

<command>[PRINT FACTURA|PRINT CREDIT BILL]<command>

<head>

<folio_print_task>folio_print_task</folio_print_task>

<document_info>folio_type|queue|bill_no|associated_bill_no|window_no|cashier</document_in fo>       <collecting_agent_property_info>tax1_%|tax2_%|tax3_%|tax4_%|tax5_%|trigger_amount1|trigger_amount2|trigger_amount3|trigger_amount4|trigger_amount5</collecting_agent_property_info>

<general>resort|arrival|nights|departure|room<general>

<payee>name_id|first|last|name2|name3|company|nationality|language|salutation|passport|tax1_no|tax2_no|name_tax_type|ar_number|udfn01|udfn02|udfn03|udfn04|udfn05|udfc01|udfc02|udfc03|udfc04|udfc05|udfd01|udfd02|udfd03|udfd04|udfd05|new_field1|new_field2|new_field3|new_field4|new_field5</payee>

<payee_primary_address>address_type|address1|address2|address3|city|province|state|country|zip_code</payee_primary_address>

<payee_primary_phone>phone_type|phone_role|phone_number</payee_primary_phone>

<guest>name_id|first|last|name2|name3</guest>

</head>

<body>

{<positive_charge>trx_date|trx_code|trx_code_type|tc_transaction_type|tax_code_no|tax_inclusive_yn|description|reference|currency|exchange_rate|quantity|price_per_unit|net_amount|gross_amount|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_amt|trx_code_type </positive_charge>}

{<negative_charge>trx_date|trx_code|trx_code_type|tc_transaction_type|tax_code_no|tax_inclusive_yn|description|reference|currency|exchange_rate|quantity|price_per_unit|net_amount|gross_amount|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_amt|trx_code_type </negative_charge>}

{<new_tax>trx_date|trx_code|trx_code_type|tc_transaction_type|tax_code_no|tax_inclusive_yn|description|reference|currency|exchange_rate|quantity|price_per_unit|net_amount|gross_amount|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_amt|trx_code_type </new_tax>}

{<payment>trx_date|trx_code|trx_code_type|tc_transaction_type|tax_code_no|tax_inclusive_yn|description|reference|currency|exchange_rate|quantity|price_per_unit|net_amount|gross_amount|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_am|trx_code_type t</payment>}

<total_info>total_net|total_gross|vat1_amt|vat2_amt|vat3_amt|vat4_amt|vat5_amt|vat6_amt|vat7_amt|vat8_amt|vat9_amt|vat10_amt amt|new_tax1_amt|new_tax2_amt|new_tax3_amt|new_tax4_amt|new_tax5_amt </total_info>

</body>

Info Folio Sample Layout

<? xml version = "1.0" ?>

<command>PRINT INFO FOLIO<command>

<head>

<document_info>folio_type|window_no</document_info>

<collecting_agent_property_info>tax1_%|tax2_%|tax3_%|tax4_%|tax5_%|trigger_amount1|trigger_amount2|trigger_amount3|trigger_amount4|trigger_amount5</collecting_agent_property_info>

<general>resort|arrival|nights|departure|room<general>

<payee>name_id|first|last|name2|name3|company|nationality|language|salutation|passport|tax1_no|tax2_no|name_tax_type|ar_number|udfn01|udfn02|udfn03|udfn04|udfn05|udfc01|udfc02|udfc03|udfc04|udfc05|udfd01|udfd02|udfd03|udfd04|udfd05|new_field1|new_field2|new_field3|new_field4|new_field5</payee>

<payee_primary_address>address_type|address1|address2|address3|city|province|state|country|zip_code</payee_primary_address>

<payee_primary_phone>phone_type|phone_role|phone_number</payee_primary_phone>

<guest>name_id|first|last|name2|name3</guest>

</head>

<body>

{<charge>trx_date|trx_code|trx_code_type|tc_transaction_type|tax_code_no|tax_inclusive_yn|description|reference|currency|exchange_rate|quantity|price_per_unit|net_amount|gross_amount|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_amt|trx_code_type </charge>}

</body>

Sample XML Files Sent to Fiscal Printer

Example 1 – Print Factura Instruction

<? xml version = "1.0" ?>

<command>PRINT FACTURA<command>

<head>

<folio_print_task>Factura_A</folio_print_task>

<document_info>INTERIM_INVOICE|FA_1|1002||2|SUPERVISOR</document_info>

<collecting_agent_property_info>|||||||||</collecting_agent_property_info>

<general>MFLATAM|25-APR-2002|2|27-APR-2002|0114<general>

<payee>1324|||Sunshine Incorporated||Sunshine Inc.|AR|S|||2323405789||RI|A110|||||||||||||||||||</payee>

<payee_primary_address>BUSINESS|Av Alem 668 7 B|||Buenos Aires||Cap Fed|AR|1001</payee_primary_address>

<payee_primary_phone>BUSINESS|PHONE|(54)11 4312- 4397</payee_primary_phone>

<guest>200|Russell|Peters||</guest>

</head>

<body>

<positive_charge>26-APR-2002|1000|L|C||N|Room Charge||ARG|1|1|1500|1500|1500|||||||||||N </positive_charge>

<positive_charge>26-APR-2002|8000|X|C|1|N|10% Room Tax||ARG|1|1|150|150|150|150||||||||||O </positive_charge>

<positive_charge>27-APR-2002|1000|L|C||N|Room Charge||ARG|1|1|1500|1500|1500|||||||||||N </positive_charge>

<positive_charge>27-APR-2002|8000|X|C|1|N|10% Room Tax||ARG|1|1|150|150|150|150||||||||||O </positive_charge>

<positive_charge>27-APR-2002|2001|F|C||Y|Lunch La Calandria||ARG|1|1|12|10.8|12||1.2|||||||||B </positive_charge>

<payment>27-APR-2002|9001||FC||Cash|ARG|1|1|3312|||||||||||||P </payment>

<total_info>3010.8|3312|300|1.2||||||||||||||</total_info>

</body>

Example 2 – Print Folio Instruction

<? xml version = "1.0" ?>

<command>PRINT_FACTURA<command>

<head>

<folio_print_task>Factura_A</folio_print_task>

<document_info>INTERIM_INVOICE|FA_3|4442||3|SUPERVISOR</document_info>

<collecting_agent_property_info>5|2.5|1.5|||500|100|100||</collecting_agent_property_info><general>MFLATAM|25-APR-2002|2|27-APR-2002|0114<general>

<payee>1324|||Sunshine Incorporated||Sunshine Inc.|AR|S|||2323405789|IB122344333|RI|A110|||||||||||||||30|100|||</payee>

<payee_primary_address>BUSINESS|Av Alem 668 7 B|||Buenos Aires||Cap Fed|AR|1001</payee_primary_address>

<payee_primary_phone>BUSINESS|PHONE|(54)11 4312- 4397</payee_primary_phone>

<guest>200|Russell|Peters||</guest>

</head>

<body>

<positive_charge>26-APR-2002|1000|L|C||N|Room Charge||ARG|1|1|350|350|350|||||||||||N</positive_charge>

<positive_charge>26-APR-2002|8000|X|C|1|N|10% Room Tax||ARG|1|1|35|35|35|35||||||||||O</positive_charge>

<positive_charge>27-APR-2002|1000|L|C||N|Room Charge||ARG|1|1|350|350|350|||||||||||N</positive_charge>

<positive_charge>27-APR-2002|8000|X|C|1|N|10% Room Tax||ARG|1|1|35|35|35|35||||||||||O</positive_charge>

<new_tax>27-APR-2002|8003|X|C|3|N|VAT Perception||ARG|1|1|24.5|24.5|24.5|||24.5||||||||E</new_tax>

<new_tax>27-APR-2002|8003|X|C|3|N|GI2 Perception||ARG|1|1|10.5|10.5|10.5||||10.5|||||||T</new_tax>

<payment>27-APR-2002|9001||FC||Cash||ARG|1|1|805|||||||||||||P</payment>

<total_info>700|805|70|||||||||||24.5||10.5||</total_info>

</body>

Example 3 – Print Factura Instruction

<? xml version = "1.0" ?>

<command>PRINT FACTURA<command>

<head>

<folio_print_task>Factura_B</folio_print_task>

<document_info>INTERIM_INVOICE|FB_1|1002||1|EPETERS</document_info>

<collecting_agent_property_info>|||||||||</collecting_agent_property_info>

<general>MFLATAM|25-APR-2002|2|27-APR-2002|0724<general>

<payee>201|John|Smith||||US|E|Mr.|23444556|||CF||||||||||||||||||||</payee>

<payee_primary_address>HOME|1202 Washington Blvd.|||Orlando||FL|US|12554</payee_primary_address>

<payee_primary_phone>BUSINESS|PHONE|(1)965 333- 2222</payee_primary_phone>

<guest>201|John|Smith||</guest>

</head>

<body>

<positive_charge>26-APR-2002|1000|L|C||N|Room Charge||USA|.33|1|1500|1500|1500|||||||||||N </positive_charge>

<positive_charge>26-APR-2002|8000|X|C|1|N|10% Room Tax||USA|.33|1|150|150|150|||||||||||O </positive_charge>

<positive_charge>27-APR-2002|1000|L|C||N|Room Charge||USA|.33|1|1500|1500|1500|||||||||||N </positive_charge>

<positive_charge>27-APR-2002|8000|X|C|1|N|10% Room Tax||USA|.33|1|150|150|150|||||||||||O </positive_charge>

<positive_charge>27-APR-2002|2001|F|C||Y|Lunch La Calandria||ARG|1|1|12|10.8|12||1.2|||||||||B </positive_charge>

<negative_charge>27-APR-2002|3001|F|C||Y|Adjust Lunch La Calandria| 50% Discount|ARG|1|1|-6|-5.4|-6||-.6|||||||||B </negative_charge>

<payment>27-APR-2002|9001||FC||Visa|5555666688889999 03/02|ARG|1|1|3306|||||||||||||P </payment>

<total_info>3005.4|3306|300|.6||||||||||||||</total_info>

</body>

Example 4 – Print Credit Bill Instruction

<? xml version = "1.0" ?>

<command>PRINT CREDIT BILL<command>

<head>

<folio_print_task>Nota_Credito_B</folio_print_task>

<document_info>INTERIM_INVOICE|NC_1|10| FB_1- 1002|1|EPETERS</document_info>

<collecting_agent_property_info>|||||||||</collecting_agent_property_info>

<general>MFLATAM|25-APR-2002|2|27-APR-2002|0724<general>

<payee>201|John|Smith||||US|E|Mr.|23444556|||CF||||||||||||||||||||</payee>

<payee_primary_address>HOME|1202 Washington Blvd.|||Orlando||FL|US|12554</payee_primary_address>

<payee_primary_phone>BUSINESS|PHONE|(1)965 333- 2222</payee_primary_phone>

<guest>201|John|Smith||</guest>

</head>

<body>

<negative_charge>27-APR-2002|3001|F|C||Y|Adjust Misc.|Error on rate applied|ARG|1|1|-200|-180|-200|-20||||||||||B</positive_charge>

<payment>27-APR-2002|9001||FC||Cash||ARG|1|1|-200|||||||||||||P</payment>

<total_info>-180|-200|-20|||||||||||||||</total_info>

</body>

Example 5 – Print Info Folio Instruction

<? xml version = "1.0" ?>

<command>PRINT INFO FOLIO<command>

<head>

<document_info>INFORMATION_INVOICE|2 </document_info>

<collecting_agent_property_info>|||||||||</collecting_agent_property_info>

<general>MFLATAM|25-APR-2002|2|27-APR-2002|0114<general>

<payee>1324|||Sunshine Incorporated||Sunshine Inc.|AR|S|||2323405789||RI|A110|||||||||||||||||||</payee>

<payee_primary_address>BUSINESS|Av Alem 668 7 B|||Buenos Aires||Cap Fed|AR|1001</payee_primary_address>

<payee_primary_phone>BUSINESS|PHONE|(54)11 4312- 4397</payee_primary_phone>

<guest>200|Russell|Peters||</guest>

</head>

<body>

<charge>26-APR-2002|1000|L|C||N|Room Charge|ARG|1|1|1500|1500|1500|||||||||||N</charge>

<charge>26-APR-2002|8000|X|C|1|N|10% Room Tax|ARG|1|1|150|150|150|||||||||||O</charge>

<charge>27-APR-2002|1000|L|C||N|Room Charge|ARG|1|1|1500|1500|1500|||||||||||N</charge>

<charge>27-APR-2002|8000|X|C|1|N|10% Room Tax|ARG|1|1|150|150|150|||||||||||O</charge>

<charge>27-APR-2002|2001|F|C||Y|Lunch La Calandria|ARG|1|1|12|10.8|12||1.2|||||||||B</charge>

<charge>27-APR-2002|9001||FC||Cash|ARG|1|1|3312|||||||||||||P</charge>

</body>

Response File

As an answer to any call from Opera, a response file will be generated by the local fiscal application. The purpose of the response file is 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 number/s, 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 info for that document and it will store them in 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 response file could have a fiscal folio number. In this case, Opera will store in FISCAL_FOLIO_TAX table a record with this number and a status of CANCELLED on it. On the other hand, no action is required.

Sample Response File Layout

Following is a sample layout for a response file. The next section provides some examples of responses populated with sample data.

<? xml version = "1.0" ?>

<command>[PRINT FACTURA| PRINT CREDIT BILL|PRINT INFO FOLIO|PRINT DAILY CLOSE|PRINT SHIFT CLOSE]</command>

<head>

<message_status>[OK | ERROR]</message_status>

[<message>message</message>]

</head>

[<body>

{<fiscal_folio_number>number</fiscal_folio_number>}

[<fiscal_queue>queue</fiscal_queue>]

[<fiscal_total_info>total_net|total_gross|total_nontaxable|tax1_amt|tax2_amt|tax3_amt|tax4_amt|tax5_amt|tax6_amt|tax7_amt|tax8_amt|tax9_amt|tax10_amt|new_tax1_amt|new_tax2_amt|new_tax3_amt|new_tax4_amt|new_tax5_amt </fiscal_total_info>]

</body>]

Sample Response Files

Example 1 – Response File to a Print Factura Instruction

<? xml version = "1.0" ?>

<command>PRINT FACTURA</command>

<head>

<message_status>OK</message_status>

</head>

<body>

<fiscal_folio_number>100001</fiscal_folio_number>

<fiscal_queue>A001</fiscal_queue>

<fiscal_total_info>3010.8|3312||300|1.2||||||||||||||</fiscal_total_info>

</body>

Example 2 – Response File to a Print Credit Bill Instruction

<? xml version = "1.0" ?>

<command>PRINT CREDIT BILL</command>

<head>

<message_status>OK</message_status>

</head>

<body>

<fiscal_folio_number>100001</fiscal_folio_number>

<fiscal_folio_number>100002</fiscal_folio_number>

<fiscal_folio_number>100003</fiscal_folio_number>

<fiscal_queue>A001</fiscal_queue>

<fiscal_total_info>3010.8|3312||300|1.2||||||||||||||</fiscal_total_info>

</body>

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

<? xml version = "1.0" ?>

<command>PRINT DAILY CLOSE</command>

<head>

<message_status>ERROR</message_status>

<message>Printer is not connected.</message>

</head>

Example 4 – Response File to a Print Folio Instruction (Error)

<? xml version = "1.0" ?>

<command>PRINT FACTURA</command>

<head>

<message_status>ERROR</message_status>

<message>Paper Jam.</message>

</head>

<body>

<fiscal_folio_number>100002</fiscal_folio_number>

</body>

Note: FISCAL_FOLIO_TAX table will have the same structure as FOLIO_TAX.

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