div. Änderungen, etc.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
@@ -854,7 +855,7 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
End If
|
||||
|
||||
If currentRow.Length > 24 AndAlso currentRow(0) <> "839160" Then 'KDNR <> VERAG --> Die Kosten bleiben uns
|
||||
Dim PLOSE As New MDM_Worker.cPLOSE
|
||||
Dim PLOSE As New MDM_Worker.cPLOSE
|
||||
|
||||
PLOSE.plose_Dateiname = fi.Name
|
||||
PLOSE.plose_RechnungsNr = plose_RechnungsNr
|
||||
@@ -903,15 +904,24 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
PLOSE.plose_Preis = CDbl(SQL.isNullReturnValue(currentRow(26), 0).replace(".", ","))
|
||||
|
||||
PLOSE.Einheitsrabatt = SQL.isleernothing(0) 'gibts nicht mehr?? in neuer Datei!
|
||||
PLOSE.plose_NettobetragTransaktion = CDbl(SQL.isNullReturnValue(currentRow(27), 0).replace(".", ","))
|
||||
PLOSE.plose_MWSTBetrag = CDbl(CDbl(SQL.isNullReturnValue(currentRow(29), 0).replace(".", ",")) - CDbl(SQL.isNullReturnValue(currentRow(27), 0).replace(".", ","))) 'selbst ausrechnen!!!
|
||||
PLOSE.plose_BruttobetragTransaktion = CDbl(SQL.isNullReturnValue(currentRow(29), 0).replace(".", ","))
|
||||
PLOSE.plose_NettobetragWaehrungAbbuchung = CDbl(SQL.isNullReturnValue(currentRow(31), 0).replace(".", ","))
|
||||
PLOSE.plose_MWSTBetragWaehrungAbbuchung = CDbl(CDbl(SQL.isNullReturnValue(currentRow(32), 0).replace(".", ",")) - CDbl(SQL.isNullReturnValue(currentRow(31), 0).replace(".", ","))) 'selbst ausrechnen!!!
|
||||
PLOSE.plose_BruttobetragWaehrungAbbuchung = CDbl(SQL.isNullReturnValue(currentRow(32), 0).replace(".", ","))
|
||||
PLOSE.plose_WaehrungLandDiesntleistung = SQL.isleernothing(currentRow(25))
|
||||
PLOSE.plose_WaehrungAbbuchung = SQL.isleernothing(currentRow(30))
|
||||
PLOSE.plose_ProduktCode = SQL.isleernothing(currentRow(21))
|
||||
|
||||
Dim wertMitMwst As Double = ParseInvariantDouble(SQL.isNullReturnValue(currentRow(29), 0))
|
||||
Dim wertOhneMwst As Double = ParseInvariantDouble(SQL.isNullReturnValue(currentRow(27), 0))
|
||||
PLOSE.plose_NettobetragTransaktion = wertOhneMwst
|
||||
PLOSE.plose_MWSTBetrag = Math.Round(wertMitMwst - wertOhneMwst, 2) ' selbst ausrechnen!!! (MwSt-Betrag = Differenz zwischen Spalte 29 und Spalte 27)
|
||||
PLOSE.plose_BruttobetragTransaktion = wertMitMwst
|
||||
|
||||
Dim wertAbbuchung As Double = ParseInvariantDouble(SQL.isNullReturnValue(currentRow(32), 0))
|
||||
Dim wertBasis As Double = ParseInvariantDouble(SQL.isNullReturnValue(currentRow(31), 0))
|
||||
|
||||
PLOSE.plose_NettobetragWaehrungAbbuchung = wertBasis
|
||||
PLOSE.plose_MWSTBetragWaehrungAbbuchung = Math.Round(wertAbbuchung - wertBasis, 2)
|
||||
|
||||
'PLOSE.plose_MWSTBetragWaehrungAbbuchung = Math.Round(CDbl(CDbl(SQL.isNullReturnValue(currentRow(32), 0).replace(".", ",")) - CDbl(SQL.isNullReturnValue(currentRow(31), 0).replace(".", ","))), 2) 'selbst ausrechnen!!!
|
||||
PLOSE.plose_BruttobetragWaehrungAbbuchung = wertAbbuchung
|
||||
PLOSE.plose_WaehrungLandDiesntleistung = SQL.isleernothing(currentRow(25))
|
||||
PLOSE.plose_WaehrungAbbuchung = SQL.isleernothing(currentRow(30))
|
||||
PLOSE.plose_ProduktCode = SQL.isleernothing(currentRow(21))
|
||||
'PLOSE.plose_ProduktbeschreibungShort = SQL.isleernothing(currentRow(22))
|
||||
PLOSE.plose_KlassenidentifikationEURO = SQL.isleernothing(currentRow(39))
|
||||
PLOSE.plose_Fahrzeugklasse = SQL.isleernothing(currentRow(40))
|
||||
@@ -929,19 +939,19 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
End If
|
||||
|
||||
If If(PLOSE.plose_SupplierRechnungsNr, "").contains("-SFC-") Then ' SOFICO
|
||||
PLOSE.plose_LieferantCode = "90"
|
||||
PLOSE.plose_Lieferant = SQL.DLookup("pl_Bezeichnung", "tblPLOSE_Lieferant", " [pl_LieferantCode]='" & PLOSE.plose_LieferantCode & "' ", "FMZOLL", "")
|
||||
End If
|
||||
|
||||
''''''''''''
|
||||
If PLOSE.SAVE() Then
|
||||
savedTrans += 1
|
||||
End If
|
||||
|
||||
counTrans += 1
|
||||
|
||||
PLOSE.plose_LieferantCode = "90"
|
||||
PLOSE.plose_Lieferant = SQL.DLookup("pl_Bezeichnung", "tblPLOSE_Lieferant", " [pl_LieferantCode]='" & PLOSE.plose_LieferantCode & "' ", "FMZOLL", "")
|
||||
End If
|
||||
|
||||
''''''''''''
|
||||
If PLOSE.SAVE() Then
|
||||
savedTrans += 1
|
||||
End If
|
||||
|
||||
counTrans += 1
|
||||
|
||||
End If
|
||||
|
||||
|
||||
cnt += 1
|
||||
|
||||
@@ -991,6 +1001,25 @@ Public Class frmMDMNachrichtenVerarbeitung
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function ParseInvariantDouble(value As Object) As Double
|
||||
If value Is Nothing OrElse value Is DBNull.Value Then
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Dim strValue As String = value.ToString().Trim()
|
||||
|
||||
If String.IsNullOrEmpty(strValue) Then
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Dim result As Double
|
||||
If Double.TryParse(strValue, NumberStyles.Any, CultureInfo.InvariantCulture, result) Then
|
||||
Return result
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Function readPLOSE_Header(d As String) As String
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user