alsmanager_lib 3.0.38 → 3.0.39

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/lib/modules.js +13 -0
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -1256,6 +1256,18 @@ function getSoftwareById(db_used, id_sw) {
1256
1256
  query += "and id = " + id_sw;
1257
1257
  return query;
1258
1258
  }
1259
+ function getSoftwareForConsegnaById(db_used, id_sw) {
1260
+ var query = "select id, maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, ";
1261
+ query += "case ";
1262
+ query += "when s.no_inventario is not null and s.no_inventario > 0 then concat(s.id,'(ID)') ";
1263
+ query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
1264
+ query += "when s.serial_no != '' and s.serial_no is not null then concat(s.serial_no,'(S/N)') ";
1265
+ query += "end as Codice ";
1266
+ query += "from softwares s ";
1267
+ query += "where (is_removed is null or is_removed = 0) ";
1268
+ query += "and id = " + id_sw;
1269
+ return query;
1270
+ }
1259
1271
  function insertSoftware(db_used, software) {
1260
1272
  var query = "insert into softwares (maker, model, support, platform, release_year, version, build_no, licence_type, licence_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura) values (";
1261
1273
  query += "'" + software.marca + "', ";
@@ -14025,6 +14037,7 @@ module.exports = {
14025
14037
  getSoftwares,
14026
14038
  getSoftwareByCodice,
14027
14039
  getSoftwareById,
14040
+ getSoftwareForConsegnaById,
14028
14041
  insertSoftware,
14029
14042
  updateSoftware,
14030
14043
  removeSoftware,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.38",
7
+ "version": "3.0.39",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",