GSTIN : 20ADBPP8636R1Z2COMPOSITE DEALER
Billing & Order Management Portal
All customer bills and details are safely stored in your system and can be exported anytime directly into Excel or Google Sheets.
All customer details, phone numbers, prescriptions, and billing amounts are automatically added to your Google Sheet rows in real time!
function doPost(e) {
try {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Auto-create header on row 1 if sheet is empty
if (sheet.getLastRow() === 0) {
sheet.appendRow([
"Invoice No", "Date", "Customer Name", "Phone / WhatsApp", "Prescription",
"Products / Items", "Subtotal (βΉ)", "Discount (βΉ)", "Grand Total (βΉ)",
"Advance Paid (βΉ)", "Balance Due (βΉ)", "Payment Mode", "Status", "Added At"
]);
sheet.getRange(1, 1, 1, 14).setFontWeight("bold").setBackground("#e0f2fe");
}
var data = JSON.parse(e.postData.contents);
var list = Array.isArray(data) ? data : [data];
for (var i = 0; i < list.length; i++) {
var item = list[i];
var products = (item.items || []).map(function(p) {
return p.name + ' (x' + p.qty + ' @ βΉ' + p.price + ')';
}).join('; ');
sheet.appendRow([
item.id || '',
item.date || '',
item.customer || '',
item.phone || '',
item.presc || 'None',
products,
item.subtotal || 0,
item.discount || 0,
item.grandTotal || 0,
item.advance || 0,
item.balance || 0,
item.paymentMode || '',
item.status || 'In Lab',
new Date().toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' })
]);
}
return ContentService.createTextOutput(JSON.stringify({ result: "success", count: list.length }))
.setMimeType(ContentService.MimeType.JSON);
} catch (error) {
return ContentService.createTextOutput(JSON.stringify({ result: "error", error: error.toString() }))
.setMimeType(ContentService.MimeType.JSON);
}
}
| User | Password | Role | Action |
|---|
data/users.json
Edit user emails and passwords directly in raw format. Both local Node file and browser storage update instantly.
β’ GSTIN: 20ADBPP8636R1Z2 β’ COMPOSITE DEALER
ποΈ Refraction Report
| TYPE | SPH | CYL | AXIS | VISION | |
|---|---|---|---|---|---|
| D.V | RE | - | - | - | - |
| LE | - | - | - | - | |
| NV Add | RE | - | - | - | - |
| LE | - | - | - | - | |
Remarks:
| SN. | Product | Description | HSN | QTY | UOM | Rate | Amount | Discount | Net Amount |
|---|
| Payment Details | ||
|---|---|---|
| Date | Mode | Amount |
| Net Outstanding Balance | βΉ0 | |
{customer}
Sending: 1 of 5 to Rahul Sharma...
Centre for Vision Care β’ Complete Eyecare & Eyewear Solutions