MDM -> IDS, etc.
This commit is contained in:
@@ -379,57 +379,60 @@ Public Class cIDS
|
||||
Dim vr = isleernothing((currentRow(13)))
|
||||
Dim obo = isleernothing((currentRow(14)))
|
||||
|
||||
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS", ymd)
|
||||
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
|
||||
|
||||
Dim zusParam = ""
|
||||
Dim isOBO As Boolean = False
|
||||
If vr IsNot Nothing AndAlso vr <> "" Then
|
||||
zusParam = vr
|
||||
ElseIf obo IsNot Nothing AndAlso obo <> "" Then
|
||||
zusParam = obo
|
||||
isOBO = True
|
||||
If lngRecordCount = 2 Then
|
||||
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS", ymd)
|
||||
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
|
||||
End If
|
||||
|
||||
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc, zusParam, isOBO)
|
||||
|
||||
Dim avprive = isleernothing((currentRow(12)))
|
||||
|
||||
|
||||
With ids
|
||||
.YearMonthDay = isleernothing((currentRow(0)))
|
||||
.CustomerCode = isleernothing((currentRow(1)))
|
||||
.Paymentsummarynumber = isleernothing((currentRow(2)))
|
||||
.CustomerName = isleernothing((currentRow(3)))
|
||||
.OutletCountry = isleernothing((currentRow(4)))
|
||||
.OutletCountryCode = isleernothing((currentRow(5)))
|
||||
.OutletCode = isleernothing((currentRow(6)))
|
||||
.ProductTypeCode = isleernothing((currentRow(7)))
|
||||
|
||||
If lngRecordCount = 2 Then
|
||||
MDMEinarb.invoicedate = CDate(.YearMonthDay)
|
||||
Dim zusParam = ""
|
||||
Dim isOBO As Boolean = False
|
||||
If vr IsNot Nothing AndAlso vr <> "" Then
|
||||
zusParam = vr
|
||||
ElseIf obo IsNot Nothing AndAlso obo <> "" Then
|
||||
zusParam = obo
|
||||
isOBO = True
|
||||
End If
|
||||
|
||||
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc, zusParam, isOBO)
|
||||
|
||||
.TransactionVolume = isleernothing((currentRow(8)))
|
||||
.AmminclVAT = isleernothing((currentRow(9)))
|
||||
.TotalNetAmount = isleernothing((currentRow(10)))
|
||||
.VATAmount = isleernothing((currentRow(11)))
|
||||
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
|
||||
Dim avprive = isleernothing((currentRow(12)))
|
||||
|
||||
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
|
||||
|
||||
If isOBO Then
|
||||
If .SAVE_OBO() Then counTrans += 1
|
||||
Else
|
||||
If .SAVE_VR() Then counTrans += 1
|
||||
End If
|
||||
With ids
|
||||
.YearMonthDay = isleernothing((currentRow(0)))
|
||||
.CustomerCode = isleernothing((currentRow(1)))
|
||||
.Paymentsummarynumber = isleernothing((currentRow(2)))
|
||||
.CustomerName = isleernothing((currentRow(3)))
|
||||
.OutletCountry = isleernothing((currentRow(4)))
|
||||
.OutletCountryCode = isleernothing((currentRow(5)))
|
||||
.OutletCode = isleernothing((currentRow(6)))
|
||||
.ProductTypeCode = isleernothing((currentRow(7)))
|
||||
|
||||
End With
|
||||
If lngRecordCount = 2 Then
|
||||
MDMEinarb.invoicedate = CDate(.YearMonthDay)
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim ymd = isleernothing((currentRow(0)))
|
||||
.TransactionVolume = isleernothing((currentRow(8)))
|
||||
.AmminclVAT = isleernothing((currentRow(9)))
|
||||
.TotalNetAmount = isleernothing((currentRow(10)))
|
||||
.VATAmount = isleernothing((currentRow(11)))
|
||||
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
|
||||
|
||||
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
|
||||
|
||||
If isOBO Then
|
||||
If .SAVE_OBO() Then counTrans += 1
|
||||
Else
|
||||
If .SAVE_VR() Then counTrans += 1
|
||||
End If
|
||||
|
||||
End With
|
||||
|
||||
Else
|
||||
|
||||
Dim ymd = isleernothing((currentRow(0)))
|
||||
Dim cc = isleernothing((currentRow(1)))
|
||||
Dim cn = isleernothing((currentRow(2)))
|
||||
Dim occ = isleernothing((currentRow(8)))
|
||||
@@ -440,23 +443,25 @@ Public Class cIDS
|
||||
Dim t_date = isleernothing((currentRow(12)))
|
||||
Dim tna = isleernothing((currentRow(16)))
|
||||
|
||||
|
||||
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS_Details", ymd)
|
||||
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
|
||||
|
||||
Dim ids_detail As New cIDSDetails(ymd, cc, cn, occ, oc, ptc, t_time, t_date, tv, tna)
|
||||
ids_detail.AmminclVAT = isleernothing((currentRow(15)))
|
||||
ids_detail.VATAmount = isleernothing((currentRow(17)))
|
||||
ids_detail.avpriceexclVAT = isleernothing((currentRow(18)))
|
||||
ids_detail.Paymentsummarynumber = ""
|
||||
If ids_detail.SAVE() Then counTrans += 1
|
||||
|
||||
If lngRecordCount = 2 Then
|
||||
MDMEinarb.invoicedate = CDate(ids_detail.YearMonthDay)
|
||||
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS_Details", ymd)
|
||||
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Dim ids_detail As New cIDSDetails(ymd, cc, cn, occ, oc, ptc, t_time, t_date, tv, tna)
|
||||
ids_detail.AmminclVAT = isleernothing((currentRow(15)))
|
||||
ids_detail.VATAmount = isleernothing((currentRow(17)))
|
||||
ids_detail.avpriceexclVAT = isleernothing((currentRow(18)))
|
||||
ids_detail.Paymentsummarynumber = ""
|
||||
If ids_detail.SAVE() Then counTrans += 1
|
||||
|
||||
If lngRecordCount = 2 Then
|
||||
MDMEinarb.invoicedate = CDate(ids_detail.YearMonthDay)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -468,11 +473,7 @@ Public Class cIDS
|
||||
Loop
|
||||
If Not isTransactionDetail Then
|
||||
MDMEinarb.supplier = "IDS"
|
||||
Else
|
||||
MDMEinarb.supplier = "IDS_Details"
|
||||
End If
|
||||
|
||||
cnt = CInt(lngRecordCount)
|
||||
cnt = CInt(lngRecordCount)
|
||||
MDMEinarb.ds_total += cnt - 1
|
||||
MDMEinarb.ds_count += counTrans
|
||||
MDMEinarb.import_date = Now()
|
||||
@@ -484,8 +485,30 @@ Public Class cIDS
|
||||
End If
|
||||
|
||||
MDMEinarb.SAVE()
|
||||
Else
|
||||
'LKW-Kennzeichen aktualisieren!
|
||||
SQL.doSQL("UPDATE det SET det.LicencePlateNumber = s.KfzKennzeichen FROM tblIDSTransactionsNew_Details det INNER JOIN SDL.dbo.SDL s
|
||||
ON s.KartenNr =
|
||||
CAST(det.CustomerCode AS varchar(50)) + CAST(det.CardNumber AS varchar(50))
|
||||
WHERE s.SDLNr = 100 AND ISNULL(s.Gesperrt,0) = 0")
|
||||
|
||||
objFileRead.Close()
|
||||
MDMEinarb.supplier = "IDS_Details"
|
||||
cnt = CInt(lngRecordCount)
|
||||
MDMEinarb.ds_total += cnt - 1
|
||||
MDMEinarb.ds_count += counTrans
|
||||
MDMEinarb.import_date = Now()
|
||||
MDMEinarb.importfilename = fi.Name
|
||||
|
||||
MDMEinarb.completed = True
|
||||
MDMEinarb.completed_date = Now()
|
||||
|
||||
|
||||
MDMEinarb.SAVE()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
objFileRead.Close()
|
||||
Return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user