alsmanager_lib 3.0.157 → 3.0.159
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 +12 -5
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -3175,7 +3175,8 @@ function getDevicesByDetailsSelectSQLite(search_criteria, details) {
|
|
|
3175
3175
|
query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
3176
3176
|
query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
3177
3177
|
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
3178
|
-
query += "end as Codice ";
|
|
3178
|
+
query += "end as Codice, ";
|
|
3179
|
+
query += "d.part_of as Parte ";
|
|
3179
3180
|
query += "from devices d ";
|
|
3180
3181
|
if (search_criteria.dev_status)
|
|
3181
3182
|
query += "left join device_usage du on d.id = du.id_device ";
|
|
@@ -3349,7 +3350,8 @@ function getDevicesByDetailsSelectMySQL(search_criteria, details) {
|
|
|
3349
3350
|
query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
3350
3351
|
query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
3351
3352
|
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
3352
|
-
query += "end as Codice ";
|
|
3353
|
+
query += "end as Codice, ";
|
|
3354
|
+
query += "d.part_of as Parte ";
|
|
3353
3355
|
query += "from devices d ";
|
|
3354
3356
|
if (search_criteria.dev_status)
|
|
3355
3357
|
query += "left join device_usage du on d.id = du.id_device ";
|
|
@@ -3526,7 +3528,8 @@ function getDevicesByDetailsSelectMySQL2(search_criteria, details) {
|
|
|
3526
3528
|
query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
3527
3529
|
query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
3528
3530
|
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
3529
|
-
query += "end as Codice ";
|
|
3531
|
+
query += "end as Codice, ";
|
|
3532
|
+
query += "d.part_of as Parte ";
|
|
3530
3533
|
query += "from devices d ";
|
|
3531
3534
|
if (search_criteria.dev_status)
|
|
3532
3535
|
query += "left join device_usage du on d.id = du.id_device ";
|
|
@@ -4581,6 +4584,7 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4581
4584
|
let serial_no = "";
|
|
4582
4585
|
let note = "";
|
|
4583
4586
|
let peso = 0;
|
|
4587
|
+
let part_of = "";
|
|
4584
4588
|
|
|
4585
4589
|
if (dev.inventario)
|
|
4586
4590
|
inventario = dev.inventario;
|
|
@@ -4603,6 +4607,9 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4603
4607
|
}
|
|
4604
4608
|
if (dev.peso_g)
|
|
4605
4609
|
peso = dev.peso_g;
|
|
4610
|
+
if (dev.part_of)
|
|
4611
|
+
part_of = dev.part_of;
|
|
4612
|
+
|
|
4606
4613
|
query = "update devices set ";
|
|
4607
4614
|
query += "inv_ict3_number = '" + inventario.trim() + "',";
|
|
4608
4615
|
query += "inv_tn_number = '" + inv_comune.trim() + "',";
|
|
@@ -4617,7 +4624,7 @@ function updateDeviceSQLite(deviceObj) {
|
|
|
4617
4624
|
query += "no_inventario = " + dev.no_inv + ", ";
|
|
4618
4625
|
query += "peso_g = " + peso + ", ";
|
|
4619
4626
|
query += "part_of = '" + part_of + "', ";
|
|
4620
|
-
query += "is_unused = " + is_unused + " ";
|
|
4627
|
+
query += "is_unused = " + dev.is_unused + " ";
|
|
4621
4628
|
query += " where id = " + dev.id;
|
|
4622
4629
|
}
|
|
4623
4630
|
return query;
|
|
@@ -4703,7 +4710,7 @@ function getDeviceMySQLPayload(dev) {
|
|
|
4703
4710
|
if (dev.part_of) {
|
|
4704
4711
|
retValue.part_of = dev.part_of;
|
|
4705
4712
|
}
|
|
4706
|
-
|
|
4713
|
+
|
|
4707
4714
|
|
|
4708
4715
|
retValue.num_objects = dev.num_objects;
|
|
4709
4716
|
retValue.no_inv = dev.no_inv;
|