alsmanager_lib 3.0.198 → 3.0.200
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 +2 -1
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -16418,7 +16418,7 @@ CREATE TABLE "printer_stampe_user" (
|
|
|
16418
16418
|
*/
|
|
16419
16419
|
|
|
16420
16420
|
function selectPrinters(id_place, only_external) {
|
|
16421
|
-
var query = "select d.id, concat(d.manifacturer, ' - ', d.model, ' (', p.name, ' - ', sd.name, ' - p.no : ', s.floor, ')') as descrizione, ";
|
|
16421
|
+
var query = "select distinct d.id, concat(d.manifacturer, ' - ', d.model, ' (', p.name, ' - ', sd.name, ' - p.no : ', s.floor, ')') as descrizione, ";
|
|
16422
16422
|
query += "case ";
|
|
16423
16423
|
query += "when dg.id is not null then gf.name ";
|
|
16424
16424
|
query += "else 'Interno' ";
|
|
@@ -16431,6 +16431,7 @@ function selectPrinters(id_place, only_external) {
|
|
|
16431
16431
|
query += "left join device_gestioni dg on d.id = dg.id_device ";
|
|
16432
16432
|
query += "left join gestori_fornitori gf on dg.id_gestione = gf.id ";
|
|
16433
16433
|
query += "where sd.date_start <= date('now') and sd.date_end >= date('now') ";
|
|
16434
|
+
query += "and ds.date_in <= date('now') and ds.date_out >= date('now') ";
|
|
16434
16435
|
query += "and d.type = 'STAMPANTE' ";
|
|
16435
16436
|
query += "and (dg.id is null or (dg.date_start <= date('now') and dg.date_end >= date('now'))) ";
|
|
16436
16437
|
if (only_external && only_external == 1)
|