top of page

CAP Solar Billing

PJM REC Data

GATS
Location
Gen
Last Month
This Month
Date Read
Gen Date
64373
DDANJ - 19 Paulison
986
104741
105727
03-01-2026
02-01-2026
66723
Greater Bergen Community Action:Greater Bergen Community Action - 541 Midland
3168
322989
326157
03-01-2026
02-01-2026
66725
Church of Annunciation - 50 West Midland
3126
393162
396289
03-01-2026
02-01-2026
66729
Greater Bergen Community Action:Greater Bergen Community Action - 100 Portland
2385
254296
256681
03-01-2026
02-01-2026
66732
La Casa de Don Pedro - 75 Park
1102
98748
99849
03-01-2026
02-01-2026
66734
O.C.E.A.N. - 503 Adamston
1446
166929
168374
03-01-2026
02-01-2026
66736
O.C.E.A.N. - 1 College
1143
136968
138111
03-01-2026
02-01-2026
66737
Our Lady of the Valley Church - 650 Nassau
3732
885264
888996
03-01-2026
02-01-2026
66738
St. Nicholas Church - 442 East Brinkerhoff
2346
245191
247537
03-01-2026
02-01-2026
67944
St. Mary High School - 64 Chestnut
2886
322807
325693
03-01-2026
02-01-2026
67951
Archdiocese of Newark - 332 Madison Hill
9750
1630313
1640063
03-01-2026
02-01-2026
67960
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 242 Adelphia
804
92838
93642
03-01-2026
02-01-2026
67964
Our Lady of Victories School - 155 The Parkway
3951
487501
491451
03-01-2026
02-01-2026
68175
St. Mary's Plainfield - 516 West 6th
2785
260398
263183
03-01-2026
02-01-2026
68656
St. James Church - 143 Madison
5115
1111997
1117112
03-01-2026
02-01-2026
68802
St. Anastasia Church - 1135 Teaneck
5322
658390
663712
03-01-2026
02-01-2026
68804
Our Lady of Mount Virgin - 200 MacArthur
2549
326712
329261
03-01-2026
02-01-2026
69505
Gateway CAP - 35 Sewell
2930
353723
356654
03-01-2026
02-01-2026
70383
Archdiocese of Newark - 171 Clifton
2189
209605
211794
03-01-2026
02-01-2026
70634
St. Joseph's Church - 115 Telford
3644
446101
449746
03-01-2026
02-01-2026
71583
Ocean View Volunteer Fire Co. - 2545 Route 9
1506
167563
169069
03-01-2026
02-01-2026
71804
St. Mary's Assumption High School - 237 South Broad
4066
512453
516518
03-01-2026
02-01-2026
71805
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 127 Yellow Brick
3335
403376
406711
03-01-2026
02-01-2026
71958
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 1405 Old Freehold
1509
154676
156185
03-01-2026
02-01-2026
71959
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 1405 Old Freehold #2
1262
177778
179041
03-01-2026
02-01-2026
73301
St. Joseph's - 305 Elm
3180
356132
359312
03-01-2026
02-01-2026
75975
Food Bank of New Jersey - 6735 Black Horse
14295
1837410
1851705
03-01-2026
02-01-2026
76239
CITYPLEX - 360 Springfield
12910
2723975
2736885
03-01-2026
02-01-2026
81226
Our Lady of Mt. Carmel - 99 Broadway
5559
690672
696231
03-01-2026
02-01-2026
81227
Bergen Arts and Science Charter School - 43 Maple
9522
1714352
1723874
03-01-2026
02-01-2026
81228
St. Michael's Medical Center - 111 Central
11540
2280372
2291913
03-01-2026
02-01-2026
81508
St. Francis Xavier - 594 North 7th
2613
277237
279850
03-01-2026
02-01-2026
82513
Little People at Work - 500 Neptune
2454
271380
273834
03-01-2026
02-01-2026

Heading 1

Quickbooks Data

Invoice
Customer
Inv Date
Due Date
Gen
Rate
Total
20261064
DDANJ - 19 Paulison
03-09-2026
04-08-2026
986
0.075
73.95
20261065
Greater Bergen Community Action:Greater Bergen Community Action - 541 Midland
03-09-2026
04-08-2026
3168
0.075
237.60
20261066
Church of Annunciation - 50 West Midland
03-09-2026
04-08-2026
3126
0.075
234.45
20261067
Greater Bergen Community Action:Greater Bergen Community Action - 100 Portland
03-09-2026
04-08-2026
2385
0.075
178.88
20261069
La Casa de Don Pedro - 75 Park
03-09-2026
04-08-2026
1102
0.075
82.65
20261070
O.C.E.A.N. - 503 Adamston
03-09-2026
04-08-2026
1446
0.075
108.45
20261072
O.C.E.A.N. - 1 College
03-09-2026
04-08-2026
1143
0.075
85.73
20261073
Our Lady of the Valley Church - 650 Nassau
03-09-2026
04-08-2026
3732
0.075
279.90
20261074
St. Nicholas Church - 442 East Brinkerhoff
03-09-2026
04-08-2026
2346
0.075
175.95
20261075
St. Mary High School - 64 Chestnut
03-09-2026
04-08-2026
2886
0.075
216.45
20261076
Archdiocese of Newark - 332 Madison Hill
03-09-2026
04-08-2026
9750
0.075
731.25
20261077
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 242 Adelphia
03-09-2026
04-08-2026
804
0.075
60.30
20261078
Our Lady of Victories School - 155 The Parkway
03-09-2026
04-08-2026
3951
0.075
296.33
20261079
St. Mary's Plainfield - 516 West 6th
03-09-2026
04-08-2026
2785
0.075
208.88
20261080
St. James Church - 143 Madison
03-09-2026
04-08-2026
5115
0.075
383.63
20261081
St. Anastasia Church - 1135 Teaneck
03-09-2026
04-08-2026
5322
0.075
399.15
20261082
Our Lady of Mount Virgin - 200 MacArthur
03-09-2026
04-08-2026
2549
0.075
191.18
20261083
Gateway CAP - 35 Sewell
03-09-2026
04-08-2026
2930
0.075
219.75
20261084
Archdiocese of Newark - 171 Clifton
03-09-2026
04-08-2026
2189
0.075
164.18
20261085
St. Joseph's Church - 115 Telford
03-09-2026
04-08-2026
3644
0.075
273.30
20261086
Ocean View Volunteer Fire Co. - 2545 Route 9
03-09-2026
04-08-2026
1506
0.075
112.95
20261087
St. Mary's Assumption High School - 237 South Broad
03-09-2026
04-08-2026
4066
0.075
304.95
20261088
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 127 Yellow Brick
03-09-2026
04-08-2026
3335
0.075
250.13
20261089
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 1405 Old Freehold
03-09-2026
04-08-2026
1509
0.075
113.18
20261090
Girl Scouts of the Jersey Shore:Girl Scouts of the Jersey Shore - 1405 Old Freehold #2
03-09-2026
04-08-2026
1262
0.075
94.65
20261091
St. Joseph's - 305 Elm
03-09-2026
04-08-2026
3180
0.075
238.50
20261093
Food Bank of New Jersey - 6735 Black Horse
03-09-2026
04-08-2026
14295
0.075
1072.13
20261094
CITYPLEX - 360 Springfield
03-09-2026
04-08-2026
12910
0.16
2065.60
20261095
Our Lady of Mt. Carmel - 99 Broadway
03-09-2026
04-08-2026
5559
0.075
416.93
20261096
Bergen Arts and Science Charter School - 43 Maple
03-09-2026
04-08-2026
9522
0.075
714.15
20261097
St. Michael's Medical Center - 111 Central
03-09-2026
04-08-2026
11540
0.075
865.50
20261098
St. Francis Xavier - 594 North 7th
03-09-2026
04-08-2026
2613
0.075
195.98
20261099
Little People at Work - 500 Neptune
03-09-2026
04-08-2026
2454
0.075
184.05

I'm a paragraph. Click here to add your own text and edit me. It's easy.

import wixData from 'wix-data';import { post_generateFile } from 'backend/download';import wixLocation from 'wix-location';$w.onReady(function () { console.log("Page is ready"); const today = new Date(); const monthNames = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; const currentMonthIndex = today.getMonth(); const currentMonth = monthNames[currentMonthIndex]; const previousMonthIndex = (currentMonthIndex + 11) % 12; const previousMonth = monthNames[previousMonthIndex]; const currentYear = today.getFullYear(); const previousYear = currentMonthIndex === 0 ? currentYear - 1 : currentYear; console.log("Current Month: ", currentMonth); console.log("Previous Month: ", previousMonth); console.log("Current Year: ", currentYear); console.log("Previous Year: ", previousYear); $w('#billmonthDDLB').options = monthNames.map((month, index) => ({ label: month.charAt(0).toUpperCase() + month.slice(1), value: month })); $w('#billmonthDDLB').value = currentMonth; fetchAndDisplayData(previousMonth, currentMonth, previousYear, currentYear); $w('#billmonthDDLB').onChange(() => { console.log("Dropdown value changed"); const selectedMonth = $w('#billmonthDDLB').value; console.log("Selected Month: ", selectedMonth); const selectedIndex = monthNames.indexOf(selectedMonth); const newPreviousMonthIndex = (selectedIndex + 11) % 12; const newPreviousMonth = monthNames[newPreviousMonthIndex]; const newCurrentYear = today.getFullYear(); const newPreviousYear = selectedMonth === "jan" ? newCurrentYear - 1 : newCurrentYear; console.log("New Previous Month: ", newPreviousMonth); console.log("New Current Year: ", newCurrentYear); console.log("New Previous Year: ", newPreviousYear); fetchAndDisplayData(newPreviousMonth, selectedMonth, newPreviousYear, newCurrentYear); }); $w('#exportButton').onClick(() => { console.log("Export button clicked"); exportToTextFile(); });});function fetchAndDisplayData(previousMonth, currentMonth, previousYear, currentYear) { console.log("Fetching and displaying data"); wixData.query("Import120") .find() .then(import120Results => { console.log("Import120 Results: ", import120Results); const import120Data = import120Results.items.filter(item => item.unitId); wixData.query("Import207") .find() .then(import207Results => { console.log("Import207 Results: ", import207Results); const import207Data = import207Results.items; const tableData = import120Data.map(item => { const unitId = item.unitId || "Unknown Unit ID"; const facility = item.facility || "Unknown Facility"; let rawValue = item[previousMonth]; const value = rawValue ? parseFloat(rawValue.toString().replace(/,/g, '')) : 0; console.log(`Unit ID: ${unitId}, Value for ${previousMonth}: ${value}`); const matchingRecord = import207Data.find(record => record.unitId === unitId); const rawLastMeterRead = matchingRecord?.lastMeterReadKWhBtu || "0"; const lastMeterRead = parseFloat(rawLastMeterRead.toString().replace(/,/g, '')) || 0; console.log(`Matching Record for Unit ID ${unitId}: `, matchingRecord); console.log(`Last Meter Read: ${lastMeterRead}`); const meterRead = `${currentMonth.toUpperCase()}/1/${currentYear}`; const meterGen = `${previousMonth.charAt(0).toUpperCase() + previousMonth.slice(1)}-${previousYear.toString().slice(-2)}`; const thisMonthGen = Math.round(lastMeterRead + value); console.log(`Meter Read: ${meterRead}, Meter Gen: ${meterGen}, This Month Gen: ${thisMonthGen}`); return { unitId, facility, value: Math.round(value), lastMeterRead: Math.round(lastMeterRead), meterRead, meterGen, thisMonthGen }; }); console.log("Table Data: ", tableData); $w('#RECTable').rows = tableData; }); });}async function exportToTextFile() { try { console.log("Exporting to text file"); const rows = $w('#RECTable').rows; console.log("Table Rows: ", rows); const textData = rows.map(row => { const unitID = row.unitId || ""; const thisMonthGen = row.thisMonthGen || ""; const blank = ""; const meterRead = row.meterRead || ""; const meterGen = row.meterGen || ""; return `${unitID},${thisMonthGen},${blank},${meterRead},${meterGen}`; }).join("\n"); console.log("Text Data: ", textData); const today = new Date(); const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; const fileName = `${monthNames[today.getMonth()]} ${today.getFullYear()} PJM Upload.txt`; console.log("File Name: ", fileName); // Call the backend function to generate the file const response = await post_generateFile({ fileName: fileName, content: textData, }); console.log("Response from post_generateFile:", response); if (response && response.url) { console.log("Redirecting to download URL: ", response.url); // Use wixLocation to redirect the browser to the download URL wixLocation.to(response.url); } else { console.error("No URL found in response"); } } catch (error) { console.error("Error exporting file:", error.message); }}

Cap Solar LLC © 2024 | Powering Those Who Power Our Communities

bottom of page