alsmanager_lib 3.0.156 → 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 +10 -1
- 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;
|
|
@@ -4676,6 +4680,7 @@ function getDeviceMySQLPayload(dev) {
|
|
|
4676
4680
|
retValue.modello = "";
|
|
4677
4681
|
retValue.serial_no = "";
|
|
4678
4682
|
retValue.note = "";
|
|
4683
|
+
retValue.part_of = "";
|
|
4679
4684
|
|
|
4680
4685
|
if (dev.inventario)
|
|
4681
4686
|
retValue.inventario = dev.inventario;
|
|
@@ -4699,6 +4704,10 @@ function getDeviceMySQLPayload(dev) {
|
|
|
4699
4704
|
if (dev.peso_g) {
|
|
4700
4705
|
retValue.peso_g = dev.peso_g;
|
|
4701
4706
|
}
|
|
4707
|
+
if (dev.part_of) {
|
|
4708
|
+
retValue.part_of = dev.part_of;
|
|
4709
|
+
}
|
|
4710
|
+
|
|
4702
4711
|
|
|
4703
4712
|
retValue.num_objects = dev.num_objects;
|
|
4704
4713
|
retValue.no_inv = dev.no_inv;
|