Skip to main content
All CollectionsKnowledge Articles (Internal base)TT2/Admin Panel (Internal)
Get Payment Plant for all objects under a Service Provider
Get Payment Plant for all objects under a Service Provider
Albert Basiul avatar
Written by Albert Basiul
Updated over 7 months ago

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:

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:

mceclip0.png

Host: tt2-db-prod-ruptela.lt

Port: 5432

Database: track2

Username: rouser

mceclip1.png

3. Connect to the DB:

mceclip2.png

3.1 if it asks to download drivers, hit the download button.

4. Open new SQL query window:

mceclip3.png

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

mceclip3.png

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>"

Did this answer your question?