diff --git a/IntegryReports/BIOLEVANTE/ContrattoAcquistoOlioSfuso.jrxml b/IntegryReports/BIOLEVANTE/ContrattoAcquistoOlioSfuso.jrxml
index a24d477..140bc8c 100644
--- a/IntegryReports/BIOLEVANTE/ContrattoAcquistoOlioSfuso.jrxml
+++ b/IntegryReports/BIOLEVANTE/ContrattoAcquistoOlioSfuso.jrxml
@@ -1,14 +1,8 @@
-
+
-
-
-
+
@@ -26,6 +20,7 @@ NzY7YXppZW5kYSAsMzAwLDIyOSw5Y2NhMzBjNC1lNzJhLTQyZWEtOWVlMi1lMTFkYmMxYzZjNjQ7]]>
data_iniz,
data_fine,
num_off AS versione,
+ id_contratto,
c.note,
c.cod_vage,
rag_soc_age,
@@ -36,6 +31,7 @@ NzY7YXppZW5kYSAsMzAwLDIyOSw5Y2NhMzBjNC1lNzJhLTQyZWEtOWVlMi1lMTFkYmMxYzZjNjQ7]]>
unt_mis_acq,
rap_conv,
prz_acq,
+ round(c.prz_acq * (1+c.perc_aliq/100), 5) as prz_acq_ivato,
perc_1,
perc_2,
perc_3,
@@ -92,6 +88,10 @@ WHERE c.id_contratto = $P{id_contratto}]]>
+
+
+
+
@@ -132,6 +132,10 @@ WHERE c.id_contratto = $P{id_contratto}]]>
+
+
+
+
@@ -467,11 +471,11 @@ WHERE c.id_contratto = $P{id_contratto}]]>
-
+
-
+
@@ -483,13 +487,13 @@ WHERE c.id_contratto = $P{id_contratto}]]>
-
+
-
+
@@ -664,6 +668,31 @@ WHERE c.id_contratto = $P{id_contratto}]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/BIOLEVANTE/contratto_acquisto_subreport.jrxml b/IntegryReports/BIOLEVANTE/contratto_acquisto_subreport.jrxml
index 1334f99..2ceaf41 100644
--- a/IntegryReports/BIOLEVANTE/contratto_acquisto_subreport.jrxml
+++ b/IntegryReports/BIOLEVANTE/contratto_acquisto_subreport.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -20,6 +20,7 @@
data_iniz,
data_fine,
num_off as versione,
+ id_contratto,
cod_vage,
rag_soc_age,
cod_vvet,
@@ -78,6 +79,10 @@ WHERE c.id_contratto = $P{id_contratto}]]>
+
+
+
+
diff --git a/IntegryReports/BIOLEVANTE/contrattoacquisto.jrxml b/IntegryReports/BIOLEVANTE/contrattoacquisto.jrxml
index bbdc85d..0a3f12a 100644
--- a/IntegryReports/BIOLEVANTE/contrattoacquisto.jrxml
+++ b/IntegryReports/BIOLEVANTE/contrattoacquisto.jrxml
@@ -1,5 +1,5 @@
-
+
diff --git a/IntegryReports/CARELLI/ReportRilevatrici.jrxml b/IntegryReports/CARELLI/ReportRilevatrici.jrxml
new file mode 100644
index 0000000..6b5c068
--- /dev/null
+++ b/IntegryReports/CARELLI/ReportRilevatrici.jrxml
@@ -0,0 +1,380 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/CARELLI/barcode_negozio.jrxml b/IntegryReports/CARELLI/barcode_negozio.jrxml
new file mode 100644
index 0000000..283bae5
--- /dev/null
+++ b/IntegryReports/CARELLI/barcode_negozio.jrxml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/EtichetteSSCC_Linea7_ALNATURA.jrxml b/IntegryReports/EtichetteSSCC_Linea7_ALNATURA.jrxml
new file mode 100644
index 0000000..cdc42f6
--- /dev/null
+++ b/IntegryReports/EtichetteSSCC_Linea7_ALNATURA.jrxml
@@ -0,0 +1,350 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/EtichetteSSCC_Linea7_SELIN.jrxml b/IntegryReports/EtichetteSSCC_Linea7_SELIN.jrxml
new file mode 100644
index 0000000..ae55860
--- /dev/null
+++ b/IntegryReports/EtichetteSSCC_Linea7_SELIN.jrxml
@@ -0,0 +1,351 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/FOLLIE/OrdiniWeb_Follie.jrxml b/IntegryReports/FOLLIE/OrdiniWeb_Follie.jrxml
index 17d6ff5..1dc48ea 100644
--- a/IntegryReports/FOLLIE/OrdiniWeb_Follie.jrxml
+++ b/IntegryReports/FOLLIE/OrdiniWeb_Follie.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -46,9 +46,6 @@
-
-
-
diff --git a/IntegryReports/GRAMM/Cartella Test/Etichetta_tama_usa.jrxml b/IntegryReports/GRAMM/Cartella Test/Etichetta_tama_usa.jrxml
new file mode 100644
index 0000000..832b319
--- /dev/null
+++ b/IntegryReports/GRAMM/Cartella Test/Etichetta_tama_usa.jrxml
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Los Angeles, CA 90058 - Tel. (213)-748-8262 "]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/GRAMM/StampaOrdineDiLavorazione.jrxml b/IntegryReports/GRAMM/StampaOrdineDiLavorazione.jrxml
index eb4c111..eb4db6a 100644
--- a/IntegryReports/GRAMM/StampaOrdineDiLavorazione.jrxml
+++ b/IntegryReports/GRAMM/StampaOrdineDiLavorazione.jrxml
@@ -35,6 +35,7 @@
dtb_ordt.qta_prod,
dtb_ordr.pos_riga,
dtb_ordr.partita_mag,
+ dtb_ordt.partita_mag as partita_mag_prod,
dtb_ordt.unt_mis_prod,
dtb_ordt.compilato_da,
dtb_ordt.controllato_da,
@@ -164,6 +165,10 @@ ORDER BY dtb_ordt.data_ord ASC,
+
+
+
+
@@ -795,7 +800,7 @@ ORDER BY dtb_ordt.data_ord ASC,
-
+
@@ -965,6 +970,27 @@ ORDER BY dtb_ordt.data_ord ASC,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/GRAMM/TrackingOrdini.jrxml b/IntegryReports/GRAMM/TrackingOrdini.jrxml
index d34155e..fa95c29 100644
--- a/IntegryReports/GRAMM/TrackingOrdini.jrxml
+++ b/IntegryReports/GRAMM/TrackingOrdini.jrxml
@@ -32,16 +32,23 @@
+ and dtb_ordt.data_iniz_trasp between $P{data_iniz}
+ and $P{data_fine}
+ and mat.cod_mgrp in ('SL')
+ and flag_fase_pref='S'
+ and jtb_dist_clav_dir.activity_type_id='LAVORAZIONE'
+
+ group by
+ dtb_ordr.cod_mart,
+ dtb_ordr.descrizione,
+ (
+ (dtb_ordr.qta_ord - qta_evasa)* dtb_ordr.rap_conv
+ )/ mtb_aart.qta_cnf ,
+ (dtb_ordr.qta_ord - qta_evasa)* dtb_ordr.rap_conv * mtb_aart.peso_kg ,
+ qta_esistente / mtb_aart.qta_cnf ,
+ qta_esistente*MTB_AART.peso_kg ,
+
+ dtb_ordt.num_ord,
+ dtb_ordt.data_ord,
+ data_iniz_trasp,
+ dtb_ordt.cod_anag,
+ gtb_anag.rag_soc,
+ azienda.nome_ditta,
+ jtb_cicl.gg_tot
+ order by linea_sl]]>
@@ -68,17 +103,25 @@ order by data_iniz_trasp asc, dtb_ordt.num_ord asc]]>
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -92,6 +135,10 @@ order by data_iniz_trasp asc, dtb_ordt.num_ord asc]]>
+
+
+
+
@@ -104,18 +151,136 @@ order by data_iniz_trasp asc, dtb_ordt.num_ord asc]]>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -138,7 +303,7 @@ order by data_iniz_trasp asc, dtb_ordt.num_ord asc]]>
-
+
@@ -146,20 +311,40 @@ order by data_iniz_trasp asc, dtb_ordt.num_ord asc]]>
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -168,7 +353,7 @@ Inizio Trasporto]]>
Ordine]]>
-
+
@@ -178,8 +363,9 @@ Ordine]]>
-
+
+
@@ -188,8 +374,9 @@ Ordine]]>
giacenza]]>
-
+
+
@@ -198,118 +385,259 @@ giacenza]]>
da evadere]]>
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/IntegryReports/RossoGargano/CertificatoConsegnaIndustrie.jrxml b/IntegryReports/RossoGargano/CertificatoConsegnaIndustrie.jrxml
index 65a8847..5db4e83 100644
--- a/IntegryReports/RossoGargano/CertificatoConsegnaIndustrie.jrxml
+++ b/IntegryReports/RossoGargano/CertificatoConsegnaIndustrie.jrxml
@@ -933,7 +933,7 @@ ORDER BY op, produttore, ddt.data_doc]]>
-
+
diff --git a/IntegryReports/RossoGargano/Controllo Giacenze.jrxml b/IntegryReports/RossoGargano/Controllo Giacenze.jrxml
new file mode 100644
index 0000000..ebeb548
--- /dev/null
+++ b/IntegryReports/RossoGargano/Controllo Giacenze.jrxml
@@ -0,0 +1,551 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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ibro.jrxml
+++ b/IntegryReports/RossoGargano/EtichettaCalibro.jrxml
@@ -245,7 +245,7 @@ from
-
+
@@ -261,7 +261,7 @@ from
-
+
@@ -277,9 +277,9 @@ from
-
+
-
+
@@ -319,11 +319,11 @@ from
-
+
-
+
@@ -351,7 +351,7 @@ from
-
+
diff --git a/IntegryReports/RossoGargano/EtichetteSSCCProdottoFinito.jrxml b/IntegryReports/RossoGargano/EtichettaSSCCProdottoFinito.jrxml
similarity index 98%
rename from IntegryReports/RossoGargano/EtichetteSSCCProdottoFinito.jrxml
rename to IntegryReports/RossoGargano/EtichettaSSCCProdottoFinito.jrxml
index 68b5ddf..55fec83 100644
--- a/IntegryReports/RossoGargano/EtichetteSSCCProdottoFinito.jrxml
+++ b/IntegryReports/RossoGargano/EtichettaSSCCProdottoFinito.jrxml
@@ -55,6 +55,8 @@
CONVERT(INT, SUM(mtb_colr.qta_col / mtb_colr.qta_cnf)) AS quantita,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag AS lotto,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
mtb_colt.progressivo_ul AS n_pedana,
@@ -86,6 +88,8 @@ GROUP BY mtb_colr.qta_cnf,
IIF(mtb_aart.bar_code IS NULL, cod_barre_imb, mtb_aart.bar_code),
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
ean128.ai_00,
ean128.ai_01,
@@ -173,6 +177,14 @@ GROUP BY mtb_colr.qta_cnf,
+
+
+
+
+
+
+
+
@@ -306,7 +318,7 @@ LOT
-
+
@@ -385,7 +397,7 @@ PRODUCTION DATE]]>
-
+
diff --git a/IntegryReports/RossoGargano/EtichettaSemilavorato.jrxml b/IntegryReports/RossoGargano/EtichettaSemilavorato.jrxml
new file mode 100644
index 0000000..3bc965a
--- /dev/null
+++ b/IntegryReports/RossoGargano/EtichettaSemilavorato.jrxml
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/RossoGargano/EtichettaSemilavorato100x70.jrxml b/IntegryReports/RossoGargano/EtichettaSemilavorato100x70.jrxml
index ac8e5bf..56e8025 100644
--- a/IntegryReports/RossoGargano/EtichettaSemilavorato100x70.jrxml
+++ b/IntegryReports/RossoGargano/EtichettaSemilavorato100x70.jrxml
@@ -49,6 +49,8 @@
) as quantita,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag as lotto,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
mtb_colt.progressivo_ul AS n_pedana,
mtb_colt.cod_jfas,
@@ -85,6 +87,8 @@ group by
case when mtb_aart.bar_code is null then cod_barre_imb else mtb_aart.bar_code end,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
ean128.ai_00,
ean128.ai_01,
@@ -164,6 +168,14 @@ group by
+
+
+
+
+
+
+
+
@@ -217,7 +229,7 @@ group by
-
+
@@ -227,7 +239,7 @@ group by
-
+
@@ -241,7 +253,7 @@ group by
-
+
@@ -250,7 +262,7 @@ group by
-
+
@@ -259,17 +271,17 @@ group by
-
-
+
+
-
+
-
+
@@ -278,7 +290,7 @@ group by
-
+
@@ -287,7 +299,7 @@ group by
-
+
@@ -297,16 +309,16 @@ group by
]]>
-
+
-
+
-
+
@@ -329,17 +341,6 @@ group by
-
-
-
-
-
-
-
-
-
-
-
@@ -355,17 +356,17 @@ group by
-
+
-
+
-
+
@@ -387,6 +388,14 @@ group by
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/RossoGargano/EtichetteSemilavorato.jrxml b/IntegryReports/RossoGargano/EtichettaSemilavoratoA5.jrxml
similarity index 98%
rename from IntegryReports/RossoGargano/EtichetteSemilavorato.jrxml
rename to IntegryReports/RossoGargano/EtichettaSemilavoratoA5.jrxml
index 3d41eda..8f86499 100644
--- a/IntegryReports/RossoGargano/EtichetteSemilavorato.jrxml
+++ b/IntegryReports/RossoGargano/EtichettaSemilavoratoA5.jrxml
@@ -54,6 +54,8 @@
) as quantita,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag as lotto,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
mtb_colt.progressivo_ul AS n_pedana,
mtb_colt.cod_jfas,
@@ -90,6 +92,8 @@ group by
case when mtb_aart.bar_code is null then cod_barre_imb else mtb_aart.bar_code end,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
ean128.ai_00,
ean128.ai_01,
@@ -169,6 +173,14 @@ group by
+
+
+
+
+
+
+
+
@@ -275,7 +287,7 @@ LOT
-
+
@@ -386,12 +398,12 @@ PRODUCTION LINE
-
+
-
+
diff --git a/IntegryReports/RossoGargano/PackinglistCarico.jrxml b/IntegryReports/RossoGargano/PackinglistCarico.jrxml
new file mode 100644
index 0000000..705bc58
--- /dev/null
+++ b/IntegryReports/RossoGargano/PackinglistCarico.jrxml
@@ -0,0 +1,789 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/RossoGargano/Packinglist_verticale.jrxml b/IntegryReports/RossoGargano/PackinglistScarico.jrxml
similarity index 92%
rename from IntegryReports/RossoGargano/Packinglist_verticale.jrxml
rename to IntegryReports/RossoGargano/PackinglistScarico.jrxml
index 41b2713..0bcf417 100644
--- a/IntegryReports/RossoGargano/Packinglist_verticale.jrxml
+++ b/IntegryReports/RossoGargano/PackinglistScarico.jrxml
@@ -1,6 +1,6 @@
-
+
@@ -39,7 +39,7 @@
udc.barcode_ul as udc,
udc.posizione as posizione_udc,
udc.cod_anag,
- udc.data_vers as data_prod,
+ udc.data_vers as data_prod_vers,
udc.cod_mdep,
mtb_colt.progressivo_ul
from mtb_colt inner join mtb_colr on mtb_colt.num_collo=mtb_colr.num_collo and
@@ -51,7 +51,7 @@
udc.num_collo=mtb_colr.num_collo_rif and
udc.ser_collo = mtb_colr.ser_collo_rif
- where mtb_colt.gestione='V')
+ where mtb_colt.segno=-1)
select DENSE_RANK() OVER (order by uds desc) as num_uds,
UDS,
@@ -73,7 +73,9 @@ select DENSE_RANK() OVER (order by uds desc) as num_uds,
fase_udc as fase,
posizione_udc as linea,
mtb_partita_mag.data_scad,
- colli.data_prod,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
+ colli.data_prod_vers,
gtb_anag.cod_anag,
gtb_anag.rag_soc,
gtb_anag.citta,
@@ -106,7 +108,7 @@ from dtb_docr left outer join colli on dtb_docr.cod_dtip=colli.cod_dtip and
dtb_docr.num_doc=colli.num_doc and
dtb_docr.ser_doc=colli.ser_doc and
dtb_docr.cod_mart=colli.cod_mart AND
- dtb_docr.partita_mag=colli.partita_mag
+ isnull( dtb_docr.partita_mag, '')=isNull(colli.partita_mag,'')
left outer join dtb_doct on dtb_docr.cod_dtip=dtb_doct.cod_dtip and
dtb_docr.data_doc=dtb_doct.data_doc and
dtb_docr.num_doc=dtb_doct.num_doc and
@@ -119,7 +121,7 @@ from dtb_docr left outer join colli on dtb_docr.cod_dtip=colli.cod_dtip and
left outer join RossoGarganoExchange.dbo.mtb_partitamag_prefisso p on p.Prefisso = left(mtb_partita_mag.partita_mag, 5)
LEFT OUTER JOIN gtb_anag on dtb_docr.cod_anag = gtb_anag.cod_anag,
azienda
-where dtb_docr.num_doc= $P{num_doc} and dtb_docr.data_doc= $P{data_doc} and dtb_docr.ser_doc = $P{ser_doc} AND dtb_docr.cod_mart is not null
+where dtb_docr.num_doc= $P{num_doc} and dtb_docr.data_doc= $P{data_doc} and dtb_docr.ser_doc =$P{ser_doc} AND dtb_docr.cod_mart is not null
group by UDS,
colli.gestione,
colli.data_collo,
@@ -135,7 +137,9 @@ group by UDS,
fase_udc,
posizione_udc,
mtb_partita_mag.data_scad,
- colli.data_prod,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
+ colli.data_prod_vers,
gtb_anag.cod_anag,
gtb_anag.rag_soc,
gtb_anag.citta,
@@ -244,10 +248,18 @@ order by uds desc]]>
+
+
+
+
+
+
+
+
@@ -388,10 +400,10 @@ order by uds desc]]>
-
+
-
+
@@ -399,17 +411,17 @@ order by uds desc]]>
-
+
-
+
-
+
@@ -420,10 +432,10 @@ order by uds desc]]>
-
+
-
+
@@ -431,7 +443,7 @@ order by uds desc]]>
-
+
@@ -442,7 +454,7 @@ order by uds desc]]>
-
+
@@ -452,7 +464,7 @@ order by uds desc]]>
-
+
@@ -462,7 +474,7 @@ order by uds desc]]>
-
+
@@ -473,7 +485,7 @@ order by uds desc]]>
-
+
@@ -484,7 +496,7 @@ order by uds desc]]>
-
+
@@ -495,7 +507,7 @@ order by uds desc]]>
-
+
@@ -515,7 +527,7 @@ order by uds desc]]>
-
+
@@ -693,10 +705,9 @@ order by uds desc]]>
-
+
-
@@ -704,7 +715,7 @@ order by uds desc]]>
-
+
@@ -715,10 +726,9 @@ order by uds desc]]>
-
+
-
@@ -733,7 +743,7 @@ order by uds desc]]>
-
+
@@ -755,7 +765,7 @@ order by uds desc]]>
-
+
diff --git a/IntegryReports/RossoGargano/Packinglist_WMS.jrxml b/IntegryReports/RossoGargano/Packinglist_WMS.jrxml
index 975c02f..e832981 100644
--- a/IntegryReports/RossoGargano/Packinglist_WMS.jrxml
+++ b/IntegryReports/RossoGargano/Packinglist_WMS.jrxml
@@ -71,6 +71,8 @@ Select mtb_colt.gestione, mtb_colt.data_ord, mtb_colt.num_ord, mtb_colt.cod_anag
mtb_aart.colli_pedana,
mtb_aart.unt_mis3,
mtb_colr.partita_mag,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
SUM(mtb_colr.num_cnf) as num_colli_preparati,
COUNT(distinct mtb_colt.num_collo) as inUDS,
@@ -96,6 +98,8 @@ group by
mtb_colr.cod_mart,
mtb_aart.descrizione_estesa,
mtb_colr.partita_mag,
+ mtb_partita_mag.partita_mag_prod,
+ mtb_partita_mag.data_prod,
mtb_partita_mag.data_scad,
mtb_colr.riga_ord,
mtb_aart.colli_pedana, mtb_aart.unt_mis3, mtb_colt.preparato_da, azienda.nome_ditta
@@ -149,6 +153,8 @@ Select ISNULL(Ordine.gestione, Colli.gestione) as gestione,
convert(decimal(10,2),Ordine.tot_colli_ord - sum(colli.num_colli_preparati)over (partition by Ordine.riga_ord )) as check_colli,
ISNULL(Ordine.colli_ord, 0 ) as colli_riga_ord,
Colli.partita_mag,
+ Colli.partita_mag_prod,
+ Colli.data_prod,
colli.data_scad,
isNull(Colli.num_colli_preparati,0) as num_colli_preparati,
Colli.inUDS,
@@ -284,6 +290,14 @@ order by riga_ord, cod_mart, partita_mag]]>
+
+
+
+
+
+
+
+
@@ -953,7 +967,7 @@ order by riga_ord, cod_mart, partita_mag]]>
-
+
diff --git a/IntegryReports/RossoGargano/Packinglist.jrxml b/IntegryReports/RossoGargano/Packinglist_old.jrxml
similarity index 99%
rename from IntegryReports/RossoGargano/Packinglist.jrxml
rename to IntegryReports/RossoGargano/Packinglist_old.jrxml
index a163f2c..f23653c 100644
--- a/IntegryReports/RossoGargano/Packinglist.jrxml
+++ b/IntegryReports/RossoGargano/Packinglist_old.jrxml
@@ -42,7 +42,7 @@
udc.num_collo=mtb_colr.num_collo_rif and
udc.ser_collo = mtb_colr.ser_collo_rif
- where mtb_colt.gestione='V')
+ where mtb_colt.gestione = 'V')
select DENSE_RANK() OVER (order by uds desc) as num_uds,
UDS,
diff --git a/IntegryReports/RossoGargano/ReportCQCarciofi.jrxml b/IntegryReports/RossoGargano/ReportCQCarciofi.jrxml
new file mode 100644
index 0000000..7817f03
--- /dev/null
+++ b/IntegryReports/RossoGargano/ReportCQCarciofi.jrxml
@@ -0,0 +1,726 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IntegryReports/SMETAR/EtichettaColloProd.jrxml b/IntegryReports/SMETAR/EtichettaColloProd.jrxml
index 731230b..0261213 100644
--- a/IntegryReports/SMETAR/EtichettaColloProd.jrxml
+++ b/IntegryReports/SMETAR/EtichettaColloProd.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -192,7 +192,7 @@ where mtb_colr.gestione = mtb_colt.gestione and
-
+
@@ -201,7 +201,7 @@ where mtb_colr.gestione = mtb_colt.gestione and
-
+
@@ -282,7 +282,7 @@ where mtb_colr.gestione = mtb_colt.gestione and
-
+
diff --git a/IntegryReports/VGALIMENTI/ReportDistintaIncassoGiornataVettore.jrxml b/IntegryReports/VGALIMENTI/ReportDistintaIncassoGiornataVettore.jrxml
index 7f33190..7734fa4 100644
--- a/IntegryReports/VGALIMENTI/ReportDistintaIncassoGiornataVettore.jrxml
+++ b/IntegryReports/VGALIMENTI/ReportDistintaIncassoGiornataVettore.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -32,8 +32,9 @@
SUM(
IIF(doc.cod_forn_td IS NULL AND ISNULL(gtb_paga.gg_prima_rata, 0) = 0,
dtb_tipi.segno_qta_scar * (doc.tot_imponib + doc.tot_iva - doc.tot_omaggi), 0)
- ) OVER (PARTITION BY doc.cod_anag, doc.cod_vdes, doc.num_doc) AS da_incassare,
- distr.imp_incasso,
+ ) OVER (PARTITION BY doc.cod_anag, doc.cod_vdes, doc.num_doc,doc.data_doc,doc.ser_doc,distr.imp_incasso) AS da_incassare,
+ sum(distr.imp_incasso) over (partition by doc.data_doc,doc.num_doc,doc.cod_dtip,doc.ser_doc) as imp_incasso,
+ distr.imp_incasso as incasso,
gtb_paga.cod_paga,
gtb_paga.descrizione,
azienda.nome_ditta,
@@ -54,6 +55,7 @@
azienda
WHERE ISNULL(distr.data_dist, doc.data_doc) = $P{data_doc}
AND doc.gestione = 'V'
+ AND doc.cod_dtip NOT IN ('BUC')
AND dtb_tipi.tipo_emissione = 'DIRETTA'
AND ($P{user_name} IS NULL OR $P{user_name}= '' OR su.User_name =$P{user_name} )
AND ($P{cod_vvet} IS NULL OR $P{cod_vvet}= '' OR doc.cod_vvet =$P{cod_vvet} )),
@@ -71,10 +73,11 @@
ELSE 'Documenti parzialmente pagati'
END AS gruppo
FROM dati
- WHERE gg_prima_rata = 0),
- count_per_group AS (SELECT gruppo, COUNT(*) AS count_righe
- FROM filtrati
- GROUP BY gruppo)
+ WHERE gg_prima_rata = 0 and cod_paga not in ('39')),
+ count_per_group AS (SELECT gruppo,
+ count(distinct cast(cod_dtip as varchar) + '|' + cast(num_doc as varchar) + '|' + ser_doc + '|' + convert(varchar, data_doc, 112)) as count_righe
+ FROM filtrati
+ GROUP BY gruppo)
SELECT filtrati.*,
totali.tot_previsto,
totali.tot_incasso,
@@ -84,12 +87,12 @@ SELECT filtrati.*,
FROM filtrati
CROSS APPLY totali
LEFT JOIN count_per_group ON filtrati.gruppo = count_per_group.gruppo
-ORDER BY CASE
+ORDER BY CASE
WHEN filtrati.gruppo = 'Documenti pagati' THEN 1
WHEN filtrati.gruppo = 'Documenti parzialmente pagati' THEN 2
WHEN filtrati.gruppo = 'Documenti sospesi' THEN 3
WHEN filtrati.gruppo = 'Documenti sospesi pagati' THEN 4
- END]]>
+ END, cod_anag, num_doc]]>
@@ -131,6 +134,10 @@ ORDER BY CASE
+
+
+
+
@@ -468,7 +475,7 @@ Paga]]>
-
+