alsmanager_lib 3.0.39 → 3.0.40

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.
Files changed (2) hide show
  1. package/lib/modules.js +6 -6
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -7818,9 +7818,9 @@ function selectBeniPerConsegnaSQLite(id_consegna) {
7818
7818
  //
7819
7819
  query += "end as Codice, ";
7820
7820
  query += "case ";
7821
- query += "when cb.tipo_bene = 'DEVICE' and trim(d.inv_pnrr_number) is null then '' ";
7822
- query += "when cb.tipo_bene = 'DEVICE' and trim(d.inv_pnrr_number) = '' then '' ";
7823
- query += "else 'SI' ";
7821
+ query += "when cb.tipo_bene = 'DEVICE' and d.inv_pnrr_number is not null and trim(d.inv_pnrr_number) <> '' then 'SI' ";
7822
+ query += "when cb.tipo_bene = 'SOFTWARE' and s.is_pnrr is not null and s.is_pnrr = 0 then 'SI' ";
7823
+ query += "else 'NO' ";
7824
7824
  query += "end as PNRR, cb.note_consegna as Note_cons ";
7825
7825
  query += "from consegna_beni cb ";
7826
7826
  query += "left join devices d on cb.id_bene = d.id ";
@@ -7842,9 +7842,9 @@ function selectBeniPerConsegnaMySQL(id_consegna) {
7842
7842
  query += "when d.serial_no != '' and d.serial_no is not null then concat(d.serial_no,'(S/N)') ";
7843
7843
  query += "end as Codice, ";
7844
7844
  query += "case ";
7845
- query += "when trim(d.inv_pnrr_number) is null then '' ";
7846
- query += "when trim(d.inv_pnrr_number) = '' then '' ";
7847
- query += "else 'SI' ";
7845
+ query += "when cb.tipo_bene = 'DEVICE' and d.inv_pnrr_number is not null and trim(d.inv_pnrr_number) <> '' then 'SI' ";
7846
+ query += "when cb.tipo_bene = 'SOFTWARE' and s.is_pnrr is not null and s.is_pnrr = 0 then 'SI' ";
7847
+ query += "else 'NO' ";
7848
7848
  query += "end as PNRR, dc.note as Note_cons ";
7849
7849
  query += " from devices d";
7850
7850
  query += " left join device_consegne dc on dc.id_device = d.id";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.39",
7
+ "version": "3.0.40",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",