BMR Calculator

BMR Calculator

Calculate your Basal Metabolic Rate - the number of calories your body needs at rest

in
lbs
Herbalife Order Calculator

Herbalife Order Calculator

Calculate pricing for customer orders with automatic discounts and GST

Customer Information

Product Selection

Product Name Qty Retail Price Earn Base Volume Points MRP Action

Order Summary

Our Price Calculation

Subtotal (Retail Price): ₹0.00
Discount Amount: -₹0.00
Gross Amount: ₹0.00
Total Volume Points: 0
Delivery Charges: ₹0.00
GST (18%): ₹0.00

Our Price/Net Amount: ₹0.00

MRP Calculation

Total MRP: ₹0.00
No Additional Charges: ₹0.00
No GST (Included in MRP): ₹0.00
   
   
   

MRP Total: ₹0.00

Google Sheets Integration Setup Guide

Step 1: Create Google Sheet Structure

  • • Create a new Google Sheet
  • • Rename the first sheet to 'Sheet1' (for products)
  • • Create a second sheet named 'Sheet2' (for orders)

Step 2: Setup Sheet1 (Products) Headers

In Sheet1, add these headers in row 1 (A1 to G1):

A1: Product Name | B1: Retail Price | C1: Earn Base | D1: Volume Points | E1: MRP | F1: Customer Price | G1: SKU Code

Step 3: Add Sample Product Data

Add your Herbalife products starting from row 2 with corresponding values

Step 4: Setup Google Apps Script

  • • In your Google Sheet, go to Extensions → Apps Script
  • • Delete the default code and paste the Google Apps Script code provided below
  • • Save the project (Ctrl+S)

Step 5: Deploy as Web App

  • • Click "Deploy" → "New deployment"
  • • Choose type: "Web app"
  • • Execute as: "Me"
  • • Who has access: "Anyone" (or "Anyone with Google account")
  • • Click "Deploy" and copy the Web app URL

Step 6: Update Form Configuration

  • • Replace 'YOUR_GOOGLE_APPS_SCRIPT_URL_HERE' in the form code with your Web app URL
  • • Test the "Load Products from Sheet" button

Important Notes:

  • • Make sure Sheet1 and Sheet2 names are exact
  • • Column headers must be in the exact order specified
  • • Numeric columns (B1-G1) should contain only numbers
  • • Test with a few products first before adding all data
`); } else { // For errors, return JSON return ContentService.createTextOutput(JSON.stringify(data)) .setMimeType(ContentService.MimeType.JSON); } } function getProducts() { try { const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1'); if (!sheet) { return createResponse({error: 'Sheet1 not found. Please create Sheet1 with product data.'}); } const data = sheet.getDataRange().getValues(); if (data.length <= 1) { return createResponse({error: 'No product data found. Please add products to Sheet1.'}); } // Skip header row and validate data const products = data.slice(1) .filter(row => row[0] && row[0].toString().trim() !== '') // Filter out empty rows .map(row => ({ name: row[0] ? row[0].toString() : '', retailPrice: parseFloat(row[1]) || 0, earnBase: parseFloat(row[2]) || 0, volumePoints: parseInt(row[3]) || 0, mrp: parseFloat(row[4]) || 0, customerPrice: parseFloat(row[5]) || 0, skuCode: row[6] ? row[6].toString() : '' })); return ContentService.createTextOutput(JSON.stringify({success: true, products: products})) .setMimeType(ContentService.MimeType.JSON); } catch (error) { return createResponse({error: 'Error loading products: ' + error.toString()}); } } function saveOrder(orderData) { try { const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet2'); if (!sheet) { return createResponse({error: 'Sheet2 not found. Please create Sheet2 for orders.'}); } // Create headers if sheet is empty if (sheet.getLastRow() === 0) { sheet.getRange(1, 1, 1, 12).setValues([[ 'Order Date', 'Customer Name', 'City', 'Product Name', 'Quantity', 'Retail Price', 'Earn Base', 'Volume Points', 'MRP', 'Discount Rate', 'Our Price Total', 'MRP Total' ]]); } const orderDate = new Date(); // Validate order data if (!orderData.customerName || !orderData.city || !orderData.products || orderData.products.length === 0) { return createResponse({error: 'Invalid order data. Please check customer name, city, and products.'}); } // Add each product as a separate row orderData.products.forEach(product => { sheet.appendRow([ orderDate, orderData.customerName, orderData.city, product.name, product.quantity, product.retailPrice, product.earnBase, product.volumePoints, product.mrp, orderData.discountRate, orderData.calculations.ourPrice, orderData.calculations.totalMRP ]); }); return createResponse({ success: true, message: `Order for ${orderData.customerName} saved successfully with ${orderData.products.length} products.` }); } catch (error) { return createResponse({error: 'Error saving order: ' + error.toString()}); } }