alsmanager_lib 3.0.111 → 3.0.112

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 +18 -16
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -1224,8 +1224,8 @@ function getVoIPDevices() {
1224
1224
 
1225
1225
  // End manage Voip
1226
1226
  // Software management
1227
- function getSoftwares(db_used, maker, model, platform, licence_type) {
1228
- 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, life_licence ";
1227
+ function getSoftwares(db_used, maker, model, platform, license_type) {
1228
+ var query = "select id, maker, model, support, platform, release_year, version, build_no, license_type, license_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_license, no_inventario ";
1229
1229
  query += "from softwares ";
1230
1230
  query += "where (is_removed is null or is_removed = 0) ";
1231
1231
  if (maker) {
@@ -1237,27 +1237,27 @@ function getSoftwares(db_used, maker, model, platform, licence_type) {
1237
1237
  if (platform) {
1238
1238
  query += "and platform = '" + platform + "' ";
1239
1239
  }
1240
- if (licence_type) {
1241
- query += "and licence_type = '" + licence_type + "' ";
1240
+ if (license_type) {
1241
+ query += "and license_type = '" + license_type + "' ";
1242
1242
  }
1243
1243
  return query;
1244
1244
  }
1245
1245
  function getSoftwareByCodice(db_used, codice) {
1246
- 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, life_licence ";
1246
+ var query = "select id, maker, model, support, platform, release_year, version, build_no, license_type, license_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_license, no_inventario ";
1247
1247
  query += "from softwares ";
1248
1248
  query += "where (is_removed is null or is_removed = 0) ";
1249
1249
  query += "and inv_ict3_number = '" + codice + "' or serial_no = '" + codice + "'";
1250
1250
  return query;
1251
1251
  }
1252
1252
  function getSoftwareById(db_used, id_sw) {
1253
- 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, life_licence ";
1253
+ var query = "select id, maker, model, support, platform, release_year, version, build_no, license_type, license_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_license, no_inventario ";
1254
1254
  query += "from softwares ";
1255
1255
  query += "where (is_removed is null or is_removed = 0) ";
1256
1256
  query += "and id = " + id_sw;
1257
1257
  return query;
1258
1258
  }
1259
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, life_licence, ";
1260
+ var query = "select s.id, s.maker, s.model, s.support, s.platform, s.release_year, s.version, s.build_no, s.license_type, s.license_key, s.expired_date, s.is_pnrr, s.inv_ict3_number, s.serial_no, s.architettura, s.life_license, s.no_inventario, ";
1261
1261
  query += "case ";
1262
1262
  query += "when s.no_inventario is not null and s.no_inventario > 0 then concat(s.id,'(ID)') ";
1263
1263
  query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
@@ -1269,7 +1269,7 @@ function getSoftwareForConsegnaById(db_used, id_sw) {
1269
1269
  return query;
1270
1270
  }
1271
1271
  function insertSoftware(db_used, software) {
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 (";
1272
+ var query = "insert into softwares (maker, model, support, platform, release_year, version, build_no, license_type, license_key, expired_date, is_pnrr, inv_ict3_number, serial_no, architettura, life_license, no_inventario) values (";
1273
1273
  query += "'" + software.marca + "', ";
1274
1274
  query += "'" + software.modello + "', ";
1275
1275
  query += "'" + software.supporto + "', ";
@@ -1277,14 +1277,15 @@ function insertSoftware(db_used, software) {
1277
1277
  query += "'" + software.release_year + "', ";
1278
1278
  query += "'" + software.version + "', ";
1279
1279
  query += "'" + software.build_no + "', ";
1280
- query += "'" + software.licence_type + "', ";
1281
- query += "'" + software.licence_key + "', ";
1280
+ query += "'" + software.license_type + "', ";
1281
+ query += "'" + software.license_key + "', ";
1282
1282
  query += "'" + software.data_scadenza + "', ";
1283
1283
  query += software.is_pnrr + ", ";
1284
1284
  query += "'" + software.inventario + "', ";
1285
1285
  query += "'" + software.serial_no + "', ";
1286
1286
  query += "'" + software.architettura + "', ";
1287
- query += software.life_licence + " ";
1287
+ query += software.life_license + ", ";
1288
+ query += software.no_inventario + " ";
1288
1289
  query += ")";
1289
1290
  return query;
1290
1291
  }
@@ -1298,14 +1299,15 @@ function updateSoftware(db_used, id_sw, software) {
1298
1299
  query += "release_year = '" + software.release_year + "', ";
1299
1300
  query += "version = '" + software.version + "', ";
1300
1301
  query += "build_no = '" + software.build_no + "', ";
1301
- query += "licence_type = '" + software.licence_type + "', ";
1302
- query += "licence_key = '" + software.licence_key + "', ";
1302
+ query += "license_type = '" + software.license_type + "', ";
1303
+ query += "license_key = '" + software.license_key + "', ";
1303
1304
  query += "expired_date = '" + software.data_scadenza + "', ";
1304
1305
  query += "is_pnrr = " + software.is_pnrr + ", ";
1305
1306
  query += "inv_ict3_number = '" + software.inventario + "', ";
1306
1307
  query += "serial_no = '" + software.serial_no + "', ";
1307
1308
  query += "architettura = '" + software.architettura + "', ";
1308
- query += "life_licence = " + software.life_licence + " ";
1309
+ query += "life_license = " + software.life_license + ", ";
1310
+ query += "no_inventario = " + software.no_inventario + ", ";
1309
1311
  query += "where id = " + id_sw;
1310
1312
  return query;
1311
1313
  }
@@ -8584,7 +8586,7 @@ function selectSoftwareConsegna(db_used, id_consegna, id_software) {
8584
8586
  }
8585
8587
 
8586
8588
  function selectSoftwaresInDepositoSQLite(inv_code) {
8587
- var query = "SELECT s.id, s.support, s.platform, s.version, s.licence_type, s.maker, s.model, ";
8589
+ var query = "SELECT s.id, s.support, s.platform, s.version, s.license_type, s.maker, s.model, ";
8588
8590
  query += "case ";
8589
8591
  query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
8590
8592
  query += "when s.serial_no != '' and s.serial_no is not null then concat(s.serial_no,'(S/N)') ";
@@ -8598,7 +8600,7 @@ function selectSoftwaresInDepositoSQLite(inv_code) {
8598
8600
  return query;
8599
8601
  }
8600
8602
  function selectSoftwaresInDepositoMySQL(inv_code) {
8601
- var query = "SELECT s.id, s.support, s.platform, s.version, s.licence_type, s.maker, s.model, ";
8603
+ var query = "SELECT s.id, s.support, s.platform, s.version, s.license_type, s.maker, s.model, ";
8602
8604
  query += "case ";
8603
8605
  query += "when s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
8604
8606
  query += "when s.serial_no != '' and s.serial_no is not null then concat(s.serial_no,'(S/N)') ";
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.111",
7
+ "version": "3.0.112",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",