@tamu-dor/famis-db 1.3.0 → 1.3.1
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/index.js +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -825,7 +825,7 @@ class FAMISDb {
|
|
|
825
825
|
});
|
|
826
826
|
try {
|
|
827
827
|
retVal = `${prefix.prefix}${prefix.start}`;
|
|
828
|
-
records = await this.db('invoices').whereIn('type', prefix.aliases).orderBy('
|
|
828
|
+
records = await this.db('invoices').whereIn('type', prefix.aliases).orderBy('famisInvoiceNumber', 'desc').limit(5);
|
|
829
829
|
if (records.length) {
|
|
830
830
|
const number = parseInt(records[0].famisInvoiceNumber.substring(1), 10) + 1;
|
|
831
831
|
retVal = `${prefix.prefix}${number}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamu-dor/famis-db",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "DB library for FAMIS database",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"awaity": "^1.0.0",
|
|
20
|
-
"cuid": "^
|
|
20
|
+
"cuid": "^3.0.0",
|
|
21
21
|
"knex": "^3.1.0",
|
|
22
22
|
"pg": "^8.11.3",
|
|
23
|
-
"rev-hash": "^
|
|
23
|
+
"rev-hash": "^4.1.0"
|
|
24
24
|
}
|
|
25
25
|
}
|