Saleculator can push products directly to the label scale. If the label scale communication protocol is not supported by Saleculator, you can download the PLU file from Saleculator and upload to the scale using the software that comes along the scale.
You can choose any data column by changing the query field in the script file. By default the script generate tab seperated values. If you want to change it to seperated by comma or any other character, make the changes in query field, like “SELECT CONCAT_WS(‘;’, NAME, CODE, PRICESELL) FROM PRODUCTS”.
Downloading PLU file on Windows
Create a Windows batch file and copy-paste the below code (UAE):
@ECHO OFF echo Exporting... set mysqlpath="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" SET query="SELECT NAME, CODE, PRICESELL FROM PRODUCTS" SET plufile=C:\Saleculator\plu.txt IF EXIST %plufile% DEL /F %plufile% %mysqlpath% -u root -ppassword SALECULATOR -N -e %query% > %plufile% echo PLU file generated. pause
Create a Windows batch file and copy-paste the below code (INDIA):
@ECHO OFF echo Exporting... set mysqlpath="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" SET query="SELECT CONCAT_WS(',',PRODUCTS.REFERENCE, PRODUCTS.NAME, PRODUCTS.CODE, ROUND(PRODUCTS.PRICESELL*(1+MAX(TAXES.RATE)),2), 1) FROM PRODUCTS JOIN TAXES ON PRODUCTS.TAXCAT=TAXES.CATEGORY WHERE PRODUCTS.ISSCALE=1 GROUP BY PRODUCTS.ID"; SET plufile=C:\Saleculator\plu.txt IF EXIST %plufile% DEL /F %plufile% %mysqlpath% -u root -ppassword SALECULATOR -N -e %query% > %plufile% echo PLU file generated. pause
Double click the batch file to generate PLU file. The PLU file will be copied to the path specified in plufile field.
Downloading PLU file on Linux
Create a linux bash file:
nano /opt/scale.bash
Copy-paste the below code into the file (UAE):
#!/bin/bash echo Exporting... query="SELECT NAME, CODE, PRICESELL FROM PRODUCTS;" plufile="/opt/PLU.txt" rm -f $plufile mysql -u root -ppassword SALECULATOR -N -e "$query" > $plufile Copy-paste the below code into the file (INDIA):
#!/bin/bash echo Exporting... query="SELECT CONCAT_WS(',',PRODUCTS.REFERENCE, PRODUCTS.NAME, PRODUCTS.CODE, ROUND(PRODUCTS.PRICESELL*(1+MAX(TAXES.RATE)),2), 1) FROM PRODUCTS JOIN TAXES ON PRODUCTS.TAXCAT=TAXES.CATEGORY WHERE PRODUCTS.ISSCALE=1 GROUP BY PRODUCTS.ID"; plufile="/opt/PLU.txt" rm -f $plufile mysql -u root -ppassword SALECULATOR -N -e "$query" > $plufile
In Scaleculator.properties file set Script.CMD1 like below
Script.CMD1=sh /opt/scale.sh
Clicking the Script button at the bottom of the Saleculator screen will generate the PLU file.