alsmanager_lib 2.0.106 → 3.0.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/lib/modules.js +15 -15
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -12163,7 +12163,7 @@ function getAltroBeneById(db_used, id_bene) {
12163
12163
  }
12164
12164
 
12165
12165
  function getAltriBeniSQLite(id_type, manifacturer, model, id_site, id_place) {
12166
- var query = "select id, inv_ict3_number, inv_comune_prov, id_type, descrizione, manifacturer, model, note from altri_beni ab ";
12166
+ var query = "select ab.id, ab.inv_ict3_number, ab.inv_comune_prov, ab.id_type, ab.descrizione, ab.manifacturer, ab.model, ab.note from altri_beni ab ";
12167
12167
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12168
12168
  query += "left join altri_beni_site s on ab.id = s.id_bene ";
12169
12169
  }
@@ -12171,25 +12171,25 @@ function getAltriBeniSQLite(id_type, manifacturer, model, id_site, id_place) {
12171
12171
  if ((manifacturer && manifacturer != '') || (model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12172
12172
  where_clause = "where "
12173
12173
  if (manifacturer && manifacturer != '') {
12174
- where_clause += "manifacturer = '" + manifacturer + "' ";
12174
+ where_clause += "ab.manifacturer = '" + manifacturer + "' ";
12175
12175
  if ((model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12176
12176
  where_clause += " and ";
12177
12177
  }
12178
12178
  }
12179
12179
  if (model && model != '') {
12180
- where_clause += "model = '" + model + "' ";
12180
+ where_clause += "ab.model = '" + model + "' ";
12181
12181
  if ((id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12182
12182
  where_clause += " and ";
12183
12183
  }
12184
12184
  }
12185
12185
  if (id_type && id_type != '') {
12186
- where_clause += "id_type = " + id_type + " ";
12186
+ where_clause += "ab.id_type = " + id_type + " ";
12187
12187
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12188
12188
  where_clause += " and ";
12189
12189
  }
12190
12190
  }
12191
12191
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12192
- where_clause += "(s.id_place is not null and s.id_place = '" + id_place + "' && id_site = " + id_site + " ";
12192
+ where_clause += "(s.id_place is not null and s.id_place = '" + id_place + "' and s.id_site = " + id_site + " ";
12193
12193
  where_clause += "and s.date_in <= date('now') and s.date_out >= date('now'))";
12194
12194
  }
12195
12195
  }
@@ -12197,7 +12197,7 @@ function getAltriBeniSQLite(id_type, manifacturer, model, id_site, id_place) {
12197
12197
  return query;
12198
12198
  }
12199
12199
  function getAltriBeniMySQL(id_type, manifacturer, model, id_site, id_place) {
12200
- var query = "select id, inv_ict3_number, inv_comune_prov, id_type, descrizione, manifacturer, model, note from altri_beni ";
12200
+ var query = "select ab.id, ab.inv_ict3_number, ab.inv_comune_prov, ab.id_type, ab.descrizione, ab.manifacturer, ab.model, note from altri_beni ";
12201
12201
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12202
12202
  query += "left join altri_beni_site s on ab.id = s.id_bene ";
12203
12203
  }
@@ -12205,25 +12205,25 @@ function getAltriBeniMySQL(id_type, manifacturer, model, id_site, id_place) {
12205
12205
  if ((manifacturer && manifacturer != '') || (model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12206
12206
  where_clause = "where "
12207
12207
  if (manifacturer && manifacturer != '') {
12208
- where_clause += "manifacturer = :manifacturer ";
12208
+ where_clause += "ab.manifacturer = :manifacturer ";
12209
12209
  if ((model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12210
12210
  where_clause += " and ";
12211
12211
  }
12212
12212
  }
12213
12213
  if (model && model != '') {
12214
- where_clause += "model = :model ";
12214
+ where_clause += "ab.model = :model ";
12215
12215
  if ((id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12216
12216
  where_clause += " and ";
12217
12217
  }
12218
12218
  }
12219
12219
  if (id_type && id_type != '') {
12220
- where_clause += "id_type = :id_type ";
12220
+ where_clause += "ab.id_type = :id_type ";
12221
12221
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12222
12222
  where_clause += " and ";
12223
12223
  }
12224
12224
  }
12225
12225
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12226
- where_clause += "(s.id_place is not null and s.id_place = :id_place && id_site = :id_site ";
12226
+ where_clause += "(s.id_place is not null and s.id_place = :id_place and s.id_site = :id_site ";
12227
12227
  where_clause += "and s.date_in <= CURDATE() and s.date_out >= CURDATE()) ";
12228
12228
  }
12229
12229
  }
@@ -12231,7 +12231,7 @@ function getAltriBeniMySQL(id_type, manifacturer, model, id_site, id_place) {
12231
12231
  return query;
12232
12232
  }
12233
12233
  function getAltriBeniMySQL2(id_type, manifacturer, model, id_site, id_place) {
12234
- var query = "select id, inv_ict3_number, inv_comune_prov, id_type, descrizione, manifacturer, model, note from altri_beni ab ";
12234
+ var query = "select ab.id, ab.inv_ict3_number, ab.inv_comune_prov, ab.id_type, ab.descrizione, ab.manifacturer, ab.model, ab.note from altri_beni ab ";
12235
12235
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12236
12236
  query += "left join altri_beni_site s on ab.id = s.id_bene ";
12237
12237
  }
@@ -12239,25 +12239,25 @@ function getAltriBeniMySQL2(id_type, manifacturer, model, id_site, id_place) {
12239
12239
  if ((manifacturer && manifacturer != '') || (model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12240
12240
  where_clause = "where "
12241
12241
  if (manifacturer && manifacturer != '') {
12242
- where_clause += "manifacturer = '" + manifacturer + "' ";
12242
+ where_clause += "ab.manifacturer = '" + manifacturer + "' ";
12243
12243
  if ((model && model != '') || (id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12244
12244
  where_clause += " and ";
12245
12245
  }
12246
12246
  }
12247
12247
  if (model && model != '') {
12248
- where_clause += "model = '" + model + "' ";
12248
+ where_clause += "ab.model = '" + model + "' ";
12249
12249
  if ((id_type && id_type != '') || (id_site && id_site > 0) || (id_place && id_place != '')) {
12250
12250
  where_clause += " and ";
12251
12251
  }
12252
12252
  }
12253
12253
  if (id_type && id_type != '') {
12254
- where_clause += "id_type = " + id_type + " ";
12254
+ where_clause += "ab.id_type = " + id_type + " ";
12255
12255
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12256
12256
  where_clause += " and ";
12257
12257
  }
12258
12258
  }
12259
12259
  if ((id_site && id_site > 0) || (id_place && id_place != '')) {
12260
- where_clause += "(s.id_place is not null and s.id_place = '" + id_place + "' && id_site = " + id_site + " ";
12260
+ where_clause += "(s.id_place is not null and s.id_place = '" + id_place + "' and s.id_site = " + id_site + " ";
12261
12261
  where_clause += "and s.date_in <= CURDATE() and s.date_out >= CURDATE())";
12262
12262
  }
12263
12263
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "2.0.106",
7
+ "version": "3.0.2",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",