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 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
|
||||
|
||||
Sendung.tblSnd_Abfertigungsart_ID = If(cboAbfertigungsart._value <> "", cboAbfertigungsart._value, -1)
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("4.0.5.4")>
|
||||
<Assembly: AssemblyFileVersion("4.0.5.4")>
|
||||
<Assembly: AssemblyVersion("4.0.5.5")>
|
||||
<Assembly: AssemblyFileVersion("4.0.5.5")>
|
||||
|
||||
@@ -47,6 +47,8 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Public dtSicherheiten As New DataTable()
|
||||
|
||||
Public grenzstelle As String = ""
|
||||
|
||||
Public firmaId As Integer
|
||||
|
||||
|
||||
@@ -96,6 +98,14 @@ Public Class frmGesamtsicherheitenNEU
|
||||
Exit For
|
||||
End If
|
||||
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
|
||||
|
||||
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)
|
||||
If a = vbYes Then
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_nname.ToLower = "celan" Then 'aktuell hardcoded, wenn Zeit ist dynamisch (per SQL-tbl)
|
||||
Dim f As New frmZEButtons("in")
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasMehrereFirmen Then
|
||||
Dim f As New frmZEButtons("in", VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasFirmen)
|
||||
f.ShowDialog()
|
||||
f.BringToFront()
|
||||
Else
|
||||
|
||||
Dim info
|
||||
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, "in", IIf(cAllgemein.MITARBEITER.mit_homeoffice, 3, 0))
|
||||
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
|
||||
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)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
lblAbfNrExists.Visible = checkDoppelAbfNr()
|
||||
@@ -7372,56 +7374,62 @@ Public Class frmSendungsdetailsNEU
|
||||
Private Sub btnWWberechnen_Click(sender As Object, e As EventArgs) Handles btnWWberechnen.Click
|
||||
Dim calcWarenwerte As Double = 0
|
||||
Dim vorpT1 = usrcntl_ATB.txtATBT1.Text
|
||||
Try
|
||||
|
||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung = "" Then
|
||||
txtWarenwertWaehrung.SET_VALUE("EUR")
|
||||
SAVE_ME()
|
||||
End If
|
||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung = "" Then
|
||||
txtWarenwertWaehrung.SET_VALUE("EUR")
|
||||
SAVE_ME()
|
||||
End If
|
||||
|
||||
If vorpT1 = "" Then
|
||||
MsgBox("Vorpapier/T1 muss eingetragen werden!")
|
||||
usrcntl_ATB.txtATBT1.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
If vorpT1 = "" Then
|
||||
MsgBox("Vorpapier/T1 muss eingetragen werden!")
|
||||
usrcntl_ATB.txtATBT1.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung <> "EUR" Then
|
||||
MsgBox("Warenwert darf nur in EUR angegeben werden")
|
||||
Exit Sub
|
||||
End If
|
||||
If SENDUNG_LIST(CURRENT_INDEX).tblSnd_WarenwertWaehrung <> "EUR" Then
|
||||
MsgBox("Warenwert darf nur in EUR angegeben werden")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each s As cSendungen In SENDUNG_LIST
|
||||
'nur Betrag EUR
|
||||
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
|
||||
calcWarenwerte += s.tblSnd_Warenwert
|
||||
Else
|
||||
MsgBox("Bei Sendung " & s.AbfertigungsNr & " ist der Warenwert nicht in EUR angegeben!")
|
||||
Exit Sub
|
||||
For Each s As cSendungen In SENDUNG_LIST
|
||||
'nur Betrag EUR
|
||||
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
|
||||
calcWarenwerte += s.tblSnd_Warenwert
|
||||
Else
|
||||
MsgBox("Bei Sendung " & s.AbfertigungsNr & " ist der Warenwert nicht in EUR angegeben!")
|
||||
Exit Sub
|
||||
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
|
||||
|
||||
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
|
||||
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)
|
||||
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)
|
||||
|
||||
Else
|
||||
Else
|
||||
|
||||
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
|
||||
If txtWarenwertWaehrung._value = "" Then
|
||||
txtWarenwertWaehrung._value = "EUR"
|
||||
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
|
||||
If txtWarenwertWaehrung._value = "" Then
|
||||
txtWarenwertWaehrung._value = "EUR"
|
||||
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 Class
|
||||
|
||||
@@ -85,9 +85,10 @@ Public Class usrCntlSND_ATBGestellung
|
||||
|
||||
Dim dt As New DataTable
|
||||
|
||||
'erster Schritt -> Gestellung nach ATB-NR
|
||||
|
||||
'1.Schritt -> Gestellung nach aktuellster ATB-NR
|
||||
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)
|
||||
If dt.Rows.Count > 0 Then
|
||||
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
|
||||
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)
|
||||
If dt.Rows.Count > 0 Then
|
||||
gsnr = dt.Rows(0).Item("gs_gsNr")
|
||||
@@ -158,7 +159,6 @@ Public Class usrCntlSND_ATBGestellung
|
||||
Standort = "Unisped GmbH" : firmaId = 21
|
||||
Case 5701
|
||||
Standort = "AMBAR" : firmaId = 24
|
||||
|
||||
Case 5103
|
||||
Standort = "VERAG CS" : firmaId = 11
|
||||
Case 5501
|
||||
@@ -183,6 +183,10 @@ Public Class usrCntlSND_ATBGestellung
|
||||
.FilialNummer = SND.FilialenNr
|
||||
.Abfertigungsnummer = SND.AbfertigungsNr
|
||||
.firmaId = firmaId
|
||||
.grenzstelle = AVISO.Grenzstelle.ToString.Replace("WO_", "")
|
||||
.txtlkwIdSearch.Text = AVISO.LKW_Nr
|
||||
.txtSicherheitWarenwert.Text = SND.tblSnd_Warenwert
|
||||
.txtSicherheitATBNr.Text = txtATBT1.Text
|
||||
End With
|
||||
AddHandler frm.FormClosing, Function()
|
||||
GesSichRef.CalcSaldo()
|
||||
|
||||
Reference in New Issue
Block a user