neu
This commit is contained in:
@@ -98,30 +98,54 @@ Public Class frmSendungsdetailsNEU
|
||||
txtColli.Focus() 'DAMIT evtl. LEAVE Events ausgelöst werden
|
||||
txtGewicht.Focus() 'DAMIT evtl. LEAVE Events ausgelöst werden
|
||||
|
||||
loadDataInLIST()
|
||||
|
||||
If AVISO.Abgeschlossen Then
|
||||
'MsgBox("Keine Änderung möglich - Akt bereits abgeschlossen.")
|
||||
Return True
|
||||
End If
|
||||
SAVE_ME = True
|
||||
If saveAll Then
|
||||
For Each s In SENDUNG_LIST
|
||||
If s.SAVE() = False Then SAVE_ME = False
|
||||
s.SAVE_HANDLING() 'derzeit ohne Funktion
|
||||
s.SAVE_VORKOSTEN() 'derzeit ohne Funktion
|
||||
Next
|
||||
Else
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE() 'Nur noch aktuelle Sendung speichern
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE_HANDLING() 'derzeit ohne Funktion
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE_VORKOSTEN() 'derzeit ohne Funktion
|
||||
End If
|
||||
SAVE_ABRECHUNG()
|
||||
|
||||
'Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
' Case "UNISPED"
|
||||
' SQL.doSQL("UPDATE Aviso SET DakosyRef='" & txtDyRef.Text & "' WHERE AvisoId='" & AvisoId & "'", "AVISO")
|
||||
'End Select
|
||||
loadDataInLIST()
|
||||
|
||||
|
||||
If VALIDATE_ME() Then
|
||||
|
||||
SAVE_ME = True
|
||||
If saveAll Then
|
||||
For Each s In SENDUNG_LIST
|
||||
If s.SAVE() = False Then SAVE_ME = False
|
||||
s.SAVE_HANDLING() 'derzeit ohne Funktion
|
||||
s.SAVE_VORKOSTEN() 'derzeit ohne Funktion
|
||||
Next
|
||||
Else
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE() 'Nur noch aktuelle Sendung speichern
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE_HANDLING() 'derzeit ohne Funktion
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE_VORKOSTEN() 'derzeit ohne Funktion
|
||||
End If
|
||||
SAVE_ABRECHUNG()
|
||||
|
||||
'Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
' Case "UNISPED"
|
||||
' SQL.doSQL("UPDATE Aviso SET DakosyRef='" & txtDyRef.Text & "' WHERE AvisoId='" & AvisoId & "'", "AVISO")
|
||||
'End Select
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function VALIDATE_ME() As Boolean
|
||||
Dim FilialeAktFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(SENDUNG_LIST(CURRENT_INDEX).FilialenNr,, "")
|
||||
|
||||
If SENDUNG_LIST(CURRENT_INDEX).FilialenNr = 5801 Or (SENDUNG_LIST(CURRENT_INDEX).FilialenNr.ToString = VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE And VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER) Then
|
||||
'Firma=Cluster, zB Front-Office --> darf alle Firmen auswählen.
|
||||
Else
|
||||
If FilialeAktFirma <> "" Then
|
||||
If Panel6.Enabled Then 'wenn gesperrt, auch keine Prüfung!
|
||||
If Not txtAvisierer.checkFirma(FilialeAktFirma) Then MsgBox("Es wurde eine Kundennummer einer fremden Firma ausgewählt. Sendung kann nicht gespeichert werden.") : Return False
|
||||
If Not txtAuftraggeber.checkFirma(FilialeAktFirma) Then MsgBox("Es wurde eine Kundennummer einer fremden Firma ausgewählt. Sendung kann nicht gespeichert werden.") : Return False
|
||||
If Not txtEmpfaenger.checkFirma(FilialeAktFirma) Then MsgBox("Es wurde eine Kundennummer einer fremden Firma ausgewählt. Sendung kann nicht gespeichert werden.") : Return False
|
||||
If Not txtFrachtfuehrer.checkFirma(FilialeAktFirma) Then MsgBox("Es wurde eine Kundennummer einer fremden Firma ausgewählt. Sendung kann nicht gespeichert werden.") : Return False
|
||||
If Not txtAbsender.checkFirma(FilialeAktFirma) Then MsgBox("Es wurde eine Kundennummer einer fremden Firma ausgewählt. Sendung kann nicht gespeichert werden.") : Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Sub NEXT_SENDUNG()
|
||||
@@ -887,6 +911,8 @@ Public Class frmSendungsdetailsNEU
|
||||
newRow.tblSnd_Vorbereitet = Nothing
|
||||
newRow.tblSnd_AbklaerungTR = Nothing
|
||||
newRow.tblSnd_AbklaerungTR_MA = Nothing
|
||||
newRow.tblSnd_AbfertigungTR = Nothing
|
||||
newRow.tblSnd_AbfertigungTR_MA = Nothing
|
||||
|
||||
|
||||
newRow.tblSnd_SendungID = -1
|
||||
@@ -2687,12 +2713,15 @@ Public Class frmSendungsdetailsNEU
|
||||
Case "AMBAR"
|
||||
If cboFiliale._value <> "5701" Then sperren = True 'UNISPED darf VERIMEX nicht, sonst alle im CLUSTER
|
||||
Case "VERAG"
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(cboFiliale._value) <> "VERAG" Then sperren = True 'Grundsätzlich wenn nicht VERAG --> sperren
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Then
|
||||
If cboFiliale._value = "5601" Or cboFiliale._value = "5501" Then sperren = True
|
||||
End If
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(cboFiliale._value) = "IMEX" AndAlso VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then
|
||||
sperren = False
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
@@ -2713,8 +2742,46 @@ Public Class frmSendungsdetailsNEU
|
||||
End Sub
|
||||
Private Sub cboFiliale_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFiliale.SelectedIndexChanged
|
||||
' btnKassenbuchEintrag.Enabled = True
|
||||
If loaded Then
|
||||
If Panel6.Enabled Then 'wenn gesperrt, auch keine Prüfung!
|
||||
|
||||
txtAnzahlPos.Visible = (cboFiliale._value = "7001")
|
||||
If cboFiliale._value <> "" Then
|
||||
|
||||
Dim FilialeAktFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(SENDUNG_LIST(CURRENT_INDEX).FilialenNr,, "")
|
||||
Dim FilialeNeuFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(cboFiliale._value,, "")
|
||||
|
||||
If FilialeNeuFirma <> "FRONTOFFICE" And FilialeAktFirma <> "FRONTOFFICE" Then
|
||||
If FilialeAktFirma <> "" And FilialeNeuFirma <> "" Then
|
||||
If FilialeAktFirma <> FilialeNeuFirma Then
|
||||
Dim kdGesetz As Boolean = False
|
||||
If txtAvisierer.KdNr_value > 0 Then kdGesetz = True
|
||||
If txtAuftraggeber.KdNr_value > 0 Then kdGesetz = True
|
||||
If txtEmpfaenger.KdNr_value > 0 Then kdGesetz = True
|
||||
If txtFrachtfuehrer.KdNr_value > 0 Then kdGesetz = True
|
||||
If txtAbsender.KdNr_value > 0 Then kdGesetz = True
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(txtAvisierer.KdData_KUNDE.FilialenNr,, "") <> FilialeNeuFirma Then kdGesetz
|
||||
If kdGesetz Then
|
||||
If vbYes = MsgBox("Es wurden bereits Kundennummern einer anderen Firma im Verbund eingetragen. Möchten Sie fortfahren?" & vbNewLine & vbNewLine & "(Die Kundenummern werden zurückgesetzt.)", vbYesNoCancel) Then
|
||||
txtAvisierer.setKdNrKeepName()
|
||||
txtAuftraggeber.setKdNrKeepName()
|
||||
txtEmpfaenger.setKdNrKeepName()
|
||||
txtFrachtfuehrer.setKdNrKeepName()
|
||||
txtAbsender.setKdNrKeepName()
|
||||
Else
|
||||
cboFiliale.changeItem(FilialeAktFirma)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
txtAnzahlPos.Visible = (cboFiliale._value = "7001")
|
||||
Label4.Visible = (cboFiliale._value = "7001")
|
||||
|
||||
Dim tmp = cboAbfertigungsart._value
|
||||
|
||||
Reference in New Issue
Block a user