Timas -> TerminalID, Prvisionsverguetung, Rechnungssuche, etc.

This commit is contained in:
2026-03-27 10:17:24 +01:00
parent 47bd09109f
commit ddae3769d0
12 changed files with 207 additions and 87 deletions

View File

@@ -88,7 +88,7 @@ Public Class cMitarbeiter
Property mit_CSuser As Object = Nothing
Property mit_CSpwd As Object = Nothing
Property mit_PersonalNr As Object = Nothing
Property mit_timasId As Object = Nothing
Property mit_timasId As Object = Nothing 'interne ID von TIMAS
Property mit_ATGRNAccessCode_AT51FP7 As Object = Nothing
Property mit_ATGRNAccessCode_AT52VA6 As Object = Nothing
Property mit_Sprachkentnisse As Object = Nothing
@@ -97,12 +97,12 @@ Public Class cMitarbeiter
Property mit_ausstempelnBeiBeenden As Boolean = False
Property mit_timasMehrereFirmen As Boolean = False
Property mit_timasFirmen As Object = Nothing
Property mit_Notfall_Name As Object = Nothing
Property mit_Notfall_Handy As Object = Nothing
Property mit_Notfall_Mail As Object = Nothing
Property mit_SchalterID As Object = Nothing
Property mit_Funktion As Object = Nothing
Property mit_terminalTimasId As Object = Nothing 'externe ID von TIMAS
@@ -223,6 +223,7 @@ Public Class cMitarbeiter
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Mail", mit_Notfall_Mail))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_SchalterID", mit_SchalterID))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Funktion", mit_Funktion))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_terminalTimasId", mit_terminalTimasId))
@@ -434,6 +435,7 @@ Public Class cMitarbeiter
If Not dr.Item("mit_Notfall_Mail") Is DBNull.Value Then Me.mit_Notfall_Mail = dr.Item("mit_Notfall_Mail")
If Not dr.Item("mit_SchalterID") Is DBNull.Value Then Me.mit_SchalterID = dr.Item("mit_SchalterID")
If Not dr.Item("mit_Funktion") Is DBNull.Value Then Me.mit_Funktion = dr.Item("mit_Funktion")
If Not dr.Item("mit_terminalTimasId") Is DBNull.Value Then Me.mit_terminalTimasId = dr.Item("mit_terminalTimasId")
Catch ex As Exception

View File

@@ -28,6 +28,7 @@ Partial Class frmMitarbeitersuche
Me.Button4 = New System.Windows.Forms.Button()
Me.btnClose = New System.Windows.Forms.Button()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.pnlMain = New System.Windows.Forms.Panel()
Me.pnl = New System.Windows.Forms.Panel()
Me.Button3 = New System.Windows.Forms.Button()
@@ -73,7 +74,6 @@ Partial Class frmMitarbeitersuche
Me.pnlGeburtstag = New System.Windows.Forms.Panel()
Me.lblGeburtstag = New System.Windows.Forms.Label()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
Me.Panel1 = New System.Windows.Forms.Panel()
Me.lblPosition = New System.Windows.Forms.Label()
@@ -89,7 +89,9 @@ Partial Class frmMitarbeitersuche
Me.Label17 = New System.Windows.Forms.Label()
Me.lblNotfall_Handy = New System.Windows.Forms.Label()
Me.lblNotfall_Name = New System.Windows.Forms.Label()
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.Label14 = New System.Windows.Forms.Label()
Me.lblTimasID = New System.Windows.Forms.Label()
Me.pnlSrch.SuspendLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlMain.SuspendLayout()
@@ -163,6 +165,32 @@ Partial Class frmMitarbeitersuche
Me.PictureBox2.TabIndex = 18
Me.PictureBox2.TabStop = False
'
'sbMitarbeiter
'
Me.sbMitarbeiter._allowFreitext = False
Me.sbMitarbeiter._AllowSetValue = False
Me.sbMitarbeiter._allowSpaceAsSplitter = True
Me.sbMitarbeiter._autoSizeGross = False
Me.sbMitarbeiter._hideIfListEmpty = True
Me.sbMitarbeiter._value = Nothing
Me.sbMitarbeiter.conn_art = "FMZOLL"
Me.sbMitarbeiter.dgvpos = "LEFT"
Me.sbMitarbeiter.DISPLAY_PARAM = Nothing
Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing
Me.sbMitarbeiter.key_visible = False
Me.sbMitarbeiter.KEYPARAM = Nothing
Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11)
Me.sbMitarbeiter.Name = "sbMitarbeiter"
Me.sbMitarbeiter.searchActive = True
Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29)
Me.sbMitarbeiter.SQL_ORDER_BY = Nothing
Me.sbMitarbeiter.SQL_SELECT = Nothing
Me.sbMitarbeiter.SQL_WHERE = Nothing
Me.sbMitarbeiter.SQL_WhereParamList = Nothing
Me.sbMitarbeiter.TabIndex = 0
Me.sbMitarbeiter.usrcntl = Nothing
'
'pnlMain
'
Me.pnlMain.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
@@ -178,6 +206,8 @@ Partial Class frmMitarbeitersuche
'
Me.pnl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer))
Me.pnl.Controls.Add(Me.lblTimasID)
Me.pnl.Controls.Add(Me.Label14)
Me.pnl.Controls.Add(Me.Button3)
Me.pnl.Controls.Add(Me.Panel2)
Me.pnl.Controls.Add(Me.pnlZeiten)
@@ -698,11 +728,6 @@ Partial Class frmMitarbeitersuche
Me.PictureBox1.TabIndex = 13
Me.PictureBox1.TabStop = False
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
'
'MyPanel1
'
Me.MyPanel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer))
@@ -874,31 +899,32 @@ Partial Class frmMitarbeitersuche
Me.lblNotfall_Name.Text = "-"
Me.lblNotfall_Name.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'sbMitarbeiter
'ContextMenuStrip1
'
Me.sbMitarbeiter._allowFreitext = False
Me.sbMitarbeiter._AllowSetValue = False
Me.sbMitarbeiter._allowSpaceAsSplitter = True
Me.sbMitarbeiter._autoSizeGross = False
Me.sbMitarbeiter._hideIfListEmpty = True
Me.sbMitarbeiter._value = Nothing
Me.sbMitarbeiter.conn_art = "FMZOLL"
Me.sbMitarbeiter.dgvpos = "LEFT"
Me.sbMitarbeiter.DISPLAY_PARAM = Nothing
Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing
Me.sbMitarbeiter.key_visible = False
Me.sbMitarbeiter.KEYPARAM = Nothing
Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11)
Me.sbMitarbeiter.Name = "sbMitarbeiter"
Me.sbMitarbeiter.searchActive = True
Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29)
Me.sbMitarbeiter.SQL_ORDER_BY = Nothing
Me.sbMitarbeiter.SQL_SELECT = Nothing
Me.sbMitarbeiter.SQL_WHERE = Nothing
Me.sbMitarbeiter.SQL_WhereParamList = Nothing
Me.sbMitarbeiter.TabIndex = 0
Me.sbMitarbeiter.usrcntl = Nothing
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
'
'Label14
'
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label14.Location = New System.Drawing.Point(501, 93)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(74, 20)
Me.Label14.TabIndex = 130
Me.Label14.Text = "TiMas-ID:"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'lblTimasID
'
Me.lblTimasID.AutoSize = True
Me.lblTimasID.Cursor = System.Windows.Forms.Cursors.Hand
Me.lblTimasID.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblTimasID.Location = New System.Drawing.Point(581, 93)
Me.lblTimasID.Name = "lblTimasID"
Me.lblTimasID.Size = New System.Drawing.Size(59, 20)
Me.lblTimasID.TabIndex = 131
Me.lblTimasID.Text = "12345"
Me.lblTimasID.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'frmMitarbeitersuche
'
@@ -1006,4 +1032,6 @@ Partial Class frmMitarbeitersuche
Friend WithEvents lblNotfall_Handy As Windows.Forms.Label
Friend WithEvents lblNotfall_Name As Windows.Forms.Label
Friend WithEvents cbxLaengergearbeitet As Windows.Forms.CheckBox
Friend WithEvents lblTimasID As Windows.Forms.Label
Friend WithEvents Label14 As Windows.Forms.Label
End Class

View File

@@ -87,6 +87,7 @@ Public Class frmMitarbeitersuche
lblFirma.Text = MA.getFirma
lblNiederlassung.Text = If(MA.mit_niederlassung, "")
lblMAId.Text = MA.mit_id
lblTimasID.Text = MA.mit_terminalTimasId
lblTelefon.Text = If(MA.mit_durchwahl, "")
lblMail.Text = If(MA.mit_email, "")

View File

@@ -1195,36 +1195,46 @@ Public Class cMSEAPI
' Amounts
If Not IsDBNull(currentRow(35)) Then
Double.TryParse(currentRow(35).ToString(), total_amount_euro)
Double.TryParse(currentRow(35).ToString().Replace(".", ","), total_amount_euro)
End If
If Not IsDBNull(currentRow(36)) Then
Double.TryParse(currentRow(36).ToString().Replace(".", ","), total_vat_amount_euro)
End If
'If total_amount_euro <> 0 OrElse total_vat_amount_euro <> 0 Then
' MsgBox("Hier " & total_amount_euro & " " & total_vat_amount_euro)
'End If
Dim inv As New cMSEInvoices(invoiceDate, Country, customerID)
inv.invoice_id = invoiceID
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = invoiceDate
End If
If Not inv.hasEntry Then
inv.invoice_id = invoiceID
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = invoiceDate
End If
If inv.hasEntry Then
inv.total_amount_euro += total_amount_euro
inv.total_vat_amount_euro += total_vat_amount_euro
Else
inv.total_amount_euro = total_amount_euro
inv.total_vat_amount_euro = total_vat_amount_euro
End If
inv.name = "TEMP"
inv.msts_vat_number = -1
inv.alternativeImport = True
inv.SAVEBYCUSTOMERIDDATE()
inv.name = "TEMP"
inv.msts_vat_number = -1
inv.alternativeImport = True
inv.SAVEBYCUSTOMERIDDATE()
Console.WriteLine("MSE: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
Else
If total_amount_euro <> 0 OrElse total_vat_amount_euro <> 0 Then 'nicht relevanten Änderungen überspringen!
inv.total_amount_euro += total_amount_euro
inv.total_vat_amount_euro += total_vat_amount_euro
inv.SAVEBYCUSTOMERIDDATE()
End If
End If
Console.WriteLine("MSE: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
@@ -1796,7 +1806,7 @@ Public Class cMSEInvoices
Public Function SAVEBYCUSTOMERIDDATE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblMSEInvoices WHERE invoice_date=@invoice_date AND invoice_id = @invoice_id AND customer_number = @customer_number) " &
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblMSEInvoices WHERE invoice_date=@invoice_date AND invoice_id = @invoice_id AND customer_number = @customer_number AND country = @country) " &
" BEGIN " & getUpdateCmdBYCustomeridDate() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
@@ -1809,7 +1819,7 @@ Public Class cMSEInvoices
Public Function SAVEBYCountry() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblMSEInvoices WHERE invoice_date=@invoice_date AND invoice_id = @invoice_id AND customer_number = @customer_number) " &
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblMSEInvoices WHERE invoice_date=@invoice_date AND country = @country AND customer_number = @customer_number) " &
" BEGIN " & getUpdateCmdBYCustomeridDateCountry() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
@@ -1966,7 +1976,7 @@ Public Class cMSEInvoices
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE tblMSEInvoices SET " & str & " WHERE invoice_date=@invoice_date AND invoice_id = @invoice_id AND customer_number = @customer_number ")
Return (" UPDATE tblMSEInvoices SET " & str & " WHERE invoice_date=@invoice_date AND invoice_id = @invoice_id AND customer_number = @customer_number AND country = @country ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)

View File

@@ -304,14 +304,14 @@ Public Class cTimasAPI
Dim success As Boolean
Dim json As New Chilkat.JsonObject
success = json.UpdateString("externid", mitarbeiter.mit_id)
success = json.UpdateString("externid", mitarbeiter.mit_terminalTimasId)
success = json.UpdateString("markingColor", "#3acc2d")
success = json.UpdateString("pnr1", mitarbeiter.mit_PersonalNr) 'für Personalverr.
'success = json.UpdateString("pnr2", "ZZ-3A-Q")
success = json.UpdateString("firstname", mitarbeiter.mit_vname)
success = json.UpdateString("lastname", mitarbeiter.mit_nname)
success = json.UpdateString("gender", IIf(mitarbeiter.mit_geschlecht = "m", "male", "female"))
success = json.UpdateInt("card", mitarbeiter.mit_id)
success = json.UpdateInt("card", mitarbeiter.mit_terminalTimasId)
success = json.UpdateString("info", mitarbeiter.mit_firma & " - " & mitarbeiter.mit_abteilung)
If mitarbeiter.mit_gebdat <> "" And IsDate(mitarbeiter.mit_gebdat) Then
success = json.UpdateString("birthday", CDate(mitarbeiter.mit_gebdat).ToString("yyyy-MM-dd"))