diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll
index f1ad1e7f..359e7af6 100644
Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ
diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll
index 4bb5a3cd..d0efe394 100644
Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ
diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll
index f1ad1e7f..359e7af6 100644
Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ
diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache
index dd7d89ab..e3277dac 100644
Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll
index 9114586d..e8e7d501 100644
Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ
diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache
index 1e6bedd1..44a628bf 100644
Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll
index 6cd84509..153e1421 100644
Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll
index da7f9f0b..fc7bc733 100644
Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ
diff --git a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
index 558463ea..fda2a174 100644
--- a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
+++ b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
@@ -330,14 +330,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW_Term"
- "ProductCode" = "8:{CCFA8747-6598-4A2D-8CE2-147C5F05DA5C}"
- "PackageCode" = "8:{4918A1A6-A703-4E70-B9DD-100E1E5F648A}"
+ "ProductCode" = "8:{4E2352E2-8A1B-46A8-8E8A-A8B9EFF41B23}"
+ "PackageCode" = "8:{7392B025-C522-42F0-AADE-8D8BF66DFB03}"
"UpgradeCode" = "8:{B348C50D-8DAD-4430-AEF0-60800C94CB78}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:1.0.286"
+ "ProductVersion" = "8:1.0.290"
"Manufacturer" = "8:SteamWare s.r.l."
"ARPHELPTELEPHONE" = "8:+39-035460560"
"ARPHELPLINK" = "8:http://www.steamware.net"
diff --git a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi
index fb04b656..10a4b1b6 100644
Binary files a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi and b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi differ
diff --git a/GMW/GMW_WS/Web.config b/GMW/GMW_WS/Web.config
index d906b146..1ba0e077 100644
--- a/GMW/GMW_WS/Web.config
+++ b/GMW/GMW_WS/Web.config
@@ -117,6 +117,9 @@
+
+
+
diff --git a/GMW/GMW_WS/bilance.asmx.cs b/GMW/GMW_WS/bilance.asmx.cs
index 1fe6b748..faa6aee8 100644
--- a/GMW/GMW_WS/bilance.asmx.cs
+++ b/GMW/GMW_WS/bilance.asmx.cs
@@ -463,15 +463,7 @@ namespace GMW_WS
{ }
}
// creo nuovo cartellino!
- DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilanciaTrim, string.Format("{0:yy}", DateTime.Now), CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, "UDC_PESA", Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_ParentTrim, false); // ATTENZIONE: "UDC_PESA" è "hard coded" nel db... !!!
- // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
- if (!toAS400)
- {
- DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, IdxPosizione.ToString(), Quantita);
- // !!!FARE!!! modificare x passare UDC, e poi rivedere il crea cart consumando x cui se parte da consumo 84 sarà un cartellino in realtà già nel -84, mettere in web.config
- //
- //
- }
+ DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilanciaTrim, string.Format("{0:yy}", DateTime.Now), CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, "UDC_PESA", Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_ParentTrim, false); // ATTENZIONE: "UDC_PESA" è "hard coded" nel db... !!!
// leggo la riga
try
{
@@ -481,6 +473,11 @@ namespace GMW_WS
}
catch
{ }
+ // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
+ if (!toAS400)
+ {
+ DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, answ, IdxPosizione.ToString(), Quantita);
+ }
return answ;
}
@@ -556,11 +553,6 @@ namespace GMW_WS
}
// creo nuovo cartellino!
DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilanciaTrim, string.Format("{0:yy}", DateTime.Now), CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, "UDC_FINITO", Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_ParentTrim, false); // ATTENZIONE: "UDC_FINITO" è "hard coded" nel db... !!!
- // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
- if (!toAS400)
- {
- DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, IdxPosizione.ToString(), Quantita);
- }
// leggo la riga
try
{
@@ -568,6 +560,11 @@ namespace GMW_WS
}
catch
{ }
+ // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
+ if (!toAS400)
+ {
+ DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, answ, IdxPosizione.ToString(), Quantita);
+ }
return answ;
}
@@ -643,11 +640,6 @@ namespace GMW_WS
}
// creo nuovo cartellino!
DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilanciaTrim, string.Format("{0:yy}", DateTime.Now), CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, "UDC_WIP", Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_ParentTrim, false); // ATTENZIONE: "UDC_WIP" è "hard coded" nel db... !!!
- // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
- if (!toAS400)
- {
- DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, IdxPosizione.ToString(), Quantita);
- }
// leggo la riga
try
{
@@ -657,6 +649,11 @@ namespace GMW_WS
}
catch
{ }
+ // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch
+ if (!toAS400)
+ {
+ DataProxy.obj.taCartellini.stp_rettMovAs400(ParticolareTrim, answ, IdxPosizione.ToString(), Quantita);
+ }
return answ;
}
@@ -697,7 +694,7 @@ namespace GMW_WS
{
// consuma il vecchio (parent) in magazzino... da 84 a -84...
MagClass.magazzino.scaricaUdcMpWip(UDC_ParentTrim);
- // salvo associazioen parent-child tra UDC!
+ // salvo associazione parent-child tra UDC!
DataProxy.obj.taRelazUDC.Insert(UDC_ParentTrim, UDC_ChildTrim);
answ = true;
}
diff --git a/GMW/GMW_WS/bin/GMW.dll b/GMW/GMW_WS/bin/GMW.dll
index 9114586d..a3eadaf5 100644
Binary files a/GMW/GMW_WS/bin/GMW.dll and b/GMW/GMW_WS/bin/GMW.dll differ
diff --git a/GMW/GMW_WS/bin/GMW_WS.dll b/GMW/GMW_WS/bin/GMW_WS.dll
index a5cbf6bd..a7b6ddf6 100644
Binary files a/GMW/GMW_WS/bin/GMW_WS.dll and b/GMW/GMW_WS/bin/GMW_WS.dll differ
diff --git a/GMW/GMW_WS/bin/GMW_data.dll b/GMW/GMW_WS/bin/GMW_data.dll
index dd8827f3..21230e41 100644
Binary files a/GMW/GMW_WS/bin/GMW_data.dll and b/GMW/GMW_WS/bin/GMW_data.dll differ
diff --git a/GMW/GMW_WS/mazzAppSettings.config b/GMW/GMW_WS/mazzAppSettings.config
index d40f93a6..34577d43 100644
--- a/GMW/GMW_WS/mazzAppSettings.config
+++ b/GMW/GMW_WS/mazzAppSettings.config
@@ -36,6 +36,9 @@
+
+
+
diff --git a/GMW/GMW_WS/obj/Release/GMW_WS.dll b/GMW/GMW_WS/obj/Release/GMW_WS.dll
index a5cbf6bd..a7b6ddf6 100644
Binary files a/GMW/GMW_WS/obj/Release/GMW_WS.dll and b/GMW/GMW_WS/obj/Release/GMW_WS.dll differ
diff --git a/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache
index 2db7bb64..856e94f4 100644
Binary files a/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_WS_installer/GMW_WS_installer.vdproj b/GMW/GMW_WS_installer/GMW_WS_installer.vdproj
index 84a90090..8fbdb7e6 100644
--- a/GMW/GMW_WS_installer/GMW_WS_installer.vdproj
+++ b/GMW/GMW_WS_installer/GMW_WS_installer.vdproj
@@ -345,7 +345,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW_WS"
"ProductCode" = "8:{F532F1C4-AAED-48FB-AC7C-AC086DFD52DD}"
- "PackageCode" = "8:{FF9145E8-FDE7-44AD-A4E7-91E88D6CC510}"
+ "PackageCode" = "8:{EFFC665B-E922-4CE0-A583-AE2DFAA50DB6}"
"UpgradeCode" = "8:{BA470335-3D4B-4C20-8152-90A5F0F14FE0}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
diff --git a/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi b/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi
index e4f2c618..e770c6ca 100644
Binary files a/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi and b/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi differ
diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj
index b0574333..8af53fc7 100644
--- a/GMW/GMW_data/GMW_data.csproj
+++ b/GMW/GMW_data/GMW_data.csproj
@@ -160,6 +160,7 @@
SettingsSingleFileGenerator
Settings.Designer.cs
+
diff --git a/GMW/GMW_data/SqlScripts/GMW_00290.sql b/GMW/GMW_data/SqlScripts/GMW_00290.sql
index 3188f7b3..e6de1ca3 100644
--- a/GMW/GMW_data/SqlScripts/GMW_00290.sql
+++ b/GMW/GMW_data/SqlScripts/GMW_00290.sql
@@ -414,6 +414,232 @@ go
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+alter VIEW v_selDestinatariListePrelievo
+AS
+SELECT CAST('*' AS NVARCHAR(6)) AS value, CAST('*' AS NVARCHAR(50)) AS label, '01-PreFus' AS conditio
+UNION
+SELECT CAST(CodCliente AS NVARCHAR(6)) AS value, CAST(RagSociale AS NVARCHAR(50)) AS label, '02-PreCli' AS conditio
+FROM RilPro.AnagClienti
+UNION
+SELECT CAST(CodTerzista AS NVARCHAR(6)) AS value, CAST(DescTerzista AS NVARCHAR(50)) AS label, '03-TerWip' AS conditio
+FROM RilPro.AnagDepositi
+go
+
+exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
+Begin DesignProperties =
+ Begin PaneConfigurations =
+ Begin PaneConfiguration = 0
+ NumPanes = 4
+ Configuration = "(H (1[40] 4[20] 2[20] 3) )"
+ End
+ Begin PaneConfiguration = 1
+ NumPanes = 3
+ Configuration = "(H (1 [50] 4 [25] 3))"
+ End
+ Begin PaneConfiguration = 2
+ NumPanes = 3
+ Configuration = "(H (1 [50] 2 [25] 3))"
+ End
+ Begin PaneConfiguration = 3
+ NumPanes = 3
+ Configuration = "(H (4 [30] 2 [40] 3))"
+ End
+ Begin PaneConfiguration = 4
+ NumPanes = 2
+ Configuration = "(H (1 [56] 3))"
+ End
+ Begin PaneConfiguration = 5
+ NumPanes = 2
+ Configuration = "(H (2 [66] 3))"
+ End
+ Begin PaneConfiguration = 6
+ NumPanes = 2
+ Configuration = "(H (4 [50] 3))"
+ End
+ Begin PaneConfiguration = 7
+ NumPanes = 1
+ Configuration = "(V (3))"
+ End
+ Begin PaneConfiguration = 8
+ NumPanes = 3
+ Configuration = "(H (1[56] 4[18] 2) )"
+ End
+ Begin PaneConfiguration = 9
+ NumPanes = 2
+ Configuration = "(H (1 [75] 4))"
+ End
+ Begin PaneConfiguration = 10
+ NumPanes = 2
+ Configuration = "(H (1[66] 2) )"
+ End
+ Begin PaneConfiguration = 11
+ NumPanes = 2
+ Configuration = "(H (4 [60] 2))"
+ End
+ Begin PaneConfiguration = 12
+ NumPanes = 1
+ Configuration = "(H (1) )"
+ End
+ Begin PaneConfiguration = 13
+ NumPanes = 1
+ Configuration = "(V (4))"
+ End
+ Begin PaneConfiguration = 14
+ NumPanes = 1
+ Configuration = "(V (2))"
+ End
+ ActivePaneConfig = 0
+ End
+ Begin DiagramPane =
+ Begin Origin =
+ Top = 0
+ Left = 0
+ End
+ Begin Tables =
+ End
+ End
+ Begin SQLPane =
+ End
+ Begin DataPane =
+ Begin ParameterDefaults = ""
+ End
+ Begin ColumnWidths = 9
+ Width = 284
+ Width = 1500
+ Width = 3360
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ End
+ End
+ Begin CriteriaPane =
+ Begin ColumnWidths = 11
+ Column = 1440
+ Alias = 900
+ Table = 1170
+ Output = 720
+ Append = 1400
+ NewValue = 1170
+ SortType = 1350
+ SortOrder = 1410
+ GroupBy = 1350
+ Filter = 1350
+ Or = 1350
+ Or = 1350
+ Or = 1350
+ End
+ End
+End
+', 'SCHEMA', 'dbo', 'VIEW', 'v_selDestinatariListePrelievo'
+go
+
+commit
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_rettMovAs400
+*
+* inserisce nella tabella per i trasferimenti batch verso magazzino AS una quantità di rettifica (con segno - )per UDC eventualmente già scaricati a sistema
+*
+* Steamware, S.E.L.
+* mod: 2010.11.02
+*
+****************************************/
+alter PROCEDURE stp_rettMovAs400
+(
+ @Particolare NVARCHAR(50),
+ @UDC NVARCHAR(20),
+ @CodMagAS NVARCHAR(50),
+ @Qta DECIMAL(10,2)
+)
+AS
+
+BEGIN
+
+ INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita)
+ VALUES (GETDATE(), 'UDC_NOQTY', @Particolare, @UDC, @CodMagAS, -@Qta)
+
+END
+
+RETURN
+go
+
+commit
+go
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_selDestListePrelByConditio
+*
+* Ottiene i destinatari delle liste di prelievo data la condizione indicata
+*
+* Steamware, S.E.L.
+* mod: 2010.11.02
+*
+****************************************/
+create PROCEDURE stp_selDestListePrelByConditio
+(
+ @conditio NVARCHAR(20)
+)
+AS
+
+IF (@conditio='01-PreFus')
+BEGIN
+ SELECT CAST('*' AS NVARCHAR(6)) AS value, CAST('*' AS NVARCHAR(50)) AS label, '01-PreFus' AS conditio
+END
+
+ELSE IF (@conditio='02-PreCli')
+BEGIN
+ SELECT CAST(CodCliente AS NVARCHAR(6)) AS value, CAST(RagSociale AS NVARCHAR(50)) AS label, '02-PreCli' AS conditio
+ FROM RilPro.AnagClienti
+ ORDER BY label
+END
+
+ELSE
+BEGIN
+ SELECT CAST(CodTerzista AS NVARCHAR(6)) AS value, CAST(DescTerzista AS NVARCHAR(50)) AS label, '03-TerWip' AS conditio
+ FROM RilPro.AnagDepositi
+ ORDER BY label
+END
+
+RETURN
+go
+
+commit
+go
+
+
+
+
diff --git a/GMW/GMW_data/SqlScripts/GMW_00291.sql b/GMW/GMW_data/SqlScripts/GMW_00291.sql
new file mode 100644
index 00000000..16a26f08
--- /dev/null
+++ b/GMW/GMW_data/SqlScripts/GMW_00291.sql
@@ -0,0 +1,299 @@
+set xact_abort on
+go
+
+begin transaction
+go
+
+alter table RigheListePrelievo_AS add
+ DataBatch datetime
+go
+
+exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'RigheListePrelievo_AS', 'COLUMN', 'DataBatch'
+go
+
+set ANSI_NULLS on
+go
+
+/*****************************************
+* STORED stp_processaCodaMovimPackList
+*
+* Processa la coda delle packing list e chiama procedura x salvataggio dato su AS400
+*
+* Steamware, S.E.L.
+* mod: 2010.10.22
+*
+****************************************/
+alter PROCEDURE BatchQueue.stp_processaCodaMovimPackList
+AS
+
+ -- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!!
+
+ -- campi x cursore e valorizzazione riga a riga
+ DECLARE @IdxRiga INT
+ DECLARE @CodLista NVARCHAR(12)
+ DECLARE @CodListaPre NVARCHAR(12)
+ DECLARE @CodStab CHAR(2)
+ DECLARE @UDC NVARCHAR(15)
+ DECLARE @Particolare NVARCHAR(15)
+ DECLARE @CodImb NVARCHAR(15)
+ DECLARE @Matr INT
+ DECLARE @Tipo NVARCHAR(2)
+ DECLARE @Dest NVARCHAR(10)
+ DECLARE @Qta INT
+ DECLARE @PesoNet NUMERIC(7,3)
+ DECLARE @PesoLor NUMERIC(7,3)
+ DECLARE @Stato CHAR(1)
+ DECLARE @Data NVARCHAR(8)
+
+ DECLARE @ScritturaRigaOK AS INT -- Flag errore su riga ritornato da Stored che va su As400 0 = Ok
+ SET @ScritturaRigaOK = 0;
+
+ DECLARE @ScritturaASOK AS INT -- Flag errore Packing generale su Stored che va su As400 0 = Ok
+ SET @ScritturaASOK = 0;
+
+ -- qui è meglio usare una tabella temporanea o ancor meglio una variabile tabella x pochi
+ -- record per non bloccare le tabelle sottostanti
+ -- query con un cursore x processare tutte le righe di Packing che sono ancora da inviare ad AS400 ( DataBatch IS NULL )
+ DECLARE RigaPackList CURSOR LOCAL FOR
+ SELECT IdxRiga, CodLista FROM v_datiPackingList ORDER BY CodLista
+
+ -- setto il codice stabilimento da inviare ad AS... VERIFICARE!!!
+ SET @CodStab = '05';
+
+ -- imposto prima codListaPre a vuoto...
+ SET @CodListaPre = '';
+
+ -- inizio cursore caricando le righe
+ OPEN RigaPackList
+ FETCH NEXT FROM RigaPackList
+ INTO @IdxRiga , @CodLista
+
+ SET @CodListaPre = @CodLista
+
+ WHILE @@FETCH_STATUS = 0
+ BEGIN
+ -- controllo ci sia almento una riga di Packing ( PER ME NON SERVE )
+ IF (SELECT COUNT(IdxRiga) FROM v_datiPackingList WHERE IdxRiga = @IdxRiga) > 0
+ BEGIN
+ -- carico valori che mi servono
+ SELECT @Particolare=pl.Particolare, @UDC=UDC, @CodImb=pl.CodImballo, @Matr = pl.matrUdc, @Tipo=pl.tipo, @Dest=pl.Destinatario,
+ @Qta=ABS(pl.Qta), @PesoNet=pl.PesoNetto, @PesoLor=pl.PesoTot, @Stato=pl.Stato, @Data=dbo.dateToAsFormat(pl.data),
+ @CodLista=pl.CodLista
+ FROM v_datiPackingList pl
+ WHERE IdxRiga = @IdxRiga
+
+ -- Eseguo la stored che registra la Packing List con le righe sue righe
+ EXECUTE @ScritturaRigaOK = BatchQueue.stp_registraPackList @CodStab, @UDC, @Particolare , @CodImb , @Matr , @Tipo , @Dest , @Qta , @PesoNet , @PesoLor , @Stato , @Data
+
+ -- se scrittura riga è ok allora salvo sulla riga la data di invio... così poi non la rivedo tra quelle da processare...
+ IF @ScritturaRigaOK = 0
+ UPDATE RigheListePrelievo_AS SET DataBatch = GETDATE() WHERE IdxRiga = @IdxRiga;
+
+
+ -- Se scrittura Riga Packing non ok metto Flag Packing list non Ok
+ IF @ScritturaRigaOK <> 0 SET @ScritturaASOK = @ScritturaRigaOK
+
+ FETCH NEXT FROM RigaPackList
+ INTO @IdxRiga , @CodLista
+
+ -- controllo: se la lista precedente è diversa dall'attuale la indico come scaricata (precedente)
+ IF(@CodListaPre <> @CodLista)
+ BEGIN
+ -- ATTENZIONE!!! Qui è da controllare perchè lo faccio una sola volta per la
+ -- lista e non per riga prelievo ... boh non so se ok ... se UDC già presente in As400 errore 7343
+ IF @ScritturaASOK = 0
+ UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodListaPre;
+ ELSE
+ SET @ScritturaASOK = 0; -- resetto il flag di controllo
+
+ -- cambio il cod pre da confrontare
+ SET @CodListaPre = @CodLista
+ END
+ END
+
+ END
+
+ -- Aggiorno anche l'ultima lista prelievo
+ -- **** è corretto ??? se poi ricarico tutto il Packing list che succede???
+ -- x gli UDC già in AS400 da errore 7343
+ IF @ScritturaASOK = 0 -- OR @ScritturaASOK = 7343 ???
+ UPDATE ElencoListePrelievo_AS SET DataBatch = GETDATE() WHERE CodLista = @CodLista
+ -- registro la data del movimento BATCH dell'ultima lista processata
+
+ -- se c'è un errore mi rimane aperto il cursore? nn dovrebbe perchè LOCAL
+ CLOSE RigaPackList
+ DEALLOCATE RigaPackList
+
+RETURN
+go
+
+alter VIEW v_datiPackingList
+AS
+SELECT dbo.ElencoListePrelievo_AS.CodLista, dbo.RigheListePrelievo_AS.IdxRiga, dbo.ElencoCartellini.UDC, dbo.ElencoListePrelievo_AS.Particolare,
+ dbo.ElencoCartellini.CodImballo, CAST(RIGHT(LTRIM(dbo.RigheListePrelievo_AS.UDC), 6) AS INT) AS matrUdc,
+ CASE WHEN (dbo.ElencoListePrelievo_AS.CodTipoLista = '03-TerWip') THEN 'FO' ELSE 'CL' END AS tipo, dbo.ElencoListePrelievo_AS.Destinatario,
+ dbo.ElencoCartellini.Qta, ROUND(dbo.ElencoCartellini.PesoTot - dbo.ElencoCartellini.Tara, 3) AS PesoNetto, ROUND(dbo.ElencoCartellini.PesoTot, 3) AS PesoTot,
+ 'P' AS Stato, GETDATE() AS data, dbo.RigheListePrelievo_AS.DataBatch
+FROM dbo.ElencoListePrelievo_AS INNER JOIN
+ dbo.RigheListePrelievo_AS ON dbo.ElencoListePrelievo_AS.CodLista = dbo.RigheListePrelievo_AS.CodLista INNER JOIN
+ dbo.ElencoCartellini ON dbo.RigheListePrelievo_AS.UDC = dbo.ElencoCartellini.UDC
+WHERE (dbo.RigheListePrelievo_AS.DataBatch IS NULL)
+go
+
+exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
+Begin DesignProperties =
+ Begin PaneConfigurations =
+ Begin PaneConfiguration = 0
+ NumPanes = 4
+ Configuration = "(H (1[40] 4[20] 2[20] 3) )"
+ End
+ Begin PaneConfiguration = 1
+ NumPanes = 3
+ Configuration = "(H (1 [50] 4 [25] 3))"
+ End
+ Begin PaneConfiguration = 2
+ NumPanes = 3
+ Configuration = "(H (1 [50] 2 [25] 3))"
+ End
+ Begin PaneConfiguration = 3
+ NumPanes = 3
+ Configuration = "(H (4 [30] 2 [40] 3))"
+ End
+ Begin PaneConfiguration = 4
+ NumPanes = 2
+ Configuration = "(H (1 [56] 3))"
+ End
+ Begin PaneConfiguration = 5
+ NumPanes = 2
+ Configuration = "(H (2 [66] 3))"
+ End
+ Begin PaneConfiguration = 6
+ NumPanes = 2
+ Configuration = "(H (4 [50] 3))"
+ End
+ Begin PaneConfiguration = 7
+ NumPanes = 1
+ Configuration = "(V (3))"
+ End
+ Begin PaneConfiguration = 8
+ NumPanes = 3
+ Configuration = "(H (1[56] 4[18] 2) )"
+ End
+ Begin PaneConfiguration = 9
+ NumPanes = 2
+ Configuration = "(H (1 [75] 4))"
+ End
+ Begin PaneConfiguration = 10
+ NumPanes = 2
+ Configuration = "(H (1[66] 2) )"
+ End
+ Begin PaneConfiguration = 11
+ NumPanes = 2
+ Configuration = "(H (4 [60] 2))"
+ End
+ Begin PaneConfiguration = 12
+ NumPanes = 1
+ Configuration = "(H (1) )"
+ End
+ Begin PaneConfiguration = 13
+ NumPanes = 1
+ Configuration = "(V (4))"
+ End
+ Begin PaneConfiguration = 14
+ NumPanes = 1
+ Configuration = "(V (2))"
+ End
+ ActivePaneConfig = 0
+ End
+ Begin DiagramPane =
+ Begin Origin =
+ Top = 0
+ Left = 0
+ End
+ Begin Tables =
+ Begin Table = "ElencoListePrelievo_AS"
+ Begin Extent =
+ Top = 6
+ Left = 38
+ Bottom = 367
+ Right = 238
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "ElencoCartellini"
+ Begin Extent =
+ Top = 14
+ Left = 658
+ Bottom = 376
+ Right = 828
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ Begin Table = "RigheListePrelievo_AS"
+ Begin Extent =
+ Top = 5
+ Left = 353
+ Bottom = 200
+ Right = 557
+ End
+ DisplayFlags = 280
+ TopColumn = 0
+ End
+ End
+ End
+ Begin SQLPane =
+ End
+ Begin DataPane =
+ Begin ParameterDefaults = ""
+ End
+ Begin ColumnWidths = 15
+ Width = 284
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ Width = 1500
+ End
+ End
+ Begin CriteriaPane =
+ Begin ColumnWidths = 11
+ Column = 1440
+ Alias = 900
+ Table = 1170
+ Output = 720
+ Append = 1400
+ NewValue = 1170
+ SortType = 1350
+ SortOrder = 1410
+ GroupBy = 1350
+ Filter = 1350
+ Or = 1350
+ Or = 1350
+ Or = 1350
+ End
+ End
+End
+', 'SCHEMA', 'dbo', 'VIEW', 'v_datiPackingList'
+go
+
+commit
+go
+
+
+
+
+
+-- registro versione...
+INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(291, GETDATE())
+GO
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 4bb5a3cd..d0efe394 100644
Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ
diff --git a/GMW/GMW_data/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll
index dd8827f3..fc7bc733 100644
Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll
index 4bb5a3cd..d0efe394 100644
Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll
index dd8827f3..fc7bc733 100644
Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ
diff --git a/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll b/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll
index 0f66e15a..b72afefb 100644
Binary files a/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll and b/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll differ
diff --git a/GMW/GMW_deploy/GMW_deploy.wdproj b/GMW/GMW_deploy/GMW_deploy.wdproj
index b69670cc..b250a4c1 100644
--- a/GMW/GMW_deploy/GMW_deploy.wdproj
+++ b/GMW/GMW_deploy/GMW_deploy.wdproj
@@ -54,6 +54,13 @@
+
+
+
+
+
+
+