-
Notifications
You must be signed in to change notification settings - Fork 0
/
reportAdmin.js
26 lines (26 loc) · 1013 Bytes
/
reportAdmin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function readAdmin(stmt, cell) {
makeReport(stmt, {
sheetName: "Admin",
query: `
SELECT DISTINCT
\`first_name\` AS "First Name",
\`last_name\` AS "Last Name",
\`nickname\` AS "Facebook Name",
\`admin-phone-number\` AS "Phone Number",
\`admin-participation-statement-one\` AS "Participation Statement 1",
\`admin-participation-statement-two\` AS "Participation Statement 2",
\`admin-car-registration\` AS "Car Registration",
\`admin-emergency-contact-name\` AS "Emergency Contact Name",
\`admin-emergency-contact-phone\` AS "Emergency Contact Phone",
pd.order_id AS "Order ID"
FROM jtl_member_db db
LEFT JOIN jtl_order_product_customer_lookup pd ON pd.user_id = db.id
WHERE product_id=${cell} AND status="wc-processing"
ORDER BY \`first_name\` ASC
`,
formatting: [
{ type: "wrap", column: "Participation Statement 1" },
{ type: "wrap", column: "Participation Statement 2" },
],
});
}