Vorauskasse Bugfix (es werden beim initialien Laden gleich die Kundenofferte geladen).
This commit is contained in:
@@ -714,15 +714,20 @@ Public Class usrcntlVorauskasse
|
|||||||
Sub setDefault()
|
Sub setDefault()
|
||||||
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||||
Case "AMBAR"
|
Case "AMBAR"
|
||||||
txtVerzollungskosten._value = 112
|
|
||||||
txtATLAS._value = 10
|
offertenvonKundenladen(True)
|
||||||
' txtClearing._value = 40
|
|
||||||
txtClearing._value = 0
|
'txtVerzollungskosten._value = 112
|
||||||
txtAviso._value = 20
|
'txtATLAS._value = 10
|
||||||
txtSonstigeKosten._value = 40
|
'' txtClearing._value = 40
|
||||||
txtSonstigeKostenText.Text = "Sonstige Kosten"
|
'txtClearing._value = 0
|
||||||
txtPapierePorti._value = 10
|
'txtAviso._value = 20
|
||||||
|
'txtSonstigeKosten._value = 40
|
||||||
|
'txtSonstigeKostenText.Text = "Sonstige Kosten"
|
||||||
|
'txtPapierePorti._value = 10
|
||||||
Case "VERAG", "IMEX"
|
Case "VERAG", "IMEX"
|
||||||
|
|
||||||
|
offertenvonKundenladen(True)
|
||||||
'txtVerzollungskosten._value = 93
|
'txtVerzollungskosten._value = 93
|
||||||
'txtATLAS._value = 8
|
'txtATLAS._value = 8
|
||||||
'txtClearing._value = 40
|
'txtClearing._value = 40
|
||||||
@@ -779,19 +784,27 @@ Public Class usrcntlVorauskasse
|
|||||||
|
|
||||||
Private Sub btnOffertladen_Click(sender As Object, e As EventArgs) Handles btnOffertladen.Click
|
Private Sub btnOffertladen_Click(sender As Object, e As EventArgs) Handles btnOffertladen.Click
|
||||||
|
|
||||||
|
offertenvonKundenladen(False)
|
||||||
|
|
||||||
|
'For Each row As DataRow In dt.Select("BerechnungsartNr = '8'")
|
||||||
|
|
||||||
|
' If row("LeistungsNr") = 60 Then txtVerzollungskosten.Text = row("Preis")
|
||||||
|
' If row("LeistungsNr") = 20 Then txtZoll._value = row("Preis")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub offertenvonKundenladen(warnungunterduecken As Boolean)
|
||||||
|
|
||||||
'Dim SQL As New SQL
|
|
||||||
' Dim dt As DataTable = SQL.loadDgvBySql("SELECT [LeistungsNr], [Preis], [Anzahl], BerechnungsartPosInkludiert FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr='1' and preis is not null order by LeistungsNr, Preis desc", "FMZOLL")
|
|
||||||
Dim dt As DataTable
|
Dim dt As DataTable
|
||||||
If SENDUNG Is Nothing Then
|
If SENDUNG Is Nothing Then
|
||||||
MsgBox("keine Sendung hinterlegt, Offert kann nicht geladen werden!")
|
If Not warnungunterduecken Then MsgBox("Es ist keine Sendung hinterlegt, daher kann keine Abfertigungsart geladen werden und kein passendes Offert!")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
dt = SQL.loadDgvBySql("SELECT [LeistungsNr], [Preis], [BerechnungsartNr] ,[Anzahl], BerechnungsartPosInkludiert FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr=(SELECT ISNULL(AO.ao_OffertenNr,-1) FROM tblAbfertigungsartOffertenstamm as AO WHERE AO.ao_Abfertigungsart='" & SENDUNG.tblSnd_Abfertigungsart_ID & "') and preis is not null order by LeistungsNr, Preis desc", "FMZOLL")
|
dt = SQL.loadDgvBySql("SELECT [LeistungsNr], [Preis], [BerechnungsartNr] ,[Anzahl], BerechnungsartPosInkludiert FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr=(SELECT ISNULL(AO.ao_OffertenNr,-1) FROM tblAbfertigungsartOffertenstamm as AO WHERE AO.ao_Abfertigungsart='" & SENDUNG.tblSnd_Abfertigungsart_ID & "') and preis is not null order by LeistungsNr, Preis desc", "FMZOLL")
|
||||||
|
|
||||||
If dt.Rows.Count = 0 Then
|
If dt.Rows.Count = 0 Then
|
||||||
MsgBox("Es konnten keine Offertpositionen für Abfertigunsgart " & SENDUNG.tblSnd_Abfertigungsart_ID & " ermittelt werden!")
|
If Not warnungunterduecken Then MsgBox("Es konnten keine Offertpositionen für Abfertigunsgart " & SENDUNG.tblSnd_Abfertigungsart_ID & " ermittelt werden!")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -823,16 +836,9 @@ Public Class usrcntlVorauskasse
|
|||||||
If row("LeistungsNr") = 340 Then txtVerzollungskosten._value = row("Preis")
|
If row("LeistungsNr") = 340 Then txtVerzollungskosten._value = row("Preis")
|
||||||
If row("LeistungsNr") = 324 Then txtATLAS._value = row("Preis")
|
If row("LeistungsNr") = 324 Then txtATLAS._value = row("Preis")
|
||||||
If row("LeistungsNr") = 440 Then txtPapierePorti._value = row("Preis")
|
If row("LeistungsNr") = 440 Then txtPapierePorti._value = row("Preis")
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
initBerechnung()
|
initBerechnung()
|
||||||
|
|
||||||
'For Each row As DataRow In dt.Select("BerechnungsartNr = '8'")
|
|
||||||
|
|
||||||
' If row("LeistungsNr") = 60 Then txtVerzollungskosten.Text = row("Preis")
|
|
||||||
' If row("LeistungsNr") = 20 Then txtZoll._value = row("Preis")
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user