alsmanager_lib 3.0.27 → 3.0.29
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 +14 -31
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -7755,7 +7755,7 @@ function selectBeniPerConsegnaSQLite(id_consegna) {
|
|
|
7755
7755
|
query += "from consegna_beni cb ";
|
|
7756
7756
|
query += "left join devices d on cb.id_bene = d.id ";
|
|
7757
7757
|
query += "left join softwares s on cb.id_bene = s.id ";
|
|
7758
|
-
query += "left join
|
|
7758
|
+
query += "left join beniconsumo bc on cb.id_bene = bc.id ";
|
|
7759
7759
|
query += "left join altri_beni a on cb.id_bene = a.id ";
|
|
7760
7760
|
query += "left join altro_tipi atd on a.id_type = atd.id ";
|
|
7761
7761
|
query += "where cb.id_consegna = " + id_consegna;
|
|
@@ -7799,51 +7799,33 @@ function selectBeniPerConsegna(db_used, id_consegna) {
|
|
|
7799
7799
|
return query;
|
|
7800
7800
|
}
|
|
7801
7801
|
|
|
7802
|
-
function
|
|
7803
|
-
var query = "select
|
|
7804
|
-
query += "
|
|
7805
|
-
query += "
|
|
7806
|
-
query += "when d.inv_pnrr_number != '' and d.inv_pnrr_number is not null then d.inv_pnrr_number ";
|
|
7807
|
-
query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
7808
|
-
query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
7809
|
-
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
7810
|
-
query += "end as codice ";
|
|
7811
|
-
query += ", dc.note as note_cons from device_consegne dc";
|
|
7812
|
-
query += " join devices d on d.id = dc.id_device";
|
|
7813
|
-
query += " where dc.id_consegna = " + id_consegna;
|
|
7814
|
-
query += " and d.id = " + id_device;
|
|
7802
|
+
function selectBeneConsegnaSQLite(id_consegna, id_benecons) {
|
|
7803
|
+
var query = "select cb.id as id_benecons, cb.id_consegna, cb.id_bene, cb.tipo_bene, ";
|
|
7804
|
+
query += "cb.note_consegna, cb.numero, cb.stato_restituzione, cb.data_consegna, cb.data_restituzione from consegna_beni cb";
|
|
7805
|
+
query += " where cb.id = " + id_benecons;
|
|
7815
7806
|
return query;
|
|
7816
7807
|
}
|
|
7817
7808
|
|
|
7818
|
-
function
|
|
7819
|
-
var query = "select
|
|
7820
|
-
query += "
|
|
7821
|
-
query += "
|
|
7822
|
-
query += "when d.inv_pnrr_number != '' and d.inv_pnrr_number is not null then d.inv_pnrr_number ";
|
|
7823
|
-
query += "when d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
7824
|
-
query += "when d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
7825
|
-
query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
7826
|
-
query += "end as codice ";
|
|
7827
|
-
query += ", dc.note as note_cons from device_consegne dc";
|
|
7828
|
-
query += " join devices d on d.id = dc.id_device";
|
|
7829
|
-
query += " where dc.id_consegna = :id_consegna";
|
|
7830
|
-
query += " and d.id :id_device";
|
|
7809
|
+
function selectBeneConsegnaMySQL(id_consegna, id_benecons) {
|
|
7810
|
+
var query = "select cb.id as id_benecons, cb.id_consegna, cb.id_bene, cb.tipo_bene, ";
|
|
7811
|
+
query += "cb.note_consegna, cb.numero, cb.stato_restituzione, cb.data_consegna, cb.data_restituzione from consegna_beni cb";
|
|
7812
|
+
query += " where cb.id = :id_benecons";
|
|
7831
7813
|
return query;
|
|
7832
7814
|
}
|
|
7833
7815
|
|
|
7834
7816
|
|
|
7835
|
-
function
|
|
7817
|
+
function selectBeneConsegna(db_used, id_consegna, id_benecons) {
|
|
7836
7818
|
var query = "";
|
|
7837
7819
|
if (db_used) {
|
|
7838
7820
|
switch (db_used) {
|
|
7839
7821
|
case 'SQLITE':
|
|
7840
|
-
query =
|
|
7822
|
+
query = selectBeneConsegnaSQLite(id_consegna, id_benecons);
|
|
7841
7823
|
break;
|
|
7842
7824
|
case 'MYSQL':
|
|
7843
|
-
query =
|
|
7825
|
+
query = selectBeneConsegnaMySQL(id_consegna, id_benecons);
|
|
7844
7826
|
break;
|
|
7845
7827
|
case 'MYSQL2':
|
|
7846
|
-
query =
|
|
7828
|
+
query = selectBeneConsegnaSQLite(id_consegna, id_benecons);
|
|
7847
7829
|
break;
|
|
7848
7830
|
}
|
|
7849
7831
|
}
|
|
@@ -13997,6 +13979,7 @@ module.exports = {
|
|
|
13997
13979
|
updateConsegnaBene,
|
|
13998
13980
|
removeConsegnaBene,
|
|
13999
13981
|
selectBeniPerConsegna,
|
|
13982
|
+
selectBeneConsegna,
|
|
14000
13983
|
selectDevicePerConsegna,
|
|
14001
13984
|
selectDeviceConsegna,
|
|
14002
13985
|
selectSoftwarePerConsegna,
|