alsmanager_lib 3.0.25 → 3.0.27
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 +28 -26
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -7709,35 +7709,35 @@ function removeConsegnaBene(db_used, id_benecons) {
|
|
|
7709
7709
|
function selectBeniPerConsegnaSQLite(id_consegna) {
|
|
7710
7710
|
var query = "select cb.id_bene as id, cb.numero as Numero, cb.tipo_bene as Tipologia, ";
|
|
7711
7711
|
query += "case ";
|
|
7712
|
-
query += "when
|
|
7713
|
-
query += "when
|
|
7714
|
-
query += "when
|
|
7715
|
-
query += "when
|
|
7712
|
+
query += "when cb.tipo_bene = 'DEVICE' then d.type ";
|
|
7713
|
+
query += "when cb.tipo_bene = 'SOFTWARE' then s.support ";
|
|
7714
|
+
query += "when cb.tipo_bene = 'BENE_CONSUMO' then bc.Tipo ";
|
|
7715
|
+
query += "when cb.tipo_bene = 'ALTRO' then atd.name ";
|
|
7716
7716
|
query += "else '' "
|
|
7717
7717
|
query += "end as Tipo, ";
|
|
7718
7718
|
query += "case ";
|
|
7719
|
-
query += "when
|
|
7720
|
-
query += "when
|
|
7721
|
-
query += "when
|
|
7722
|
-
query += "when
|
|
7719
|
+
query += "when cb.tipo_bene = 'DEVICE' then d.manifacturer ";
|
|
7720
|
+
query += "when cb.tipo_bene = 'SOFTWARE' then s.maker ";
|
|
7721
|
+
query += "when cb.tipo_bene = 'BENE_CONSUMO' then bc.Marca ";
|
|
7722
|
+
query += "when cb.tipo_bene = 'ALTRO' then a.manifacturer ";
|
|
7723
7723
|
query += "else '' "
|
|
7724
7724
|
query += "end as Marca, ";
|
|
7725
7725
|
query += "case ";
|
|
7726
|
-
query += "when
|
|
7727
|
-
query += "when
|
|
7728
|
-
query += "when
|
|
7729
|
-
query += "when
|
|
7726
|
+
query += "when cb.tipo_bene = 'DEVICE' then d.model ";
|
|
7727
|
+
query += "when cb.tipo_bene = 'SOFTWARE' then s.model ";
|
|
7728
|
+
query += "when cb.tipo_bene = 'BENE_CONSUMO' then bc.Modello ";
|
|
7729
|
+
query += "when cb.tipo_bene = 'ALTRO' then a.model ";
|
|
7730
7730
|
query += "else '' "
|
|
7731
7731
|
query += "end as Modello, ";
|
|
7732
7732
|
query += "case ";
|
|
7733
|
-
query += "when
|
|
7734
|
-
query += "when
|
|
7735
|
-
query += "when
|
|
7736
|
-
query += "when
|
|
7737
|
-
query += "when
|
|
7733
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_ict3_number != '' and d.inv_ict3_number is not null then d.inv_ict3_number ";
|
|
7734
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_pnrr_number != '' and d.inv_pnrr_number is not null then d.inv_pnrr_number ";
|
|
7735
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_tn_number != '' and d.inv_tn_number is not null then concat(d.inv_tn_number,'(TN)') ";
|
|
7736
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.inv_tndigit_number != '' and d.inv_tndigit_number is not null then concat(d.inv_tndigit_number,'(TNDigit)') ";
|
|
7737
|
+
query += "when cb.tipo_bene = 'DEVICE' and d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
|
|
7738
7738
|
//
|
|
7739
|
-
query += "when
|
|
7740
|
-
query += "when
|
|
7739
|
+
query += "when cb.tipo_bene = 'SOFTWARE' and s.inv_ict3_number != '' and s.inv_ict3_number is not null then s.inv_ict3_number ";
|
|
7740
|
+
query += "when cb.tipo_bene = 'SOFTWARE' and s.serial_no != '' and s.serial_no is not null then concat(s.serial_no,'(S/N)') ";
|
|
7741
7741
|
//
|
|
7742
7742
|
// Temporaneamente non considerato
|
|
7743
7743
|
//query += "when cd.tipo_bene = 'BENE_CONSUMO' and d.inv_ict3_number != '' and d.inv_ict3_number is not null then d.inv_ict3_number ";
|
|
@@ -7748,15 +7748,17 @@ function selectBeniPerConsegnaSQLite(id_consegna) {
|
|
|
7748
7748
|
//
|
|
7749
7749
|
query += "end as Codice, ";
|
|
7750
7750
|
query += "case ";
|
|
7751
|
-
query += "when
|
|
7752
|
-
query += "when
|
|
7751
|
+
query += "when cb.tipo_bene = 'DEVICE' and trim(d.inv_pnrr_number) is null then '' ";
|
|
7752
|
+
query += "when cb.tipo_bene = 'DEVICE' and trim(d.inv_pnrr_number) = '' then '' ";
|
|
7753
7753
|
query += "else 'SI' ";
|
|
7754
7754
|
query += "end as PNRR, cb.note_consegna as Note_cons ";
|
|
7755
|
-
query += "
|
|
7756
|
-
query += "
|
|
7757
|
-
query += "
|
|
7758
|
-
query += "
|
|
7759
|
-
query += "
|
|
7755
|
+
query += "from consegna_beni cb ";
|
|
7756
|
+
query += "left join devices d on cb.id_bene = d.id ";
|
|
7757
|
+
query += "left join softwares s on cb.id_bene = s.id ";
|
|
7758
|
+
query += "left join beni_consumo bc on cb.id_bene = bc.id ";
|
|
7759
|
+
query += "left join altri_beni a on cb.id_bene = a.id ";
|
|
7760
|
+
query += "left join altro_tipi atd on a.id_type = atd.id ";
|
|
7761
|
+
query += "where cb.id_consegna = " + id_consegna;
|
|
7760
7762
|
return query;
|
|
7761
7763
|
}
|
|
7762
7764
|
|