SND Abrechung
This commit is contained in:
@@ -4186,6 +4186,15 @@ Public Class frmSendungsdetailsNEU
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initDGVAbrechnung()
|
||||
dgvVorkosten.Rows.Clear()
|
||||
For Each ABR In SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG
|
||||
dgvVorkosten.Rows.Add(SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG.IndexOf(ABR), ABR.sndabr_beteiligter, ABR.sndabr_LeistungsNr, ABR.sndabr_bezeichnung, ABR.sndabr_preis)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripMenuItem13_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem13.Click
|
||||
|
||||
End Sub
|
||||
@@ -4918,6 +4927,116 @@ Public Class frmSendungsdetailsNEU
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'---------------------------
|
||||
|
||||
|
||||
Private Sub btnAddAbr_Click_1(sender As Object, e As EventArgs) Handles btnAddAbr.Click
|
||||
lblErrAbr.Visible = False
|
||||
If cboAbrAn._value.Trim = "" Then
|
||||
lblErrAbr.Text = "Abrechnung An fehlt!" : lblErrAbr.Visible = True : Exit Sub
|
||||
End If
|
||||
If cboAbrLeistungen._value = "" Then
|
||||
lblErrAbr.Text = "Leistungs-Nr fehlt!" : lblErrAbr.Visible = True : Exit Sub
|
||||
End If
|
||||
If txtAbrLeistungsBez.Text.Trim = "" Then
|
||||
lblErrAbr.Text = "Leistungs-Bezeichnung fehlt!" : lblErrAbr.Visible = True : Exit Sub
|
||||
End If
|
||||
If txtAbrLeistungsBez.Text.Trim.Length <= 35 Then
|
||||
lblErrAbr.Text = "Leistungs-Bezeichnung zu lang!" : lblErrAbr.Visible = True : Exit Sub
|
||||
End If
|
||||
If txtAbrPreis._value = "" Then
|
||||
lblErrAbr.Text = "Preis fehlt!" : lblErrAbr.Visible = True : Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
If ABR_ID >= 0 Then
|
||||
Dim ABR = SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG(ABR_ID)
|
||||
ABR.sndabr_LeistungsNr = cboAbrLeistungen._value
|
||||
abr.sndabr_abrArt = ""
|
||||
ABR.sndabr_bezeichnung = txtAbrLeistungsBez.Text.Trim
|
||||
ABR.sndabr_beteiligter = cboAbrAn._value.Trim
|
||||
abr.sndabr_preis = CDbl(txtAbrPreis._value)
|
||||
abr.sndabr_einzelPreis = CDbl(txtAbrPreis._value)
|
||||
abr.sndabr_anzahl = 1
|
||||
'SENDUNG_LIST(CURRENT_INDEX).SAVE()
|
||||
btnAddAbr.BackgroundImage = My.Resources.plus
|
||||
Else
|
||||
Dim ABR As New VERAG_PROG_ALLGEMEIN.cSendungAbrechnung(SENDUNG_LIST(CURRENT_INDEX).tblSnd_SendungID)
|
||||
ABR.sndabr_LeistungsNr = cboAbrLeistungen._value
|
||||
ABR.sndabr_abrArt = ""
|
||||
ABR.sndabr_bezeichnung = txtAbrLeistungsBez.Text.Trim
|
||||
ABR.sndabr_beteiligter = cboAbrAn._value.Trim
|
||||
ABR.sndabr_preis = CDbl(txtAbrPreis._value)
|
||||
ABR.sndabr_einzelPreis = CDbl(txtAbrPreis._value)
|
||||
ABR.sndabr_anzahl = 1
|
||||
|
||||
SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG.Add(ABR)
|
||||
End If
|
||||
ABR_ID = -1
|
||||
lblVK_BEarbeitungAbbrechen.Visible = False
|
||||
txtVK_Leistung.Text = ""
|
||||
txtVK_Firma.Text = ""
|
||||
txtVK_Preis.Text = ""
|
||||
initdgvAbrechnung()
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dgvAbrechnung_KeyDown(sender As Object, e As KeyEventArgs) Handles dgvAbrechnung.KeyDown
|
||||
If dgvAbrechnung.SelectedRows.Count = 0 Then Exit Sub
|
||||
|
||||
If e.KeyCode = Keys.Delete Then
|
||||
If vbYes = MsgBox("Möchten Sie die Abrechnungs-Position wirklich löschen?", vbYesNoCancel) Then
|
||||
Dim ABR = SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG.Find(Function(x) x.sndabr_id = dgvAbrechnung.SelectedRows(0).Cells("clmnAbrID").Value)
|
||||
SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG.Remove(ABR)
|
||||
SENDUNG_LIST(CURRENT_INDEX).SAVE(False)
|
||||
initdgvAbrechnung()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Dim ABR_ID = -1
|
||||
Private Sub dgvAbrechnung_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAbrechnung.CellDoubleClick, dgvAbrechnung.CellContentDoubleClick
|
||||
If e.RowIndex >= 0 Then
|
||||
Try
|
||||
|
||||
Dim VK = SENDUNG_LIST(CURRENT_INDEX).ABRECHNUNG(dgvAbrechnung.SelectedRows(0).Cells("clmnAbrId").Value)
|
||||
cboAbrAn.changeItem(VK.sndabr_beteiligter)
|
||||
txtAbrLeistungsBez.Text = VK.sndabr_bezeichnung
|
||||
cboAbrLeistungen.changeItem(VK.sndabr_LeistungsNr)
|
||||
txtAbrPreis.Text = CDbl(VK.sndabr_preis).ToString("N2")
|
||||
|
||||
ABR_ID = dgvAbrechnung.SelectedRows(0).Cells("clmnAbrId").Value
|
||||
lblVK_BEarbeitungAbbrechen.Visible = True
|
||||
btnAddAbr.BackgroundImage = My.Resources.stift
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblAbrAbbrechen_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lblAbrAbbrechen.LinkClicked
|
||||
ABR_ID = -1
|
||||
lblVK_BEarbeitungAbbrechen.Visible = False
|
||||
btnAddAbr.BackgroundImage = My.Resources.plus
|
||||
txtVK_Leistung.Text = ""
|
||||
txtVK_Firma.Text = ""
|
||||
txtVK_Preis.Text = ""
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
'---------------------------
|
||||
|
||||
|
||||
|
||||
Private Sub Button17_Click_1(sender As Object, e As EventArgs) Handles btnVorkostenAdd.Click
|
||||
If txtVK_Leistung.Text.Trim = "" Then Exit Sub
|
||||
If txtVK_Firma.Text.Trim = "" Then Exit Sub
|
||||
|
||||
Reference in New Issue
Block a user