Skip to content

Google Drive and Sheets

Connect the Owner's Google account to a station PC, then send the station's registers to one Google Sheet in the Owner's Drive from the Reports screen.

On this page
  1. Before you start
  2. What the app can see in your Drive
  3. Connect the Owner's Google account
  4. Sync the registers to Google Sheets
  5. What the spreadsheet holds
  6. More than one PC
  7. Backups in Google Drive
  8. Disconnect Google
  9. If something goes wrong

PetroKhata can write the station's registers into a Google Sheet in the Owner's own Google Drive. The Owner connects their Google account on the station PC once. After that, anyone who can open Reports can send the registers to the sheet with one button.

Before you start

  • Only the Owner connects or disconnects the Google account, with their PIN. The Owner must have a PIN on this PC.
  • You need the internet to connect and to sync.
  • The Google Drive screen is under Setup, on the station PC only. It is not in the web portal.
  • If the screen says Google is not set up on this PC yet. It needs the app’s Google client, added to its settings once., the person who installed PetroKhata must add that setting first. See Settings for IT.

What the app can see in your Drive

The app asks Google only for the files it makes itself. It cannot see or change the rest of the Owner's Drive.

The Google sign-in is kept on this PC only, sealed by Windows. It is never synced to other PCs or phones.

Connect the Owner's Google account

  1. Select Setup → Google Drive.
  2. Select Connect Google account.
  3. In Connect Google with the Owner’s PIN, choose the Owner and type their PIN.
  4. A browser window opens at Google. The PetroKhata screen says Finish signing in to Google in the browser window that opened.
  5. In the browser, sign in to the Owner's Google account and allow access.
  6. The browser says Connected. You can close this tab and go back to the station app. Close the tab.

The Google Drive screen now says Connected to and the Google email address.

Finish the sign-in within 5 minutes. If you take longer, the screen says The Google sign-in was not finished. Try again. Select Connect Google account again.

Sync the registers to Google Sheets

  1. Select Reports.
  2. Choose the dates. On the Daily Sales Register tab, the sync uses the Business date. On the other tabs, it uses From and To.
  3. Select Sync to Google Sheets, next to Print.
  4. Wait while it says Writing to Google Sheets…
  5. When it says Synced and the number of tabs, the sheet is ready.

The Sync to Google Sheets button appears only after the Owner has connected Google on this PC.

To open the sheet, select Setup → Google Drive → Open the spreadsheet. The same screen shows when the last sync was, for example Last synced 22 Nov, 7:05 pm.

What the spreadsheet holds

The first sync makes one spreadsheet in the Owner's Drive, named after the station. Each sync writes these tabs:

Tab What it holds
Daily sales For each day: each product's litres and amount in ₹.
Collections For each day: number of shifts, litres, sales, and cash, card, UPI, fleet and credit collections, with the day's short and excess in ₹.
Stock For each tank and each closed day: opening, receipts, sales, book stock, dip, variation, month variation, limit and status, in litres.
Credit Every credit customer: what they owe now, their limit and their status.
Proposals and invoices Proposals and invoices dated in the period, with taxable value, GST and total.
Purchases Posted purchase bills in the period. Only on the PC the Owner has cleared for accounts.

Only days with shifts appear in Daily sales and Collections. Only closed days appear in Stock. See Close the day.

If someone deletes the spreadsheet, the next sync makes a new one.

More than one PC

The Google connection belongs to one PC. To sync from another PC, the Owner connects Google on that PC too. Each PC keeps its own spreadsheet.

Backups in Google Drive

When daily backups are on and Google is connected on a PC, each backup of that PC is also copied to the Owner's Drive. See Backup and restore.

Disconnect Google

  1. Select Setup → Google Drive.
  2. Select Disconnect.
  3. In Disconnect Google with the Owner’s PIN, choose the Owner and type their PIN.

The screen says Google has been disconnected from this PC. The spreadsheet stays in the Owner’s Drive. The Sync to Google Sheets button goes away from Reports.

If the Owner connects Google again later, the next sync makes a new spreadsheet. The old one stays in the Drive as it was.

If something goes wrong

You see What to do
Cannot reach Google. Check the internet connection. Connect the PC to the internet and try again.
The Google connection has expired. Connect again. The Owner selects Disconnect, then Connect Google account again.
Google sign-in was cancelled. The Owner did not allow access in the browser. Connect again and allow it.
Google Sheets refused the update. Try again in a minute. Wait a minute and select Sync to Google Sheets again.
The Owner connects a Google account first. Google is not connected on this PC. The Owner connects it.

Something here does not match your screen, or a step is unclear? Tell us and we will fix the page.

Type to search every page of the guide.