- Use
console.log
for logging instead ofLogger.log
. One can access logs for more executions then last one.
We use clasp command line tool here. To bound this project with prepared sheet document:
- Login to your dev google account (
clasp login
) - Create new empty script project attached to this document (
clasp create <scriptTitle> <sheet_id_here>
) - Review files to be pushed with
clasp status
clasp push
- Activate onFormSubmit trigger
- sheet -> Tools -> Script editor -> Edit -> Current project's triggers -> create a new trigger
- You need to grant permissions to the app under your account. This is called app verification. It will involve this nasty "go to ...(unsafe)" dialog
- Done
- Create new spreadsheet
- Share it with Vojta
- Push code into it
- Create form with fields' names and options having exact strings
av19 done
- Add column for var. symbol if not already present
- Determines how much should be paid
- Infer variable symbol for the registration and save it in sheet
- Create an entry for expected payment in
money info
sheet - Send confirmation email to registrant
av19 pending
- Fetch statement from bank api for latest time period
- Parse it and filter payments
- Go through
money info
sheet and if variable symbol matches do this:- Mark row in sheet as "needs attention" if payment is not in CZK
- Update
already paid
field in sheet - Log pairing result in
bank log
sheet - Sends an email to user (confirmation or more to pay)
av19 pending
(All non header rows in money info
sheet).foreach:
- Skip if
manual override
set to true - If not paid or long enough then send nudge email
av19 pending
av19 done
- Prompts admin to enter variable symbol and amount paid
- Find entry with var. symbol in
money info
sheet - Put email of logged in admin and amount into note of that payment for reference
- Trigger pairing check as if this payment was read from bank
av19 done
- Fetch statement from bank api for fixed time period
- Parse it and filter payments
- Log all payments into
bank log
sheet
av19 done
Exactly as onGetBankingDataTick
but using static data instead of fetching.
- manual override
- It is not attempted to match this to payment
- It is set by regsys when there is variable id match but some other issue with payment (wrong currency)
- paid everything - set by regsys when whole sum is paid
- other notes - this field is for human editing