We need to send commands to a Datecs DP-50D cash register in order to print a fiscal receipt.
For that wee need a C# method with parameters that is able to:
- send commands to the cash register by writing them to a .txt file
- listening for the cash register feedback that writes the replay/result to the same command file or to another file.
The commands that need to be sent are:
- ''48'' – open fiscal receipt
- ''53'' – payment
- ''54'' – print fiscal text
- ''56'' – close fiscal receipt
- ''33'' – clear the display
- ''47'' – show text on top row of the display
- ''35'' – show text on bottom row of the display
The mechanism is simple but we did not find the correct message format.
We attached example files:
- [url removed, login to view] => file containing the commands
- [url removed, login to view] => file that passes the [url removed, login to view] file to the [url removed, login to view] for execution to the cash register.
We need someone that has worked before with this type of cash register.
A C# parametrised method should be created in order to create and print fiscal receipts.
The method should have the following parameters:
- path to [url removed, login to view]
- path to command file
- path to response file (may be the same as the command file)
- communication port (COM1...n)
- communication speed [bps]
- cash register serial number
- paid amount
- payment method (cash or credit card)
- text to print on the fiscal receipt
- text to display on the cash register display (display with 2 lines)
The method should send the commands to the cash register and wait for the reply.
If all ok, it should return the fiscal receipt number, else it should throw the error received from the cash register on executing the commands.
We need the fiscal receipt number given by the cash register so we can store it into the database.
The error messages received from the cash register should be in a human understandable format, if possible.