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