Gestellungen
This commit is contained in:
@@ -112,7 +112,7 @@
|
|||||||
If txtGewicht.Text <> "" And Not IsNumeric(txtGewicht.Text) Then MsgBox("Gewicht: Falsches Format") : Exit Sub
|
If txtGewicht.Text <> "" And Not IsNumeric(txtGewicht.Text) Then MsgBox("Gewicht: Falsches Format") : Exit Sub
|
||||||
|
|
||||||
If Sendung Is Nothing Then
|
If Sendung Is Nothing Then
|
||||||
Sendung = New VERAG_PROG_ALLGEMEIN.cSendungen(AvisoId, SQL.getValueTxtBySql("SELECT Count(*)+1 FROM tblSendungen WHERE tblSnd_AvisoID=" & AvisoId & "", "AVISO"),,,, 0)
|
Sendung = New VERAG_PROG_ALLGEMEIN.cSendungen(AvisoId, SQL.getValueTxtBySql("SELECT Count(*)+1 FROM tblSendungen WHERE tblSnd_AvisoID=" & AvisoId & "", "AVISO"), filialNr,,, 0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Sendung.tblSnd_Abfertigungsart_ID = If(cboAbfertigungsart._value <> "", cboAbfertigungsart._value, -1)
|
Sendung.tblSnd_Abfertigungsart_ID = If(cboAbfertigungsart._value <> "", cboAbfertigungsart._value, -1)
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("4.0.5.4")>
|
<Assembly: AssemblyVersion("4.0.5.5")>
|
||||||
<Assembly: AssemblyFileVersion("4.0.5.4")>
|
<Assembly: AssemblyFileVersion("4.0.5.5")>
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Public dtSicherheiten As New DataTable()
|
Public dtSicherheiten As New DataTable()
|
||||||
|
|
||||||
|
Public grenzstelle As String = ""
|
||||||
|
|
||||||
Public firmaId As Integer
|
Public firmaId As Integer
|
||||||
|
|
||||||
|
|
||||||
@@ -96,6 +98,14 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
ElseIf grenzstelle <> "" Then
|
||||||
|
|
||||||
|
For i As Integer = 0 To cboWarenort.Items.Count - 1
|
||||||
|
If cboWarenort.Items(i).ToString().Contains(grenzstelle) Then
|
||||||
|
cboWarenort.SelectedIndex = i
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -612,11 +612,11 @@ Public Class frmHauptfenster
|
|||||||
Dim a As MsgBoxResult = MsgBox("Für " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & " wurde heute noch keine Zeit erfasst" & vbNewLine & Now.ToString() & " als Startzeit erfassen?", vbYesNo)
|
Dim a As MsgBoxResult = MsgBox("Für " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & " wurde heute noch keine Zeit erfasst" & vbNewLine & Now.ToString() & " als Startzeit erfassen?", vbYesNo)
|
||||||
If a = vbYes Then
|
If a = vbYes Then
|
||||||
|
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_nname.ToLower = "celan" Then 'aktuell hardcoded, wenn Zeit ist dynamisch (per SQL-tbl)
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasMehrereFirmen Then
|
||||||
Dim f As New frmZEButtons("in")
|
Dim f As New frmZEButtons("in", VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasFirmen)
|
||||||
f.ShowDialog()
|
f.ShowDialog()
|
||||||
f.BringToFront()
|
f.BringToFront()
|
||||||
Else
|
|
||||||
Dim info
|
Dim info
|
||||||
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, "in", IIf(cAllgemein.MITARBEITER.mit_homeoffice, 3, 0))
|
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, "in", IIf(cAllgemein.MITARBEITER.mit_homeoffice, 3, 0))
|
||||||
MsgBox(info)
|
MsgBox(info)
|
||||||
|
|||||||
@@ -2225,6 +2225,8 @@ Public Class frmSendungsdetailsNEU
|
|||||||
'cbxSpedBuch.Checked = (posnr.Filiale > 0 And posnr.Abfertigungsnummer > 0 And posnr.UnterNr >= 0) ' Wenn Sped Eintrag gelöscht-> - 1, dann ist der Eintrag nicht mehr vorhanden
|
'cbxSpedBuch.Checked = (posnr.Filiale > 0 And posnr.Abfertigungsnummer > 0 And posnr.UnterNr >= 0) ' Wenn Sped Eintrag gelöscht-> - 1, dann ist der Eintrag nicht mehr vorhanden
|
||||||
Dim vorhanden = ADMIN.getValueTxtBySql("SELECT COUNT(*) FROM [Speditionsbuch] WHERE [FilialenNr]='" & cboFiliale._value & "' AND AbfertigungsNr='" & txtAbfertigungsnummer.Text & "'", "FMZOLL") ' AND UnterNr='" & txtUnterNr.Text & "'
|
Dim vorhanden = ADMIN.getValueTxtBySql("SELECT COUNT(*) FROM [Speditionsbuch] WHERE [FilialenNr]='" & cboFiliale._value & "' AND AbfertigungsNr='" & txtAbfertigungsnummer.Text & "'", "FMZOLL") ' AND UnterNr='" & txtUnterNr.Text & "'
|
||||||
cbxSpedBuch.Checked = (vorhanden > 0)
|
cbxSpedBuch.Checked = (vorhanden > 0)
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
lblAbfNrExists.Visible = checkDoppelAbfNr()
|
lblAbfNrExists.Visible = checkDoppelAbfNr()
|
||||||
@@ -7372,56 +7374,62 @@ Public Class frmSendungsdetailsNEU
|
|||||||
Private Sub btnWWberechnen_Click(sender As Object, e As EventArgs) Handles btnWWberechnen.Click
|
Private Sub btnWWberechnen_Click(sender As Object, e As EventArgs) Handles btnWWberechnen.Click
|
||||||
Dim calcWarenwerte As Double = 0
|
Dim calcWarenwerte As Double = 0
|
||||||
Dim vorpT1 = usrcntl_ATB.txtATBT1.Text
|
Dim vorpT1 = usrcntl_ATB.txtATBT1.Text
|
||||||
|
Try
|
||||||
|
|
||||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung = "" Then
|
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung = "" Then
|
||||||
txtWarenwertWaehrung.SET_VALUE("EUR")
|
txtWarenwertWaehrung.SET_VALUE("EUR")
|
||||||
SAVE_ME()
|
SAVE_ME()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If vorpT1 = "" Then
|
If vorpT1 = "" Then
|
||||||
MsgBox("Vorpapier/T1 muss eingetragen werden!")
|
MsgBox("Vorpapier/T1 muss eingetragen werden!")
|
||||||
usrcntl_ATB.txtATBT1.Focus()
|
usrcntl_ATB.txtATBT1.Focus()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung <> "EUR" Then
|
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung <> "EUR" Then
|
||||||
MsgBox("Warenwert darf nur in EUR angegeben werden")
|
MsgBox("Warenwert darf nur in EUR angegeben werden")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For Each s As cSendungen In SENDUNG_LIST
|
For Each s As cSendungen In SENDUNG_LIST
|
||||||
'nur Betrag EUR
|
'nur Betrag EUR
|
||||||
If s.tblSnd_Vorpapier = vorp Then
|
If s.tblSnd_Vorpapier = vorp Then
|
||||||
If s.tblSnd_WarenwertWaehrung = "EUR" AndAlso s.tblSnd_Warenwert > 0 AndAlso s.FilialenNr = SENDUNG_LIST(CURRENT_INDEX).FilialenNr Then
|
If s.tblSnd_WarenwertWaehrung = "EUR" AndAlso s.tblSnd_Warenwert > 0 AndAlso s.FilialenNr = SENDUNG_LIST(CURRENT_INDEX).FilialenNr Then
|
||||||
calcWarenwerte += s.tblSnd_Warenwert
|
calcWarenwerte += s.tblSnd_Warenwert
|
||||||
Else
|
Else
|
||||||
MsgBox("Bei Sendung " & s.AbfertigungsNr & " ist der Warenwert nicht in EUR angegeben!")
|
MsgBox("Bei Sendung " & s.AbfertigungsNr & " ist der Warenwert nicht in EUR angegeben!")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert Is Nothing Then
|
||||||
|
SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert = Math.Round(calcWarenwerte, 2)
|
||||||
|
SAVE_ME()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert Is Nothing Then
|
|
||||||
SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert = Math.Round(calcWarenwerte, 2)
|
|
||||||
SAVE_ME()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Math.Round(calcWarenwerte, 2) <> Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2) AndAlso SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert <> "" Then
|
If IsNumeric(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert) AndAlso Math.Round(calcWarenwerte, 2) <> Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2) Then
|
||||||
MsgBox("Warenwert für Gestellung stimmt nicht überein!" & vbNewLine & "Berechnerter Warenwert: " & Math.Round(calcWarenwerte, 2) & vbNewLine & "Eingetragener Warenwert: " & Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2), MsgBoxStyle.Critical)
|
MsgBox("Warenwert für Gestellung stimmt nicht überein!" & vbNewLine & "Berechnerter Warenwert: " & Math.Round(calcWarenwerte, 2) & vbNewLine & "Eingetragener Warenwert: " & Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2), MsgBoxStyle.Critical)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
|
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
|
||||||
If txtWarenwertWaehrung._value = "" Then
|
If txtWarenwertWaehrung._value = "" Then
|
||||||
txtWarenwertWaehrung._value = "EUR"
|
txtWarenwertWaehrung._value = "EUR"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -85,9 +85,10 @@ Public Class usrCntlSND_ATBGestellung
|
|||||||
|
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
|
|
||||||
'erster Schritt -> Gestellung nach ATB-NR
|
|
||||||
|
'1.Schritt -> Gestellung nach aktuellster ATB-NR
|
||||||
If txtATBT1.Text <> "" Then
|
If txtATBT1.Text <> "" Then
|
||||||
Dim SQLString As String = "Select top (1) gs_gsNr from [tblGesamtsicherheit] where [gs_ATBNr] = '" & txtATBT1.Text & "'"
|
Dim SQLString As String = "Select top (1) gs_gsNr from [tblGesamtsicherheit] where [gs_ATBNr] = '" & txtATBT1.Text & "' order by gs_datum desc"
|
||||||
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
||||||
If dt.Rows.Count > 0 Then
|
If dt.Rows.Count > 0 Then
|
||||||
gsnr = dt.Rows(0).Item("gs_gsNr")
|
gsnr = dt.Rows(0).Item("gs_gsNr")
|
||||||
@@ -96,7 +97,7 @@ Public Class usrCntlSND_ATBGestellung
|
|||||||
|
|
||||||
'falls nicht gefunden, 2 Schritt -> Gestellung nach AVISO ID, oder Aberftigungsnrand FilialNr
|
'falls nicht gefunden, 2 Schritt -> Gestellung nach AVISO ID, oder Aberftigungsnrand FilialNr
|
||||||
If gsnr = 0 Then
|
If gsnr = 0 Then
|
||||||
Dim SQLString As String = "Select top (1) gs_gsNr from [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' "
|
Dim SQLString As String = "Select top (1) gs_gsNr from [tblGesamtsicherheit] where ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' order by gs_datum desc"
|
||||||
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
||||||
If dt.Rows.Count > 0 Then
|
If dt.Rows.Count > 0 Then
|
||||||
gsnr = dt.Rows(0).Item("gs_gsNr")
|
gsnr = dt.Rows(0).Item("gs_gsNr")
|
||||||
@@ -158,7 +159,6 @@ Public Class usrCntlSND_ATBGestellung
|
|||||||
Standort = "Unisped GmbH" : firmaId = 21
|
Standort = "Unisped GmbH" : firmaId = 21
|
||||||
Case 5701
|
Case 5701
|
||||||
Standort = "AMBAR" : firmaId = 24
|
Standort = "AMBAR" : firmaId = 24
|
||||||
|
|
||||||
Case 5103
|
Case 5103
|
||||||
Standort = "VERAG CS" : firmaId = 11
|
Standort = "VERAG CS" : firmaId = 11
|
||||||
Case 5501
|
Case 5501
|
||||||
@@ -183,6 +183,10 @@ Public Class usrCntlSND_ATBGestellung
|
|||||||
.FilialNummer = SND.FilialenNr
|
.FilialNummer = SND.FilialenNr
|
||||||
.Abfertigungsnummer = SND.AbfertigungsNr
|
.Abfertigungsnummer = SND.AbfertigungsNr
|
||||||
.firmaId = firmaId
|
.firmaId = firmaId
|
||||||
|
.grenzstelle = AVISO.Grenzstelle.ToString.Replace("WO_", "")
|
||||||
|
.txtlkwIdSearch.Text = AVISO.LKW_Nr
|
||||||
|
.txtSicherheitWarenwert.Text = SND.tblSnd_Warenwert
|
||||||
|
.txtSicherheitATBNr.Text = txtATBT1.Text
|
||||||
End With
|
End With
|
||||||
AddHandler frm.FormClosing, Function()
|
AddHandler frm.FormClosing, Function()
|
||||||
GesSichRef.CalcSaldo()
|
GesSichRef.CalcSaldo()
|
||||||
|
|||||||
Reference in New Issue
Block a user