USTVA; MDM-Einarbeitung

This commit is contained in:
2025-10-03 09:12:44 +02:00
parent 44d3949da5
commit 584c88c68e
6 changed files with 131 additions and 17 deletions

View File

@@ -342,6 +342,10 @@ Public Class cIDS
objFileRead.DiscardBufferedData()
objFileRead.BaseStream.Seek(0, System.IO.SeekOrigin.Begin)
Dim counTrans As Integer = 0
Dim savedTrans As Integer = 0
Dim MDMEinarb As New cMDMEinarbeitung("IDS", Now())
Do While (objFileRead.Peek() > -1)
Dim currentRow As String()
@@ -354,7 +358,6 @@ Public Class cIDS
Return False
End If
Else
Try
@@ -388,6 +391,8 @@ Public Class cIDS
With ids
.YearMonthDay = isleernothing((currentRow(0)))
.CustomerCode = isleernothing((currentRow(1)))
@@ -398,6 +403,10 @@ Public Class cIDS
.OutletCode = isleernothing((currentRow(6)))
.ProductTypeCode = isleernothing((currentRow(7)))
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = CDate(.YearMonthDay)
End If
'Dim transVol_old = .TransactionVolume
'Dim transVol_new = isleernothing((currentRow(8)))
@@ -471,9 +480,9 @@ Public Class cIDS
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
If isOBO Then
.SAVE_OBO()
If .SAVE_OBO() Then counTrans += 1
Else
.SAVE_VR()
If .SAVE_VR() Then counTrans += 1
End If
'.SAVE()
@@ -488,6 +497,16 @@ Public Class cIDS
Loop
cnt = CInt(lngRecordCount)
MDMEinarb.ds_total += cnt - 1
MDMEinarb.ds_count += counTrans
MDMEinarb.import_date = Now()
If MDMEinarb.ds_total = MDMEinarb.ds_count Then
MDMEinarb.completed = True
MDMEinarb.completed_date = Now()
End If
MDMEinarb.SAVE()
objFileRead.Close()
Return True