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

@@ -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"))