fix2 (Verwahrung)
This commit is contained in:
@@ -4683,7 +4683,8 @@ Public Class cWorker_NCTS
|
||||
|
||||
Dim gs_row As DataRow = dtGesamtsicherheit.Rows(0)
|
||||
|
||||
Dim rows = dtGesamtsicherheit.Select("gsp_gspPosId = " & gs_row("gs_posNr") & " AND gsp_MRNNr IS NOT NULL")
|
||||
'Dim rows = dtGesamtsicherheit.Select("gsp_gspPosId = " & gs_row("gs_posNr") & " AND gsp_MRNNr IS NOT NULL")
|
||||
Dim rows = dtGesamtsicherheit.Select("gsp_gspPosId = " & gs_row("gs_posNr") & " AND isnull(gsp_MRNNr,'') <> ''")
|
||||
|
||||
If rows.Length > 0 Then
|
||||
Exit Sub 'bereits vorhanden -> keine INFO
|
||||
@@ -4698,20 +4699,36 @@ Public Class cWorker_NCTS
|
||||
|
||||
'Berechnung Warenwert und Sicherheitsbetrag aus Sendung -> immer aus den Produktivdaten!
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
Dim dtVorpapiere As DataTable = SQL.loadDgvBySql("SELECT tblSnd_Warenwert,tblSnd_WarenwertWaehrung,tblSnd_Vorpapier_Pos,tblSnd_Vorpapier2_Pos, tblSnd_Vorpapier3_Pos from tblSendungen where tblSnd_Vorpapier = '" & gs_row("gs_ATBNr") & "' Or tblSnd_Vorpapier2 = '" & gs_row("gs_ATBNr") & "' OR tblSnd_Vorpapier3 = '" & gs_row("gs_ATBNr") & "'", "AVISO")
|
||||
Dim dtVorpapiere As DataTable = SQL.loadDgvBySql("SELECT tblSnd_Warenwert,tblSnd_WarenwertWaehrung,replace(tblSnd_Vorpapier_Pos,'+',',') as tblSnd_Vorpapier_Pos,replace(tblSnd_Vorpapier2_Pos,'+',',') as tblSnd_Vorpapier2_Pos, replace(tblSnd_Vorpapier3_Pos,'+',',') as tblSnd_Vorpapier3_Pos from tblSendungen where tblSnd_Vorpapier = '" & gs_row("gs_ATBNr") & "' Or tblSnd_Vorpapier2 = '" & gs_row("gs_ATBNr") & "' OR tblSnd_Vorpapier3 = '" & gs_row("gs_ATBNr") & "'", "AVISO")
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = testlauf
|
||||
|
||||
|
||||
If dtVorpapiere.Rows.Count > 0 Then
|
||||
|
||||
Dim rowsVorp = dtVorpapiere.Select("tblSnd_Warenwert is not null AND (tblSnd_Vorpapier_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier2_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier3_Pos = '" & gs_row.Item("gs_posNr") & "')")
|
||||
' Dim rowsVorp = dtVorpapiere.Select("tblSnd_Warenwert is not null AND (tblSnd_Vorpapier_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier2_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier3_Pos = '" & gs_row.Item("gs_posNr") & "')")
|
||||
|
||||
|
||||
Dim posNr_temp As String = gs_row.Item("gs_posNr").ToString()
|
||||
|
||||
Dim rowsVorp = dtVorpapiere.AsEnumerable().
|
||||
Where(Function(r) Not IsDBNull(r("tblSnd_Warenwert")) AndAlso (
|
||||
r("tblSnd_Vorpapier_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp) OrElse
|
||||
r("tblSnd_Vorpapier2_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp) OrElse
|
||||
r("tblSnd_Vorpapier3_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp)
|
||||
)
|
||||
).ToArray()
|
||||
|
||||
|
||||
|
||||
Dim row = rowsVorp(0)
|
||||
If POSNr = posNr_temp Then
|
||||
Warenwert = CDbl(row("tblSnd_Warenwert"))
|
||||
Sicherheitsbetrag = System.Math.Round(Warenwert * (GesSichRef.gsr_zollsatz / 100), 2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Dim dtSendungen = SQL.loadDgvBySql("SELECT")
|
||||
@@ -4763,7 +4780,7 @@ Public Class cWorker_NCTS
|
||||
.gsp_erstellungsdatum = DateTime.Now
|
||||
.gsp_ust = gs_row("gs_ust")
|
||||
.gsp_ATCNr = ""
|
||||
.gsp_MRNNr = IIf(regNR = "", MRNNR, regNR)
|
||||
.gsp_MRNNr = IIf(regNR = "", MRNNR.Trim(), regNR.Trim())
|
||||
.gsp_avisoId = gs_row("gs_avisoID")
|
||||
.gsp_systemuser = "DAKOSY-AUTO"
|
||||
End With
|
||||
|
||||
@@ -734,20 +734,34 @@ Anzeige:
|
||||
|
||||
'Berechnung Warenwert und Sicherheitsbetrag aus Sendung -> immer aus den Produktivdaten!
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
Dim dtVorpapiere As DataTable = SQL.loadDgvBySql("SELECT tblSnd_Warenwert,tblSnd_WarenwertWaehrung,tblSnd_Vorpapier_Pos,tblSnd_Vorpapier2_Pos, tblSnd_Vorpapier3_Pos from tblSendungen where tblSnd_Vorpapier = '" & gs_row("gs_ATBNr") & "' Or tblSnd_Vorpapier2 = '" & gs_row("gs_ATBNr") & "' OR tblSnd_Vorpapier3 = '" & gs_row("gs_ATBNr") & "'", "AVISO")
|
||||
Dim dtVorpapiere As DataTable = SQL.loadDgvBySql("SELECT tblSnd_Warenwert,tblSnd_WarenwertWaehrung,replace(tblSnd_Vorpapier_Pos,'+',',') as tblSnd_Vorpapier_Pos,replace(tblSnd_Vorpapier2_Pos,'+',',') as tblSnd_Vorpapier2_Pos, replace(tblSnd_Vorpapier3_Pos,'+',',') as tblSnd_Vorpapier3_Pos from tblSendungen where tblSnd_Vorpapier = '" & gs_row("gs_ATBNr") & "' Or tblSnd_Vorpapier2 = '" & gs_row("gs_ATBNr") & "' OR tblSnd_Vorpapier3 = '" & gs_row("gs_ATBNr") & "'", "AVISO")
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = testlauf
|
||||
|
||||
|
||||
If dtVorpapiere.Rows.Count > 0 Then
|
||||
|
||||
Dim rowsVorp = dtVorpapiere.Select("tblSnd_Warenwert is not null AND (tblSnd_Vorpapier_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier2_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier3_Pos = '" & gs_row.Item("gs_posNr") & "')")
|
||||
' Dim rowsVorp = dtVorpapiere.Select("tblSnd_Warenwert is not null AND (tblSnd_Vorpapier_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier2_Pos = '" & gs_row.Item("gs_posNr") & "' or tblSnd_Vorpapier3_Pos = '" & gs_row.Item("gs_posNr") & "')")
|
||||
|
||||
|
||||
Dim posNr_temp As String = gs_row.Item("gs_posNr").ToString()
|
||||
|
||||
Dim rowsVorp = dtVorpapiere.AsEnumerable().
|
||||
Where(Function(r) Not IsDBNull(r("tblSnd_Warenwert")) AndAlso (
|
||||
r("tblSnd_Vorpapier_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp) OrElse
|
||||
r("tblSnd_Vorpapier2_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp) OrElse
|
||||
r("tblSnd_Vorpapier3_Pos").ToString().Split(","c).Select(Function(x) x.Trim()).Contains(posNr_temp)
|
||||
)
|
||||
).ToArray()
|
||||
|
||||
Dim row = rowsVorp(0)
|
||||
If POSNr = posNr_temp Then
|
||||
Warenwert = CDbl(row("tblSnd_Warenwert"))
|
||||
Sicherheitsbetrag = Math.Round(Warenwert * (GesSichRef.gsr_zollsatz / 100), 2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Dim dtSendungen = SQL.loadDgvBySql("SELECT")
|
||||
|
||||
Reference in New Issue
Block a user