alsmanager_lib 3.0.120 → 3.0.121
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 +39 -0
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -10797,6 +10797,42 @@ function getBeneConsumoById(db_used, id_bene) {
|
|
|
10797
10797
|
return query;
|
|
10798
10798
|
}
|
|
10799
10799
|
//
|
|
10800
|
+
function insertBeneConsumo(tipo, marca, modello, quantitativo) {
|
|
10801
|
+
/*
|
|
10802
|
+
CREATE TABLE "beniconsumo" (
|
|
10803
|
+
"id" INTEGER,
|
|
10804
|
+
"Tipo" TEXT,
|
|
10805
|
+
"Marca" TEXT,
|
|
10806
|
+
"Modello" TEXT,
|
|
10807
|
+
"Quantitativo" INTEGER,
|
|
10808
|
+
"id_type" INTEGER,
|
|
10809
|
+
PRIMARY KEY("id" AUTOINCREMENT)
|
|
10810
|
+
)
|
|
10811
|
+
*/
|
|
10812
|
+
var query = "insert into beniconsumo (tipo, marca, modello, quantitativo) values (";
|
|
10813
|
+
query += "'" + tipo + "', ";
|
|
10814
|
+
query += "'" + marca + "', ";
|
|
10815
|
+
query += "'" + modello + "', ";
|
|
10816
|
+
query += quantitativo;
|
|
10817
|
+
query += ")";
|
|
10818
|
+
return query;
|
|
10819
|
+
}
|
|
10820
|
+
function updateBeneConsumo(id_bene, tipo, marca, modello, quantitativo) {
|
|
10821
|
+
var query = "update beniconsumo set ";
|
|
10822
|
+
query += "tipo = '" + tipo + "', ";
|
|
10823
|
+
query += "marca = '" + marca + "', ";
|
|
10824
|
+
query += "modello = '" + modello + "', ";
|
|
10825
|
+
query += "quantitativo = " + quantitativo + " ";
|
|
10826
|
+
query += "where id = " + id_bene;
|
|
10827
|
+
return query;
|
|
10828
|
+
|
|
10829
|
+
}
|
|
10830
|
+
function removeBeneConsumo(id_bene) {
|
|
10831
|
+
var query = "delete from beniconsumo ";
|
|
10832
|
+
query += "where id = " + id_bene;
|
|
10833
|
+
return query;
|
|
10834
|
+
}
|
|
10835
|
+
//
|
|
10800
10836
|
function insertBeneConsumoAbbinatoSQLite(id_device, id_bene, numero) {
|
|
10801
10837
|
var query = "insert into device_beniconsumo (id_device, id_bene, numero) values ";
|
|
10802
10838
|
query += "(" + id_device + ", " + id_bene + " ," + numero + ")";
|
|
@@ -15060,6 +15096,9 @@ module.exports = {
|
|
|
15060
15096
|
getBeniConsumoNotNull,
|
|
15061
15097
|
getBeneConsumoUsato,
|
|
15062
15098
|
getBeneConsumoById,
|
|
15099
|
+
insertBeneConsumo,
|
|
15100
|
+
updateBeneConsumo,
|
|
15101
|
+
removeBeneConsumo,
|
|
15063
15102
|
existBeneAbbinato,
|
|
15064
15103
|
insertBeneConsumoAbbinato,
|
|
15065
15104
|
updateBeneConsumoAbbinato,
|