SP

Solar Phase Energy Pvt. Ltd.

Advance Receipt Manager  ·  Works Offline

Not configured
v4.0  ·  GSheets Sync
solarphase.in

0 receipt(s) waiting to sync to Google Sheets. Connect to internet and click Sync.

Receipt Details
Live Preview
SOLAR PHASE ENERGY PVT. LTD.
Solar EPC · BESS · SCADA · Rooftop & Commercial Solar · Kota, Rajasthan
ADVANCE MONEY RECEIPT
Receipt No.
--
Date
--
Received with thanks from
--
₹ --
--
Payment Mode--
Cheque No.--
Towards--
A/C Name: Solar Phase Energy Private Limited
Bank: ICICI Bank, Talwandi, Kota  |  A/C No: 153905001044  |  IFSC: ICIC0001539
GSTIN: 08ABECS8916K1ZS
This is a computer-generated receipt.

All Receipts

No receipts yet.
Total Received
₹0
0 receipts
This Month
₹0
0 receipts
Pending
₹0
0 receipts
Unsynced
0
in queue
Client-wise Summary
No data yet.
Monthly Collections
No data yet.
✅ Google Sheets Setup

Follow these 5 steps once. After that every receipt auto-syncs to your Google Sheet permanently.

  1. Create a new Google Sheet
    Go to sheets.google.com → click Blank. Name it Solar Phase Receipt Ledger.
  2. Open Apps Script
    In your Sheet: click Extensions → Apps Script. A new tab opens with a code editor.
  3. Paste the script below
    Delete everything in the editor, paste this code, then click Save (disk icon).
    // ===== Set your secret here (must match "Sync Secret Token" in the app) ===== var SECRET = 'CHANGE_ME'; function doGet(e) { var p = e.parameter || {}; var cb = p.callback || ''; try { // Reject anyone who doesn't send the matching token if (String(p.token || '') !== SECRET) { return reply(cb, {status:'error', message:'Unauthorized'}); } var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName('Ledger') || ss.insertSheet('Ledger'); // Create header row once if (sheet.getLastRow() === 0) { var headers = ['Receipt No.','Date','Client Name','Amount (Rs.)','Payment Mode', 'Cheque/Ref No.','Purpose','Project','Status','Notes','Synced At']; sheet.appendRow(headers); sheet.getRange(1,1,1,headers.length).setBackground('#1a6b3a') .setFontColor('#ffffff').setFontWeight('bold').setFontSize(10); sheet.setFrozenRows(1); sheet.setColumnWidth(1,130); sheet.setColumnWidth(3,180); sheet.setColumnWidth(6,130); sheet.setColumnWidth(7,220); sheet.setColumnWidth(8,150); sheet.setColumnWidth(11,160); } // No receipt number = health check (used by Test Connection) if (!p.rno) { return reply(cb, {status:'ok', message:'Solar Phase Receipt Sync Active'}); } var row = [ p.rno, p.date, p.name, Number(p.amount || 0), p.mode, p.ref || '', p.purpose || '', p.project || '', p.status || '', p.notes || '', new Date().toLocaleString('en-IN') ]; // Find existing row by Receipt No. -> update in place; else append var last = sheet.getLastRow(); var targetRow = 0; if (last >= 2) { var rnos = sheet.getRange(2,1,last-1,1).getValues(); for (var i=0; i < rnos.length; i++) { if (String(rnos[i][0]) === String(p.rno)) { targetRow = i+2; break; } } } var action; if (targetRow > 0) { sheet.getRange(targetRow,1,1,row.length).setValues([row]); action = 'updated'; } else { sheet.appendRow(row); targetRow = sheet.getLastRow(); action = 'added'; } // Colour the status cell + format amount var st = sheet.getRange(targetRow, 9); if (p.status === 'paid') st.setBackground('#e8f5ee').setFontColor('#145530'); else if (p.status === 'pending') st.setBackground('#faeeda').setFontColor('#633806'); else st.setBackground('#fee2e2').setFontColor('#991b1b'); sheet.getRange(targetRow,4).setNumberFormat('#,##0'); return reply(cb, {status:'success', action:action, row:targetRow}); } catch(err) { return reply(cb, {status:'error', message:String(err)}); } } // Returns JSONP when a callback is supplied, plain JSON otherwise function reply(cb, obj) { var json = JSON.stringify(obj); if (cb) { return ContentService.createTextOutput(cb + '(' + json + ')') .setMimeType(ContentService.MimeType.JAVASCRIPT); } return ContentService.createTextOutput(json) .setMimeType(ContentService.MimeType.JSON); } // Also accept JSON POSTs (optional) function doPost(e) { var data = {}; try { data = JSON.parse(e.postData.contents); } catch(ex) {} return doGet({ parameter: data }); }
  4. Deploy as Web App
    Click Deploy → New deployment.
    • Type: Web app
    • Execute as: Me
    • Who has access: Anyone
    Click Deploy → Authorize → Copy the Web App URL.
  5. Paste the URL below and Save
    The URL looks like: https://script.google.com/macros/s/AKfyc.../exec
⚙ App Settings
Paste your deployed Web App URL here
Must match the SECRET set inside your Apps Script. Blocks others from writing to your sheet.
Data Backup & Restore

Re-sync All pushes every receipt to Google Sheets (safe — skips duplicates).
Backup JSON saves a local copy you can restore into this app on any device.