Fiscal service

There is no default implementation available for this functionality. The Fiscalization needs to be done for each country as a customization

 

This service has some functions that can be used when doing a fiscalization customization. The functions and functionality included in this service was based on the Clean cash fiscal functionality used in some European countries.

There are some configurations built into the Hardware profile but those might also have to be customized by a partner

If the conditional compilation symbol on the Fiscal project is set to be FISCALTEST then the "Dummy fiscal service" included in the service code will be built and run

Additional fiscalization info fields are available in Site Manager - Receipt designer under Fiscalization category if custom fiscal information is required to be printed on receipts. In PrintingService FormModulation the FiscalInfo1, FiscalInfo2, FiscalInfo3, FiscalInfo4 variables are available to print custom data as needed by the Fiscal service implementation.

Main functionality

 

Name Description
LocalVersion Locale/country version of Fiscal service in use(e.g. SE).
ManufacturerName Name of the manufacturer (e.g. LS Retail ehf.).
CodeVersion Version of the Fiscal service in use.
ExportFiscalTransToXML

Export the fiscal information from the concluded transaction to XML.

FiscalGetInfoFromTransaction Gets the value/display text for a printing variable in the Fiscalization category.
FiscalGetText Gets the value/display text for a printing text-only variable.
GetFiscalSignature Gets the fiscal signature if any provided by the active fiscal service.
GetFooterTextForTrainingMode If POS is in training mode then if needed can customize on Receipt Footer the two bottom lines with custom text like T R A I N I N I N G M O D E This is not a valid receipt
GetHeaderTextForTrainingMode If POS is in training mode then if needed can customize on Receipt Header the two top lines with custom text like T R A I N I N I N G M O D E This is not a valid receipt
HashTransaction Hash the concluded transaction
IsActive To activate ALL fiscal functionality in the POS this function needs to return true.
IsOperationAllowed Check if the operation that the user clicked on is allowed. This function can display any warning messages and must return true if the operation can continue.
JournalLogExport Exports a transaction log. Please see further comments in the function itself on the functionality.
PrintFiscalLog Used by JournalLogExport.
PrintReceiptCopy

If it returns false any functionality that is printing a copy of the receipt will not print it. When the POS is sending the receipt as an email this function is also called to check if it can be sent as that is a copy of the receipt.

In the standard functionality of LS One all receipt copies (including invoices and emails) are saved to table RboTransactionReprintTrans so information about how many copies have been printed can be retrieved. If the customer has multiple stores and terminals then this check would have to be done through the site service otherwise it can be done locally.

RunFiscalOperations Execute any fiscal operations on the current transaction.
SaveFiscalLog(IConnectionManager, List<>, string) Used by JournalLogExport.

SaveFiscalLog (IConnectionManager, FiscalLogEntity)

Save a fiscal log entity.
SaveFiscalLog(IConnectionManager, string, POSOperations) When any operation is started in the POS this function is called and here the log of operations can be saved using the SaveFiscalLog(IConnectionManager, FiscalLogEntity) function.
SaveReceiptCopy Saves a copy of the receipt to the fiscal log.
ShowJournalLogExportDialog Show a dialog with fiscal transaction which can be selected to print or save.
StartupCheck If this function returns false the POS will not start itself up, this function is only called when the initial loading of the POS is done
TransactionCompleted Here you need to set the receipt ID on the transaction if you don't want to use the one the POS created for you. If another receipt ID is to be used then you need to return the receipt ID back into the numbersequence using ReturnSequencedNumbers in the TransactionService and set the new receipt ID to the transaction
VerifyHashAndSignOfTransaction Verify the hash and sign of the transaction.

POS Operations

Many operations in the POS directly call the Fiscal service. Here below is a list of all the operations and which functions they call

Name Description
Print fiscal info Calls function GetFiscalInfo
Journal log export Calls function JournalLogExport
Receipt copy (in Journal dialog) Calls functions PrintReceiptCopy, SaveReceiptCopy
Reprint receipt Calls function PrintReceiptCopy
Print X report Calls function SaveFiscalLog
Print Z report Calls function SaveFiscalLog

POS Startup

If one of the requirements of the fiscalization is that the POS cannot be started if certain conditions are not met then those checks should be done in the StartupCheck function in the Fiscal service. If the StartupCheck function returns false then a dialog with a message is displayed to the user and the POS will not start itself.

To activate any of this fiscal functionality in the POS the function IsAlive needs to return true !

Development pack

To find this service in the development pack go to DevPack\Source\Core\Common_services

See also

Transaction service