Pentru varianta in romana va rog sa navigati aici.
3. Print receipts from FTP directory New
4. Print receipts from web server/HTTP New
5. Licencing
10. Sale command
11. Discount command
12. Subtotal command
13. Total command
16. Cash deposit/withdrawal command
20. Free text with various styles command
22. Driver configuration in SAGA application New
23. Receipt examples
To download the driver you need to know exactly which operating system you want, and depending on it you can download it from the first page of the Download section. It is recommended to download it here whenever needed so this way you will always have the latest version of the driver.
If you use the Chrome browser after choosing the directory where you want to save the archive, you may have a security alert that you should choose to "Keep". To make sure the driver is sure we want to inform you that it is signed with a security certificate that was obtained from our company's reviews from some international institutions, in our case, Comodo.
If you use the Exporer Internet browser or Firefox you just have to choose the directory where to save the archive.
After downloading, you must unzip the archive, which may be named dxprint.zip in the Windows operating system, dxprint_linux.zip for the Linux operating system or dxprint_mac.zip for the MacOS operating system.
Unzipping on Windows can be done by right clicking on the archive, choose "Extract All" and after this step you have to choose where you want to unzip. For the Linux operating system, choose the right click menu and choose "Extract Here". For MacOS you need to double-click on the archive and it will automatically unzip.
After unzipping, the resulting directory will contain the driver named dxprint.exe (or dxprint for Linux or MacOS), the configuration file named config.json and a directory named bonuri_exemple that contains over 38 receipts that can be used immediately as well as tests.
The minimum requirements for the driver are: :
For Windows, Windows XP SP3 or later is required.
For Linux, a 2.6.23 or higher kernel is required (from Centos 6 upwards).
For MacOS, Snow Leopard 10.6 or newer version is required.
The configuration file is in JSON format, and is very easy to modify. All you need is a text editor like Wordpad (Windows) or DxprintApp.exe (desktop application) from the driver directory, Text Editor (Linux) or TextEdit (MacOS).
{
"echipament": {
"port": "COM1",
"baudRate": 115200,
"numarOperator": 1,
"parolaOperator": "0001",
"numarLogic": 1
},
"rulare": {
"rezident": false,
"directorBonuri": "bonuri",
"ftpServer": "",
"ftpUtilizator": "",
"ftpParola": "",
"ftpDirectorBonuri": "",
"ftpIntervalVerificareInSecunde": 300,
"httpServerActiv": false,
"httpPort": 8090,
"httpUtilizator": "",
"httpParola": "",
"httpPermiteListareDirBonuri": true
},
"general": {
"directorBonuriExecutate": "executate",
"directorBonuriRaspuns": "raspuns",
"raspundeInAcelasiFisier": false,
"generareFisierCuNrBonFiscal": true,
"directorRapoarteAnaf": "ANAF",
"extensieFisierBon": "inp,bon",
"intervalPastrareBonuriInDirector": 7,
"tiparesteRaportZAutomat": true,
"raspundeCuNrEroareInFisierRaspuns": false,
"transformaCifDinTextPublicitarInFactura": "",
"trimiteRaportZPeEmail": ""
},
"licenta": "Cumpara licenta de pe www.dxprint.ro",
"versiune": 1
}
It consists of 5 main sections echipament, rulare, general, licenta si versiune.
After installing the adapter from usb to serial on your computer, it is recommended to check in Device Manager (Windows) or in /dev/ttyXXX (Linux, MacOS) and identify the COM port number. After identifying it, it must be COM1, COM2, COMXX for Windows, and /dev/ttyACM0, /dev/ttyACM1, /dev/ttyACMX for Linux and MacOS. This information must be entered in the port section of the configuration file. Default value COM1.
New
If you want to connect to TCP/IP then you must specify the port in the form tcp://ip:port
. Example: tcp://192.168.1.23:3999
. Typically, cash registers allow network
connection and the default port for listening is 3999, but all network information can be found
out by executing the command dxprint.exe -sn.
The communication speed is usually set in the cash register at 115200, but if needed it can be
changed directly from the baudRate
section according to the speed set in the cash
register. Preferably, the cash register speed is also passed to Device Manager at the COM port
speed so there is no discrepancy in the communication between the driver and the cash register.
For TCP / IP connection this parameter is ignored. Default value 115200.
Note that if the equipment is set to a speed of less than 57600, there is a likelihood
that the information sent or received between the equipment and the driver will not be fully
received, resulting in erroneous information or non-receipt of the fiscal receipt.
numarOperator
represents the operator set in the cash register. Fiscal equipment is
initially programmed with operator number 1.
parolaOperator
is the operator password set in the cash register. The fiscal
equipment is initially programmed with the operator password 0001.
The driver has two ways of running: resident and non-resident. To run in resident mode, you need
to change in true value to the rezident option. In resident mode, the driver monitors
whether there are new filenames in the directory specified in the directorBonuri
option, and as they are added to this directory, the driver processes them individually.
If the driver is to work in a non-resident mode, then he waits when the name of the file for the
printout is released, as an example, the non-resident mode is dxprint.exe
<bon.inp>
<bon.inp> can be a file in the driver directory or if it is
located in another directory calling will be done via absolute path, namely dxprint.exe
c:\bon.inp
.
All of the options below are only valid when the driver is running in resident mode.
New
ftpServer
is the FTP server login address to which the driver connects to retrieve
the generated receipts in the directory specified by the ftpDirectorBonuri
option.
The login address must be in ip:port
or hostname:port
format. If the
connection port is the standard 21, then the connection address may not include the port.
New
ftpUtilizator
is the user to connect to the FTP server. If the server allows
Anonymous login it is mandatory to specify the user name Anonymous and the password.
New
ftpParola
is the password for the FTP user. This field is mandatory even when the
server accepts Anonymous logins.
New
ftpDirectorBonuri
represents the FTP directory from where receipts will be
extracted. Ex: bonuri/generate
, bonuri
. The driver will try to change
to this directory when connected to FTP server.
New
ftpIntervalVerificareInSecunde
is the interval in seconds of checking new receipts
in the specified directory within the FTP server. Minimum interval is 60 seconds.
For more information on how to work with a directory on an FTP server, see the section Print receipts from FTP directory.
New
httpServerActiv
is the option by which if it is true, a web server will be
started on the chosen port in the httpPort
option, through which you can print the
receipts directly through a POST call to the endpoint /bonuri.
New
httpPort
is the option to set the port for the HTTP server. This port must be
between 1024 - 65535.
New
httpUtilizator
represents the user name you want to protect the web server by using
Basic Auth authentication.
New
httpParola
is the user password you want to protect your web server. Only when the
user and password are specified authentication will be active.
Nou
httpPermiteListareDirBonuri
ois the option that if true
it will be
possible to access the web interface available from the browser at http://IP:port
,
executed receipts directories and response receipts specified in the driver configuration.
For more information on how to work with this HTTP server go to the section Print receipts from web server/HTTP.
This section contains the general driver variables, which are valid for both running modes (resident/non-resident).
directorBonuriExecutate
is the directory where the executed receipts will be moved.
The receipts moved here will not contain the response information. It may have a "executate"
relative path, and this means creating a directory with the name "executate"
in the
directory where the dxprint driver is located, or an absolute "c:\\executate"
path,
and that means the receipt will be moved to the c:\executate directory. Note that for the
absolute path it is necessary to pass an additional \ , c:\\
instead of
c:\
.
directorBonuriRaspuns
is the directory where the response files of the executed
receipts will be generated. It may have a "raspuns"
relative path, and this means
that a directory with the name "raspuns"
will be created in the directory where the
dxprint driver is located, or an absolute path to the "c:\\raspuns"
format, and
that means the file will be generated in the "c:\raspuns"
directory. Note that for
the absolute path it is necessary to pass an additional \ , c:\\
instead of
c:\
. The response file contains exact response information such as Fprint with
error codes Er, Ok, Sd and additionally at the end of each row if one of the row is
invalid will pass and the reason why the receipt was rejected. Additionally, if we have
situations such as Lack of Paper or Report Z not executed, this error message will be passed to
the last line of the file.
generareFisierCuNrBonFiscal
is the option by which if true then in the
directorBonuriRaspuns
directory will additionally generate beside the response
file, a file with the .nrb extension containing information related to that receipt, such as the
receipt number, the Z number, the file name and date of execution:
OK;Z=38|NR=503|UNIQUE_ID=bon.txt|2018_07_09_17_00_04_312
. Note that this file is
generated only when the receipt has been successfully executed. Default value true.
New
directorRapoarteAnaf
is the directory where XML/P7B files in the fiscal
equipment will be extracted for the ANAF reporting. It may have a "anaf"
relative
path, and this means creating a directory with the "anaf"
name in the directory
where the dxprint driver is located, or an absolute path of "c:\\anaf"
, and this
means the file will be generated in the "c:\anaf
directory. Note that for the
absolute path it is necessary to pass an additional \, c:\\
instead of
c:\
. In addition, the driver at the time of executing the anaf file
extraction reports will generate one subdirectory for each report type. For the report by Z
number, it will generate a directory named Z10-20 that basically represents the start-end
Z-numbers sent to the command line. For the type of extraction report based on the timeframe it
will generate a directory with the name 09-2018 which is the month-year 09-2018 information
extracted from the start date sent to the command line.
extensieFisierBon
is the list of receipt file extensions that the driver processes.
These can be comma delimited one after the other in the form of inp,bon,txt
and
that means the driver will process only those files that have the .inp, .bon or .txt extension.
If a receipt file does not have the extension specified in this option, it will be ignored in
both resident and non-resident mode. Default value inp,bon.
intervalPastrareBonuriInDirector
is the maximum number of days a file in the
directories defined in the executed folder directorBonuriExecutate
and response
folder directorBonuriRaspuns
is kept. All files that are older than the number of
days specified in this option will be deleted automatically when the driver starts. The maximum
number of days allowed is 30. The default value is 7 days.
New
tiparesteRaportZAutomat
is the option by which if it is true when a receipt
is to be printed and more than 24 hours have elapsed from the last receipt, you will first print
out the Z report followed by the desired receipt for initial printing. Default value true.
New
raspundeCuNrEroareInFisierRaspuns
is the option by which if true when a
command from a receipt encounters an error, the corresponding error will be recorded in the
response file of the receipt and will have the format Er-111024. For integration you need
the entire list of errors that can be downloaded here. Default value false.
New
transformaCifDinTextPublicitarInFactura
represents the option by which the tax code
can be printed in the new format required by the law even if it was sent via the free text
command, namely the P command. As an example, if the application is currently
generating the following command: P,1,______,_,__;Client Tax Code: RO123456789;;;;;
you will be able to switch to this option exactly the text of the Client Tax Code:
and when the receipt is pre-validated, the driver will know to extract the tax code and print it
in the new format. The content of this option is case insensitive.
New
trimiteRaportZPeEmail
is the option to send email with the Z report when it is
printed and will be sent to the email addresses specified in this option. You may have several
comma delimited email addresses one after the other. As an example:
suport@dxprint.ro,test@test.com
. Please note that this information sent securely
via email is not stored on our servers or Amazon servers. Our company uses Amazon AWS to send
all your emails.
Reprezent the driver paid licence. Without this license, commands can not be sent to the
fiscal equipment. It is important to have the license copied on a single line instead of the
current value Cumpara licenta de pe www.dxprint.ro, and include the two equals at the end
of it. If you want a trial license, just send us an email at suport@dxprint.ro and specify the series of
equipment you want to test.
It is the configuration version for the communication driver, it is recommended not to change this value.
When the driver is running in the resident mode and the options in the ftp section are completed
then it will start a ticker that once at the specified interval will try to connect to the FTP
server in the specified directory and from there to extract all the receipts files which have
the
extension allowed in the extensions list in the extensieFisierBon
option. It should
be specified that the verification will only be done after the first extension, so if the option
has two or more extensions in the form of inp,bon,txt
then the driver will only
extract the files that have the extension .inp
. If there are no extensions
specified, the driver will extract the files that will have the .inp
extension.
When there are files in the FTP directory, for each file the driver will try to download it and
copy it to a temporary file with the same name and it will append the _FTP_datetime
at the end. This way, in the executed and response directories, you can quickly identify the
files that came from an FTP folder. After the file has been created and saved in the resident
directory specified by the directorBonuri
option, the original file in the FTP
directory will be deleted.
After executing the receipt, it will be moved to the executed and response directory, and the response file name will also contain the execution date and time next to the initial date and time appended at the temporary file creation from the FTP directory.
It is recommended that the check interval to be realistic and must be related to the number of receipts generated during that period. The length of time a receipt is printed depends on the number of commands in it.
Must be specified that the driver can be used at the same time for a local sales application that generates the receipts in the same receipts directory. The fact that the receipts are extracted from an FTP directory does not interfere with the driver's local operation. Additionally, it can be used at the same time including HTTP protocol receipt.
When the driver is running in the resident mode and the httpServerActiv
option is
true, it will start a web server where it can receive commands directly through the HTTP
protocol.
The created web server will have the address from the IP address of the computer on which the
driver and port specified in the httpPort
option. As an example, if your computer
has the 192.168.1.23 ip and the port you chose is 8080, you can access the driver's web
interface directly from the browser by navigating to the address
http://192.168.1.23:8080
.
Please note that there is a great likelihood that the operating system will ask you for permission to accept connections on the port you specified. It is recommended that you allow this to use this functionality. It should be specified that the created server is not an SSL-certified one, he was designed for internal networks use with more than 2 computers and a single fiscal equipment.
For the examples below we will use the server address as http://192.168.1.23:8080
to be simpler to exemplify. But keep in mind that your IP address will certainly be different.
The computer IP address can be found as follows:
Wndows: From Command Prompt by calling the ipconfig command and in the result
you should look at the IPv4 Address section.
Linux, Mac: From the Terminal by calling the ifconfig command and the same as
the result you need to check the inet section of eth0, or en0 depending on how many network
cards you have installed.
After you start the driver with the http server enabled, you can check that it works by calling
the web browser driver directly from the browser at http://192.168.1.23:8080. In the displayed
page you will have all the details to be able to print a receipt from another computer on the
network or elsewhere including accessing the executed and response directory receipts if the
httpPermiteListareDirBonuri
option is active.
To be able to print a receipt via HTTP, you need to send a POST call to http://192.168.1.23:8080
and the body content must be the command lines in the receipt file. If you want to specify the
name of the receipt file, this information can be sent via a param query with the name nume
.
As an example, we have a bon.inp
receipt file with the specified name bon.inp that
contains a sale of a product that have 10% discount:
POST http://192.168.1.23:8080/bonuri?nume=bon.inp HTTP/1.1
Content-Type: text/plain; charset=utf-8
Content-Length: 200
S,1,______,_,__;Product with discount;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;ic;Discount for favorite customer: 10%;
W,1,______,_,__;ic;Thank you!;
T,1,______,_,__;0;;;;;
If you have the authentication enabled you must send the call with the Authorization header as in the example below. Authentication is Basic Auth.
POST http://192.168.1.23:8080/bonuri?nume=bon.inp HTTP/1.1
Content-Type: text/plain; charset=utf-8
Authorization: Basic dXNlcjpwYXJvbGE=
Content-Length: 200
S,1,______,_,__;Product with discount;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;ic;Discount for favorite customer: 10%;
W,1,______,_,__;ic;Thank you!;
T,1,______,_,__;0;;;;;
In response to the above call, the file name generated for printing will return. In this driver
version there is no direct validation in the webserver. Commands sent in the http body are sent
to the driver and based on them will build a receipt file that will be copied to the receipts
directory specified by the option directorBonuri
and executed as any other receipt.
A response to the post above will contain in the body the file name generated by the
server/driver and sent to the fiscal equipment. At the same time to the name of then receipt
received will be appended _HTTP_ip_client_port_client_datetime
at the end to be
able to identify quickly the receipt in the executed receipts folder. In
the example below, the receipt was received from the computer with ip 192.168.1.50 on September
12, 2018 at 13:20:36.
HTTP/1.1 200 OK
Content-Type: text/html
Date: Tue, 11 Sep 2018 10:20:36 GMT
Content-Length: 52
bon_inp_HTTP_192_168_1_50_59936_2018_09_12_13_20_36_124.inp
If you need help in implementing a http client required for this procedure, please contact us at suport@dxprint.ro.
Must be specified that the driver can be used at the same time for a local sales application that generates the receipts in the same receipts directory. The fact that receipts are received through the HTTP protocol does not interfere with the driver's local operation. In addition, it can be used at the same time including extracting receipts from FTP directory.
To run the driver needs a valid license. It can be purchased online directly from the website in the Cumpara licenta section, or from our partners. Licensing is based on the tax equipment series and is paid only once, regardless of whether the fiscal equipment has been reused on another company.
If you need a test or application integration license, please email us at suport@dxprint.ro and you will be able to receive it free of charge.
To see the list of commands, you need to run the command line driver as dxprint.exe -h. At launch you will have the following list of options:
-X Prints report X, Ex. dxprint.exe -X
(Windows), ./dxprint
-X
(Linux, MacOS)
-Z Prints report Z, Ex. dxprint.exe -Z
(Windows), ./dxprint
-Z
(Linux, MacOS)
New
-D Print daily report by departments, Ex. dxprint.exe -D
(Windows), ./dxprint
-D
(Linux, MacOS)
-d=<valoare> Cash deposit, Ex. dxprint.exe -d=12.34
(Windows), ./dxprint -d=5
(Linux, MacOS)
-r=<valoare> Cash withdrawal, Ex. dxprint.exe -r=56
(Windows), ./dxprint -r=45.67
(Linux, MacOS)
-t Displays current date set on fiscal equipment, Ex. dxprint.exe
-t
(Windows), ./dxprint -t
(Linux, MacOS)
-c Set current date on fiscal equipment based on current computer date,
Ex. dxprint.exe -t
(Windows), ./dxprint -t
(Linux, MacOS)
-xd=<data_inceput,data_sfarsit> Exports the XML report required for ANAF by
date interval (format DAY-MONTH-YEAR_SHORT),
exports the XML report for the interval November 1, 2018 - December 1, 2018. These files will be
saved in the
Ex. dxprint.exe
-xd=01-11-18,01-12-18directorRapoarteAnaf
directory set in the configuration file.
-xz=<Z_inceput,Z_sfarsit> Exports the XML report required for ANAF by Z
numbers, Ex. dxprint.exe -xz=10,23
exports the XML report for Zs from 10 to 23.
These files will be saved in the directorRapoarteAnaf
directory set in the
configuration file.
-n Print a non-fiscal test receipt, Ex. dxprint.exe -n
(Windows),
./dxprint -n
(Linux, MacOS)
New
-nm Prints a multi-line non-fiscal test receipt delimited by commas,
Ex. dxprint.exe -nm="line1 for test printing,line2 for test printing"
(Windows),
./dxprint -nm="line1 for test printing,line2 for test printing"
(Linux, MacOS)
-s Print equipment information (series, tax, header, vat values), Ex.
dxprint.exe -s
(Windows),
./dxprint -s
(Linux, MacOS). This command can also be launched without a valid
license, being specially designed to see the series of equipment to license the driver and to
test that there is communication between driver and the fiscal equipment.
New
-sn Print network equipment information (mac, ip address, port, gateway, dhcp),
Ex. dxprint.exe -sn
(Windows),
./dxprint -sn
(Linux, MacOS). This command can also be launched without a valid
license, being specially designed to see equipment information and test that there is
communication between driver and fiscal equipment.
-v Displays the driver version, Ex. dxprint.exe -v
(Windows),
./dxprint -v
(Linux, MacOS)
To export the XML reports from the fiscal equipment, you need to run the command line driver with the following options:
-xd=<data_inceput,data_sfarsit> Exports the XML report required for ANAF by
date interval (format DAY-MONTH-YEAR_SHORT),
exports the XML report for the interval November 1, 2018 - December 1, 2018. These files will be
saved in the
Ex. dxprint.exe
-xd=01-11-18,01-12-18directorRapoarteAnaf
directory set in the configuration file.
-xz=<Z_inceput,Z_sfarsit> Exports the XML report required for ANAF by Z
numbers, Ex. dxprint.exe -xz=10,23
exports the XML report for Zs from 10 to 23. These files will be saved in the
directorRapoarteAnaf
directory set in the configuration file.
In order to report any issues we have the request to email us at suport@dxprint.ro . Please
specify the driver version used, which information can be found through the command dxprint.exe
-v
.
Known Issues:
When the connection to the COM port is desired and the fiscal equipment is not set in
computer mode, or
it is turned off or not properly connected, it will generate the error:
Problema deschidere port serial: The system cannot find the file specified.
When TCP/IP connectivity is desired and the fiscal equipment is not set up in computer mode or is off or not properly connected, it will generate a timeout after a wait time of 20 seconds.
Linux: When you first want to connect to the COM port, the message will be generated:
Problema deschidere port serial: open /dev/ttyACM0: permission denied.
In this case the command sudo chmod a+rw /dev/ttyACMX must be run, where X is the
port number assigned by the operating system, or if you do not want to give access to all users
on this port you can run usermod -a -G dialout <user>, where <user> is
the user you want to share with.
If the fiscal equipment stays without paper or faces a problem right when it comes during the
printing process, the driver waits for 120 seconds to fix the problem. Most of the time it
happens that the receipt stops because of the lack of paper, information mentioned in the
driver's
response. This will generate a message like:
Lipsa hartie! Va rugam schimbati rola! Urmatoarea incercare de tiparire va fi peste 5
secunde!
If you need more information about an error, we have the request to check the existing
dxprint.log
file in the driver directory. It contains additional information about
the receipts sent and the errors received.
The command file format is the same as Fiscalwire, and with FPrint only the following commands
are compatible:
S (sale), T (total), D (receipt duplicate), P (free text), C (discount/increase), H
(keyboard lock), F (keyboard unlock), I (deposit/withdrawal), X (report X), Z
(report Z)
.
Current legislation does not allow a fiscal receipt copy, the command being kept only for
compatibility.
There is a list of 2 commands that do not exist in the FPrint driver, namely:
V (client display), K (fiscal code on receipt)
In addition, the driver allows:
a) Transmission of the unit of measurement (pcs, kg, etc.) into the sales command.
b) Forwarding the 19% vat value in the sales command, the index position can be transmitted for
compatibility, and the driver automatically identifies the vat value existing in the specified
index position.
c) The Fiscal Code can be sent by the separate K
command, and at that time the
fiscal receipt will be printed according to the new legislation.
S,logic_number,______,_,__;description;price;quantity;department;group;vat;0;0;um;
Examples:
S,1,______,_,__;Product with UM specified;19.45;3.905;1;1;19%;0;0;kg;
S,1,______,_,__;Product with vat value specified;12.00;1.000;1;1;9%;0;0;buc;
S,1,______,_,__;Product with vat index position;12.00;1.000;1;1;2;0;0;buc;
S,1,______,_,__;Product without UM specified;19.45;3.905;1;1;19%;0;0;
S Represents the sale command
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
description Represents product description. The permitted character set by equipment is ISO-8859-2. It can have a maximum of 72 characters.
price Represents the price of the product. It can be up to a maximum of 2 decimals and can be negative for void operations.
quantity Represents the quantity of the product. This can be up to a maximum of 3 decimal places.
department Represents the product department. Value between 0 - 99. 0 meaning it has no specified department.
group Represents the product group. Value between 1 - 99.
vat Represents the vat value. It can be passed as position (1 - 99) or as value in the form of 19%, 5%, 9%. If the percentage is present, it will be assumed that the value is passed and try to identify the value with the list of vat values existing in the fiscal equipment. If the index position is sent the driver will try to identify with the existing positions in the fiscal equipment and will be sent the value of vat specified by index position or value. The list of available vat values and positions in the fiscal equipment can be found in the command: dxprint.exe -s.
um Represents the unit of measure of the product. If not specified then the driver
will send the BUC
measurement unit. If a unit of measurement is bigger than 6
characters, only the first 6 characters will be sent to the fiscal equipment.
C,logic_number,______,_,__;discount_type;value;;;;
Examples:
C,1,______,_,__;0;15.00;;;;
//Percentage increase by 15%
C,1,______,_,__;1;10.00;;;;
//Percentage discount by 10%
C,1,______,_,__;2;10.00;;;;
//Value increase of 10 lei
C,1,______,_,__;3;5.00;;;;
//Value discount of 5 lei
C Represents the discount command
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
discount_type Represents the type of action. This can be:
0
- Percentage increase
1
- Percentage discount
2
- Value increase
3
- Value discount
value Represents the percentage/value of the discount/increase. It can be up to a maximum of 2 decimals.
Careful:
If the discount command appears after the
L
subtotal command, then the discount/increase will be given to the entire value of
the receipt.
Otherwise, a discount/increase will be granted to the product before the discount command.
L,logic_number,______,_,__;
Examples:
L,1,______,_,__;
L Represents the subtotal command.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
T,logic_number,______,_,__;payment_type;value;;;;
Examples:
T,1,______,_,__;1;5.65;;;;
//Payment by CARD in value of 5.65 lei
T,1,______,_,__;4;5.35;;;;
//Payment by VALUE TICKETS in value of 5.35 lei
T,1,______,_,__;0;;;;;
//Payment by CASH with automated total calculated
T,1,______,_,__;0;25.87;;;;
//Payment by CASH in value of 25.87 lei
T Represents the total command.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
payment_type Represents the accepted payment method. This can be:
0
- Cash
1
- Card
2
- Credit
3
- Meal tickets
4
- Value tickets
5
- Voucher
6
- Modern payment
7
- Card + Cash in advance
8
- Other payment methods
value Represents the payment value. This can be up to 2 decimal places.
If this is
not specified, the total payment will automatically be calculated.
If the form of payment is 7 - Card + Cash in advance, the value entered must be greater than the
total amount of the receipt.
report_type,logic_number,______,_,__;;;;;;;
Examples:
X,1,______,_,__;;;;;;;
Z,1,______,_,__;;;;;;;
report_type Represents the type of report you want. This can be:
X
- X report
Z
- Z report
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
Warning:
When these reports are executed, it will
generate in the driver directory an additional file with the totals of that day in an easy to
understand format.
R,logic_number,______,_,__;report_type;display_type;date/number
Z start;date/number Z end;
Examples:
R,1,______,_,__;6;0;01-12-18;31-12-18;
//Detailed report for date interval 01.12.2018 - 31.12.2018
R,1,______,_,__;1;0;100;200;;;
//Detailed report for Z number interval 100 - 200.
R,1,______,_,__;2;0;;;
//ECR report
R,1,______,_,__;3;0;;;
//Department report
R,1,______,_,__;4;0;;;
//Group product report
R,1,______,_,__;5;0;01-12-18;14-12-18;
//Summary report for date interval 01.12.2018 - 14.12.2018
R,1,______,_,__;0;0;20;40;
//Summary report for Z number 20 - 40
R Represent the check report command.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
report_type Represents the type of report. This may be:
0
- Summary report based on Z numbers
1
- Detailed report based on Z numbers
2
- ECR report
3
- Department report
4
- Group product report
5
- Summary report based on date interval
6
- Detailed report based on date interval
display_type Represents how the report should be displayed. This can be 0 for printing on fiscal equipment or 1 for export to external file. At this time, only printing (0 parameter) is functional.
date/number Z start Represents the start date in short format (day-month-year_short,
Ex: 01-12-18) if the report type is 5
or 6
, or the starting Z number
if the report type is 0
or 1
.
For the rest of the reports this parameter is ignored. For Z number, the minimum admissible
value is 0.
date/number Z end Represents the end date in short format (day-month-year_short, Ex:
31-12-18) if the report type is 5
or 6
, or the Z number ends if the
report type is 0
or 1
. For the rest of the reports this parameter is
ignored. For both date and number Z, the value must be greater than the date/number Z start
date.
I,logic_number,______,_,__;action_type;value;;;;
Examples:
I,1,______,_,__;0;12.56;;;;
//Cash deposit of 12.56 lei
I,1,______,_,__;1;5.89;;;;
//Cash withdrawal of 5.89 lei
I Represents the cash deposit/withdrawal command.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
action_type Represents the action type. This can be:
0
- Cash deposit
1
- Cash withdrawal
value Represents the deposit or withdrawn value. It must be 2 decimal places.
K,logic_number,______,_,__;fiscal_code;
Examples:
K,1,______,_,__;RO123456789;
K,1,______,_,__;987654321;
K Represents the fiscal code print command on the receipt.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
fiscal_code Represents the firm fiscal code you want to print on your receipt.
V,logic_number,______,_,__;action_type;text;
Examples:
V,1,______,_,__;0;CLEAR;
V,1,______,_,__;1;Text on top line of display;
V,1,______,_,__;2;Text on bottom line of display;
V Represents the display command on the external display.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
action_type Represents the action type you want. It can be:
0
- Delete the text from external display
1
- Print the text on the top line of the external display
2
- Print the text at the bottom line of the external display
text Represents the desired text for shown on external display. The permitted character set by equipment is ISO-8859-2. Up to 20 characters.
P,logic_number,______,_,__;text;;;;;
P,1,______,_,__;Operator: John Doe;;;;;
P,1,______,_,__;Thank you!;;;;;
P,1,______,_,__;Discount loyalty card 20%;;;;;
P Represents the free text print command on the receipt.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
text Represents the desired text for display on the receipt. The permitted character set by equipment is ISO-8859-2. Up to 42 characters.
W,logic_number,______,_,__;display_type;text;
W,1,______,_,__;b;Operator: John Doe;
//Bold textW,1,______,_,__;bu;Thank you!;
//Bold and underline textW,1,______,_,__;;Discount loyalty card 20%;
//Text with no stylesW,1,______,_,__;idc;Discount 20%;
//Italic, double size center aligned textW,1,______,_,__;bur;Sale transaction #1234;
//Bold, underline with right alignment textW,1,______,_,__;biudc;Free text with all the styles used;
//Bold, italic, underline with double size and center alignment textW Represents the free text with various style print command on the receipt.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
display_type Represents the type of display you want. You can use multiple styles in
the same command. It can be: :
b
- Bold
i
- Italic
u
- Underline
d
- Double size text
l
- Text align left (default)
c
- Text align center
r
- Text align right
text Represents the desired text for display on the receipt. The permitted character set by equipment is ISO-8859-2. Up to 42 characters.
Q,logic_number,______,_,__;barcode_type;barcode;size;
Q,1,______,_,__;1;12345670;
//EAN8 barcodeQ,1,______,_,__;2;1234567890128;
//EAN13 barcodeQ,1,______,_,__;3;dxprint-1234565;
//Code128 barcodeQ,1,______,_,__;4;www.dxprint.ro;
//QRCode barcode without the size specifiedQ,1,______,_,__;4;www.dxprint.ro;5;
//QRCode barcode with the size specified of 5Q Represents the command to print a barcode on the receipt.
logic_number Represents the logical number of the equipment, and you can modify the
numarLogic
option from the configuration file. Value between 1 - 99.
barcode_type Represents the type of barcode you want. It can be:
1
- EAN8
2
- EAN13
3
- Code128
4
- QRCode
barcode Represents the barcode for display. The maximum size varies depending on the
type of bar code you want. This can be: 8 numeric characters for EAN8
,
13 numeric characters forEAN13
, between 3 and 31 alphanumeric
characters for Code128
, and between 3 and 279 alphanumeric characters for
QRCode
.
size Represents the size of the QRCode barcode. This can be between 1 and 8, 1 being the smallest and 8 the largest. If not specified, the size has a default value of 3. For the rest of the barcodes this parameter can only be passed as it will be ignored.
To be able to print receipts from the Saga C application with the DxPrint driver, you need to follow the instructions below:
From the menu Administrare
must be selected from the menu Configurare
societati
. In the open window you will choose the desired company and in the section you
Casa de marcat
will select the option DATECSPRINTER exactly as in the green
box in the picture below.
The driver selection and payment options will be made from the menu Operatii
submenu Iesiri
. In the open window choose an existing receipt or a new receipt will
be made and after it is completed, press the button Tiparire bon fiscal
. The window
opened by pressing the button will look exactly like the picture below. The section is selected
Configurare
and the information below will be filled in:
Program interfata
the option must be selected DxPrint
and Resident
mode must not be checked. If you have an older version of Saga, you can choose the FiscalWire
option from the menu.
Cale fisier de interfata cu programul de tiparire
The dxprint.exe executable path
must be selected. In the image below, the driver was unzipped in C:\DXPRINT.
Indice modalitate de incasare
must be exactly the same as the picture:
Indice 0 - Cash
Indice 4 - Tickets
Indice 1 - Card
Indice cota de TVA
must coincide with the list and position of existing vat values
in the equipment. This information can be find out by executing the command dxprint.exe
-s.
To print client fiscal code on receipt you need to add value CF: in the configuration
file config.json at the option transformaCifDinTextPublicitarInFactura
,
Ex: "transformaCifDinTextPublicitarInFactura": "CF:"
.
These examples can also be found in the driver's archive in the bonuri_exemple directory.
This receipt contains both the company's fiscal code and percentage discounts per product and free text. The receipt amount was paid with cash.
K,1,______,_,__;RO78344513;
S,1,______,_,__;Product of test1;12.12;2.000;2;1;2;0;0;
C,1,______,_,__;1;15.00;;;;
S,1,______,_,__;Product of test2;175.23;3.000;1;1;1;0;0;
C,1,______,_,__;1;25.00;;;;
P,1,______,_,__;PROMO 2+1;;;;
S,1,______,_,__;Product of test3;10.24;1.000;1;1;1;0;0;
S,1,______,_,__;Product of test4;195.00;2.000;1;1;1;0;0;
P,1,______,_,__;THANK YOU!;;;;
P,1,______,_,__;Cashier: John Doe;;;;
T,1,______,_,__;0;;;;;
This receipt contains 2 products that are subject to a 15% discount. The receipt amount was paid with cash.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
P,1,______,_,__;Receipt with general discount;;;;
L,1,______,_,__;
C,1,______,_,__;1;15.00;;;;
T,1,______,_,__;0;;;;;
This receipt contains 2 products that are subject to an individual discount of 10% and 5% respectively. The receipt amount was paid with cash.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;5.00;;;;
T,1,______,_,__;0;;;;;
This receipt contains 3 products, of which only one has a 10% discount, and the CARD is cashed in the amount of 50 lei and the remaining cash left over.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
P,1,______,_,__;Discount only for one product and multiple payment;;;;
S,1,______,_,__;Product of test 2;5.00;20.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
S,1,______,_,__;Product of test 3;10.00;2.000;1;1;1;0;0;buc;
T,1,______,_,__;1;50.00;;;;
T,1,______,_,__;0;;;;;
This gift contains 3 products of which only one has a 5 lei discount. The receipt amount was paid with cash.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;BUC;
S,1,______,_,__;Product of test 2;10.00;3.453;1;1;1;0;0;KG;
S,1,______,_,__;Product of test 3;10.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;3;5.00;;;;
T,1,______,_,__;0;;;;;
This receipt contains 5 products and is paid as follows: CARD - 0.50 lei, MEAL TICKETS - 0.50 lei and the rest by CASH. In addition, it contains both the firm fiscal code and a comment with the name of the operator.
K,1,______,_,__;RO123456789;
S,1,______,_,__;Item 1;1.00;1.000;1;1;1;0;0;buc;
S,1,______,_,__;Item 2;1.00;1.000;1;1;1;0;0;
S,1,______,_,__;Item 3;1.00;1.000;1;1;19%;0;0;
S,1,______,_,__;Item 4;1.00;1.000;1;1;9%;0;0;
S,1,______,_,__;Item 5;1.00;1.000;1;1;1;0;0;
P,1,______,_,__;Operator: John Doe;;;;
T,1,______,_,__;1;0.50;;;;
T,1,______,_,__;2;0.50;;;;
T,1,______,_,__;0;
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;19%;0;0;buc;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;19%;0;0;buc;
P,1,______,_,__;Receipt with multiple types of payment;;;;
T,1,______,_,__;1;5.65;;;;
T,1,______,_,__;3;5.35;;;;
T,1,______,_,__;0;;;;;
This receipt contains 3 products, of which only one has a 100% discount. The receipt amount was paid with cash.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;BUC;
S,1,______,_,__;Product of test 2;10.00;3.453;1;1;1;0;0;KG;
S,1,______,_,__;Product of test 3;10.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;100.00;;;;
T,1,______,_,__;0;;;;;
This receipt contains 2 products and 2 comments at the beginning and end of the receipt. The receipt amount was paid with cash.
P,1,______,_,__;Receipt start comment;;;;
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
S,1,______,_,__;Product of test 2;0.99;2.000;1;1;1;0;0;buc;
P,1,______,_,__;Receipt end comment;;;;
T,1,______,_,__;0;;;;;
This receipt contains 2 products that have the vat defined as a percentage value. The receipt amount was paid with cash.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;19%;0;0;buc;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;5%;0;0;buc;
P,1,______,_,__;Products with different vat values;;;;
T,1,______,_,__;0;;;;;
This receipt contains the print commands on the two lines of the external display.
V,1,______,_,__;0;CLEAR;
V,1,______,_,__;1;Sale finalized;
V,1,______,_,__;2;Thank You!;
This receipt contains the cash deposit command in the drawer.
I,1,______,_,__;0;12.34;;;;
This receipt contains the cash withdrawal command from the drawer.
I,1,______,_,__;1;12.34;;;;
This receipt contains the X report command.
X,1,______,_,__;;;;;;;
This receipt contains the Z report command.
Z,1,______,_,__;;;;;;;
This receipt contains the Daily ECR report command.
R,1,______,_,__;2;0;;;
This receipt contains the Daily report by departments command.
R,1,______,_,__;3;0;;;
This receipt contains the command for the summary report on interval 1 September 2018 - September 10, 2018.
R,1,______,_,__;5;0;01-09-18;10-09-18;
This receipt contains the command for the detailed report on interval 1 September 2018 - September 10, 2018.
R,1,______,_,__;6;0;01-09-18;10-09-18;
This receipt contains the command for the summary report on Z numbers between 1 and 10.
R,1,______,_,__;0;0;1;10;;;
This receipt contains the command for the summary report on Z numbers between 20 and 30.
R,1,______,_,__;1;0;20;30;;;
This receipt contains 2 products that have comments with italics, center alignment, and right alignment.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;ir;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
W,1,______,_,__;ic;Discount vailable on more than 5 products;
W,1,______,_,__;ic;Thank You!;
T,1,______,_,__;0;;;;;
This receipt contains 2 products that have a discount of 10% and which additionally have bold and centered comments.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;bc;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;bc;Discount loyalty card: 10%;
W,1,______,_,__;bc;Thank You!;
T,1,______,_,__;0;;;;;
This receipt contains 2 discount products and after each product there are bolded, centered and double size comments.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;bdc;Active promotion: -10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;20.00;;;;
W,1,______,_,__;bdc;Active promotion: -20%;
T,1,______,_,__;0;;;;;
EAN8
barcode:Receipt with 2 products that have a discount of 10% and which additionally
after
each product have a barcode EAN8
printed.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;1;90311017;
W,1,______,_,__;bc;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;1;98746576;
W,1,______,_,__;bc;Discount loyalty customer: 10%;
T,1,______,_,__;0;;;;;
EAN8
barcode:Receipt with 2 products that additionally have a EAN8
printed
barcode.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
Q,1,______,_,__;1;64538624;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
Q,1,______,_,__;1;90864827;
T,1,______,_,__;0;;;;;
EAN13
barcode:Receipt with 2 products that have a discount of 10% and additionally
after each product a barcode EAN13
printed.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;2;9780201379624;
W,1,______,_,__;bc;Discount loyalty customer: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;2;9874583923428;
W,1,______,_,__;bc;Discount loyalty customer: 10%;
T,1,______,_,__;0;;;;;
EAN13
barcode:
receipt with 2 products that additionally have a EAN13
printed
barcode.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
Q,1,______,_,__;2;3758493457029;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
Q,1,______,_,__;2;8645839201727;
T,1,______,_,__;0;;;;;
Code128
barcode:
Receipt with 2 products that have a discount of 10% and which additionally
after each product have a barcode Code128
.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;3;barcode1;
W,1,______,_,__;bc;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
Q,1,______,_,__;3;9874-tr-sm;
W,1,______,_,__;c;Sale transaction #:;
Q,1,______,_,__;3;250990;
T,1,______,_,__;0;;;;;
Code128
barcode:Receipt with 2 products that have an additional barcode for
Code128
each product, and a barcode that represents the current transaction number.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
Q,1,______,_,__;3;bl-123;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
Q,1,______,_,__;3;cod0989-sm;
W,1,______,_,__;c;Sale transaction #:;
Q,1,______,_,__;3;19997678;
T,1,______,_,__;0;;;;;
QRCode
barcode:
Receipt with 2 products that have discount and which additionally contains an
internet address in QRCode
standard size barcode format .
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;bc;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
W,1,______,_,__;bc;Try our new online shop:;
Q,1,______,_,__;4;www.dxprint.ro;
T,1,______,_,__;0;;;;;
QRCode
barcode:
Receipt with 2 products that additionally contains an internet address in
QRCode
standard size barcode.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
W,1,______,_,__;ic;Try our new online shop:;
Q,1,______,_,__;4;www.dxprint.ro;
T,1,______,_,__;0;;;;;
QRCode
barcode:
Bon with 2 products that additionally contains an internet address in the form
of QRCode
large-scale barcode.
S,1,______,_,__;Product of test 1;10.00;1.000;1;1;1;0;0;buc;
C,1,______,_,__;1;10.00;;;;
W,1,______,_,__;bc;Discount loyalty card: 10%;
S,1,______,_,__;Product of test 2;5.00;2.000;1;1;1;0;0;buc;
W,1,______,_,__;bc;Try our new online shop:;
Q,1,______,_,__;4;www.dxprint.ro;7;
T,1,______,_,__;0;;;;;