-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
32 lines (23 loc) · 773 Bytes
/
template.yaml
File metadata and controls
32 lines (23 loc) · 773 Bytes
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
27
28
29
30
31
32
OUTPUT_NAME:
"Invoice-{INVOICE_NUM}"
OUTPUT_FORMAT:
- docx
- pdf
ON_END:
SQL('UPDATE document SET last_document_num = last_document_num + 1 WHERE rowid = 1')
ON_START:
- SQL('CREATE TABLE IF NOT EXISTS document (last_document_num INTEGER DEFAULT 0)')
- SQL('INSERT OR IGNORE INTO document (rowid, last_document_num) VALUES (1, 0)')
INVOICE_NUM:
"{CURRENT_DATE_NUM(year)}-{CURRENT_DATE_NUM(month)}-{SQL('SELECT last_document_num FROM document WHERE rowid = 1')+1}"
MONTH_STR:
CURRENT_DATE_STR(month)
DAY_NUM:
CURRENT_DATE_NUM(day)
YEAR_NUM:
CURRENT_DATE_NUM(year)
PRICE:
500
DESCRIPTION:
"Software Development Services – Backend Development
(Period: {CURRENT_DATE_NUM(day, month, year)-DAYS(7)} - {CURRENT_DATE_NUM(day, month, year)})"