There is an alternative, much simpler method of getting the payment plans of TT2 objects by Service Provider, see link below:
Dbeaver method:
Information you need to acquire before starting this tutorial:
Service Provider ID from here: https://track.ruptela.lt/administrator/serviceprovider/
If you are outside the office you must be connected to the VPN
1. Download DBeaver (or any other PostgreSQL client): Download
1.1. Install DBeaver hitting next on everything, leaving as the default installation.
2. Create a connection to TT2 DB:
Host: tt2-db-prod-ruptela.lt
Port: 5432
Database: track2
Username: rouser
3. Connect to the DB:
3.1 if it asks to download drivers, hit the download button.
4. Open new SQL query window:
5. Copy the SQL Query below and swap "<ServiceProviderID>" with the Service Provider ID:
SELECT client.company_name, object.imei, object.name, object.payment_plan, object.visible
FROM object
INNER JOIN client ON object.client_id = client.id
WHERE client_id IN (
SELECT id
FROM client
WHERE provider_id = <ServiceProviderID>) AND imei NOTNULL
******Replace the whole expression <ServiceProviderID> by the provider id number******
β
βExample: Using Service Provider: TREND (ID: 1197), it would be:
βprovider_id = 1197
6 . Paste in DBeaver the whole SQL Query and press CTRL + Enter
7. Click in the highlighted button in the picture below
8. A popup will appear, select CSV as the format and click Next
Click Next again
Click Next again
Click Next again
Click in Proceed
9. The CSV file containing all objects information will be available in this folder:
"C:\Users\<yourUserNameHere>"