MDM Ustva, etc.
This commit is contained in:
2
SDL/My Project/Application.Designer.vb
generated
2
SDL/My Project/Application.Designer.vb
generated
@@ -24,7 +24,7 @@ Namespace My
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.IsSingleInstance = true
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MyApplicationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>frmLogin</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<SingleInstance>true</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<MinimumSplashScreenDisplayTime>0</MinimumSplashScreenDisplayTime>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
<HighDpiMode>0</HighDpiMode>
|
||||
</MyApplicationData>
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.5.2.1")>
|
||||
<Assembly: AssemblyFileVersion("1.5.2.1")>
|
||||
<Assembly: AssemblyVersion("1.5.2.2")>
|
||||
<Assembly: AssemblyFileVersion("1.5.2.2")>
|
||||
|
||||
1102
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
1102
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports System.Reflection
|
||||
Imports System.Windows.Documents
|
||||
Imports com.sun.net.httpserver.Authenticator
|
||||
Imports itextsharp.text.pdf
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -78,7 +76,7 @@ Public Class frmMDM_USTVAntrag
|
||||
' left join [tblUStVLeistender] as leist on leist.UStV_Leistender = [tblUStVPositionen].[UStVPo_Leistender]
|
||||
' where UStVAn_ID='" & UStVAn_ID & "' ORDER BY UStVPo_ID", "FMZOLL")
|
||||
|
||||
.SET_SQL("SELECT [UStVAn_ID] ,[UStVPo_ID] ,[UStVPo_ReDat],[UStVPo_ReNr],[UStVPo_Leistungsbezeichnung],[UStVPo_Leistender],leist.[UstV_Leistender_Strasse] + ' ' + leist.[UstV_Leistender_StrasseNr] as [UstV_Leistender_Strasse],leist.[UstV_Leistender_PLZ],leist.[UstV_Leistender_Stadt],leist.[UstV_Leistender_Land],leist.[UstV_Leistender_UstNr],[UStVPo_USteuerbetrag],[UStVPo_Schnittstelle],[UStVPo_SchnittstellenNr],[UStVPo_Umrechnungskurs],[UStVPo_USteuerbetragEUR],[UStVPo_Sachbearbeiter], [UStVPo_daId], [UStVPo_daId_loeschbar] ,[UStVPo_VZ],[UStVPo_VZ_RKID] ,cast(case when isnull([UStVPo_VZ_RKID],0) = 0 then 0 else 1 end as bit) as VZabrechnet
|
||||
.SET_SQL("SELECT [UStVAn_ID] ,[UStVPo_ID] ,[UStVPo_ReDat],[UStVPo_ReNr],[UStVPo_Leistungsbezeichnung],[UStVPo_Nettobetrag],[UStVPo_NettobetragEUR],[UStVPo_Leistender],leist.[UstV_Leistender_Strasse] + ' ' + leist.[UstV_Leistender_StrasseNr] as [UstV_Leistender_Strasse],leist.[UstV_Leistender_PLZ],leist.[UstV_Leistender_Stadt],leist.[UstV_Leistender_Land],leist.[UstV_Leistender_UstNr],[UStVPo_USteuerbetrag],[UStVPo_Schnittstelle],[UStVPo_SchnittstellenNr],[UStVPo_Umrechnungskurs],[UStVPo_USteuerbetragEUR],[UStVPo_Sachbearbeiter], [UStVPo_daId], [UStVPo_daId_loeschbar] ,[UStVPo_VZ],[UStVPo_VZ_RKID] ,cast(case when isnull([UStVPo_VZ_RKID],0) = 0 then 0 else 1 end as bit) as VZabrechnet
|
||||
FROM [tblUStVPositionen]
|
||||
LEFT JOIN [tblUStVLeistender] as leist
|
||||
ON ([tblUStVPositionen].[UStVPo_LeistenderId] > 0
|
||||
@@ -166,6 +164,9 @@ Public Class frmMDM_USTVAntrag
|
||||
.Columns("UStVPo_VZ_RKID").Visible = False
|
||||
.Columns("UStVPo_daId_loeschbar").Visible = False
|
||||
|
||||
.Columns("UStVPo_NettobetragEUR").Visible = False
|
||||
.Columns("UStVPo_Nettobetrag").Visible = False
|
||||
|
||||
|
||||
Dim c As New DataGridViewImageColumn
|
||||
c.Name = "clmnPDF" : c.HeaderText = "RE"
|
||||
@@ -645,7 +646,6 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not cns_LRE.Items.ContainsKey("rmc") Then
|
||||
Dim rmc = New ToolStripMenuItem() With {.Text = "RMC", .Name = "rmc", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler rmc.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
@@ -730,6 +730,13 @@ Public Class frmMDM_USTVAntrag
|
||||
Return (cnt > 0)
|
||||
End Function
|
||||
|
||||
'Shared Function alreadyExistsWithNettobetrag(USTVAn_KuNr As Integer, UStVAn_LandNr As String, USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
|
||||
' Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
' Dim cnt = SQL.getValueTxtBySql(" Select count(*) FROM [tblUStVAntrag] inner join [tblUStVPositionen] On tblUStVAntrag.UStVAn_ID= [tblUStVPositionen].UStVAn_ID
|
||||
' WHERE USTVAn_KuNr='" & USTVAn_KuNr & "' /* AND UStVPo_SchnittstellenNr='" & USTV_POS.UStVPo_SchnittstellenNr & "'*/ AND UStVPo_ReNr = '" & USTV_POS.UStVPo_ReNr & "' AND UStVPo_ReDat='" & USTV_POS.UStVPo_ReDat & "' AND UStVAn_LandNr='" & UStVAn_LandNr & "' and UStVPo_Nettobetrag is not null ", "FMZOLL")
|
||||
' Return (cnt > 0)
|
||||
'End Function
|
||||
|
||||
Function alreadyExists_InAntrag(USTV_POS As VERAG_PROG_ALLGEMEIN.cUStVPositionen) As Boolean
|
||||
For Each row As DataGridViewRow In dgvUSTVPositionen.Rows
|
||||
If row.Cells("UStVPo_SchnittstellenNr").Value = USTV_POS.UStVPo_SchnittstellenNr Then
|
||||
@@ -750,6 +757,9 @@ Public Class frmMDM_USTVAntrag
|
||||
If GET_Antraege IsNot Nothing Then
|
||||
|
||||
For Each ANTRAG In GET_Antraege
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
|
||||
Dim sql As New SQL
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
@@ -760,6 +770,52 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_ReNr = ANTRAG.plose_RechnungsNr.ToString
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
|
||||
USTVA_Nettobetragchanged = True
|
||||
|
||||
If Not MWSTSummenAusBeleg Then
|
||||
USTV_POS.UStVPo_Nettobetrag = ANTRAG.plose_NettobetragWaehrungAbbuchung 'IMMER IN EUR
|
||||
USTV_POS.UStVPo_NettobetragEUR = ANTRAG.plose_NettobetragWaehrungAbbuchung
|
||||
Else
|
||||
'TODO - hier Umrechnungslogik von FRMDW und EUR und EUR/FRMDWR für Belegsebene
|
||||
Dim umrechKurs As Double = 1
|
||||
|
||||
If USTV_ANTRAG.UStVAn_Währungscode = ANTRAG.plose_WaehrungAbbuchung And USTV_ANTRAG.UStVAn_Währungscode = "EUR" Then
|
||||
USTV_POS.UStVPo_Nettobetrag = ANTRAG.plose_NettobetragWaehrungAbbuchung
|
||||
USTV_POS.UStVPo_NettobetragEUR = ANTRAG.plose_NettobetragWaehrungAbbuchung
|
||||
|
||||
Else
|
||||
Dim kurs As New cEZB_Waehrungskurse(USTV_ANTRAG.UStVAn_Währungscode)
|
||||
Dim NETTOBETRAG_EUR = ANTRAG.plose_NettobetragWaehrungAbbuchung
|
||||
Dim NETTOBETRAG = ANTRAG.plose_NettobetragTransaktion
|
||||
|
||||
If USTV_ANTRAG.UStVAn_Währungscode <> "EUR" AndAlso ANTRAG.plose_WaehrungAbbuchung = "EUR" Then
|
||||
|
||||
NETTOBETRAG = Math.Round(kurs.EXCHANGE_EURTOCUR(NETTOBETRAG_EUR, USTV_ANTRAG.UStVAn_Währungscode, CDate(USTV_POS.UStVPo_ReDat)), 2)
|
||||
|
||||
ElseIf USTV_ANTRAG.UStVAn_Währungscode = "EUR" AndAlso ANTRAG.plose_WaehrungAbbuchung <> "EUR" Then
|
||||
|
||||
NETTOBETRAG_EUR = Math.Round(kurs.EXCHANGE_CURTOEUR(NETTOBETRAG, USTV_ANTRAG.UStVAn_Währungscode, CDate(USTV_POS.UStVPo_ReDat)), 2)
|
||||
|
||||
ElseIf USTV_ANTRAG.UStVAn_Währungscode <> "EUR" AndAlso ANTRAG.plose_WaehrungAbbuchung <> "EUR" Then
|
||||
|
||||
NETTOBETRAG_EUR = Math.Round(kurs.EXCHANGE_CURTOEUR(NETTOBETRAG, USTV_ANTRAG.UStVAn_Währungscode, CDate(USTV_POS.UStVPo_ReDat)), 2)
|
||||
|
||||
End If
|
||||
|
||||
If NETTOBETRAG <> 0 Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = NETTOBETRAG_EUR
|
||||
USTV_POS.UStVPo_Nettobetrag = NETTOBETRAG
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
|
||||
If MWSTSummenAusBeleg AndAlso ANTRAG.plose_daId IsNot Nothing Then
|
||||
@@ -871,6 +927,7 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
USTVA_Nettobetragchanged = False
|
||||
If bytSchnittstellenNr = 11 Then 'egal bei welcher Einlesselogik, sollen immer [tblPLOSE_Details] und [tblPLOSE_Inv_Data] aktualisiert werden!
|
||||
MDM_Worker.cPLOSE.UPDATE_ARCHIV_NEULOGIK(USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_ID, USTV_POS.UStVPo_ReNr, True)
|
||||
MDM_Worker.cPLOSE.UPDATE_ARCHIV(USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_ID, USTV_POS.UStVPo_ReNr, True)
|
||||
@@ -880,6 +937,9 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -912,6 +972,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
For Each r As DataRow In dt_RE.Rows
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
@@ -922,6 +984,14 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = r.Item("Nettobetrag")
|
||||
USTV_POS.UStVPo_Nettobetrag = r.Item("Nettobetrag")
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
Dim sql As New SQL
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
@@ -1000,7 +1070,8 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -1026,7 +1097,7 @@ Public Class frmMDM_USTVAntrag
|
||||
If GET_Antraege Then
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
Dim kdNr = r.Item("rmc_kdNr")
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
@@ -1044,6 +1115,20 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End If
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
|
||||
If Not IsDBNull(r.Item("rmc_betragNetto")) AndAlso IsNumeric(r.Item("rmc_betragNetto")) Then
|
||||
USTV_POS.UStVPo_Nettobetrag = CDbl(r.Item("rmc_betragNetto"))
|
||||
If r.Item("rmc_waehrung") = "EUR" Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = CDbl(r.Item("rmc_betragNetto"))
|
||||
End If
|
||||
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
@@ -1097,12 +1182,12 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim umrechKurs As Double = 1
|
||||
If (CDbl(r.Item("rmc_betragBrutto")) <> 0 AndAlso CDbl(r.Item("rmc_euroBrutto")) <> 0) Then
|
||||
|
||||
Dim UST_EUR As Double = CDbl(r.Item("rmc_euroBrutto"))
|
||||
Dim UST_org As Double = CDbl(r.Item("rmc_betragBrutto"))
|
||||
Dim Brutto_EUR As Double = CDbl(r.Item("rmc_euroBrutto"))
|
||||
Dim Brutto_org As Double = CDbl(r.Item("rmc_betragBrutto"))
|
||||
|
||||
'umrechKurs = frmdw / eur
|
||||
|
||||
umrechKurs = Math.Floor((UST_org / UST_EUR * 100 + 0.5)) / 100
|
||||
umrechKurs = Math.Floor((Brutto_org / Brutto_EUR * 100 + 0.5)) / 100
|
||||
|
||||
End If
|
||||
|
||||
@@ -1110,12 +1195,20 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = Math.Round((r.Item("rmc_betragMWST") / umrechKurs), 2)
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = r.Item("rmc_betragMWST")
|
||||
|
||||
If USTV_POS.UStVPo_NettobetragEUR Is Nothing Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = Math.Round((r.Item("rmc_betragNetto") / umrechKurs), 2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
cRMC.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr.ToString, kdNr, USTV_POS.UStVAn_ID)
|
||||
End If
|
||||
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -1139,6 +1232,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
|
||||
Dim kdNr = r.Item("customer_id")
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
@@ -1149,16 +1244,31 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr & IIf(Antrag_LandKz = "BE", "/Belgium", "")
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
USTV_POS.UStVPo_daId = r.Item("daId")
|
||||
USTV_POS.UStVPo_Leistungsbezeichnung = r.Item("specification_page_name")
|
||||
If IsNumeric(USTV_POS.UStVPo_daId) AndAlso USTV_POS.UStVPo_daId > 0 Then
|
||||
USTV_POS.UStVPo_daId_loeschbar = False
|
||||
Else
|
||||
USTV_POS.UStVPo_daId_loeschbar = True
|
||||
End If
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
|
||||
If Not IsDBNull(r.Item("NETTO")) AndAlso IsNumeric(r.Item("NETTO")) Then
|
||||
USTV_POS.UStVPo_Nettobetrag = CDbl(r.Item("NETTO"))
|
||||
If r.Item("original_currency") = "EUR" Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = CDbl(r.Item("NETTO"))
|
||||
End If
|
||||
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not alreadyExistsMitLeistungsBez(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
USTV_POS.UStVPo_Leistungsbezeichnung = r.Item("specification_page_name")
|
||||
|
||||
|
||||
Dim leistender As New cUStVLeistender("MS Europe BV" & " " & Antrag_LandKz, Antrag_LandKz)
|
||||
If leistender.UStV_LeistenderId < 1 Then
|
||||
@@ -1188,12 +1298,21 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR 'Math.Round((UST_org / umrechKurs), 2)
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = UST_org
|
||||
|
||||
If USTV_POS.UStVPo_NettobetragEUR Is Nothing Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = Math.Round((r.Item("NETTO") / umrechKurs), 2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
cMSEAPI.UPDATE_ARCHIV(r.Item("invoice_date"), r.Item("invoice_number"), r.Item("customer_id"), Antrag_LandKz, USTV_POS.UStVAn_ID)
|
||||
End If
|
||||
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -1217,6 +1336,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
|
||||
Dim kdnr = r.Item("Kundennummer")
|
||||
Dim kdnrUTA = r.Item("KundennummerUTA")
|
||||
|
||||
@@ -1234,6 +1355,21 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_daId_loeschbar = True
|
||||
End If
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
|
||||
If Not IsDBNull(r.Item("Gesamtbetrag_Netto_in_Lieferlandwährung")) AndAlso r.Item("Gesamtbetrag_Netto_in_Lieferlandwährung") <> "" Then
|
||||
USTV_POS.UStVPo_Nettobetrag = CDbl(r.Item("Gesamtbetrag_Netto_in_Lieferlandwährung"))
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
|
||||
If Not IsDBNull(r.Item("Gesamtbetrag_Netto_in_Darstellwährung")) AndAlso r.Item("Gesamtbetrag_Netto_in_Darstellwährung") <> "" Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = CDbl(r.Item("Gesamtbetrag_Netto_in_Darstellwährung"))
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
@@ -1277,6 +1413,10 @@ Public Class frmMDM_USTVAntrag
|
||||
cUTA.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnrUTA, USTV_POS.UStVAn_ID)
|
||||
End If
|
||||
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -1304,6 +1444,8 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim sql As New SQL
|
||||
Dim kdnr = r.Item("Kundennummer")
|
||||
|
||||
Dim USTVA_Nettobetragchanged As Boolean = False
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
@@ -1325,6 +1467,17 @@ Public Class frmMDM_USTVAntrag
|
||||
Else
|
||||
USTV_POS.UStVPo_daId_loeschbar = True
|
||||
End If
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then
|
||||
|
||||
If Not IsDBNull(r.Item("Nettobetrag")) AndAlso IsNumeric(r.Item("Nettobetrag")) Then
|
||||
USTV_POS.UStVPo_NettobetragEUR = CDbl(r.Item("Nettobetrag"))
|
||||
If USTV_ANTRAG.UStVAn_Währungscode = "EUR" Then USTV_POS.UStVPo_Nettobetrag = CDbl(r.Item("Nettobetrag")) 'dann ist die "Fremdwährung" EURO
|
||||
USTVA_Nettobetragchanged = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
|
||||
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
@@ -1390,17 +1543,27 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = UST_org
|
||||
|
||||
If USTV_POS.UStVPo_Nettobetrag Is Nothing Then USTV_POS.UStVPo_Nettobetrag = Math.Round((r.Item("Nettobetrag") * umrechKurs), 2)
|
||||
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
cIDS.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnr, Antrag_LandKz, USTV_POS.UStVAn_ID)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If USTV_POS.INSERT() Then
|
||||
cIDS.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnr, Antrag_LandKz, USTV_POS.UStVAn_ID)
|
||||
ElseIf USTVA_Nettobetragchanged Then
|
||||
|
||||
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
|
||||
|
||||
End If
|
||||
'tblUStVPositionen
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
@@ -2898,46 +3061,6 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End If
|
||||
|
||||
|
||||
' If Not IsNull(Me!UStVAn_LandNr) Then
|
||||
' strSQL = "SELECT tblSteuernummern.*" &
|
||||
' " FROM tblSteuernummern" &
|
||||
' " WHERE (((tblSteuernummern.AdressenNr)=" & Me!lngKundenNr & ") AND ((tblSteuernummern.LandNr)=" & Me!UStVAn_LandNr & "));"
|
||||
' Set rst = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
||||
' If Not rst.EOF Then
|
||||
' Me!StNrFürRückerstattungUSt = rst!StNrFürRückerstattungUSt
|
||||
' Me!StNrGültigkeitsdatum = rst!StNrGültigkeitsdatum
|
||||
' Me!bezVertretungsvollmachtAusgestelltAm.ForeColor = -2147483630
|
||||
' Me!bezVertretungsvollmachtAusgestelltAm.Caption = "Vertretungsvollmacht ausgestellt am"
|
||||
' Me!VertretungsvollmachtAusgestelltAm = rst!VertretungsvollmachtAusgestelltAm
|
||||
' Me!bezVertretungsvollmachtErhaltenAm.ForeColor = -2147483630
|
||||
' Me!bezVertretungsvollmachtErhaltenAm.Caption = "Vertretungsvollmacht erhalten am"
|
||||
' Me!VertretungsvollmachtErhaltenAm = rst!VertretungsvollmachtErhaltenAm
|
||||
' Me!AuszahlungsvollmachtAusgestelltAm = rst!AuszahlungsvollmachtAusgestelltAm
|
||||
' Me!AuszahlungsvollmachtErhaltenAm = rst!AuszahlungsvollmachtErhaltenAm
|
||||
' Me!Bemerkung = rst!Bemerkung
|
||||
' End If
|
||||
' rst.Close
|
||||
' ' ab 25.03.2010 Generalvollmacht Eintrag in Tabelle Adressen
|
||||
' strSQL = "SELECT Adressen.UStV_GVAnfDat, Adressen.UStV_GVAusDat" &
|
||||
' " FROM Adressen" &
|
||||
' " WHERE (((Adressen.AdressenNr)=" & Me!lngKundenNr & ") AND" &
|
||||
' " (((Adressen.UStV_GVAnfDat) Is Not Null) OR ((Adressen.UStV_GVAusDat) Is Not Null)));"
|
||||
' Set rst = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
||||
' If Not rst.EOF Then
|
||||
' Me!bezVertretungsvollmachtAusgestelltAm.ForeColor = 16711808
|
||||
' Me!bezVertretungsvollmachtAusgestelltAm.Caption = "Generalvollmacht angefordert am"
|
||||
' Me!VertretungsvollmachtAusgestelltAm = rst!UStV_GVAnfDat
|
||||
' Me!bezVertretungsvollmachtErhaltenAm.ForeColor = 16711808
|
||||
' Me!bezVertretungsvollmachtErhaltenAm.Caption = "Generalvollmacht ausgestellt am"
|
||||
' Me!VertretungsvollmachtErhaltenAm = rst!UStV_GVAusDat
|
||||
' End If
|
||||
' rst.Close
|
||||
' Set rst = Nothing
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
@@ -3965,6 +4088,9 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
|
||||
Dim KUNDE_ERW As New cKundenErweitert(USTV_ANTRAG.UStVAn_KuNr)
|
||||
|
||||
If IsDBNull(ADR.UstIdNr) OrElse ADR.UstIdNr Is Nothing Then
|
||||
MsgBox("UID-Nr ist nicht im Kunden hinterlegt!")
|
||||
End If
|
||||
|
||||
Dim filePath As String = ""
|
||||
Dim fileName As String = USTV_ANTRAG.UStVAn_KuNr & "_" & Antrag_LandKz & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year & "_VATRefund.xml"
|
||||
@@ -3981,6 +4107,7 @@ Public Class frmMDM_USTVAntrag
|
||||
If saveDialog.ShowDialog() = DialogResult.OK Then
|
||||
filePath = saveDialog.FileName
|
||||
Else
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -4007,13 +4134,13 @@ Public Class frmMDM_USTVAntrag
|
||||
.an_r = CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year,
|
||||
.d_rec = 0,
|
||||
.luna_r = CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month,
|
||||
.cif = IIf(Not IsDBNull(ADR.UstIdNr) AndAlso ADR.UstIdNr IsNot Nothing, ADR.UstIdNr, ""),
|
||||
.cif = IIf(Not IsDBNull(ADR.UstIdNr) AndAlso ADR.UstIdNr IsNot Nothing, ADR.UstIdNr, 0),
|
||||
.totalPlata_A = 0
|
||||
},
|
||||
.ProrateAdjustment = New ProrateAdjustment With {.Year = "", .FinalProrate = ""},
|
||||
.Applicant = New Party With {
|
||||
.NameFree = ADR.Name_1,
|
||||
.VATIdentificationNumber = IIf(Not IsDBNull(ADR.UstIdNr) AndAlso ADR.UstIdNr IsNot Nothing, ADR.UstIdNr, ""),
|
||||
.VATIdentificationNumber = IIf(Not IsDBNull(ADR.UstIdNr) AndAlso ADR.UstIdNr IsNot Nothing, ADR.UstIdNr, 0),
|
||||
.AddressFree = ADR.Straße.ToString & vbCrLf & ADR.LandKz.ToString & " - " & ADR.PLZ.ToString & " -" & ADR.Ort.ToString, '"RO - 550270 - MUN. SIBIU",
|
||||
.PostCode = "", .Phone = "", .EmailAddress = "juricevic@verag.ag"
|
||||
},
|
||||
@@ -4049,24 +4176,47 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim UIDNrLeistender = ""
|
||||
|
||||
If row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" IsNot Nothing Then
|
||||
Dim maut As Boolean = False
|
||||
Dim diesel As Boolean = False
|
||||
Dim parkplatz As Boolean = False
|
||||
Dim zubeh As Boolean = False
|
||||
|
||||
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_UstNr").Value) AndAlso row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" IsNot Nothing Then
|
||||
UIDNrLeistender = row.Cells("UstV_Leistender_UstNr").Value
|
||||
UIDNrLeistender = UIDNrLeistender.ToString.Replace(Antrag_LandKz, "")
|
||||
End If
|
||||
|
||||
If Not IsDBNull(row.Cells("UStVPo_Leistungsbezeichnung").Value) AndAlso row.Cells("UStVPo_Leistungsbezeichnung").Value IsNot Nothing Then
|
||||
|
||||
Dim Bez As String = row.Cells("UStVPo_Leistungsbezeichnung").Value
|
||||
Bez = Bez.ToLower
|
||||
|
||||
If Bez.Contains("maut") Then maut = True
|
||||
If Bez.Contains("diesel") Then diesel = True
|
||||
If Bez.Contains("parkplatz") Then parkplatz = True
|
||||
If Bez.Contains("zubeh") Then zubeh = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim Nettobetrag As Double = 0
|
||||
If Not IsDBNull(row.Cells("UStVPo_Nettobetrag").Value) AndAlso IsNumeric(row.Cells("UStVPo_Nettobetrag").Value) Then Nettobetrag = CDbl(row.Cells("UStVPo_Nettobetrag").Value)
|
||||
|
||||
app.PurchaseInformation.Invoices.Add(New Invoice With {
|
||||
.SequenceNumber = counter,
|
||||
.SimplifiedInvoice = 0,
|
||||
.ReferenceNumber = row.Cells("UStVPo_ReNr").Value, ' "25/000616354/987",
|
||||
.IssuingDate = CDate(row.Cells("UStVPo_ReDat").Value).ToString("yyyy-MM-dd"),'"2025-11-30",
|
||||
.GoodsDescription = New GoodsDescription With {.GoodsItem = New GoodsItem With {.Code = 1, .SubCode = "1.1.2", .FreeText = ""}},
|
||||
.TransactionDescription = New TransactionDescription With {.TaxableAmount = "00.00", .VATAmount = row.Cells("UStVPo_USteuerbetrag").Value.ToString.Replace(",", ".")},
|
||||
.GoodsDescription = New GoodsDescription With {.GoodsItem = New GoodsItem},
|
||||
.TransactionDescription = New TransactionDescription With {.TaxableAmount = Nettobetrag.ToString.Replace(",", "."), .VATAmount = row.Cells("UStVPo_USteuerbetrag").Value.ToString.Replace(",", ".")},
|
||||
.Deduction = New Deduction With {.ProRataRate = "", .DeductibleVATAmount = row.Cells("UStVPo_USteuerbetrag").Value.ToString.Replace(",", ".")},
|
||||
.EUSupplier = New Party With {
|
||||
.NameFree = row.Cells("UStVPo_Leistender").Value,'"DKV EURO SERVICE GMBH + CO KG",
|
||||
.AddressFree = row.Cells("UstV_Leistender_Strasse").Value & " " & row.Cells("UstV_Leistender_Land").Value & " " & row.Cells("UstV_Leistender_PLZ").Value & " " & row.Cells("UstV_Leistender_Stadt").Value,'"BALCKE DÜRR ALLEE 3 DE 40882 RATINGEN",
|
||||
.VATIdentificationNumber = UIDNrLeistender,
|
||||
.CountryCode = Antrag_LandKz
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
'[UStVAn_ID] , [UStVPo_ID], [UStVPo_ReDat], [UStVPo_ReNr], [UStVPo_Leistungsbezeichnung], [UStVPo_Leistender], leist.[UstV_Leistender_Strasse] + ' ' + leist.[UstV_Leistender_StrasseNr] as [UstV_Leistender_Strasse],leist.[UstV_Leistender_PLZ],leist.[UstV_Leistender_Stadt],leist.[UstV_Leistender_Land],leist.[UstV_Leistender_UstNr],[UStVPo_USteuerbetrag],[UStVPo_Schnittstelle],[UStVPo_SchnittstellenNr],[UStVPo_Umrechnungskurs],[UStVPo_USteuerbetragEUR],[UStVPo_Sachbearbeiter], [UStVPo_daId], [UStVPo_daId_loeschbar] ,[UStVPo_VZ],[UStVPo_VZ_RKID]
|
||||
@@ -4226,4 +4376,22 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Function
|
||||
|
||||
Private Shared Function updateNettobetrag(RechnungsNr As String, Rechnungsdatum As Date, SchnittstellenNr As Integer, USTV_POS As cUStVPositionen)
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
|
||||
|
||||
|
||||
If USTV_POS.UStVPo_ID > 0 AndAlso USTV_POS.UStVAn_ID > 0 Then
|
||||
If USTV_POS.UStVPo_Nettobetrag IsNot Nothing AndAlso USTV_POS.UStVPo_NettobetragEUR IsNot Nothing Then
|
||||
SQL.doSQL("Update [tblUStVPositionen] Set [UStVPo_Nettobetrag] = " & USTV_POS.UStVPo_Nettobetrag.ToString.Replace(",", ".") & ",[UStVPo_NettobetragEUR] = " & USTV_POS.UStVPo_NettobetragEUR.ToString.Replace(",", ".") & " WHERE cast([UStVPo_ReDat] as Date) = '" & Rechnungsdatum.ToShortDateString & "' AND UStVPo_ReNr = '" & RechnungsNr & "' AND UStVPo_SchnittstellenNr = " & SchnittstellenNr, "FMZOLL")
|
||||
Else
|
||||
If USTV_POS.UStVPo_Nettobetrag IsNot Nothing Then SQL.doSQL("Update [tblUStVPositionen] Set [UStVPo_Nettobetrag] = " & USTV_POS.UStVPo_Nettobetrag.ToString.Replace(",", ".") & " WHERE cast([UStVPo_ReDat] as Date) = '" & Rechnungsdatum.ToShortDateString & "' AND UStVPo_ReNr = '" & RechnungsNr & "' AND UStVPo_SchnittstellenNr = " & SchnittstellenNr, "FMZOLL")
|
||||
If USTV_POS.UStVPo_NettobetragEUR IsNot Nothing Then SQL.doSQL("Update [tblUStVPositionen] Set [UStVPo_NettobetragEUR] = " & USTV_POS.UStVPo_NettobetragEUR.ToString.Replace(",", ".") & " WHERE cast([UStVPo_ReDat] as Date) = '" & Rechnungsdatum.ToShortDateString & "' AND UStVPo_ReNr = '" & RechnungsNr & "' AND UStVPo_SchnittstellenNr = " & SchnittstellenNr, "FMZOLL")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
98
SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb
generated
98
SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb
generated
@@ -49,6 +49,10 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.lblAenderungsdatum = New System.Windows.Forms.Label()
|
||||
Me.lblSachbearbeiter = New System.Windows.Forms.Label()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.txtNettobetragEUR = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtNettobetrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label19 = New System.Windows.Forms.Label()
|
||||
Me.Label18 = New System.Windows.Forms.Label()
|
||||
Me.btnDel = New System.Windows.Forms.Button()
|
||||
Me.cbxAntragsfilter = New VERAG_PROG_ALLGEMEIN.MyCheckBoxValue(Me.components)
|
||||
Me.lblWarning = New System.Windows.Forms.Label()
|
||||
@@ -83,6 +87,7 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
|
||||
Me.scanLieferschein = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
||||
Me.cnS_KIUPLOAD = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.btn_EUR_to_FW = New System.Windows.Forms.Button()
|
||||
Me.tabDok.SuspendLayout()
|
||||
Me.tbcntr.SuspendLayout()
|
||||
Me.tabVollmachten.SuspendLayout()
|
||||
@@ -394,6 +399,11 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.Controls.Add(Me.btn_EUR_to_FW)
|
||||
Me.pnl.Controls.Add(Me.txtNettobetragEUR)
|
||||
Me.pnl.Controls.Add(Me.txtNettobetrag)
|
||||
Me.pnl.Controls.Add(Me.Label19)
|
||||
Me.pnl.Controls.Add(Me.Label18)
|
||||
Me.pnl.Controls.Add(Me.btnDel)
|
||||
Me.pnl.Controls.Add(Me.cbxAntragsfilter)
|
||||
Me.pnl.Controls.Add(Me.lblWarning)
|
||||
@@ -429,6 +439,76 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.pnl.Size = New System.Drawing.Size(1300, 239)
|
||||
Me.pnl.TabIndex = 1
|
||||
'
|
||||
'txtNettobetragEUR
|
||||
'
|
||||
Me.txtNettobetragEUR._DateTimeOnly = False
|
||||
Me.txtNettobetragEUR._numbersOnly = True
|
||||
Me.txtNettobetragEUR._numbersOnlyKommastellen = ""
|
||||
Me.txtNettobetragEUR._numbersOnlyTrennzeichen = True
|
||||
Me.txtNettobetragEUR._Prozent = False
|
||||
Me.txtNettobetragEUR._ShortDateNew = False
|
||||
Me.txtNettobetragEUR._ShortDateOnly = False
|
||||
Me.txtNettobetragEUR._TimeOnly = False
|
||||
Me.txtNettobetragEUR._TimeOnly_Seconds = False
|
||||
Me.txtNettobetragEUR._value = ""
|
||||
Me.txtNettobetragEUR._Waehrung = True
|
||||
Me.txtNettobetragEUR._WaehrungZeichen = False
|
||||
Me.txtNettobetragEUR.Enabled = False
|
||||
Me.txtNettobetragEUR.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtNettobetragEUR.Location = New System.Drawing.Point(294, 168)
|
||||
Me.txtNettobetragEUR.MaxLength = 15
|
||||
Me.txtNettobetragEUR.MaxLineLength = -1
|
||||
Me.txtNettobetragEUR.MaxLines_Warning = ""
|
||||
Me.txtNettobetragEUR.MaxLines_Warning_Label = Nothing
|
||||
Me.txtNettobetragEUR.Name = "txtNettobetragEUR"
|
||||
Me.txtNettobetragEUR.Size = New System.Drawing.Size(154, 20)
|
||||
Me.txtNettobetragEUR.TabIndex = 29
|
||||
'
|
||||
'txtNettobetrag
|
||||
'
|
||||
Me.txtNettobetrag._DateTimeOnly = False
|
||||
Me.txtNettobetrag._numbersOnly = True
|
||||
Me.txtNettobetrag._numbersOnlyKommastellen = ""
|
||||
Me.txtNettobetrag._numbersOnlyTrennzeichen = True
|
||||
Me.txtNettobetrag._Prozent = False
|
||||
Me.txtNettobetrag._ShortDateNew = False
|
||||
Me.txtNettobetrag._ShortDateOnly = False
|
||||
Me.txtNettobetrag._TimeOnly = False
|
||||
Me.txtNettobetrag._TimeOnly_Seconds = False
|
||||
Me.txtNettobetrag._value = ""
|
||||
Me.txtNettobetrag._Waehrung = True
|
||||
Me.txtNettobetrag._WaehrungZeichen = False
|
||||
Me.txtNettobetrag.Enabled = False
|
||||
Me.txtNettobetrag.ForeColor = System.Drawing.Color.Red
|
||||
Me.txtNettobetrag.Location = New System.Drawing.Point(17, 168)
|
||||
Me.txtNettobetrag.MaxLength = 15
|
||||
Me.txtNettobetrag.MaxLineLength = -1
|
||||
Me.txtNettobetrag.MaxLines_Warning = ""
|
||||
Me.txtNettobetrag.MaxLines_Warning_Label = Nothing
|
||||
Me.txtNettobetrag.Name = "txtNettobetrag"
|
||||
Me.txtNettobetrag.Size = New System.Drawing.Size(154, 20)
|
||||
Me.txtNettobetrag.TabIndex = 28
|
||||
'
|
||||
'Label19
|
||||
'
|
||||
Me.Label19.AutoSize = True
|
||||
Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label19.Location = New System.Drawing.Point(291, 152)
|
||||
Me.Label19.Name = "Label19"
|
||||
Me.Label19.Size = New System.Drawing.Size(105, 15)
|
||||
Me.Label19.TabIndex = 27
|
||||
Me.Label19.Text = "Netto-Betrag EUR"
|
||||
'
|
||||
'Label18
|
||||
'
|
||||
Me.Label18.AutoSize = True
|
||||
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!)
|
||||
Me.Label18.Location = New System.Drawing.Point(14, 152)
|
||||
Me.Label18.Name = "Label18"
|
||||
Me.Label18.Size = New System.Drawing.Size(79, 15)
|
||||
Me.Label18.TabIndex = 26
|
||||
Me.Label18.Text = "Netto-Betrag:"
|
||||
'
|
||||
'btnDel
|
||||
'
|
||||
Me.btnDel.BackgroundImage = Global.SDL.My.Resources.Resources.del
|
||||
@@ -1000,6 +1080,19 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Me.cnS_KIUPLOAD.Name = "ContextMenuStrip1"
|
||||
Me.cnS_KIUPLOAD.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'btn_EUR_to_FW
|
||||
'
|
||||
Me.btn_EUR_to_FW.BackgroundImage = Global.SDL.My.Resources.Resources.picboxPrevious_Enter
|
||||
Me.btn_EUR_to_FW.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btn_EUR_to_FW.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btn_EUR_to_FW.Location = New System.Drawing.Point(208, 166)
|
||||
Me.btn_EUR_to_FW.Name = "btn_EUR_to_FW"
|
||||
Me.btn_EUR_to_FW.Size = New System.Drawing.Size(36, 24)
|
||||
Me.btn_EUR_to_FW.TabIndex = 30
|
||||
Me.btn_EUR_to_FW.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
Me.btn_EUR_to_FW.UseVisualStyleBackColor = True
|
||||
Me.btn_EUR_to_FW.Visible = False
|
||||
'
|
||||
'ustCntlUSTV_AntragPosition
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -1088,4 +1181,9 @@ Partial Class ustCntlUSTV_AntragPosition
|
||||
Friend WithEvents btnAPIUbload As Button
|
||||
Friend WithEvents btnDel As Button
|
||||
Friend WithEvents cnS_KIUPLOAD As ContextMenuStrip
|
||||
Friend WithEvents txtNettobetragEUR As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtNettobetrag As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label19 As Label
|
||||
Friend WithEvents Label18 As Label
|
||||
Friend WithEvents btn_EUR_to_FW As Button
|
||||
End Class
|
||||
|
||||
@@ -32,6 +32,8 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
txtUmrechnungskurs._value = 1
|
||||
txtUSTBetrag._value = 0
|
||||
txtUSTBetragEUR._value = 0
|
||||
txtNettobetrag._value = 0
|
||||
txtNettobetragEUR._value = 0
|
||||
cbxAPI.Checked = False
|
||||
cboSchnittstellennr.changeItem("")
|
||||
lblAenderungsdatum.Text = "-"
|
||||
@@ -79,6 +81,8 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
txtUSTBetrag.Text = If(UStV_POS.UStVPo_USteuerbetrag, "")
|
||||
txtUmrechnungskurs.Text = If(UStV_POS.UStVPo_Umrechnungskurs, "")
|
||||
txtUSTBetragEUR.Text = If(UStV_POS.UStVPo_USteuerbetragEUR, "")
|
||||
txtNettobetrag.Text = If(UStV_POS.UStVPo_Nettobetrag, "")
|
||||
txtNettobetragEUR.Text = If(UStV_POS.UStVPo_NettobetragEUR, "")
|
||||
|
||||
sbLeistender.Text = UStV_Leitender.UStV_Leistender
|
||||
loadChangedDSToPanel(UStV_Leitender, True)
|
||||
@@ -116,6 +120,12 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
btnAPIUbload.Enabled = False
|
||||
End If
|
||||
|
||||
If txtNettobetrag.Text = "" AndAlso txtNettobetragEUR.Text <> "" Then
|
||||
btn_EUR_to_FW.Visible = True
|
||||
Else
|
||||
btn_EUR_to_FW.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen")
|
||||
scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten")
|
||||
@@ -133,7 +143,7 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
gridAktiv = True
|
||||
End Sub
|
||||
|
||||
Sub getValues(ByRef UStV_POS, ByRef save)
|
||||
Sub getValues(ByRef UStV_POS As cUStVPositionen, ByRef save As Boolean)
|
||||
|
||||
If UStV_POS Is Nothing OrElse UStV_POS.UStVAn_ID = 0 Then UStV_POS = New VERAG_PROG_ALLGEMEIN.cUStVPositionen()
|
||||
|
||||
@@ -164,6 +174,15 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
Else
|
||||
save = False
|
||||
End If
|
||||
|
||||
If txtNettobetrag.Text <> "" Then
|
||||
UStV_POS.UStVPo_Nettobetrag = txtNettobetrag.Text.Replace(",", ".")
|
||||
End If
|
||||
|
||||
If txtNettobetragEUR.Text <> "" Then
|
||||
UStV_POS.UStVPo_NettobetragEUR = txtNettobetragEUR.Text.Replace(",", ".")
|
||||
End If
|
||||
|
||||
If txtLeistungsbezeichnung.Text <> "" Then
|
||||
UStV_POS.UStVPo_Leistungsbezeichnung = txtLeistungsbezeichnung.Text
|
||||
Else
|
||||
@@ -487,6 +506,9 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
|
||||
|
||||
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||
|
||||
If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||
|
||||
txtChanged = True
|
||||
End If
|
||||
|
||||
@@ -522,6 +544,7 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") OrElse UStV_POS.UStVPo_Umrechnungskurs Is Nothing Then
|
||||
|
||||
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||
If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||
txtChanged = True
|
||||
End If
|
||||
End If
|
||||
@@ -867,4 +890,23 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btn_EUR_to_FW_Click(sender As Object, e As EventArgs) Handles btn_EUR_to_FW.Click
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
MsgBox("Keine Berechtigung für das Bearbeiten des Antrages - MDM_USTVA_bearbeiten")
|
||||
Exit Sub
|
||||
Else
|
||||
If IsNumeric(txtNettobetragEUR.Text) Then
|
||||
txtNettobetrag.Text = Math.Floor((txtNettobetragEUR.Text * txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||
txtChanged = True
|
||||
|
||||
If txtChanged Then
|
||||
values_changed()
|
||||
txtChanged = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -60,7 +60,6 @@ Public Class cUSTVAntrag
|
||||
Property UStVAn_RGRetour As Object = Nothing
|
||||
Property UStVAn_VZoffen As Object = Nothing
|
||||
Property UStVAn_Sicherheit As Object = Nothing
|
||||
|
||||
Property POSITIONEN As New List(Of cUStVPositionen) '= Nothing
|
||||
|
||||
Dim SQL As New SQL
|
||||
@@ -131,6 +130,7 @@ Public Class cUSTVAntrag
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_VZoffen", UStVAn_VZoffen)) '
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_Sicherheit", UStVAn_Sicherheit))
|
||||
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -348,7 +348,8 @@ Public Class cUStVPositionen
|
||||
Property UStVPo_VZ As Boolean = False
|
||||
Property UStVPo_VZ_RKID As Object = Nothing '
|
||||
Property UStVPo_interneNr As Integer
|
||||
|
||||
Property UStVPo_Nettobetrag As Object = Nothing
|
||||
Property UStVPo_NettobetragEUR As Object = Nothing
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
@@ -466,6 +467,8 @@ Public Class cUStVPositionen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_VZ", UStVPo_VZ))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_VZ_RKID", UStVPo_VZ_RKID))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_interneNr", UStVPo_interneNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_Nettobetrag", UStVPo_Nettobetrag)) '
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_NettobetragEUR", UStVPo_NettobetragEUR))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
@@ -566,7 +566,8 @@ Public Class cIDS
|
||||
Using cmd As New SqlCommand("SELECT
|
||||
tblIDSTransactionsNew.KdNrVERAG as Kundennummer,
|
||||
ISNULL(tblIDSTransactionsNew.[OBONumber],ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) AS Rechnungsnummer,
|
||||
tblIDSTransactionsNew.[YearMonthDay] AS Rechnungsdatum,
|
||||
tblIDSTransactionsNew.[YearMonthDay] AS Rechnungsdatum,
|
||||
SUM(tblIDSTransactionsNew.[TotalNetAmount]) AS Nettobetrag,
|
||||
SUM(tblIDSTransactionsNew.[VATAmount]) AS Steuerbetrag
|
||||
FROM
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ Public Class cRMC
|
||||
End If
|
||||
|
||||
|
||||
Dim SQLstr = "select Temp.KundenNr, Temp.Kundenname,Temp.LandKZ, Temp.Jahr, Temp.Quartal, sum(Temp.Betrag) as 'verrechneter Bearbeitungsbetrag', " & IIf(nurUnter50anzeigen, "50 - sum(Temp.Betrag) as Differenzbetrag", "") & " from (SELECT
|
||||
Dim SQLstr = "select Temp.KundenNr, Temp.Kundenname,Temp.LandKZ, Temp.Jahr, Temp.Quartal, sum(Temp.Betrag) as 'verrechneter Bearbeitungsbetrag' " & IIf(nurUnter50anzeigen, ", 50 - sum(Temp.Betrag) as Differenzbetrag", "") & " from (SELECT
|
||||
USTVA.UStVAn_KuNr as KundenNr,
|
||||
USTVA.UStVAn_Name as Kundenname,
|
||||
[Länderverzeichnis für die Außenhandelsstatistik].LandKz as LandKZ,
|
||||
|
||||
@@ -195,7 +195,7 @@ Public Class cTrdInvoice
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal, tblTrdinInvoice.UStVAn_ID, tblTrdinInvoice.FilialenNr
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal,(SteuerpflichtigerBetragLokal+SteuerfreierBetragLokal) as Nettobetrag , tblTrdinInvoice.UStVAn_ID, tblTrdinInvoice.FilialenNr
|
||||
FROM tblTrdinInvoice
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'" & IIf(Archiv, " ", " AND isnull(tblTrdinInvoice.UStVAn_ID,0) = 0 ") & "
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", conn)
|
||||
|
||||
@@ -1416,8 +1416,8 @@ Public Class cUTA
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand("SELECT [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland AS Rechnungsnummer,Adressen.AdressenNr as Kundennummer, [tblUTAImportNew].Kundennummer as KundennummerUTA,
|
||||
Sum([Gesamtbetrag_Brutto_in_Lieferlandwährung]-[Gesamtbetrag_Netto_in_Lieferlandwährung]) AS Umsatzsteuerbetrag_in_Lieferlandwährung, Lieferlandwährung_ISO,
|
||||
Sum([Gesamtbetrag_Brutto_in_Darstellwährung]-[Gesamtbetrag_Netto_in_Darstellwährung]) AS Umsatzsteuerbetrag_in_Darstellwährung, Darstellwährung_ISO, daId
|
||||
Sum([Gesamtbetrag_Netto_in_Lieferlandwährung]) AS Gesamtbetrag_Netto_in_Lieferlandwährung, Sum([Gesamtbetrag_Brutto_in_Lieferlandwährung]-[Gesamtbetrag_Netto_in_Lieferlandwährung]) AS Umsatzsteuerbetrag_in_Lieferlandwährung, Lieferlandwährung_ISO,
|
||||
Sum([Gesamtbetrag_Netto_in_Darstellwährung]) AS Gesamtbetrag_Netto_in_Darstellwährung, Sum([Gesamtbetrag_Brutto_in_Darstellwährung]-[Gesamtbetrag_Netto_in_Darstellwährung]) AS Umsatzsteuerbetrag_in_Darstellwährung, Darstellwährung_ISO, daId
|
||||
FROM [tblUTAImportNew] INNER JOIN Adressen ON [tblUTAImportNew].Kundennummer = Adressen.UTAKundenNr
|
||||
WHERE ([tblUTAImportNew].Rechnungsdatum Between '" & von.ToShortDateString & "' And '" & bis.ToShortDateString & "' AND [tblUTAImportNew].Lieferland_ISO2='" & LandKZ & "' AND [tblUTAImportNew].Lieferlandwährung_ISO='" & Wahrungscode & "' AND Adressen.AdressenNr=" & KundenNr & " AND charged = 1 " & IIf(Archiv, " ", " AND isnull(tblUTAImportNew.UStVAn_ID,0) = 0 ") & " )
|
||||
GROUP BY [tblUTAImportNew].Rechnungsdatum, [tblUTAImportNew].Rechnungsnummer_pro_Lieferland, Lieferlandwährung_ISO ,Darstellwährung_ISO,Adressen.AdressenNr,[tblUTAImportNew].Kundennummer, daId
|
||||
|
||||
@@ -1394,7 +1394,7 @@ Public Class cMSEAPI
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand("select * from ( select cust.[customer_id],bills.invoice_date, bills.invoice_number, bills.specification_page_name, trans.original_currency ,sum(USteuer_EUR) as UST_EUR, sum(original_vat_amount) as UST, inv.daId as daId
|
||||
Using cmd As New SqlCommand("select * from ( select cust.[customer_id],bills.invoice_date, bills.invoice_number, bills.specification_page_name, trans.original_currency ,sum(USteuer_EUR) as UST_EUR, sum(original_vat_amount) as UST, sum(original_net_amount) as NETTO, inv.daId as daId
|
||||
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||
left join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||
|
||||
Reference in New Issue
Block a user