I have evolved the ERPDeliveryReceipt QR Code scanning to write to a Kanban Board display into something more generic but brilliant. Now you can scan to update any table and set any field value.
Below is the changed code to show how the best is so simple:
The scanned QR Code has to be a 5 comma separated values to be inside this construct:
- Code: Select all
SQL: UPDATE [Table] SET [Set]=[Set2] WHERE [Where]=[Where2]
Just set your 5 csv set in a QR Code generator and then scan it in, and press Update DB.
The default is for quick testing of the BedRegistration KanbanBoard example under Red1 Ninja plugin. You can use the QR Code prepared below which is just PatientTwo. The second QR Code is ,,,,PatientOne to check the defaulting csvs works.
How To Use:
Fetch the APK from http://sourceforge.net/projects/red1/fi ... k/download
After launch, press on the Settings icon and set the URL of your PostgreSQL database and its login/pass
Press Scan and first time it will ask you to install ZXing Code Scanner. After that its ready to use.
Generate QR Code from any online generator such as http://www.qr-code-generator.com/
Scan the code.
Update DB and then check your database for the changed value.
You can scan the above codes in conjunction with viewtopic.php?f=45&t=1831#p8843. Watch the movie here.
Sourcecode is committed to http://github.com/red1org/ScanWrite. The URL setting of 10.0.2.2 is for localhost testing inside Android Studio. Any questions please direct to my email at red1@red1.org or red1org@gmail.com giving background info so i can edit and publish them here.
Encountered Issues:
1. Unable to connect - Edit pg_hba.conf and postgresql.conf to allow trust all and listen to any '*'
2. Wrong QR Code - it is OK, i catch exception there and make it continue. Later i will make a pop up listing summary of good and bad scans.
Why Must I Use ScanWrite?
1. It is convenient and superfast to tag anything in the ERP
2. QR code tag is to directly affects a database status or any other field. (You must admit this is brilliant.)
3. iDempiere need not be running. Just the Postgresql Database service is up.
4. Kanban Board example as reference of a brilliant practical use of iDempiere.