@tamu-dor/famis-db 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/actions.yml +16 -0
- package/docs/index.html +1453 -335
- package/docs.md +363 -190
- package/index.d.ts +619 -0
- package/index.js +56 -2
- package/package.json +3 -3
- package/readme.md +2 -2
- package/schemas/migrations/202102041628.sql +26 -0
- package/schemas/migrations/202102261131.sql +68 -0
- package/schemas/migrations/202104011516.sql +12 -0
- package/schemas/migrations/202104210829.sql +69 -0
- package/schemas/migrations/202104210926.sql +77 -0
- package/schemas/migrations/202105201344.sql +17 -0
- package/schemas/migrations/202105201355.sql +26 -0
- package/schemas/migrations/202105251323.sql +17 -0
- package/schemas/migrations/202106081436.sql +20 -0
- package/schemas/migrations/202106221333.sql +20 -0
- package/schemas/migrations/202107291406.sql +35 -0
- package/schemas/migrations/202108181427.sql +26 -0
- package/schemas/migrations/202110041133.sql +75 -0
- package/schemas/migrations/202110251113.sql +20 -0
- package/schemas/migrations/202111021104.sql +13 -0
- package/schemas/migrations/202111021110.sql +16 -0
- package/schemas/migrations/202111100901.sql +16 -0
- package/schemas/migrations/202111101041.sql +79 -0
- package/schemas/migrations/20211115.sql +71 -0
- package/schemas/migrations/202112171038.sql +89 -0
- package/schemas/migrations/202201211055.sql +97 -0
- package/schemas/migrations/202201211124.sql +24 -0
- package/schemas/migrations/202201261015.sql +17 -0
- package/schemas/migrations/202201311403.sql +91 -0
- package/schemas/migrations/202202081201.sql +41 -0
- package/schemas/migrations/202202081205.sql +45 -0
- package/schemas/migrations/202202141101.sql +21 -0
- package/schemas/migrations/202202141117.sql +76 -0
- package/schemas/migrations/202202151329.sql +21 -0
- package/schemas/migrations/202202171025.sql +4 -0
- package/schemas/migrations/20220225.sql +23 -0
- package/schemas/migrations/202203150618.sql +13 -0
- package/schemas/migrations/202204041316.sql +12 -0
- package/schemas/migrations/202204141018.sql +78 -0
- package/schemas/migrations/202204141301.sql +36 -0
- package/schemas/migrations/202205061236.sql +15 -0
- package/schemas/migrations/202206021248.sql +20 -0
- package/schemas/migrations/20220615.sql +39 -0
- package/schemas/migrations/202206291132.sql +15 -0
- package/schemas/migrations/202207290901.sql +31 -0
- package/schemas/migrations/202207290907.sql +26 -0
- package/schemas/migrations/202208241422.sql +21 -0
- package/schemas/migrations/202209141529.sql +21 -0
- package/schemas/migrations/202209300911.sql +35 -0
- package/schemas/migrations/202210111429.sql +35 -0
- package/schemas/migrations/202210111456.sql +57 -0
- package/schemas/migrations/202210171517.sql +23 -0
- package/schemas/migrations/202211091403.sql +26 -0
- package/schemas/migrations/202211091410.sql +26 -0
- package/schemas/migrations/202211091417.sql +31 -0
- package/schemas/migrations/202211161451.sql +81 -0
- package/schemas/migrations/202212141236.sql +37 -0
- package/schemas/migrations/202302201117.sql +73 -0
- package/schemas/migrations/202303081110.sql +78 -0
- package/schemas/migrations/202304191238.sql +12 -0
- package/schemas/migrations/202304271214.sql +7 -0
- package/schemas/schema.sql +57 -22
- package/change.txt +0 -123
- package/changes.md +0 -405
- package/famisDb.pdf +0 -0
- package/readme.wiki +0 -332
package/docs.md
CHANGED
|
@@ -2,51 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
### Table of Contents
|
|
4
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
5
|
+
* [addInvoice][1]
|
|
6
|
+
* [allowableExpenseCode][2]
|
|
7
|
+
* [formatAccountNumber][3]
|
|
8
|
+
* [getAccountNumber][4]
|
|
9
|
+
* [getAccountsByResponsibleUin][5]
|
|
10
|
+
* [getAccountsByUin][6]
|
|
11
|
+
* [getAdminUsers][7]
|
|
12
|
+
* [getAllCores][8]
|
|
13
|
+
* [getAllInvoices][9]
|
|
14
|
+
* [getAllowableExpenseCodes][10]
|
|
15
|
+
* [getAllSystemParts][11]
|
|
16
|
+
* [getByAccountNumber][12]
|
|
17
|
+
* [getCommentFile][13]
|
|
18
|
+
* [getCommentFiles][14]
|
|
19
|
+
* [getCoreByAccount][15]
|
|
20
|
+
* [getCoreById][16]
|
|
21
|
+
* [getCoreCurrentAccount][17]
|
|
22
|
+
* [getCoreUsers][18]
|
|
23
|
+
* [getCurrentFiscalYear][19]
|
|
24
|
+
* [getCustomerNumber][20]
|
|
25
|
+
* [getEnabledCores][21]
|
|
26
|
+
* [getExpenseCode][22]
|
|
27
|
+
* [getExpenseCodeByRevenue][23]
|
|
28
|
+
* [getHeldInvoices][24]
|
|
29
|
+
* [getInvoiceByFingerPrint][25]
|
|
30
|
+
* [getInvoiceByNumber][26]
|
|
31
|
+
* [getInvoiceByUid][27]
|
|
32
|
+
* [getInvoiceComments][28]
|
|
33
|
+
* [getInvoiceFingerPrint][29]
|
|
34
|
+
* [getInvoicesAwaitingEmail][30]
|
|
35
|
+
* [getInvoicesByAccount][31]
|
|
36
|
+
* [getLatestInvoices][32]
|
|
37
|
+
* [getNextFAMISInvoiceNumber][33]
|
|
38
|
+
* [getRevenueCode][34]
|
|
39
|
+
* [getSystemById][35]
|
|
40
|
+
* [getSystemByPartNumber][36]
|
|
41
|
+
* [getSystemUsers][37]
|
|
42
|
+
* [getUser][38]
|
|
43
|
+
* [getUserCores][39]
|
|
44
|
+
* [getUserSystemParts][40]
|
|
45
|
+
* [isSrsHighRisk][41]
|
|
46
|
+
* [markEmailed][42]
|
|
47
|
+
* [markInvoiced][43]
|
|
48
|
+
* [processInvoice][44]
|
|
49
|
+
* [saveComment][45]
|
|
50
|
+
* [saveCommentFile][46]
|
|
51
|
+
* [searchByAccountNumber][47]
|
|
52
|
+
* [searchInvoicesByFamis][48]
|
|
53
|
+
* [searchInvoicesByNumber][49]
|
|
54
|
+
* [setDeleted][50]
|
|
55
|
+
* [setInvoiceFingerPrint][51]
|
|
56
|
+
* [setInvoicePostedDate][52]
|
|
57
|
+
* [updateInvoice][53]
|
|
58
|
+
* [updateUser][54]
|
|
59
|
+
* [Comment][55]
|
|
60
|
+
* [CommentFile][56]
|
|
61
|
+
* [HighRisk][57]
|
|
50
62
|
|
|
51
63
|
## addInvoice
|
|
52
64
|
|
|
@@ -54,11 +66,11 @@ Adds an invoice
|
|
|
54
66
|
|
|
55
67
|
### Parameters
|
|
56
68
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
* `invoice` **[object][58]**
|
|
70
|
+
* `type` **[string][59]**
|
|
71
|
+
* `famisInvoiceNumber` **[string][59]**
|
|
60
72
|
|
|
61
|
-
Returns **[Promise][
|
|
73
|
+
Returns **[Promise][60]<[object][58]>** invoice
|
|
62
74
|
|
|
63
75
|
## allowableExpenseCode
|
|
64
76
|
|
|
@@ -66,12 +78,12 @@ Check if expense code is within the allowable range for specified account and th
|
|
|
66
78
|
|
|
67
79
|
### Parameters
|
|
68
80
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
* `accountNumber`
|
|
82
|
+
* `code` **[string][59]**
|
|
83
|
+
* `fiscal` **integer**
|
|
84
|
+
* `account` **[string][59]**
|
|
73
85
|
|
|
74
|
-
Returns **[Promise][
|
|
86
|
+
Returns **[Promise][60]<[boolean][61]>** truthy value
|
|
75
87
|
|
|
76
88
|
## formatAccountNumber
|
|
77
89
|
|
|
@@ -79,7 +91,7 @@ Return formatted account number
|
|
|
79
91
|
|
|
80
92
|
### Parameters
|
|
81
93
|
|
|
82
|
-
|
|
94
|
+
* `accountNumber` **[string][59]** unformatted 13 digit famis account number
|
|
83
95
|
|
|
84
96
|
## getAccountNumber
|
|
85
97
|
|
|
@@ -87,10 +99,10 @@ Extract customer account and po number
|
|
|
87
99
|
|
|
88
100
|
### Parameters
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
* `famis` **[object][58]**
|
|
103
|
+
* `replace_data` **[object][58]**
|
|
92
104
|
|
|
93
|
-
Returns **[object][
|
|
105
|
+
Returns **[object][58]** account number object
|
|
94
106
|
|
|
95
107
|
## getAccountsByResponsibleUin
|
|
96
108
|
|
|
@@ -98,9 +110,9 @@ Get PI accounts by responsible UIN
|
|
|
98
110
|
|
|
99
111
|
### Parameters
|
|
100
112
|
|
|
101
|
-
|
|
113
|
+
* `uin` **[string][59]**
|
|
102
114
|
|
|
103
|
-
Returns **[Promise][
|
|
115
|
+
Returns **[Promise][60]<[array][62]>** account object array
|
|
104
116
|
|
|
105
117
|
## getAccountsByUin
|
|
106
118
|
|
|
@@ -108,15 +120,21 @@ Get PI Accounts by UIN
|
|
|
108
120
|
|
|
109
121
|
### Parameters
|
|
110
122
|
|
|
111
|
-
|
|
123
|
+
* `uin` **[string][59]**
|
|
112
124
|
|
|
113
|
-
Returns **[Promise][
|
|
125
|
+
Returns **[Promise][60]<[array][62]>** account object array
|
|
126
|
+
|
|
127
|
+
## getAdminUsers
|
|
128
|
+
|
|
129
|
+
Get all admin users
|
|
130
|
+
|
|
131
|
+
Returns **[Promise][60]<[array][62]>** array of user objects
|
|
114
132
|
|
|
115
133
|
## getAllCores
|
|
116
134
|
|
|
117
135
|
Get all cores
|
|
118
136
|
|
|
119
|
-
Returns **[Promise][
|
|
137
|
+
Returns **[Promise][60]<[array][62]>** core objects
|
|
120
138
|
|
|
121
139
|
## getAllInvoices
|
|
122
140
|
|
|
@@ -124,11 +142,13 @@ Get all invoice ordered by and sorted by paramaters passed
|
|
|
124
142
|
|
|
125
143
|
### Parameters
|
|
126
144
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
145
|
+
* `orderBy` **[string][59]** (optional, default `'date'`)
|
|
146
|
+
* `dir` **[string][59]** (optional, default `'desc'`)
|
|
147
|
+
* `deleted` **[boolean][61]** (optional, default `false`)
|
|
148
|
+
* `page` **integer** (optional, default `null`)
|
|
149
|
+
* `limit` **integer** (optional, default `null`)
|
|
130
150
|
|
|
131
|
-
Returns **[Promise][
|
|
151
|
+
Returns **[Promise][60]<[array][62]>** invoice objects
|
|
132
152
|
|
|
133
153
|
## getAllowableExpenseCodes
|
|
134
154
|
|
|
@@ -136,17 +156,17 @@ Get allowable expense code ranges for specified account
|
|
|
136
156
|
|
|
137
157
|
### Parameters
|
|
138
158
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
159
|
+
* `accountNumber`
|
|
160
|
+
* `fiscal`
|
|
161
|
+
* `account` **[string][59]**
|
|
142
162
|
|
|
143
|
-
Returns **[Promise][
|
|
163
|
+
Returns **[Promise][60]<[boolean][61]>** expense code range object(s)
|
|
144
164
|
|
|
145
165
|
## getAllSystemParts
|
|
146
166
|
|
|
147
167
|
Get all system parts
|
|
148
168
|
|
|
149
|
-
Returns **[Promise][
|
|
169
|
+
Returns **[Promise][60]<[object][58]>** system objects
|
|
150
170
|
|
|
151
171
|
## getByAccountNumber
|
|
152
172
|
|
|
@@ -154,9 +174,27 @@ Get PI accounts by account number
|
|
|
154
174
|
|
|
155
175
|
### Parameters
|
|
156
176
|
|
|
157
|
-
|
|
177
|
+
* `number` **[string][59]**
|
|
178
|
+
* `campus` **[string][59]**
|
|
179
|
+
* `historical` **[boolean][61]** (optional, default `false`)
|
|
180
|
+
|
|
181
|
+
Returns **[Promise][60]<[object][58]>** account object
|
|
182
|
+
|
|
183
|
+
## getCommentFile
|
|
184
|
+
|
|
185
|
+
Get invoice comment file
|
|
186
|
+
|
|
187
|
+
### Parameters
|
|
188
|
+
|
|
189
|
+
* `fileUid` **[string][59]** file uid
|
|
190
|
+
|
|
191
|
+
## getCommentFiles
|
|
158
192
|
|
|
159
|
-
|
|
193
|
+
Get invoice comment files
|
|
194
|
+
|
|
195
|
+
### Parameters
|
|
196
|
+
|
|
197
|
+
* `commentUid` **[string][59]** comment uid
|
|
160
198
|
|
|
161
199
|
## getCoreByAccount
|
|
162
200
|
|
|
@@ -164,9 +202,9 @@ Get core by account number
|
|
|
164
202
|
|
|
165
203
|
### Parameters
|
|
166
204
|
|
|
167
|
-
|
|
205
|
+
* `account` **[string][59]**
|
|
168
206
|
|
|
169
|
-
Returns **[Promise][
|
|
207
|
+
Returns **[Promise][60]<[object][58]>** core object
|
|
170
208
|
|
|
171
209
|
## getCoreById
|
|
172
210
|
|
|
@@ -174,9 +212,9 @@ Get core by id
|
|
|
174
212
|
|
|
175
213
|
### Parameters
|
|
176
214
|
|
|
177
|
-
|
|
215
|
+
* `id` **[string][59]**
|
|
178
216
|
|
|
179
|
-
Returns **[Promise][
|
|
217
|
+
Returns **[Promise][60]<[object][58]>** core object
|
|
180
218
|
|
|
181
219
|
## getCoreCurrentAccount
|
|
182
220
|
|
|
@@ -184,9 +222,9 @@ Get core current revenue account number
|
|
|
184
222
|
|
|
185
223
|
### Parameters
|
|
186
224
|
|
|
187
|
-
|
|
225
|
+
* `coreId` **[string][59]**
|
|
188
226
|
|
|
189
|
-
Returns **[Promise][
|
|
227
|
+
Returns **[Promise][60]<[object][58]>** core object
|
|
190
228
|
|
|
191
229
|
## getCoreUsers
|
|
192
230
|
|
|
@@ -194,9 +232,9 @@ Get a core's users by core ID
|
|
|
194
232
|
|
|
195
233
|
### Parameters
|
|
196
234
|
|
|
197
|
-
|
|
235
|
+
* `coreId` **[number][63]**
|
|
198
236
|
|
|
199
|
-
Returns **[Promise][
|
|
237
|
+
Returns **[Promise][60]<[array][62]>** user objects
|
|
200
238
|
|
|
201
239
|
## getCurrentFiscalYear
|
|
202
240
|
|
|
@@ -208,10 +246,10 @@ Get customer by customer account number
|
|
|
208
246
|
|
|
209
247
|
### Parameters
|
|
210
248
|
|
|
211
|
-
|
|
212
|
-
|
|
249
|
+
* `accountNumber` **[string][59]**
|
|
250
|
+
* `campusCode` **[string][59]**
|
|
213
251
|
|
|
214
|
-
Returns **[Promise][
|
|
252
|
+
Returns **[Promise][60]<[object][58]>** customer account object
|
|
215
253
|
|
|
216
254
|
## getEnabledCores
|
|
217
255
|
|
|
@@ -219,25 +257,42 @@ Get all enabled cores
|
|
|
219
257
|
|
|
220
258
|
### Parameters
|
|
221
259
|
|
|
222
|
-
|
|
260
|
+
* `date` **[string][59]**
|
|
223
261
|
|
|
224
|
-
Returns **[Promise][
|
|
262
|
+
Returns **[Promise][60]<[array][62]>** core objects
|
|
225
263
|
|
|
226
264
|
## getExpenseCode
|
|
227
265
|
|
|
266
|
+
Get expense code object
|
|
267
|
+
|
|
268
|
+
### Parameters
|
|
269
|
+
|
|
270
|
+
* `code` **[string][59]**
|
|
271
|
+
|
|
272
|
+
Returns **[Promise][60]<[object][58]>** expense code object
|
|
273
|
+
|
|
274
|
+
## getExpenseCodeByRevenue
|
|
275
|
+
|
|
228
276
|
Get matching expense code for specified revenue code
|
|
229
277
|
|
|
230
278
|
### Parameters
|
|
231
279
|
|
|
232
|
-
|
|
280
|
+
* `revenue` **[string][59]**
|
|
233
281
|
|
|
234
|
-
Returns **[Promise][
|
|
282
|
+
Returns **[Promise][60]<[string][59]>** expense code
|
|
235
283
|
|
|
236
284
|
## getHeldInvoices
|
|
237
285
|
|
|
238
286
|
Returns all held invoices
|
|
239
287
|
|
|
240
|
-
|
|
288
|
+
### Parameters
|
|
289
|
+
|
|
290
|
+
* `orderBy` (optional, default `'date'`)
|
|
291
|
+
* `dir` (optional, default `'desc'`)
|
|
292
|
+
* `page` (optional, default `null`)
|
|
293
|
+
* `limit` (optional, default `null`)
|
|
294
|
+
|
|
295
|
+
Returns **[Promise][60]<[array][62]>** held invoice objects
|
|
241
296
|
|
|
242
297
|
## getInvoiceByFingerPrint
|
|
243
298
|
|
|
@@ -245,9 +300,9 @@ Get invoice by fingerprint
|
|
|
245
300
|
|
|
246
301
|
### Parameters
|
|
247
302
|
|
|
248
|
-
|
|
303
|
+
* `fingerPrint` **[string][59]**
|
|
249
304
|
|
|
250
|
-
Returns **[Promise][
|
|
305
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
251
306
|
|
|
252
307
|
## getInvoiceByNumber
|
|
253
308
|
|
|
@@ -255,9 +310,9 @@ Get invoice by originating system assigned number
|
|
|
255
310
|
|
|
256
311
|
### Parameters
|
|
257
312
|
|
|
258
|
-
|
|
313
|
+
* `number` **[string][59]**
|
|
259
314
|
|
|
260
|
-
Returns **[Promise][
|
|
315
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
261
316
|
|
|
262
317
|
## getInvoiceByUid
|
|
263
318
|
|
|
@@ -265,9 +320,17 @@ Get invoice by uid
|
|
|
265
320
|
|
|
266
321
|
### Parameters
|
|
267
322
|
|
|
268
|
-
|
|
323
|
+
* `uid` **[string][59]**
|
|
324
|
+
|
|
325
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
326
|
+
|
|
327
|
+
## getInvoiceComments
|
|
328
|
+
|
|
329
|
+
Get invoice comments
|
|
269
330
|
|
|
270
|
-
|
|
331
|
+
### Parameters
|
|
332
|
+
|
|
333
|
+
* `invoiceUid` **[string][59]** invoice uid
|
|
271
334
|
|
|
272
335
|
## getInvoiceFingerPrint
|
|
273
336
|
|
|
@@ -275,13 +338,13 @@ Return fingerprint of invoice
|
|
|
275
338
|
|
|
276
339
|
### Parameters
|
|
277
340
|
|
|
278
|
-
|
|
341
|
+
* `invoice` **[object][58]** json object
|
|
279
342
|
|
|
280
343
|
## getInvoicesAwaitingEmail
|
|
281
344
|
|
|
282
345
|
Returns all awaiting email invoices
|
|
283
346
|
|
|
284
|
-
Returns **[Promise][
|
|
347
|
+
Returns **[Promise][60]<[array][62]>** awaiting email invoice objects
|
|
285
348
|
|
|
286
349
|
## getInvoicesByAccount
|
|
287
350
|
|
|
@@ -289,15 +352,15 @@ Get all invoices associated with a specified account number
|
|
|
289
352
|
|
|
290
353
|
### Parameters
|
|
291
354
|
|
|
292
|
-
|
|
355
|
+
* `accountNumber` **[string][59]**
|
|
293
356
|
|
|
294
|
-
Returns **[Promise][
|
|
357
|
+
Returns **[Promise][60]<[array][62]>** invoice objects
|
|
295
358
|
|
|
296
359
|
## getLatestInvoices
|
|
297
360
|
|
|
298
361
|
Retreives invoices from the latest date
|
|
299
362
|
|
|
300
|
-
Returns **[Promise][
|
|
363
|
+
Returns **[Promise][60]<[array][62]>** invoice objects
|
|
301
364
|
|
|
302
365
|
## getNextFAMISInvoiceNumber
|
|
303
366
|
|
|
@@ -305,10 +368,10 @@ Get next FAMIS invoice number in sequence for specified invoice type
|
|
|
305
368
|
|
|
306
369
|
### Parameters
|
|
307
370
|
|
|
308
|
-
|
|
309
|
-
|
|
371
|
+
* `type`
|
|
372
|
+
* `invoice` **[string][59]**
|
|
310
373
|
|
|
311
|
-
Returns **[Promise][
|
|
374
|
+
Returns **[Promise][60]<[string][59]>** next invoice number in sequence
|
|
312
375
|
|
|
313
376
|
## getRevenueCode
|
|
314
377
|
|
|
@@ -316,9 +379,9 @@ Get revenue code object
|
|
|
316
379
|
|
|
317
380
|
### Parameters
|
|
318
381
|
|
|
319
|
-
|
|
382
|
+
* `revenue` **[string][59]**
|
|
320
383
|
|
|
321
|
-
Returns **[Promise][
|
|
384
|
+
Returns **[Promise][60]<[object][58]>** revenue code object
|
|
322
385
|
|
|
323
386
|
## getSystemById
|
|
324
387
|
|
|
@@ -326,9 +389,9 @@ Get system part by ID
|
|
|
326
389
|
|
|
327
390
|
### Parameters
|
|
328
391
|
|
|
329
|
-
|
|
392
|
+
* `id` **[number][63]**
|
|
330
393
|
|
|
331
|
-
Returns **[Promise][
|
|
394
|
+
Returns **[Promise][60]<[object][58]>** system part object
|
|
332
395
|
|
|
333
396
|
## getSystemByPartNumber
|
|
334
397
|
|
|
@@ -336,9 +399,9 @@ Get system part by two digit part number
|
|
|
336
399
|
|
|
337
400
|
### Parameters
|
|
338
401
|
|
|
339
|
-
|
|
402
|
+
* `number` **[string][59]**
|
|
340
403
|
|
|
341
|
-
Returns **[Promise][
|
|
404
|
+
Returns **[Promise][60]<[object][58]>** system part object
|
|
342
405
|
|
|
343
406
|
## getSystemUsers
|
|
344
407
|
|
|
@@ -346,9 +409,9 @@ Get a system part's users by system ID
|
|
|
346
409
|
|
|
347
410
|
### Parameters
|
|
348
411
|
|
|
349
|
-
|
|
412
|
+
* `systemId` **[number][63]**
|
|
350
413
|
|
|
351
|
-
Returns **[Promise][
|
|
414
|
+
Returns **[Promise][60]<[array][62]>** user objects
|
|
352
415
|
|
|
353
416
|
## getUser
|
|
354
417
|
|
|
@@ -356,9 +419,9 @@ Get user
|
|
|
356
419
|
|
|
357
420
|
### Parameters
|
|
358
421
|
|
|
359
|
-
|
|
422
|
+
* `userId` **[string][59]**
|
|
360
423
|
|
|
361
|
-
Returns **[Promise][
|
|
424
|
+
Returns **[Promise][60]<[object][58]>** user object
|
|
362
425
|
|
|
363
426
|
## getUserCores
|
|
364
427
|
|
|
@@ -366,9 +429,9 @@ Get a user's cores they manage
|
|
|
366
429
|
|
|
367
430
|
### Parameters
|
|
368
431
|
|
|
369
|
-
|
|
432
|
+
* `userId` **[string][59]**
|
|
370
433
|
|
|
371
|
-
Returns **[Promise][
|
|
434
|
+
Returns **[Promise][60]<[array][62]>** core objects
|
|
372
435
|
|
|
373
436
|
## getUserSystemParts
|
|
374
437
|
|
|
@@ -376,9 +439,19 @@ Get a user's system parts they manage
|
|
|
376
439
|
|
|
377
440
|
### Parameters
|
|
378
441
|
|
|
379
|
-
|
|
442
|
+
* `userId` **any**
|
|
443
|
+
|
|
444
|
+
Returns **[Promise][60]<[object][58]>** system objects
|
|
380
445
|
|
|
381
|
-
|
|
446
|
+
## isSrsHighRisk
|
|
447
|
+
|
|
448
|
+
Is invoice flagged by SRS high risk policies
|
|
449
|
+
|
|
450
|
+
### Parameters
|
|
451
|
+
|
|
452
|
+
* `invoice` **[object][58]** json object
|
|
453
|
+
|
|
454
|
+
Returns **[Promise][60]<[HighRisk][64]>** high risk object
|
|
382
455
|
|
|
383
456
|
## markEmailed
|
|
384
457
|
|
|
@@ -386,10 +459,10 @@ Toggles an invoice as emailed
|
|
|
386
459
|
|
|
387
460
|
### Parameters
|
|
388
461
|
|
|
389
|
-
|
|
390
|
-
|
|
462
|
+
* `uid` **[string][59]**
|
|
463
|
+
* `emailed` **[boolean][61]**
|
|
391
464
|
|
|
392
|
-
Returns **[Promise][
|
|
465
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
393
466
|
|
|
394
467
|
## markInvoiced
|
|
395
468
|
|
|
@@ -397,10 +470,10 @@ Toggles an invoice as paid
|
|
|
397
470
|
|
|
398
471
|
### Parameters
|
|
399
472
|
|
|
400
|
-
|
|
401
|
-
|
|
473
|
+
* `uid` **[string][59]**
|
|
474
|
+
* `invoiced` **[boolean][61]**
|
|
402
475
|
|
|
403
|
-
Returns **[Promise][
|
|
476
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
404
477
|
|
|
405
478
|
## processInvoice
|
|
406
479
|
|
|
@@ -408,9 +481,30 @@ Process an invoice to have all necessary relationships
|
|
|
408
481
|
|
|
409
482
|
### Parameters
|
|
410
483
|
|
|
411
|
-
|
|
484
|
+
* `invoice` **[object][58]** the invoice object sent by iLab
|
|
485
|
+
* `historical` **[boolean][61]** if true use historical accounts too (optional, default `false`)
|
|
486
|
+
|
|
487
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
488
|
+
|
|
489
|
+
## saveComment
|
|
490
|
+
|
|
491
|
+
Create/update invoice comment
|
|
492
|
+
|
|
493
|
+
### Parameters
|
|
494
|
+
|
|
495
|
+
* `comment` **[Comment][65]** json object
|
|
412
496
|
|
|
413
|
-
Returns **[Promise][
|
|
497
|
+
Returns **[Promise][60]<[Comment][65]>** comment object
|
|
498
|
+
|
|
499
|
+
## saveCommentFile
|
|
500
|
+
|
|
501
|
+
Create/update invoice comment file
|
|
502
|
+
|
|
503
|
+
### Parameters
|
|
504
|
+
|
|
505
|
+
* `commentFile` **[CommentFile][66]** json object
|
|
506
|
+
|
|
507
|
+
Returns **[Promise][60]<[CommentFile][66]>** comment object
|
|
414
508
|
|
|
415
509
|
## searchByAccountNumber
|
|
416
510
|
|
|
@@ -418,9 +512,9 @@ Search PI accounts by partial account number
|
|
|
418
512
|
|
|
419
513
|
### Parameters
|
|
420
514
|
|
|
421
|
-
|
|
515
|
+
* `number` **[string][59]**
|
|
422
516
|
|
|
423
|
-
Returns **[Promise][
|
|
517
|
+
Returns **[Promise][60]<[array][62]>** account object(s)
|
|
424
518
|
|
|
425
519
|
## searchInvoicesByFamis
|
|
426
520
|
|
|
@@ -428,9 +522,9 @@ Search invoices by FAMIS invoice number
|
|
|
428
522
|
|
|
429
523
|
### Parameters
|
|
430
524
|
|
|
431
|
-
|
|
525
|
+
* `famis` **[string][59]**
|
|
432
526
|
|
|
433
|
-
Returns **[Promise][
|
|
527
|
+
Returns **[Promise][60]<[array][62]>** invoice objects
|
|
434
528
|
|
|
435
529
|
## searchInvoicesByNumber
|
|
436
530
|
|
|
@@ -438,9 +532,9 @@ Search invoices by originating system generated invoice number
|
|
|
438
532
|
|
|
439
533
|
### Parameters
|
|
440
534
|
|
|
441
|
-
|
|
535
|
+
* `number` **[string][59]**
|
|
442
536
|
|
|
443
|
-
Returns **[Promise][
|
|
537
|
+
Returns **[Promise][60]<[array][62]>** invoice objects
|
|
444
538
|
|
|
445
539
|
## setDeleted
|
|
446
540
|
|
|
@@ -448,10 +542,10 @@ Sets an invoice's deletion date
|
|
|
448
542
|
|
|
449
543
|
### Parameters
|
|
450
544
|
|
|
451
|
-
|
|
452
|
-
|
|
545
|
+
* `uid` **[string][59]**
|
|
546
|
+
* `deleted` **[date][67]**
|
|
453
547
|
|
|
454
|
-
Returns **[Promise][
|
|
548
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
455
549
|
|
|
456
550
|
## setInvoiceFingerPrint
|
|
457
551
|
|
|
@@ -459,10 +553,10 @@ Sets an invoice's fingerprint
|
|
|
459
553
|
|
|
460
554
|
### Parameters
|
|
461
555
|
|
|
462
|
-
|
|
463
|
-
|
|
556
|
+
* `uid` **[string][59]**
|
|
557
|
+
* `fingerprint` **[string][59]**
|
|
464
558
|
|
|
465
|
-
Returns **[Promise][
|
|
559
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
466
560
|
|
|
467
561
|
## setInvoicePostedDate
|
|
468
562
|
|
|
@@ -470,10 +564,10 @@ Sets an invoice's posted date
|
|
|
470
564
|
|
|
471
565
|
### Parameters
|
|
472
566
|
|
|
473
|
-
|
|
474
|
-
|
|
567
|
+
* `uid` **[string][59]**
|
|
568
|
+
* `postedDate` **[date][67]**
|
|
475
569
|
|
|
476
|
-
Returns **[Promise][
|
|
570
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
477
571
|
|
|
478
572
|
## updateInvoice
|
|
479
573
|
|
|
@@ -481,10 +575,59 @@ Updates an invoice
|
|
|
481
575
|
|
|
482
576
|
### Parameters
|
|
483
577
|
|
|
484
|
-
|
|
485
|
-
|
|
578
|
+
* `uid` **[string][59]**
|
|
579
|
+
* `invoice` **[object][58]**
|
|
580
|
+
|
|
581
|
+
Returns **[Promise][60]<[object][58]>** invoice object
|
|
582
|
+
|
|
583
|
+
## updateUser
|
|
584
|
+
|
|
585
|
+
Update user
|
|
586
|
+
|
|
587
|
+
### Parameters
|
|
588
|
+
|
|
589
|
+
* `user` **[object][58]**
|
|
590
|
+
|
|
591
|
+
Returns **[Promise][60]<[object][58]>** user object
|
|
592
|
+
|
|
593
|
+
## Comment
|
|
594
|
+
|
|
595
|
+
Type: [Object][58]
|
|
596
|
+
|
|
597
|
+
### Properties
|
|
598
|
+
|
|
599
|
+
* `id` **integer** db generated id
|
|
600
|
+
* `uid` **[string][59]** uid
|
|
601
|
+
* `invoice_id` **[string][59]** invoice id
|
|
602
|
+
* `user_id` **[string][59]** user uid
|
|
603
|
+
* `comment` **[string][59]** text of comment
|
|
604
|
+
* `type` **[string][59]** type of comment
|
|
605
|
+
* `created` **[date][67]** created date
|
|
606
|
+
* `deleted` **[date][67]** deleted date
|
|
607
|
+
|
|
608
|
+
## CommentFile
|
|
609
|
+
|
|
610
|
+
Type: [Object][58]
|
|
611
|
+
|
|
612
|
+
### Properties
|
|
486
613
|
|
|
487
|
-
|
|
614
|
+
* `id` **integer** db generated id
|
|
615
|
+
* `uid` **[string][59]** uid
|
|
616
|
+
* `invoice_id` **[string][59]** invoice uid
|
|
617
|
+
* `comment_id` **[string][59]** comment uid
|
|
618
|
+
* `original_filename` **[string][59]** original file name
|
|
619
|
+
* `filename` **[string][59]** generate unique filename on filesystem
|
|
620
|
+
* `created` **[date][67]** created date
|
|
621
|
+
* `deleted` **[date][67]** deleted date
|
|
622
|
+
|
|
623
|
+
## HighRisk
|
|
624
|
+
|
|
625
|
+
Type: [Object][58]
|
|
626
|
+
|
|
627
|
+
### Properties
|
|
628
|
+
|
|
629
|
+
* `isHighRisk` **[boolean][61]** indicates if invoice triggers SRS high risk policy
|
|
630
|
+
* `flaggedTransactions` **[object][58]** object of transactions that flag
|
|
488
631
|
|
|
489
632
|
[1]: #addinvoice
|
|
490
633
|
|
|
@@ -498,94 +641,124 @@ Returns **[Promise][48]<[object][46]>** invoice object
|
|
|
498
641
|
|
|
499
642
|
[6]: #getaccountsbyuin
|
|
500
643
|
|
|
501
|
-
[7]: #
|
|
644
|
+
[7]: #getadminusers
|
|
645
|
+
|
|
646
|
+
[8]: #getallcores
|
|
647
|
+
|
|
648
|
+
[9]: #getallinvoices
|
|
649
|
+
|
|
650
|
+
[10]: #getallowableexpensecodes
|
|
651
|
+
|
|
652
|
+
[11]: #getallsystemparts
|
|
653
|
+
|
|
654
|
+
[12]: #getbyaccountnumber
|
|
655
|
+
|
|
656
|
+
[13]: #getcommentfile
|
|
657
|
+
|
|
658
|
+
[14]: #getcommentfiles
|
|
659
|
+
|
|
660
|
+
[15]: #getcorebyaccount
|
|
661
|
+
|
|
662
|
+
[16]: #getcorebyid
|
|
663
|
+
|
|
664
|
+
[17]: #getcorecurrentaccount
|
|
665
|
+
|
|
666
|
+
[18]: #getcoreusers
|
|
667
|
+
|
|
668
|
+
[19]: #getcurrentfiscalyear
|
|
669
|
+
|
|
670
|
+
[20]: #getcustomernumber
|
|
671
|
+
|
|
672
|
+
[21]: #getenabledcores
|
|
673
|
+
|
|
674
|
+
[22]: #getexpensecode
|
|
502
675
|
|
|
503
|
-
[
|
|
676
|
+
[23]: #getexpensecodebyrevenue
|
|
504
677
|
|
|
505
|
-
[
|
|
678
|
+
[24]: #getheldinvoices
|
|
506
679
|
|
|
507
|
-
[
|
|
680
|
+
[25]: #getinvoicebyfingerprint
|
|
508
681
|
|
|
509
|
-
[
|
|
682
|
+
[26]: #getinvoicebynumber
|
|
510
683
|
|
|
511
|
-
[
|
|
684
|
+
[27]: #getinvoicebyuid
|
|
512
685
|
|
|
513
|
-
[
|
|
686
|
+
[28]: #getinvoicecomments
|
|
514
687
|
|
|
515
|
-
[
|
|
688
|
+
[29]: #getinvoicefingerprint
|
|
516
689
|
|
|
517
|
-
[
|
|
690
|
+
[30]: #getinvoicesawaitingemail
|
|
518
691
|
|
|
519
|
-
[
|
|
692
|
+
[31]: #getinvoicesbyaccount
|
|
520
693
|
|
|
521
|
-
[
|
|
694
|
+
[32]: #getlatestinvoices
|
|
522
695
|
|
|
523
|
-
[
|
|
696
|
+
[33]: #getnextfamisinvoicenumber
|
|
524
697
|
|
|
525
|
-
[
|
|
698
|
+
[34]: #getrevenuecode
|
|
526
699
|
|
|
527
|
-
[
|
|
700
|
+
[35]: #getsystembyid
|
|
528
701
|
|
|
529
|
-
[
|
|
702
|
+
[36]: #getsystembypartnumber
|
|
530
703
|
|
|
531
|
-
[
|
|
704
|
+
[37]: #getsystemusers
|
|
532
705
|
|
|
533
|
-
[
|
|
706
|
+
[38]: #getuser
|
|
534
707
|
|
|
535
|
-
[
|
|
708
|
+
[39]: #getusercores
|
|
536
709
|
|
|
537
|
-
[
|
|
710
|
+
[40]: #getusersystemparts
|
|
538
711
|
|
|
539
|
-
[
|
|
712
|
+
[41]: #issrshighrisk
|
|
540
713
|
|
|
541
|
-
[
|
|
714
|
+
[42]: #markemailed
|
|
542
715
|
|
|
543
|
-
[
|
|
716
|
+
[43]: #markinvoiced
|
|
544
717
|
|
|
545
|
-
[
|
|
718
|
+
[44]: #processinvoice
|
|
546
719
|
|
|
547
|
-
[
|
|
720
|
+
[45]: #savecomment
|
|
548
721
|
|
|
549
|
-
[
|
|
722
|
+
[46]: #savecommentfile
|
|
550
723
|
|
|
551
|
-
[
|
|
724
|
+
[47]: #searchbyaccountnumber
|
|
552
725
|
|
|
553
|
-
[
|
|
726
|
+
[48]: #searchinvoicesbyfamis
|
|
554
727
|
|
|
555
|
-
[
|
|
728
|
+
[49]: #searchinvoicesbynumber
|
|
556
729
|
|
|
557
|
-
[
|
|
730
|
+
[50]: #setdeleted
|
|
558
731
|
|
|
559
|
-
[
|
|
732
|
+
[51]: #setinvoicefingerprint
|
|
560
733
|
|
|
561
|
-
[
|
|
734
|
+
[52]: #setinvoiceposteddate
|
|
562
735
|
|
|
563
|
-
[
|
|
736
|
+
[53]: #updateinvoice
|
|
564
737
|
|
|
565
|
-
[
|
|
738
|
+
[54]: #updateuser
|
|
566
739
|
|
|
567
|
-
[
|
|
740
|
+
[55]: #comment
|
|
568
741
|
|
|
569
|
-
[
|
|
742
|
+
[56]: #commentfile
|
|
570
743
|
|
|
571
|
-
[
|
|
744
|
+
[57]: #highrisk
|
|
572
745
|
|
|
573
|
-
[
|
|
746
|
+
[58]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
574
747
|
|
|
575
|
-
[
|
|
748
|
+
[59]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
576
749
|
|
|
577
|
-
[
|
|
750
|
+
[60]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
578
751
|
|
|
579
|
-
[
|
|
752
|
+
[61]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
580
753
|
|
|
581
|
-
[
|
|
754
|
+
[62]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
582
755
|
|
|
583
|
-
[
|
|
756
|
+
[63]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
584
757
|
|
|
585
|
-
[
|
|
758
|
+
[64]: #highrisk
|
|
586
759
|
|
|
587
|
-
[
|
|
760
|
+
[65]: #comment
|
|
588
761
|
|
|
589
|
-
[
|
|
762
|
+
[66]: #commentfile
|
|
590
763
|
|
|
591
|
-
[
|
|
764
|
+
[67]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date
|