@tamu-dor/famis-db 1.3.0 → 1.3.2

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.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
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('uid', 'desc');
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.0",
3
+ "version": "1.3.2",
4
4
  "description": "DB library for FAMIS database",
5
5
  "main": "index.js",
6
6
  "scripts": {