Update 20240102
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports C1.Win.C1TrueDBGrid
|
||||
Imports Gnostice.Documents
|
||||
|
||||
Public Class LeistungDruck
|
||||
|
||||
@@ -101,7 +102,7 @@ Public Class LeistungDruck
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim Kalkulationsmenge As Integer = 0
|
||||
Dim WithEvents evh As Generic_Event_Handler = Globals.EVH
|
||||
|
||||
Sub load_data()
|
||||
@@ -110,7 +111,7 @@ Public Class LeistungDruck
|
||||
If Globals.LeistungenLoaded = True Then Exit Sub
|
||||
If Globals.Applicationtype = ApplicationTypes.Projektabrechnung Then
|
||||
|
||||
GrpTarif.Width = 550
|
||||
'GrpTarif.Width = 550
|
||||
'GrpLeistungen.Left = GrpTarif.Left + GrpTarif.Width + 4
|
||||
grpLeistungsdetails.Left = GrpTarif.Left + GrpTarif.Width + 4
|
||||
Me.lblbehandler.Text = "Erbringer"
|
||||
@@ -732,6 +733,9 @@ Public Class LeistungDruck
|
||||
|
||||
b = drv.Item("Frankenbetrag")
|
||||
Me.diwert.Value = b
|
||||
If Globals.DruckBranche = True Then
|
||||
If drv.Item("variabel") = True And Me.Kalkulationsmenge > 0 Then Me.diwert.Value = Me.diwert.Value / 1000 * Me.Kalkulationsmenge
|
||||
End If
|
||||
Me.txtBezD.Text = drv.Item("BezD")
|
||||
End If
|
||||
Try
|
||||
@@ -1339,6 +1343,17 @@ Public Class LeistungDruck
|
||||
r("total") = Globals.Round5(r("Menge") * r("Taxpunkte") * r("frankenprotaxpunkt"))
|
||||
End If
|
||||
Next
|
||||
For Each r As DataRow In ldb.dsDaten.Tables(0).Rows
|
||||
Dim dv As New DataView(IntTables.Inttables.Tables("Tarif"), "sso_nummer='" + r("sso_nummer") + "'", "", DataViewRowState.CurrentRows)
|
||||
For Each rowView As DataRowView In dv
|
||||
Dim r2 As DataRow = rowView.Row
|
||||
If r2("Variabel") = True Then
|
||||
r("Total") = Globals.Round5(r("Menge")) * r2("frankenbetrag") / 1000 * Me.Kalkulationsmenge
|
||||
r("frankenprotaxpunkt") = r("Total")
|
||||
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
ldb.Update_Data()
|
||||
refresh_leistungen()
|
||||
End Function
|
||||
@@ -1510,6 +1525,11 @@ Public Class LeistungDruck
|
||||
Private Sub C1Produkte_RowColChange(sender As Object, e As RowColChangeEventArgs) Handles C1Produkte.RowColChange
|
||||
If Me.onload Then Exit Sub
|
||||
Try
|
||||
Try
|
||||
Me.Kalkulationsmenge = Me.C1Produkte.Columns("AnzKalkulation").Value
|
||||
Catch
|
||||
Me.Kalkulationsmenge = 0
|
||||
End Try
|
||||
|
||||
refresh_leistungen()
|
||||
Refresh_Produktzusatz()
|
||||
@@ -1584,11 +1604,13 @@ Public Class LeistungDruck
|
||||
zdb.Exec_SQL(sql)
|
||||
Next
|
||||
zdb.Dispose()
|
||||
Globals.ToastInfo.ShowSaveMesasge(Me.ParentForm)
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
|
||||
C1Produkte.Update()
|
||||
pdb.Update_Data()
|
||||
Globals.ToastInfo.ShowSaveMesasge(Me.ParentForm)
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
|
||||
@@ -1608,11 +1630,41 @@ Public Class LeistungDruck
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Me.C1Produkte.Columns("id").Value))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
refresh_produkte()
|
||||
Return
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub C1Produkte_AfterColEdit(sender As Object, e As ColEventArgs) Handles C1Produkte.AfterColEdit
|
||||
Dim bm As Integer = C1Produkte.Bookmark
|
||||
C1Produkte.Bookmark = -1
|
||||
C1Produkte.Update()
|
||||
pdb.Update_Data()
|
||||
C1Produkte.Bookmark = bm
|
||||
End Sub
|
||||
|
||||
Private Sub C1Produkte_AfterColUpdate(sender As Object, e As ColEventArgs) Handles C1Produkte.AfterColUpdate
|
||||
|
||||
If e.Column.Name = "Anz.Kalkulation" Then
|
||||
ToolStripButton3_Click(sender, e)
|
||||
Try
|
||||
Me.Kalkulationsmenge = Me.C1Produkte.Columns("AnzKalkulation").Value
|
||||
Catch
|
||||
Me.Kalkulationsmenge = 0
|
||||
End Try
|
||||
Recalc_Leistungen()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Panel3_Resize(sender As Object, e As EventArgs) Handles Panel3.Resize
|
||||
GrpProdukte.Height = Panel3.Height / 4
|
||||
' GrpTarif.Height = Panel3.Height / 4
|
||||
GroupBox1.Width = Panel3.Width / 2
|
||||
GroupBox2.Width = Panel3.Width / 2
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user