alsmanager_lib 1.0.36 → 1.0.38
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 +8 -8
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -5544,15 +5544,15 @@ function queryDocumentoTypes() {
|
|
|
5544
5544
|
function selectDocumentiComboSQLite(tipo, anno_emissione) {
|
|
5545
5545
|
var where_clause = "";
|
|
5546
5546
|
var query = "select id, concat(tipo, ' - ', descrizione, ' - ', data_emissione, ' - ', riferimento) as doc from documenti ";
|
|
5547
|
-
if (tipo || anno_emissione) {
|
|
5547
|
+
if ((tipo && tipo.trim() != '') || (anno_emissione && anno_emissione.trim() != '')) {
|
|
5548
5548
|
where_clause = "where ";
|
|
5549
|
-
if (tipo &&
|
|
5549
|
+
if (tipo && tipo.trim() != '') {
|
|
5550
5550
|
where_clause += "tipo = '" + tipo + "' ";
|
|
5551
|
-
if (anno_emissione && anno_emissione
|
|
5551
|
+
if (anno_emissione && anno_emissione.trim() != '') {
|
|
5552
5552
|
where_clause += " and ";
|
|
5553
5553
|
}
|
|
5554
5554
|
}
|
|
5555
|
-
if (anno_emissione && anno_emissione
|
|
5555
|
+
if (anno_emissione && anno_emissione.trim() != ''){
|
|
5556
5556
|
where_clause += "substr(data_emissione, 1,4) = '" + anno_emissione + "' ";
|
|
5557
5557
|
}
|
|
5558
5558
|
}
|
|
@@ -5564,15 +5564,15 @@ function selectDocumentiComboSQLite(tipo, anno_emissione) {
|
|
|
5564
5564
|
function selectDocumentiComboMySQL(tipo, anno_emissione) {
|
|
5565
5565
|
var where_clause = "";
|
|
5566
5566
|
var query = "select id, concat(tipo, ' - ', descrizione, ' - ', data_emissione, ' - ', riferimento) as doc from documenti ";
|
|
5567
|
-
if (tipo || anno_emissione) {
|
|
5567
|
+
if ((tipo && tipo.trim() != '') || (anno_emissione && anno_emissione.trim() != '')) {
|
|
5568
5568
|
where_clause = "where ";
|
|
5569
|
-
if (tipo && tipo != '') {
|
|
5569
|
+
if (tipo && tipo.trim() != '') {
|
|
5570
5570
|
where_clause += "tipo = :tipo ";
|
|
5571
|
-
if (anno_emissione && anno_emissione
|
|
5571
|
+
if (anno_emissione && anno_emissione.trim() != '') {
|
|
5572
5572
|
where_clause += " and ";
|
|
5573
5573
|
}
|
|
5574
5574
|
}
|
|
5575
|
-
if (anno_emissione && anno_emissione
|
|
5575
|
+
if (anno_emissione && anno_emissione.trim() != ''){
|
|
5576
5576
|
where_clause += "substr(data_emissione, 1,4) = :anno_emissione ";
|
|
5577
5577
|
}
|
|
5578
5578
|
}
|