fremdrechnung, etc.
This commit is contained in:
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.4.7.3")>
|
<Assembly: AssemblyVersion("1.4.7.4")>
|
||||||
<Assembly: AssemblyFileVersion("1.4.7.3")>
|
<Assembly: AssemblyFileVersion("1.4.7.4")>
|
||||||
|
|||||||
@@ -937,38 +937,38 @@ Public Class usrcntlFremdrechnungen
|
|||||||
|
|
||||||
If onlyRelevantInvioces AndAlso Lieferant <> "IDS" AndAlso erw.kde_keineMWSt Then Exit For 'abbruchbedingung
|
If onlyRelevantInvioces AndAlso Lieferant <> "IDS" AndAlso erw.kde_keineMWSt Then Exit For 'abbruchbedingung
|
||||||
|
|
||||||
Dim sendÍnvoice As Boolean = IIf(onlyRelevantInvioces, False, True)
|
Dim sendÍnvoice As Boolean = IIf(onlyRelevantInvioces AndAlso KUNDE.KundenNr = 0, False, True)
|
||||||
|
|
||||||
'ORIGINAL-RECHNUNG senden wenn:
|
'ORIGINAL-RECHNUNG senden wenn:
|
||||||
If onlyRelevantInvioces Then
|
If onlyRelevantInvioces Then
|
||||||
|
|
||||||
'1. wenn die Rechnung in dem Land in dem er ansässig ist ausgestellt wurde (rumän. Kunde – Rechnung ausgestellt in Rumänien = z.B. IDS in RO getankt…)
|
'1. wenn die Rechnung in dem Land in dem er ansässig ist ausgestellt wurde (rumän. Kunde – Rechnung ausgestellt in Rumänien = z.B. IDS in RO getankt…)
|
||||||
If row.Cells("Land").Value <> "" AndAlso landKZiso2 = row.Cells("Land").Value Then sendÍnvoice = True
|
If Not sendÍnvoice AndAlso row.Cells("Land").Value <> "" AndAlso landKZiso2 = row.Cells("Land").Value Then sendÍnvoice = True
|
||||||
|
|
||||||
'2. wenn die Rechnung die MWST-SUMME 0 aufweist!!!
|
'2. wenn die Rechnung die MWST-SUMME 0 aufweist!!!
|
||||||
If Not sendÍnvoice AndAlso row.Cells("MWSt").Value = 0 Then sendÍnvoice = True
|
If Not sendÍnvoice AndAlso row.Cells("MWSt").Value = 0 Then sendÍnvoice = True
|
||||||
|
|
||||||
'3. Rechnungen der Länder in denen der Kunde keine MWST erstattet bekommt -> dtkeineMWST
|
'3. Rechnungen der Länder in denen der Kunde keine MWST erstattet bekommt -> dtkeineMWST
|
||||||
If Not sendÍnvoice AndAlso landKZiso2 <> "" AndAlso dtkeineMWST.Rows.Count > 0 Then
|
If Not sendÍnvoice AndAlso landKZiso2 <> "" AndAlso dtkeineMWST.Rows.Count > 0 Then
|
||||||
Dim rows() As DataRow = dtkeineMWST.Select("Lieferant <> 'IDS' AND Land = '" & landKZiso2 & "' and Erstattungsland = '" & row.Cells("Land").Value & "'")
|
Dim rows() As DataRow = dtkeineMWST.Select("Lieferant <> 'IDS' AND Land = '" & landKZiso2 & "' and Erstattungsland = '" & row.Cells("Land").Value & "'")
|
||||||
Dim dtkeineMWST_ohneContraint As New DataTable
|
Dim dtkeineMWST_ohneContraint As New DataTable
|
||||||
If rows.Length > 0 Then dtkeineMWST_ohneContraint = rows.CopyToDataTable()
|
If rows.Length > 0 Then dtkeineMWST_ohneContraint = rows.CopyToDataTable()
|
||||||
If dtkeineMWST_ohneContraint.Rows.Count > 0 Then sendÍnvoice = True
|
If dtkeineMWST_ohneContraint.Rows.Count > 0 Then sendÍnvoice = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'4. Rechnungen der Länder, in denen der Kunde selber MWST beantragt
|
||||||
|
|
||||||
|
If Not sendÍnvoice AndAlso landKZiso2 <> "" AndAlso dtKundeMWSTTemp.Rows.Count > 0 Then
|
||||||
|
Dim rows() As DataRow = dtKundeMWSTTemp.Select("LandKz = '" & row.Cells("Land").Value & "'")
|
||||||
|
Dim dtKundeMWSTTemp_ohneContraint As New DataTable
|
||||||
|
If rows.Length > 0 Then dtKundeMWSTTemp_ohneContraint = rows.CopyToDataTable()
|
||||||
|
If dtKundeMWSTTemp_ohneContraint.Rows.Count > 0 Then sendÍnvoice = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'4. Rechnungen der Länder, in denen der Kunde selber MWST beantragt
|
|
||||||
|
|
||||||
If Not sendÍnvoice AndAlso landKZiso2 <> "" AndAlso dtKundeMWSTTemp.Rows.Count > 0 Then
|
If Lieferant = "VERAG" Then
|
||||||
Dim rows() As DataRow = dtKundeMWSTTemp.Select("LandKz = '" & row.Cells("Land").Value & "'")
|
|
||||||
Dim dtKundeMWSTTemp_ohneContraint As New DataTable
|
|
||||||
If rows.Length > 0 Then dtKundeMWSTTemp_ohneContraint = rows.CopyToDataTable()
|
|
||||||
If dtKundeMWSTTemp_ohneContraint.Rows.Count > 0 Then sendÍnvoice = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Lieferant = "VERAG" Then
|
|
||||||
|
|
||||||
'VERAG IGNORIEREN
|
'VERAG IGNORIEREN
|
||||||
'Dim ReDat = row.Cells("Rechnungsdatum").Value
|
'Dim ReDat = row.Cells("Rechnungsdatum").Value
|
||||||
|
|||||||
Reference in New Issue
Block a user