alsmanager_lib 3.0.157 → 3.0.158
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
|
@@ -4581,6 +4581,7 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4581
4581
|
let serial_no = "";
|
|
4582
4582
|
let note = "";
|
|
4583
4583
|
let peso = 0;
|
|
4584
|
+
let part_of = "";
|
|
4584
4585
|
|
|
4585
4586
|
if (dev.inventario)
|
|
4586
4587
|
inventario = dev.inventario;
|
|
@@ -4603,6 +4604,9 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4603
4604
|
}
|
|
4604
4605
|
if (dev.peso_g)
|
|
4605
4606
|
peso = dev.peso_g;
|
|
4607
|
+
if (dev.part_of)
|
|
4608
|
+
part_of = dev.part_of;
|
|
4609
|
+
|
|
4606
4610
|
query = "update devices set ";
|
|
4607
4611
|
query += "inv_ict3_number = '" + inventario.trim() + "',";
|
|
4608
4612
|
query += "inv_tn_number = '" + inv_comune.trim() + "',";
|
|
@@ -4617,7 +4621,7 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4617
4621
|
query += "no_inventario = " + dev.no_inv + ", ";
|
|
4618
4622
|
query += "peso_g = " + peso + ", ";
|
|
4619
4623
|
query += "part_of = '" + part_of + "', ";
|
|
4620
|
-
query += "is_unused = " + is_unused + " ";
|
|
4624
|
+
query += "is_unused = " + dev.is_unused + " ";
|
|
4621
4625
|
query += " where id = " + dev.id;
|
|
4622
4626
|
}
|
|
4623
4627
|
return query;
|
|
@@ -4703,7 +4707,7 @@ function getDeviceMySQLPayload(dev) {
|
|
|
4703
4707
|
if (dev.part_of) {
|
|
4704
4708
|
retValue.part_of = dev.part_of;
|
|
4705
4709
|
}
|
|
4706
|
-
|
|
4710
|
+
|
|
4707
4711
|
|
|
4708
4712
|
retValue.num_objects = dev.num_objects;
|
|
4709
4713
|
retValue.no_inv = dev.no_inv;
|