alsmanager_lib 3.0.116 → 3.0.118
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 +6 -2
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -11160,6 +11160,7 @@ function writeSiteDestination(id_site, id_place, date_start, date_end, name, fun
|
|
|
11160
11160
|
query += "'" + dt_end + "', ";
|
|
11161
11161
|
query += "'" + name + "', ";
|
|
11162
11162
|
query += "'" + funzione + "' ";
|
|
11163
|
+
query += ")";
|
|
11163
11164
|
return query;
|
|
11164
11165
|
}
|
|
11165
11166
|
|
|
@@ -11180,11 +11181,14 @@ function updateSiteDestination(id_site, id_place, date_start, date_end, name, fu
|
|
|
11180
11181
|
return query;
|
|
11181
11182
|
}
|
|
11182
11183
|
|
|
11183
|
-
function updateSiteDestinationAfterMove(id_site, id_place, date_start_ref) {
|
|
11184
|
+
function updateSiteDestinationAfterMove(id_site, id_place, date_start, name, funzione, date_start_ref) {
|
|
11184
11185
|
var dt_end = convertDateToStringDB(date_start_ref);
|
|
11186
|
+
var dt_start = convertDateToStringDB(date_start);
|
|
11185
11187
|
var query = "update site_destinations set ";
|
|
11186
11188
|
query += "date_end = date('" + dt_end + "', '-1 day') ";
|
|
11187
|
-
query += "where id_site = " + id_site + " and id_place = '" + id_place + "'";
|
|
11189
|
+
query += "where id_site = " + id_site + " and id_place = '" + id_place + "' ";
|
|
11190
|
+
query += "and date_start = '" + dt_start + "' ";
|
|
11191
|
+
query += "and name = '" + name + "' and type = '" + funzione + "'";
|
|
11188
11192
|
return query;
|
|
11189
11193
|
}
|
|
11190
11194
|
|