Compare commits

14 Commits

Author SHA1 Message Date
a65e0b517d version 2026-02-10 16:46:47 +01:00
635351dadc cFakt, MSM-USTVA 2026-02-10 16:39:50 +01:00
1f24c3032a fakt 2026-02-10 11:27:48 +01:00
d279c89da0 fakt Wallner bei AMBAR als Verrechnung 2026-02-10 11:19:33 +01:00
3d6dbc5f07 version 2026-02-10 10:02:44 +01:00
345b0eff40 CBAM, USTVA, etc. 2026-02-10 09:14:53 +01:00
18f73c3c6f cFakt, etc. 2026-02-09 17:00:20 +01:00
908ee4ba2b MDM Ustva, etc. 2026-02-09 14:00:53 +01:00
2d0b21aacb ustva, etc. 2026-02-09 08:53:41 +01:00
6d7d37cf44 USTAV, Vatrefund 2026-02-06 16:53:04 +01:00
2e4278603a ro ustva 2026-02-06 15:03:29 +01:00
9f1092fc19 Fomulare, etc. 2026-02-06 09:36:22 +01:00
6262265a27 merge 2026-02-06 09:20:56 +01:00
c1e158eeb7 version, fakt, Formuale, Ubersicht, etc. 2026-02-06 09:19:49 +01:00
29 changed files with 1386 additions and 259 deletions

View File

@@ -1094,8 +1094,8 @@ Public Class cFakturierung
rpt.lblFirmenbuch.Text = If(FIRMA.Firma_Firmenbuch, "").ToString.Replace("Firmenbuch:", "").Trim
rpt.lblUID.Text = If(FIRMA.Firma_UID, "")
rpt.lblEORI.Text = If(FIRMA.Firma_EORI, "")
rpt.lblUID.Text = If(FIRMA.Firma_UID, "").ToString.Replace("UID: ", "").Trim
rpt.lblEORI.Text = If(FIRMA.Firma_EORI, "").ToString.Replace("EORI: ", "").Trim
'Für Vorschau:
If Buchungsjahr Is DBNull.Value Then Buchungsjahr = Now.Year
@@ -1450,7 +1450,10 @@ Public Class cFakturierung
rpt.lblLKWId.Text = If(Rechnung.AvisoID, "")
Dim sachbearbeiterAufRechnung = getSBRgName(Rechnung.Firma_ID, Rechnung.Sachbearbeiter)
rpt.lblSachbearbeiter.Text = IIf(sachbearbeiterAufRechnung = "Herr Ordu", "Verrechnung", sachbearbeiterAufRechnung) 'If(RECHNUNG.Sachbearbeiter, "")
rpt.lblSachbearbeiter.Text = IIf((sachbearbeiterAufRechnung = "Herr Ordu" Or sachbearbeiterAufRechnung = "Frau Wallner") And Rechnung.Firma_ID = 24, "Verrechnung", sachbearbeiterAufRechnung) 'AMBAR HALT---ohne Worte
'If(RECHNUNG.Sachbearbeiter, "")
rpt.txtAbsender.Text = If(Rechnung.AbsenderName_1, "") & " " & If(Rechnung.AbsenderName_2, "") & vbNewLine & If(Rechnung.AbsenderOrt, "").ToString.Trim
rpt.txtEmpfaenger.Text = If(Rechnung.EmpfängerName_1, "") & " " & If(Rechnung.EmpfängerName_2, "") & vbNewLine & If(Rechnung.EmpfängerOrt, "").ToString.Trim
@@ -2245,7 +2248,7 @@ Public Class cFakturierung
rpt.lblLKWId.Text = If(RECHNUNG.AvisoID, "")
Dim sachbearbeiterAufRechnung = getSBRgName(RECHNUNG.Firma_ID, RECHNUNG.Sachbearbeiter)
rpt.lblSachbearbeiter.Text = IIf(sachbearbeiterAufRechnung = "Herr Ordu", "Verrechnung", sachbearbeiterAufRechnung) 'If(RECHNUNG.Sachbearbeiter, "")
rpt.lblSachbearbeiter.Text = IIf((sachbearbeiterAufRechnung = "Herr Ordu" Or sachbearbeiterAufRechnung = "Frau Wallner") And RECHNUNG.Firma_ID = 24, "Verrechnung", sachbearbeiterAufRechnung) 'If(RECHNUNG.Sachbearbeiter, "")
If firma.Firma_ID = 4 Then
rpt.lblWarenWertUeberschrift.Visible = False
@@ -3889,12 +3892,12 @@ Public Class cFakturierung
Dim defaultMail = ""
Select Case firma
Case "AMBAR"
defaultMail = "import@ambarlog.de"
defaultMail = "import@ambarlog.com"
If useDepartmentmailadress Then
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "BH" Then defaultMail = "buchhaltung@ambarlog.de"
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "EXPORT" Then defaultMail = "office@ambarlog.de"
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "BH" Then defaultMail = "buchhaltung@ambarlog.com"
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "EXPORT" Then defaultMail = "office@ambarlog.com"
End If
If fakturierung Then defaultMail = "buchhaltung@ambarlog.de"
If fakturierung Then defaultMail = "buchhaltung@ambarlog.com"
End Select
Return defaultMail
@@ -5020,14 +5023,15 @@ Public Class cFakturierung
'rpt.lblAbfertigungsDatum.Text = RECHNUNG.Abfertigungsdatum.ToShortDateString
'rpt.lblLKWId.Text = If(RECHNUNG.AvisoID, "")
Dim sachbearbeiterAufRechnung = getSBRgName(Row("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, Row("Sachbearbeiter"), True)
rpt.lblSachbearbeiter.Text = IIf(sachbearbeiterAufRechnung = "Herr Ordu", "Verrechnung", sachbearbeiterAufRechnung) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - NEU
rpt.lblSachbearbeiter.Text = IIf((sachbearbeiterAufRechnung = "Herr Ordu" Or sachbearbeiterAufRechnung = "Frau Wallner") And Row("Firma_ID") = 24, "Verrechnung", sachbearbeiterAufRechnung) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - NEU
'rpt.lblSachbearbeiter.Text = getSBRgName(Firma.Firma_ID, VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben
rpt.lblFirmenbuch.Text = If(Firma.Firma_Firmenbuch, "").ToString.Replace("Firmenbuch: ", "").Trim
rpt.lblUID.Text = If(Firma.Firma_UID, "").ToString.Replace("UID: ", "").Trim
rpt.lblEORI.Text = If(Firma.Firma_EORI, "")
rpt.lblEORI.Text = If(Firma.Firma_EORI, "").ToString.Replace("EORI: ", "").Trim
rpt.txtKdAuftragsnummer.Text = If(Row("KdAuftragsNr") IsNot DBNull.Value, Row("KdAuftragsNr"), "")
@@ -5450,7 +5454,7 @@ Public Class cFakturierung
'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben
rpt.lblFirmenbuch.Text = If(Firma.Firma_Firmenbuch, "").ToString.Replace("Firmenbuch: ", "").Trim
rpt.lblUID.Text = If(Firma.Firma_UID, "").ToString.Replace("UID: ", "").Trim
rpt.lblEORI.Text = If(Firma.Firma_EORI, "")
rpt.lblEORI.Text = If(Firma.Firma_EORI, "").ToString.Replace("EORI: ", "").Trim
'rpt.txtKdAuftragsnummer.Text = If(Row("KdAuftragsNr") IsNot DBNull.Value, Row("KdAuftragsNr"), "")
@@ -5865,7 +5869,10 @@ Public Class cFakturierung
'rpt.lblAbfertigungsDatum.Text = RECHNUNG.Abfertigungsdatum.ToShortDateString
'rpt.lblLKWId.Text = If(RECHNUNG.AvisoID, "")
Dim sachbearbeiterAufRechnung = getSBRgName(ROW("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, ROW("Sachbearbeiter"), True)
rpt.lblSachbearbeiter.Text = IIf(sachbearbeiterAufRechnung = "Herr Ordu", "Verrechnung", sachbearbeiterAufRechnung) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - NEU
rpt.lblSachbearbeiter.Text = IIf((sachbearbeiterAufRechnung = "Herr Ordu" Or sachbearbeiterAufRechnung = "Frau Wallner") And ROW("Firma_ID") = 24, "Verrechnung", sachbearbeiterAufRechnung) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - NEU
'rpt.lblSachbearbeiter.Text = getSBRgName(ROW("Firma_ID"), VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME) 'könnten ja mehrerer SB die Rg-Anlagen geschreiben haben - ALT

View File

@@ -561,7 +561,7 @@ Public Class frmFaktEmail
If accountToSent <> "" Then
If outl.Session.Accounts.Count > 0 Then
For Each oAccount In outl.Session.Accounts
If oAccount.SmtpAddress = accountToSent Then
If oAccount.SmtpAddress.ToLower = accountToSent.ToLower Then
Mail.SendUsingAccount = oAccount
Exit For
End If
@@ -645,7 +645,7 @@ Public Class frmFaktEmail
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
Try
Mail.SentOnBehalfOfName = "buchhaltung@ambarlog.de"
Mail.SentOnBehalfOfName = "buchhaltung@ambarlog.com"
Catch ex2 As Exception
MsgBox(ex2.Message)
End Try
@@ -783,7 +783,7 @@ Public Class frmFaktEmail
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
Try
Mail.SentOnBehalfOfName = "buchhaltung@ambarlog.de"
Mail.SentOnBehalfOfName = "buchhaltung@ambarlog.com"
Catch ex2 As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex2.Message, ex2.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try

View File

@@ -3989,7 +3989,7 @@ Nächste_Textzeile_lesen:
' RECHNUNG.DruckDatumZeit
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
If Not checkUIDNR() Then Exit Sub
getValues()
'getValues()
If RECHNUNG.Rechnungsart = "PROFORMA" And RECHNUNG.Sammelrechnung <> "0" Then MsgBox("Proforma-Rechnung nur bei Einzelrechnung möglich!") : Exit Sub
If RECHNUNG.Sammelrechnung <> "0" Then MsgBox("Nur bei Einzelrechnung möglich!") : Exit Sub
If RECHNUNG.Status <> 0 OrElse vbYes = MsgBox("Möchten Sie das PDF erstellen?" & vbNewLine & "Es wird eine Rechnungsnummer vergeben, die Rechnung gilt somit als gedruckt und kann nicht mehr bearbeitet werden.", vbYesNoCancel) Then
@@ -4004,7 +4004,7 @@ Nächste_Textzeile_lesen:
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
getValues()
'getValues()
If RECHNUNG.Sammelrechnung <> "0" Then MsgBox("Nur bei Einzelrechnung möglich!") : Exit Sub
If RECHNUNG.Status <> 0 OrElse vbYes = MsgBox("Möchten Sie die Rechnung drucken?" & vbNewLine & "Es wird eine Rechnungsnummer vergeben, die Rechnung kann nicht mehr bearbeitet werden.", vbYesNoCancel) Then
If RECHNUNG.Status <> 0 OrElse saveMe() Then
@@ -4052,7 +4052,7 @@ Nächste_Textzeile_lesen:
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click, Button16.Click
If Not checkUIDNR() Then Exit Sub
getValues()
'getValues()
If RECHNUNG.Sammelrechnung <> "0" Then MsgBox("Nur bei Einzelrechnung möglich!") : Exit Sub
If RECHNUNG.Status <> 0 OrElse saveMe() Then
' Anhänge sichern, falls geändert

View File

@@ -46,7 +46,9 @@ Public Class subRptLaufzettelZollDE_Vorpapier
picBarcodeMRN.Location = New PointF(picBarcodeMRN.Location.X - 0.5, picBarcodeMRN.Location.Y)
ATAMRN = "(" & ATAMRN & ")"
txtATAMRN.Font = New Document.Drawing.Font("Microsoft Sans Serif", 10, GrapeCity.ActiveReports.Document.Drawing.FontStyle.Regular) ' kleiner schreiben
txtATAMRN.Font = New GrapeCity.ActiveReports.Document.Drawing.Font("Microsoft Sans Serif", 10, GrapeCity.ActiveReports.Document.Drawing.FontStyle.Regular) ' kleiner schreiben
End If
End If
Catch ex As Exception

View File

@@ -53,8 +53,10 @@ Partial Class usrcntlVollmacht_DE_indirekt
Me.cboSprache = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cbxEinmaligeVollmachtCarnetATA = New System.Windows.Forms.CheckBox()
Me.txtEinmalig_CarnetATA = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtVmDat = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.datDatum = New System.Windows.Forms.DateTimePicker()
Me.txtOrt = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label9 = New System.Windows.Forms.Label()
Me.cbxDatum = New System.Windows.Forms.CheckBox()
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
@@ -526,37 +528,57 @@ Partial Class usrcntlVollmacht_DE_indirekt
Me.txtEinmalig_CarnetATA.Size = New System.Drawing.Size(174, 20)
Me.txtEinmalig_CarnetATA.TabIndex = 34
'
'txtVmDat
'datDatum
'
Me.txtVmDat._DateTimeOnly = False
Me.txtVmDat._numbersOnly = False
Me.txtVmDat._numbersOnlyKommastellen = ""
Me.txtVmDat._numbersOnlyTrennzeichen = True
Me.txtVmDat._Prozent = False
Me.txtVmDat._ShortDateNew = False
Me.txtVmDat._ShortDateOnly = False
Me.txtVmDat._TimeOnly = False
Me.txtVmDat._TimeOnly_Seconds = False
Me.txtVmDat._value = Nothing
Me.txtVmDat._Waehrung = False
Me.txtVmDat._WaehrungZeichen = True
Me.txtVmDat.ForeColor = System.Drawing.Color.Black
Me.txtVmDat.Location = New System.Drawing.Point(47, 165)
Me.txtVmDat.MaxLineLength = -1
Me.txtVmDat.MaxLines_Warning = ""
Me.txtVmDat.MaxLines_Warning_Label = Nothing
Me.txtVmDat.Name = "txtVmDat"
Me.txtVmDat.Size = New System.Drawing.Size(89, 20)
Me.txtVmDat.TabIndex = 35
Me.datDatum.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.datDatum.Location = New System.Drawing.Point(868, 206)
Me.datDatum.Name = "datDatum"
Me.datDatum.Size = New System.Drawing.Size(95, 20)
Me.datDatum.TabIndex = 69
'
'txtOrt
'
Me.txtOrt._DateTimeOnly = False
Me.txtOrt._numbersOnly = False
Me.txtOrt._numbersOnlyKommastellen = ""
Me.txtOrt._numbersOnlyTrennzeichen = True
Me.txtOrt._Prozent = False
Me.txtOrt._ShortDateNew = False
Me.txtOrt._ShortDateOnly = False
Me.txtOrt._TimeOnly = False
Me.txtOrt._TimeOnly_Seconds = False
Me.txtOrt._value = Nothing
Me.txtOrt._Waehrung = False
Me.txtOrt._WaehrungZeichen = True
Me.txtOrt.ForeColor = System.Drawing.Color.Black
Me.txtOrt.Location = New System.Drawing.Point(687, 205)
Me.txtOrt.MaxLineLength = -1
Me.txtOrt.MaxLines_Warning = ""
Me.txtOrt.MaxLines_Warning_Label = Nothing
Me.txtOrt.Name = "txtOrt"
Me.txtOrt.Size = New System.Drawing.Size(109, 20)
Me.txtOrt.TabIndex = 67
'
'Label9
'
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(44, 149)
Me.Label9.Location = New System.Drawing.Point(650, 212)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(88, 13)
Me.Label9.TabIndex = 36
Me.Label9.Text = "Vollmacht-datum:"
Me.Label9.Size = New System.Drawing.Size(24, 13)
Me.Label9.TabIndex = 66
Me.Label9.Text = "Ort:"
'
'cbxDatum
'
Me.cbxDatum.AutoSize = True
Me.cbxDatum.Checked = True
Me.cbxDatum.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxDatum.Location = New System.Drawing.Point(808, 208)
Me.cbxDatum.Name = "cbxDatum"
Me.cbxDatum.Size = New System.Drawing.Size(60, 17)
Me.cbxDatum.TabIndex = 120
Me.cbxDatum.Text = "Datum:"
Me.cbxDatum.UseVisualStyleBackColor = True
'
'usrcntlVollmacht_DE_indirekt
'
@@ -564,8 +586,10 @@ Partial Class usrcntlVollmacht_DE_indirekt
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.WhiteSmoke
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Controls.Add(Me.cbxDatum)
Me.Controls.Add(Me.datDatum)
Me.Controls.Add(Me.txtOrt)
Me.Controls.Add(Me.Label9)
Me.Controls.Add(Me.txtVmDat)
Me.Controls.Add(Me.txtEinmalig_CarnetATA)
Me.Controls.Add(Me.cbxEinmaligeVollmachtCarnetATA)
Me.Controls.Add(Me.Label12)
@@ -598,7 +622,7 @@ Partial Class usrcntlVollmacht_DE_indirekt
Me.Controls.Add(Me.txtFirma)
Me.Controls.Add(Me.lbl)
Me.Name = "usrcntlVollmacht_DE_indirekt"
Me.Size = New System.Drawing.Size(1000, 202)
Me.Size = New System.Drawing.Size(1000, 229)
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -635,6 +659,8 @@ Partial Class usrcntlVollmacht_DE_indirekt
Friend WithEvents cboSprache As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cbxEinmaligeVollmachtCarnetATA As System.Windows.Forms.CheckBox
Friend WithEvents txtEinmalig_CarnetATA As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents txtVmDat As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents datDatum As DateTimePicker
Friend WithEvents txtOrt As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label9 As Label
Friend WithEvents cbxDatum As CheckBox
End Class

View File

@@ -1961,7 +1961,28 @@ Public Class FormularManagerNEU
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.txtFax.Text, 119, 74, 70, 6, "bold", 10, , itextsharp.text.Element.ALIGN_LEFT))
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.txtEmail.Text, 40, 80, 90, 6, "bold", 8, , iTextSharp.text.Element.ALIGN_LEFT))
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.txtVmDat.Text, 25, 260, 90, 6, "bold", 8, , iTextSharp.text.Element.ALIGN_LEFT))
'listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.txtVmDat.Text, 25, 260, 90, 6, "bold", 8, , iTextSharp.text.Element.ALIGN_LEFT))
Dim dat As Date = Now
If usrCntl.txtOrt.Text <> "" Then
If (IsDate(usrCntl.datDatum.Text)) AndAlso usrCntl.cbxDatum.Checked Then
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.txtOrt.Text & ", " & usrCntl.datDatum.Text, 20, 269, 90, 6, "bold", 8, , itextsharp.text.Element.ALIGN_LEFT))
End If
Else
If (IsDate(usrCntl.datDatum.Text)) AndAlso usrCntl.cbxDatum.Checked Then
dat = CDate(usrCntl.datDatum.Value)
listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues(usrCntl.datDatum.Text, 50, 269, 90, 6, "bold", 8, , itextsharp.text.Element.ALIGN_LEFT))
End If
End If
Dim top = 0
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
@@ -1974,11 +1995,6 @@ Public Class FormularManagerNEU
listTowrite = addEinmaligeVMCarnetATA(listTowrite, 0, top + 220, usrCntl.cboSprache._value, usrCntl.txtEinmalig_CarnetATA.Text, "")
End If
Dim dat As Date = Now
If IsDate(usrCntl.txtVmDat.Text) Then
dat = CDate(usrCntl.txtVmDat.Text)
End If
If dat < CDate("01.01.2023") Then

View File

@@ -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

View File

@@ -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>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.5.1.9")>
<Assembly: AssemblyFileVersion("1.5.1.9")>
<Assembly: AssemblyVersion("1.5.2.5")>
<Assembly: AssemblyFileVersion("1.5.2.5")>

View File

@@ -190,6 +190,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property ambar_boarder_new() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("ambar_boarder_new", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>

View File

@@ -970,4 +970,7 @@
<data name="zauberstab" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zauberstab.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ambar_boarder_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ambar_boarder_new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -1275,6 +1275,7 @@
<Compile Include="mdm\PLOSE\rptPLOSE_Konsortium.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="USTV\VATRefund.vb" />
<Compile Include="USTV\usrCntlUSTV.Designer.vb">
<DependentUpon>usrCntlUSTV.vb</DependentUpon>
</Compile>
@@ -5327,6 +5328,9 @@
<None Include="Resources\ambar_boarder1.jpg" />
<None Include="Resources\ambar_boarder.jpg" />
<None Include="Resources\aeo_CS.jpg" />
<None Include="Resources\ambar_boarder_new.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="Resources\food.png" />
<None Include="Resources\food1.png" />
<None Include="Resources\food2.png" />

374
SDL/USTV/VATRefund.vb Normal file
View File

@@ -0,0 +1,374 @@
Imports Chilkat
'=========================
' HAUFENKLASSEN
'=========================
Public Class VATRefundApplication
Public Property CodF1 As FormInfo
Public Property RefundPeriod As Period
Public Property ApplicationReference As ApplicationReference
Public Property ProrateAdjustment As ProrateAdjustment
Public Property Applicant As Party
Public Property BusinessDescription As BusinessDescription
Public Property Representative As Party
Public Property DetailedBankAccount As BankAccount
Public Property PurchaseInformation As PurchaseInformation
Public Property ImportInformation As ImportInformation
Public Property DocumentCopy As List(Of DocumentCopy)
Public Property NumberOfDocuments As NumberOfDocuments
Public Property ApplicantSignature As Signature
Public Sub New()
DocumentCopy = New List(Of DocumentCopy)()
PurchaseInformation = New PurchaseInformation()
ImportInformation = New ImportInformation()
End Sub
'=========================
' Methode um das XML zu erzeugen
'=========================
Public Function ToXml() As Xml
Dim xml As New Xml
xml.Tag = "VATRefundApplication"
xml.AddAttribute("xmlns:xfa", "http://www.xfa.org/schema/xfa-data/1.0/")
' FormInfo
xml.UpdateChildContent("codF1|formType", CodF1.FormType)
xml.UpdateChildContentInt("codF1|formId", CodF1.FormId)
xml.UpdateChildContent("codF1|universalCode", CodF1.UniversalCode)
' RefundPeriod
xml.UpdateChildContentInt("RefundPeriod|StartDate", RefundPeriod.StartDate)
xml.UpdateChildContentInt("RefundPeriod|EndDate", RefundPeriod.EndDate)
' ApplicationReference
With ApplicationReference
xml.UpdateChildContentInt("ApplicationReference|Year", .Year)
xml.UpdateChildContent("ApplicationReference|RefundingCountryCode", .RefundingCountryCode)
xml.UpdateChildContent("ApplicationReference|Language", .Language)
xml.UpdateChildContent("ApplicationReference|Currency", .Currency)
xml.UpdateChildContentInt("ApplicationReference|ApplicationType", .ApplicationType)
xml.UpdateChildContent("ApplicationReference|ReferenceNumber", .ReferenceNumber)
xml.UpdateChildContentInt("ApplicationReference|Annual", .Annual)
xml.UpdateChildContentInt("ApplicationReference|an_r", .an_r)
xml.UpdateChildContentInt("ApplicationReference|d_rec", .d_rec)
xml.UpdateChildContentInt("ApplicationReference|luna_r", .luna_r)
xml.UpdateChildContentInt("ApplicationReference|cif", .cif)
xml.UpdateChildContentInt("ApplicationReference|totalPlata_A", .totalPlata_A)
End With
' ProrateAdjustment
xml.UpdateChildContent("ProrateAdjustment|Year", ProrateAdjustment.Year)
xml.UpdateChildContent("ProrateAdjustment|FinalProrate", ProrateAdjustment.FinalProrate)
' Applicant
UpdatePartyXml(xml, "Applicant", Applicant)
' BusinessDescription
With BusinessDescription
xml.UpdateChildContentInt("BusinessDescription|d_caen", .d_caen)
xml.UpdateChildContent("BusinessDescription|CAEN", .CAEN)
xml.UpdateChildContentInt("BusinessDescription|BusinessActivity", .BusinessActivity)
End With
' Representative
UpdatePartyXml(xml, "Representative", Representative)
' DetailedBankAccount
With DetailedBankAccount
xml.UpdateChildContent("DetailedBankAccount|Total", .Total)
xml.UpdateChildContent("DetailedBankAccount|Currency", .Currency)
xml.UpdateChildContentInt("DetailedBankAccount|OwnerType", .OwnerType)
xml.UpdateChildContent("DetailedBankAccount|OwnerName", .OwnerName)
xml.UpdateChildContent("DetailedBankAccount|IBAN", .IBAN)
xml.UpdateChildContent("DetailedBankAccount|BIC", .BIC)
End With
' PurchaseInformation
For i As Integer = 0 To PurchaseInformation.Invoices.Count - 1
Dim inv = PurchaseInformation.Invoices(i)
Dim path = $"PurchaseInformation|Invoice[{i}]"
xml.UpdateChildContentInt($"{path}|SequenceNumber", inv.SequenceNumber)
xml.UpdateChildContentInt($"{path}|simplifiedInvoice", inv.SimplifiedInvoice)
xml.UpdateChildContent($"{path}|ReferenceNumber", inv.ReferenceNumber)
xml.UpdateChildContent($"{path}|IssuingDate", inv.IssuingDate)
' GoodsDescription
UpdateGoodsDescriptionXml(xml, $"{path}|GoodsDescription", inv.GoodsDescription)
' TransactionDescription
If inv.TransactionDescription IsNot Nothing Then
xml.UpdateChildContent($"{path}|TransactionDescription|TaxableAmount", inv.TransactionDescription.TaxableAmount)
xml.UpdateChildContent($"{path}|TransactionDescription|VATAmount", inv.TransactionDescription.VATAmount)
End If
' Deduction
If inv.Deduction IsNot Nothing Then
xml.UpdateChildContent($"{path}|Deduction|ProRataRate", inv.Deduction.ProRataRate)
xml.UpdateChildContent($"{path}|Deduction|DeductibleVATAmount", inv.Deduction.DeductibleVATAmount)
End If
' EUSupplier
If inv.EUSupplier IsNot Nothing Then
' UpdatePartyXml(xml, $"{path}|EUSupplier", inv.EUSupplier)
UpdateEUSupplierXml(xml, $"{path}|EUSupplier", inv.EUSupplier)
End If
Next
' ImportInformation
For i As Integer = 0 To ImportInformation._Imports.Count - 1
Dim imp = ImportInformation._Imports(i)
Dim path = $"ImportInformation|Import[{i}]"
xml.UpdateChildContentInt($"{path}|SequenceNumber", imp.SequenceNumber)
xml.UpdateChildContent($"{path}|ReferenceNumber", imp.ReferenceNumber)
xml.UpdateChildContent($"{path}|IssuingDate", imp.IssuingDate)
' xml.UpdateChildContent($"{path}|ReferenceInformation", imp.ReferenceInformation)
UpdateGoodsDescriptionXml(xml, $"{path}|GoodsDescription", imp.GoodsDescription)
If imp.TransactionDescription IsNot Nothing Then
xml.UpdateChildContent($"{path}|TransactionDescription|TaxableAmount", imp.TransactionDescription.TaxableAmount)
xml.UpdateChildContent($"{path}|TransactionDescription|VATAmount", imp.TransactionDescription.VATAmount)
End If
If imp.Deduction IsNot Nothing Then
xml.UpdateChildContent($"{path}|Deduction|ProRataRate", imp.Deduction.ProRataRate)
xml.UpdateChildContent($"{path}|Deduction|DeductibleVATAmount", imp.Deduction.DeductibleVATAmount)
End If
If imp.EUSupplier IsNot Nothing Then
UpdatePartyXml(xml, $"{path}|Supplier", imp.EUSupplier)
End If
Next
' DocumentCopy
For i As Integer = 0 To DocumentCopy.Count - 1
Dim doc = DocumentCopy(i)
Dim path = $"DocumentCopy{i + 1}"
xml.UpdateChildContentInt($"{path}|Bifa_atasament", doc.Bifa_atasament)
xml.UpdateChildContent($"{path}|Document|FileName", doc.Document.FileName)
xml.UpdateChildContent($"{path}|Document|FileType", doc.Document.FileType)
xml.UpdateChildContent($"{path}|Document|FileDescription", doc.Document.FileDescription)
Next
' NumberOfDocuments
With NumberOfDocuments
xml.UpdateChildContentInt("NumberOfDocuments|AtachatedFiles", .AtachatedFiles)
xml.UpdateChildContentInt("NumberOfDocuments|PurchaseOrders", .PurchaseOrders)
xml.UpdateChildContentInt("NumberOfDocuments|ImportOrders", .ImportOrders)
End With
' ApplicantSignature
xml.UpdateChildContent("ApplicantSignature|NameFree", ApplicantSignature.NameFree)
xml.UpdateChildContent("ApplicantSignature|Position", ApplicantSignature.Position)
Return xml
End Function
'=========================
' Hilfsmethode: Party in XML
'=========================
Private Sub UpdatePartyXml(xml As Xml, path As String, party As Party)
xml.UpdateChildContent($"{path}|NameFree", party.NameFree)
xml.UpdateChildContent($"{path}|VATIdentificationNumber", party.VATIdentificationNumber)
xml.UpdateChildContent($"{path}|AddressFree", party.AddressFree)
xml.UpdateChildContent($"{path}|PostCode", party.PostCode)
xml.UpdateChildContent($"{path}|Phone", party.Phone)
xml.UpdateChildContent($"{path}|EmailAddress", party.EmailAddress)
xml.UpdateChildContent($"{path}|CountryCode", party.CountryCode)
xml.UpdateChildContent($"{path}|RepresentativeID", party.RepresentativeID)
xml.UpdateChildContent($"{path}|identificationType", party.IdentificationType)
End Sub
Private Sub UpdateEUSupplierXml(xml As Xml, path As String, party As Party)
xml.UpdateChildContent($"{path}|NameFree", party.NameFree)
xml.UpdateChildContent($"{path}|AddressFree", party.AddressFree)
xml.UpdateChildContent($"{path}|PostCode", party.PostCode)
xml.UpdateChildContent($"{path}|Phone", party.Phone)
xml.UpdateChildContent($"{path}|EmailAddress", party.EmailAddress)
xml.UpdateChildContent($"{path}|CountryCode", party.CountryCode)
xml.UpdateChildContent($"{path}|RepresentativeID", party.RepresentativeID)
xml.UpdateChildContent($"{path}|identificationType", party.IdentificationType)
' 👇 VAT ONLY HERE
If Not String.IsNullOrWhiteSpace(party.VATIdentificationNumber) Then
xml.UpdateChildContent(
$"{path}|EUTraderID|VATIdentificationNumber",
party.VATIdentificationNumber)
End If
End Sub
Private Sub UpdateGoodsDescriptionXml(
xml As Chilkat.Xml,
parentPath As String,
goodsDesc As GoodsDescription)
If goodsDesc Is Nothing OrElse goodsDesc.GoodsItem Is Nothing Then Exit Sub
xml.UpdateChildContent(parentPath, "")
For i As Integer = 0 To goodsDesc.GoodsItem.Count - 1
Dim item = goodsDesc.GoodsItem(i)
Dim basePath = $"{parentPath}|GoodsItem[{i}]"
xml.UpdateChildContentInt($"{basePath}|Code", item.Code)
xml.UpdateChildContent($"{basePath}|SubCode", item.SubCode)
xml.UpdateChildContent($"{basePath}|FreeText", item.FreeText)
Next
End Sub
Private Function EnsureNode(xml As Chilkat.Xml, path As String) As Chilkat.Xml
Dim parts() As String = path.Split("|"c)
Dim current As Chilkat.Xml = xml
For Each part As String In parts
Dim node As Chilkat.Xml = current.FirstChild
Dim found As Boolean = False
While Not node Is Nothing
If node.Tag = part Then
current = node
found = True
Exit While
End If
node = node.NextSibling
End While
' If node not found, create it
If Not found Then
current = current.NewChild(part, "")
End If
Next
Return current
End Function
End Class
'=========================
' UNTERKLASSEN
'=========================
Public Class FormInfo
Public Property FormType As String
Public Property FormId As Integer
Public Property UniversalCode As String
End Class
Public Class Period
Public Property StartDate As Integer
Public Property EndDate As Integer
End Class
Public Class ApplicationReference
Public Property Year As Integer
Public Property RefundingCountryCode As String
Public Property Language As String
Public Property Currency As String
Public Property ApplicationType As Integer
Public Property ReferenceNumber As String
Public Property Annual As Integer
Public Property an_r As Integer
Public Property d_rec As Integer
Public Property luna_r As Integer
Public Property cif As Integer
Public Property totalPlata_A As Integer
End Class
Public Class ProrateAdjustment
Public Property Year As String
Public Property FinalProrate As String
End Class
Public Class Party
Public Property NameFree As String
Public Property VATIdentificationNumber As String
Public Property AddressFree As String
Public Property PostCode As String
Public Property Phone As String
Public Property EmailAddress As String
Public Property CountryCode As String
Public Property RepresentativeID As String
Public Property IdentificationType As String
End Class
Public Class BusinessDescription
Public Property d_caen As Integer
Public Property CAEN As String
Public Property BusinessActivity As Integer
End Class
Public Class BankAccount
Public Property Total As Decimal
Public Property Currency As String
Public Property OwnerType As Integer
Public Property OwnerName As String
Public Property IBAN As String
Public Property BIC As String
End Class
Public Class PurchaseInformation
Public Property Invoices As List(Of Invoice) = New List(Of Invoice)
End Class
Public Class Invoice
Public Property SequenceNumber As Integer
Public Property SimplifiedInvoice As Integer
Public Property ReferenceNumber As String
Public Property IssuingDate As String
Public Property GoodsDescription As GoodsDescription
Public Property TransactionDescription As TransactionDescription
Public Property Deduction As Deduction
Public Property EUSupplier As Party
End Class
Public Class GoodsDescription
Public Property GoodsItem As List(Of GoodsItem)
End Class
Public Class GoodsItem
Public Property Code As Integer
Public Property SubCode As String
Public Property FreeText As String
End Class
Public Class TransactionDescription
Public Property TaxableAmount As String
Public Property VATAmount As String
End Class
Public Class Deduction
Public Property ProRataRate As String
Public Property DeductibleVATAmount As String
End Class
Public Class ImportInformation
Public Property _Imports As List(Of Invoice) = New List(Of Invoice)
End Class
Public Class DocumentCopy
Public Property Bifa_atasament As Integer
Public Property Document As DocumentFile
End Class
Public Class DocumentFile
Public Property FileName As String
Public Property FileType As String
Public Property FileDescription As String
End Class
Public Class NumberOfDocuments
Public Property AtachatedFiles As Integer
Public Property PurchaseOrders As Integer
Public Property ImportOrders As Integer
End Class
Public Class Signature
Public Property NameFree As String
Public Property Position As String
End Class

View File

@@ -24,9 +24,11 @@ Partial Class frmMDM_USTVAntrag
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag))
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.pnlBottom = New System.Windows.Forms.Panel()
Me.pbXMLExport = New System.Windows.Forms.PictureBox()
Me.btnRMCQuartal = New System.Windows.Forms.Button()
Me.Label18 = New System.Windows.Forms.Label()
Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.pbMail = New System.Windows.Forms.PictureBox()
@@ -144,8 +146,8 @@ Partial Class frmMDM_USTVAntrag
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.btnRMCQuartal = New System.Windows.Forms.Button()
Me.pnlBottom.SuspendLayout()
CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.pb_Beleg, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -176,6 +178,7 @@ Partial Class frmMDM_USTVAntrag
'
Me.pnlBottom.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.pnlBottom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlBottom.Controls.Add(Me.pbXMLExport)
Me.pnlBottom.Controls.Add(Me.btnRMCQuartal)
Me.pnlBottom.Controls.Add(Me.Label18)
Me.pnlBottom.Controls.Add(Me.txtSumme)
@@ -198,6 +201,30 @@ Partial Class frmMDM_USTVAntrag
Me.pnlBottom.Size = New System.Drawing.Size(1444, 100)
Me.pnlBottom.TabIndex = 3
'
'pbXMLExport
'
Me.pbXMLExport.Image = Global.SDL.My.Resources.Resources.xml
Me.pbXMLExport.Location = New System.Drawing.Point(1203, 10)
Me.pbXMLExport.Name = "pbXMLExport"
Me.pbXMLExport.Size = New System.Drawing.Size(35, 35)
Me.pbXMLExport.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.pbXMLExport.TabIndex = 56
Me.pbXMLExport.TabStop = False
Me.pbXMLExport.Visible = False
'
'btnRMCQuartal
'
Me.btnRMCQuartal.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRMCQuartal.ForeColor = System.Drawing.Color.Black
Me.btnRMCQuartal.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnRMCQuartal.Location = New System.Drawing.Point(752, 17)
Me.btnRMCQuartal.Name = "btnRMCQuartal"
Me.btnRMCQuartal.Size = New System.Drawing.Size(103, 39)
Me.btnRMCQuartal.TabIndex = 55
Me.btnRMCQuartal.Text = "RMC Quartal"
Me.btnRMCQuartal.UseVisualStyleBackColor = True
Me.btnRMCQuartal.Visible = False
'
'Label18
'
Me.Label18.AutoSize = True
@@ -236,7 +263,7 @@ Partial Class frmMDM_USTVAntrag
'pbMail
'
Me.pbMail.Image = CType(resources.GetObject("pbMail.Image"), System.Drawing.Image)
Me.pbMail.Location = New System.Drawing.Point(1097, 8)
Me.pbMail.Location = New System.Drawing.Point(1080, 8)
Me.pbMail.Name = "pbMail"
Me.pbMail.Size = New System.Drawing.Size(35, 35)
Me.pbMail.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
@@ -305,7 +332,7 @@ Partial Class frmMDM_USTVAntrag
'picExcel
'
Me.picExcel.Image = CType(resources.GetObject("picExcel.Image"), System.Drawing.Image)
Me.picExcel.Location = New System.Drawing.Point(1145, 8)
Me.picExcel.Location = New System.Drawing.Point(1121, 8)
Me.picExcel.Name = "picExcel"
Me.picExcel.Size = New System.Drawing.Size(35, 35)
Me.picExcel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
@@ -327,7 +354,7 @@ Partial Class frmMDM_USTVAntrag
'picPDF
'
Me.picPDF.Image = CType(resources.GetObject("picPDF.Image"), System.Drawing.Image)
Me.picPDF.Location = New System.Drawing.Point(1198, 8)
Me.picPDF.Location = New System.Drawing.Point(1162, 10)
Me.picPDF.Name = "picPDF"
Me.picPDF.Size = New System.Drawing.Size(35, 35)
Me.picPDF.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
@@ -1534,8 +1561,8 @@ Partial Class frmMDM_USTVAntrag
Me.dgvUSTVPositionen.AKTUALISIERUNGS_INTERVALL = 500
Me.dgvUSTVPositionen.AllowUserToAddRows = False
Me.dgvUSTVPositionen.AllowUserToDeleteRows = False
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
Me.dgvUSTVPositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1696,8 +1723,8 @@ Partial Class frmMDM_USTVAntrag
Me.dgvErstattungspositionen.AKTUALISIERUNGS_INTERVALL = 500
Me.dgvErstattungspositionen.AllowUserToAddRows = False
Me.dgvErstattungspositionen.AllowUserToDeleteRows = False
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
Me.dgvErstattungspositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1850,19 +1877,6 @@ Partial Class frmMDM_USTVAntrag
Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen"
Me.FakturiertToolStripMenuItem.Visible = False
'
'btnRMCQuartal
'
Me.btnRMCQuartal.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRMCQuartal.ForeColor = System.Drawing.Color.Black
Me.btnRMCQuartal.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnRMCQuartal.Location = New System.Drawing.Point(752, 17)
Me.btnRMCQuartal.Name = "btnRMCQuartal"
Me.btnRMCQuartal.Size = New System.Drawing.Size(103, 39)
Me.btnRMCQuartal.TabIndex = 55
Me.btnRMCQuartal.Text = "RMC Quartal"
Me.btnRMCQuartal.UseVisualStyleBackColor = True
Me.btnRMCQuartal.Visible = False
'
'frmMDM_USTVAntrag
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -1878,6 +1892,7 @@ Partial Class frmMDM_USTVAntrag
Me.Text = "USTV Antrag"
Me.pnlBottom.ResumeLayout(False)
Me.pnlBottom.PerformLayout()
CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.pbMail, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.pb_Beleg, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).EndInit()
@@ -2031,4 +2046,5 @@ Partial Class frmMDM_USTVAntrag
Friend WithEvents Label18 As Label
Friend WithEvents txtSumme As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents btnRMCQuartal As Button
Friend WithEvents pbXMLExport As PictureBox
End Class

View File

@@ -1,8 +1,6 @@
Imports System.IO
Imports System.Reflection
Imports System.Windows.Documents
Imports com.sun.crypto.provider
Imports GrapeCity.SpreadBuilder
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"
@@ -607,6 +608,8 @@ Public Class frmMDM_USTVAntrag
End If
pbXMLExport.Visible = setXMLExportVisible(USTV_ANTRAG.UStVAn_LandKz)
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
btnAntrageeinarbeiten.Enabled = False
@@ -645,7 +648,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 +732,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 +759,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 +772,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 +929,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 +939,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 +974,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 +986,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 +1072,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 +1099,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 +1117,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 +1184,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 +1197,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 +1234,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,20 +1246,35 @@ 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
leistender= New cUStVLeistender("MS Europe BV")
If leistender.UStV_LeistenderId < 1 Then
leistender = New cUStVLeistender("MS Europe BV")
End If
USTV_POS.UStVPo_Leistender = leistender.UStV_Leistender.ToString
@@ -1188,12 +1300,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 +1338,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 +1357,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 IsNumeric(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 IsNumeric(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 +1415,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 +1446,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 +1469,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 +1545,27 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
USTV_POS.UStVPo_USteuerbetrag = UST_org
End If
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
'tblUStVPositionen
End If
ElseIf USTVA_Nettobetragchanged Then
updateNettobetrag(USTV_POS.UStVPo_ReNr, USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_SchnittstellenNr, USTV_POS)
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 +3063,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
@@ -3919,7 +4044,7 @@ Public Class frmMDM_USTVAntrag
End If
Return ""
Return ""
End Function
@@ -3944,6 +4069,351 @@ Return ""
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles pbXMLExport.Click
Me.Cursor = Cursors.WaitCursor
If dgvUSTVPositionen.SelectedRows.Count = 0 Then Exit Sub
Try
Dim dtInvoices As New DataTable
Dim FIRMA As New cFirmen(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID)
Dim ADR As New cAdressen(USTV_ANTRAG.UStVAn_KuNr)
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
Dim KUNDE_ERW As New cKundenErweitert(USTV_ANTRAG.UStVAn_KuNr)
Dim BANK_OWNER As String = ""
Dim BANK_IBAN As String = ""
Dim BANK_BIC As String = ""
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"
Dim saveDialog As New SaveFileDialog() With {
.Title = "XML-Datei speichern",
.Filter = "XML-Dateien (*.xml)|*.xml|Alle Dateien (*.*)|*.*",
.DefaultExt = "xml",
.AddExtension = True,
.FileName = fileName,
.OverwritePrompt = True
}
If saveDialog.ShowDialog() = DialogResult.OK Then
filePath = saveDialog.FileName
Else
Me.Cursor = Cursors.Default
Exit Sub
End If
Dim fullFilePath As String = saveDialog.FileName
Dim directoryPath As String = Path.GetDirectoryName(fullFilePath)
If Not Directory.Exists(directoryPath) Then
Directory.CreateDirectory(directoryPath)
End If
Select Case Antrag_LandKz
Case "AT", "DE", "CZ", "BE", "SI"
BANK_OWNER = FIRMA.Firma_Bez
BANK_IBAN = FIRMA.Firma_IBAN1
BANK_BIC = FIRMA.Firma_BIC1
Case Else
'Bank aus Kunden!
Dim dtBank As New DataTable
dtBank = SQL.loadDgvBySql("SELECT isnull(bnk_name,'') as bnk_name ,bnk_anschrift,ISNULL(bnk_iban,'') as bnk_iban,ISNULL(bnk_bic,'') as bnk_bic FROM [tblBankverbindungen] WHERE isnull(bnk_hauptkonto,0) = 0 and bnk_archiv = 0 and bnk_KundenNr = " & KUNDE.KundenNr, "FMZOLL")
If dtBank.Rows.Count > 0 Then
BANK_OWNER = ADR.Name_1
BANK_IBAN = dtBank.Rows(0).Item("bnk_iban")
BANK_BIC = dtBank.Rows(0).Item("bnk_bic")
End If
'wenn nicht hinterlegt, dann leer lassen!
End Select
Dim app As New VATRefundApplication() With {
.CodF1 = New FormInfo With {.FormType = "D318", .FormId = 318, .UniversalCode = "D318_A1.0.0"},
.RefundPeriod = New Period With {.StartDate = CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month, .EndDate = CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month},
.ApplicationReference = New ApplicationReference With {
.Year = CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year,
.RefundingCountryCode = Antrag_LandKz,
.Language = "DE",
.Currency = USTV_ANTRAG.UStVAn_Währungscode,
.ApplicationType = 1,
.ReferenceNumber = "",
.Annual = IIf(CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month = 1 And CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month = 12, 1, 0),
.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, 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, 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"
},
.BusinessDescription = New BusinessDescription With {
.d_caen = 2, .CAEN = "4941--Transp.rutiere de marfuri", .BusinessActivity = 4941
},
.Representative = New Party With {
.NameFree = "VERAG 360 GMBH",
.RepresentativeID = "ATU76165837",
.AddressFree = "SUBEN NR. 100, AT-4975 SUBEN",
.PostCode = "4975",
.Phone = "00437711277719",
.EmailAddress = "juricevic@verag.ag",
.CountryCode = "AT",
.IdentificationType = "TIN"
},
.DetailedBankAccount = New BankAccount With {
.Total = txtSummeEUR._value.ToString.Replace(",", "."),
.Currency = USTV_ANTRAG.UStVAn_Währungscode,
.OwnerType = 1,
.OwnerName = BANK_OWNER,
.IBAN = BANK_IBAN,
.BIC = BANK_BIC
},
.NumberOfDocuments = New NumberOfDocuments With {.AtachatedFiles = 0, .PurchaseOrders = dgvUSTVPositionen.SelectedRows.Count, .ImportOrders = 0},
.ApplicantSignature = New Signature With {.NameFree = "LUXBAUER BRIGITTE", .Position = "IMPUTERNICIT"}
}
Dim counter As Integer = 1
For Each row As DataGridViewRow In dgvUSTVPositionen.SelectedRows.Cast(Of DataGridViewRow)().OrderBy(Function(dgvr) dgvr.Index)
Dim UIDNrLeistender = ""
Dim LeistenderName As String = ""
Dim maut As Boolean = False
Dim diesel As Boolean = False
Dim parkplatz As Boolean = False
Dim zubeh As Boolean = False
Dim uebernachtung 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
LeistenderName = row.Cells("UStVPo_Leistender").Value
LeistenderName = LeistenderName.ToString.Replace(Antrag_LandKz, "")
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)
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 row.Cells("UStVPo_SchnittstellenNr").Value = 10 Then
'UTA überspringen
ElseIf row.Cells("UStVPo_SchnittstellenNr").Value = 9 Then
maut = True 'MSE immer MAUT
Else
If Bez.Contains("maut") Or Bez.Contains("toll") Then maut = True
If Bez.Contains("diesel") Or Bez.Contains("fuel") Then diesel = True
If Bez.Contains("parkplatz") Then parkplatz = True
If Bez.Contains("zubeh") Then zubeh = True
If Bez.Contains("übern") Then uebernachtung = True
End If
End If
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
If diesel Then
goods.GoodsItem.Add(New GoodsItem With {.Code = 1, .SubCode = "1.1.2", .FreeText = ""})
End If
If maut Then
goods.GoodsItem.Add(New GoodsItem With {.Code = 4, .SubCode = "4.1", .FreeText = ""})
End If
If zubeh Then
goods.GoodsItem.Add(New GoodsItem With {.Code = 3, .SubCode = "3.1.5", .FreeText = ""})
End If
If parkplatz Then
goods.GoodsItem.Add(New GoodsItem With {.Code = 3, .SubCode = "3.1.4", .FreeText = ""})
End If
If uebernachtung Then
goods.GoodsItem.Add(New GoodsItem With {.Code = 6, .SubCode = "6.5", .FreeText = ""})
End If
Select Case Antrag_LandKz
Case "DE", "CZ", "LU"
For Each good In goods.GoodsItem
good.SubCode = "" 'SUbcodes leeren
Next
End Select
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 = goods,
.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 = LeistenderName,'"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]
' =========================
' 3⃣ ImportInformation hinzufügen (wenn vorhanden - OPTIONAL)
' =========================
' app.ImportInformation._Imports.Add(New Invoice With {
' .SequenceNumber = 17,
' .ReferenceNumber = "",
' .IssuingDate = "",
' .GoodsDescription = New GoodsDescription With {.GoodsItem = New GoodsItem With {.FreeText = "", .Code = 0, .SubCode = ""}},
' .Deduction = New Deduction With {.DeductibleVATAmount = "0.00", .ProRataRate = ""}
'})
counter = +1
Next
' =========================
' 4⃣ Dokumente hinzufügen
' =========================
Dim list As New List(Of String)
Dim pdfPathfinished As String = ""
If dgvUSTVPositionen.SelectedRows.Count > 0 Then
Dim nummerierung As Boolean = False
Select Case MsgBox("Soll eine Nummerierung auf den PDF Dokumenten angegeben werden?", vbYesNoCancel)
Case vbYes : nummerierung = True
Case vbNo : nummerierung = False
Case Else : Exit Sub
End Select
For Each row As DataGridViewRow In dgvUSTVPositionen.SelectedRows.Cast(Of DataGridViewRow)().OrderBy(Function(dgvr) dgvr.Index)
Dim pdf As String = ""
pdf = func.getPDF(row.Cells("UStVPo_SchnittstellenNr").Value, row.Cells("UStVPo_ReNr").Value, row.Cells("UStVPo_ReDat").Value, row.Cells("UStVPo_daId").Value, IIf(nummerierung, row.Cells("UStVPo_ID").Value, -1), True, Antrag_LandKz, USTV_ANTRAG, New cFakturierung, False)
If pdf <> "" Then list.Add(pdf)
Next
End If
If list.Count > 0 Then
If list.Count > 1 Then
Dim pathPDF = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("RG_" & Now.ToString("ddMMyyyyHHmmss") & ".pdf", ".pdf", False, False)
If FormularManagerNEU.MergePdfFiles(list, pathPDF) Then
pdfPathfinished = pathPDF
End If
Else
pdfPathfinished = list(0)
End If
Dim fileNamePDFAttZIP As String = "RG_" & Antrag_LandKz & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatVon).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Month & "_" & CDate(USTV_ANTRAG.UStVAn_ReDatBis).Year & ".zip"
fileNamePDFAttZIP = directoryPath & "\" & fileNamePDFAttZIP
Dim fileZipped As Boolean = True
If pdfPathfinished <> "" Then
' Falls ZIP schon existiert → löschen
If File.Exists(fileNamePDFAttZIP) Then
File.Delete(fileNamePDFAttZIP)
End If
Dim zipFile As New Chilkat.Zip()
Dim success = zipFile.NewZip(fileNamePDFAttZIP)
If (success = False) Then
Debug.WriteLine(zipFile.LastErrorText)
Exit Sub
End If
Dim saveExtraPath As Boolean = False
success = zipFile.AppendFiles(pdfPathfinished, saveExtraPath)
If (success = False) Then
fileZipped = False
End If
success = zipFile.WriteZipAndClose()
If (success = False) Then
fileZipped = False
End If
If fileZipped Then
' app.DocumentCopy.Add(New DocumentCopy With {
'.Bifa_atasament = 1,
'.Document = New DocumentFile With {
' .FileName = fileNamePDFAttZIP,
' .FileType = "application/zip",
' .FileDescription = "INVOICES/POA"
'}
'})
End If
End If
End If
' =========================
' 5⃣ XML erzeugen
' =========================
Dim xml As Chilkat.Xml = app.ToXml()
Dim xmlString As String = xml.GetXml()
Console.WriteLine(xmlString)
System.IO.File.WriteAllText(filePath, xmlString)
Me.Cursor = Cursors.Default
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Me.Cursor = Cursors.Default
End Try
End Sub
Private Function PDFInvoicesPath(ByRef posId As String) As String
@@ -3980,4 +4450,39 @@ Return ""
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
Private Function setXMLExportVisible(ISOLand As String)
Dim valid As Boolean = False
If ISOLand = "" Then Return valid
Select Case ISOLand
Case "RO" : valid = True
Case Else : valid = False
End Select
Return valid
End Function
End Class

View File

@@ -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

View File

@@ -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
@@ -548,6 +571,7 @@ Public Class ustCntlUSTV_AntragPosition
If txtRgDatum.Text <> "" Then
txtRgDatum.Text = txtRgDatum.Text.Replace("-", ".")
txtRgDatum.Text = txtRgDatum.Text.Replace(",", ".")
'If IsDate(txtRgDatum.Text) Then txtChanged = True
End If
@@ -866,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

View File

@@ -22,7 +22,6 @@ Partial Class frmKundenUebersichtZOLL
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
@@ -30,19 +29,17 @@ Partial Class frmKundenUebersichtZOLL
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmKundenUebersichtZOLL))
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip()
Me.KopierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.tabZolltarife = New System.Windows.Forms.TabPage()
Me.pnlZollTarife = New System.Windows.Forms.Panel()
Me.tabKundendaten = New System.Windows.Forms.TabPage()
Me.rtbInfo = New System.Windows.Forms.RichTextBox()
Me.lblAbfertigungsverbot = New System.Windows.Forms.Label()
Me.usrcntlKundenuebersicht = New SDL.usrCntlKundenuebersicht()
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip()
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
Me.tbcntrKundenDaten = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.UsrCntlOfferte1 = New SDL.usrCntlOfferte()
Me.tbStatistik = New System.Windows.Forms.TabPage()
Me.cboKundenblattFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button1 = New System.Windows.Forms.Button()
@@ -89,10 +86,10 @@ Partial Class frmKundenUebersichtZOLL
Me.btnSpeichern = New System.Windows.Forms.Button()
Me.Label35 = New System.Windows.Forms.Label()
Me.tbRechnungen = New System.Windows.Forms.TabPage()
Me.dgvRg = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
Me.dgvRg = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel()
Me.btnRgPdf = New System.Windows.Forms.Button()
Me.ctxtRg = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ctxtRg = New System.Windows.Forms.ContextMenuStrip()
Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.btnMonat = New System.Windows.Forms.Button()
Me.Button10 = New System.Windows.Forms.Button()
@@ -100,9 +97,8 @@ Partial Class frmKundenUebersichtZOLL
Me.Label40 = New System.Windows.Forms.Label()
Me.tbSpeditionsbuch = New System.Windows.Forms.TabPage()
Me.tbFiskaluebersicht = New System.Windows.Forms.TabPage()
Me.UsrcntlFiskaluebersicht1 = New SDL.usrcntlFiskaluebersicht()
Me.tbCBAM = New System.Windows.Forms.TabPage()
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.MenuStripKunden = New System.Windows.Forms.MenuStrip()
Me.mnueKunden = New System.Windows.Forms.ToolStripMenuItem()
@@ -149,8 +145,8 @@ Partial Class frmKundenUebersichtZOLL
Me.lblTESTSystem = New System.Windows.Forms.Label()
Me.pic = New System.Windows.Forms.PictureBox()
Me.KdSearchBox1 = New VERAG_PROG_ALLGEMEIN.KdSearchBox()
Me.tmrFiskal = New System.Windows.Forms.Timer(Me.components)
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.tmrFiskal = New System.Windows.Forms.Timer()
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip()
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
Me.ÄndernToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.HochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@@ -158,6 +154,10 @@ Partial Class frmKundenUebersichtZOLL
Me.PDFLöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.usrcntlKundenuebersicht = New SDL.usrCntlKundenuebersicht()
Me.UsrCntlOfferte1 = New SDL.usrCntlOfferte()
Me.UsrcntlFiskaluebersicht1 = New SDL.usrcntlFiskaluebersicht()
Me.ZollvollmachtDEIndirektToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ContextMenuStrip1.SuspendLayout()
Me.tabZolltarife.SuspendLayout()
Me.tabKundendaten.SuspendLayout()
@@ -205,7 +205,7 @@ Partial Class frmKundenUebersichtZOLL
Me.tabZolltarife.Location = New System.Drawing.Point(4, 25)
Me.tabZolltarife.Name = "tabZolltarife"
Me.tabZolltarife.Padding = New System.Windows.Forms.Padding(3)
Me.tabZolltarife.Size = New System.Drawing.Size(1182, 697)
Me.tabZolltarife.Size = New System.Drawing.Size(1182, 750)
Me.tabZolltarife.TabIndex = 1
Me.tabZolltarife.Text = "Kunden - Zolltarife"
Me.tabZolltarife.UseVisualStyleBackColor = True
@@ -216,7 +216,7 @@ Partial Class frmKundenUebersichtZOLL
Me.pnlZollTarife.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlZollTarife.Location = New System.Drawing.Point(3, 3)
Me.pnlZollTarife.Name = "pnlZollTarife"
Me.pnlZollTarife.Size = New System.Drawing.Size(1176, 691)
Me.pnlZollTarife.Size = New System.Drawing.Size(1176, 744)
Me.pnlZollTarife.TabIndex = 0
'
'tabKundendaten
@@ -260,17 +260,6 @@ Partial Class frmKundenUebersichtZOLL
Me.lblAbfertigungsverbot.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.lblAbfertigungsverbot.Visible = False
'
'usrcntlKundenuebersicht
'
Me.usrcntlKundenuebersicht.BackColor = System.Drawing.Color.White
Me.usrcntlKundenuebersicht.BER_STUFE = 0
Me.usrcntlKundenuebersicht.Dock = System.Windows.Forms.DockStyle.Fill
Me.usrcntlKundenuebersicht.Location = New System.Drawing.Point(3, 3)
Me.usrcntlKundenuebersicht.Margin = New System.Windows.Forms.Padding(2)
Me.usrcntlKundenuebersicht.Name = "usrcntlKundenuebersicht"
Me.usrcntlKundenuebersicht.Size = New System.Drawing.Size(1176, 744)
Me.usrcntlKundenuebersicht.TabIndex = 0
'
'ContextMenuStrip2
'
Me.ContextMenuStrip2.ImageScalingSize = New System.Drawing.Size(24, 24)
@@ -312,20 +301,10 @@ Partial Class frmKundenUebersichtZOLL
Me.TabPage1.Location = New System.Drawing.Point(4, 25)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(1182, 697)
Me.TabPage1.Size = New System.Drawing.Size(1182, 750)
Me.TabPage1.TabIndex = 2
Me.TabPage1.Text = "Offerte"
'
'UsrCntlOfferte1
'
Me.UsrCntlOfferte1.BackColor = System.Drawing.Color.White
Me.UsrCntlOfferte1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrCntlOfferte1.Location = New System.Drawing.Point(3, 3)
Me.UsrCntlOfferte1.Margin = New System.Windows.Forms.Padding(2)
Me.UsrCntlOfferte1.Name = "UsrCntlOfferte1"
Me.UsrCntlOfferte1.Size = New System.Drawing.Size(1176, 691)
Me.UsrCntlOfferte1.TabIndex = 0
'
'tbStatistik
'
Me.tbStatistik.BackColor = System.Drawing.Color.White
@@ -359,7 +338,7 @@ Partial Class frmKundenUebersichtZOLL
Me.tbStatistik.Location = New System.Drawing.Point(4, 25)
Me.tbStatistik.Name = "tbStatistik"
Me.tbStatistik.Padding = New System.Windows.Forms.Padding(3)
Me.tbStatistik.Size = New System.Drawing.Size(1182, 697)
Me.tbStatistik.Size = New System.Drawing.Size(1182, 750)
Me.tbStatistik.TabIndex = 3
Me.tbStatistik.Text = "Statikstik"
'
@@ -850,7 +829,7 @@ Partial Class frmKundenUebersichtZOLL
Me.tbFiskal.Controls.Add(Me.pnlFiskTop)
Me.tbFiskal.Location = New System.Drawing.Point(4, 25)
Me.tbFiskal.Name = "tbFiskal"
Me.tbFiskal.Size = New System.Drawing.Size(1182, 697)
Me.tbFiskal.Size = New System.Drawing.Size(1182, 750)
Me.tbFiskal.TabIndex = 4
Me.tbFiskal.Text = "Fiskal"
'
@@ -859,7 +838,7 @@ Partial Class frmKundenUebersichtZOLL
Me.pnlFiskal.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlFiskal.Location = New System.Drawing.Point(0, 55)
Me.pnlFiskal.Name = "pnlFiskal"
Me.pnlFiskal.Size = New System.Drawing.Size(1182, 642)
Me.pnlFiskal.Size = New System.Drawing.Size(1182, 695)
Me.pnlFiskal.TabIndex = 40
'
'pnlFiskTop
@@ -912,7 +891,7 @@ Partial Class frmKundenUebersichtZOLL
Me.tbRechnungen.Controls.Add(Me.MyPanel1)
Me.tbRechnungen.Location = New System.Drawing.Point(4, 25)
Me.tbRechnungen.Name = "tbRechnungen"
Me.tbRechnungen.Size = New System.Drawing.Size(1182, 697)
Me.tbRechnungen.Size = New System.Drawing.Size(1182, 750)
Me.tbRechnungen.TabIndex = 5
Me.tbRechnungen.Text = "Rechnungen"
'
@@ -930,7 +909,7 @@ Partial Class frmKundenUebersichtZOLL
Me.dgvRg.ReadOnly = True
Me.dgvRg.RowHeadersVisible = False
Me.dgvRg.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvRg.Size = New System.Drawing.Size(1182, 637)
Me.dgvRg.Size = New System.Drawing.Size(1182, 690)
Me.dgvRg.TabIndex = 1
'
'MyPanel1
@@ -1033,7 +1012,7 @@ Partial Class frmKundenUebersichtZOLL
'
Me.tbSpeditionsbuch.Location = New System.Drawing.Point(4, 25)
Me.tbSpeditionsbuch.Name = "tbSpeditionsbuch"
Me.tbSpeditionsbuch.Size = New System.Drawing.Size(1182, 697)
Me.tbSpeditionsbuch.Size = New System.Drawing.Size(1182, 750)
Me.tbSpeditionsbuch.TabIndex = 6
Me.tbSpeditionsbuch.Text = "Speditionsbuch"
Me.tbSpeditionsbuch.UseVisualStyleBackColor = True
@@ -1043,26 +1022,17 @@ Partial Class frmKundenUebersichtZOLL
Me.tbFiskaluebersicht.Controls.Add(Me.UsrcntlFiskaluebersicht1)
Me.tbFiskaluebersicht.Location = New System.Drawing.Point(4, 25)
Me.tbFiskaluebersicht.Name = "tbFiskaluebersicht"
Me.tbFiskaluebersicht.Size = New System.Drawing.Size(1182, 697)
Me.tbFiskaluebersicht.Size = New System.Drawing.Size(1182, 750)
Me.tbFiskaluebersicht.TabIndex = 7
Me.tbFiskaluebersicht.Text = "Fiskal-Analyse"
Me.tbFiskaluebersicht.UseVisualStyleBackColor = True
'
'UsrcntlFiskaluebersicht1
'
Me.UsrcntlFiskaluebersicht1.BackColor = System.Drawing.Color.White
Me.UsrcntlFiskaluebersicht1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrcntlFiskaluebersicht1.Location = New System.Drawing.Point(0, 0)
Me.UsrcntlFiskaluebersicht1.Name = "UsrcntlFiskaluebersicht1"
Me.UsrcntlFiskaluebersicht1.Size = New System.Drawing.Size(1182, 697)
Me.UsrcntlFiskaluebersicht1.TabIndex = 0
'
'tbCBAM
'
Me.tbCBAM.Location = New System.Drawing.Point(4, 25)
Me.tbCBAM.Name = "tbCBAM"
Me.tbCBAM.Padding = New System.Windows.Forms.Padding(3)
Me.tbCBAM.Size = New System.Drawing.Size(1182, 697)
Me.tbCBAM.Size = New System.Drawing.Size(1182, 750)
Me.tbCBAM.TabIndex = 8
Me.tbCBAM.Text = "CBAM"
Me.tbCBAM.UseVisualStyleBackColor = True
@@ -1214,7 +1184,7 @@ Partial Class frmKundenUebersichtZOLL
'
'ToolStripMenuItem4
'
Me.ToolStripMenuItem4.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStrVM_de, Me.ZollvollmachtDEFiskalToolStripMenuItem, Me.ToolStripMenuItem6, Me.ToolStripMenuItem8, Me.ZollvollmachtATEVToolStripMenuItem, Me.VollmachtFinanzamtToolStripMenuItem})
Me.ToolStripMenuItem4.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.toolStrVM_de, Me.ZollvollmachtDEFiskalToolStripMenuItem, Me.ToolStripMenuItem6, Me.ToolStripMenuItem8, Me.ZollvollmachtATEVToolStripMenuItem, Me.VollmachtFinanzamtToolStripMenuItem, Me.ZollvollmachtDEIndirektToolStripMenuItem})
Me.ToolStripMenuItem4.Name = "ToolStripMenuItem4"
Me.ToolStripMenuItem4.Size = New System.Drawing.Size(242, 22)
Me.ToolStripMenuItem4.Text = "Vollmachten"
@@ -1222,37 +1192,37 @@ Partial Class frmKundenUebersichtZOLL
'toolStrVM_de
'
Me.toolStrVM_de.Name = "toolStrVM_de"
Me.toolStrVM_de.Size = New System.Drawing.Size(204, 22)
Me.toolStrVM_de.Size = New System.Drawing.Size(215, 22)
Me.toolStrVM_de.Text = "Zollvollmacht DE"
'
'ZollvollmachtDEFiskalToolStripMenuItem
'
Me.ZollvollmachtDEFiskalToolStripMenuItem.Name = "ZollvollmachtDEFiskalToolStripMenuItem"
Me.ZollvollmachtDEFiskalToolStripMenuItem.Size = New System.Drawing.Size(204, 22)
Me.ZollvollmachtDEFiskalToolStripMenuItem.Size = New System.Drawing.Size(215, 22)
Me.ZollvollmachtDEFiskalToolStripMenuItem.Text = "Zollvollmacht DE - Fiskal"
'
'ToolStripMenuItem6
'
Me.ToolStripMenuItem6.Name = "ToolStripMenuItem6"
Me.ToolStripMenuItem6.Size = New System.Drawing.Size(204, 22)
Me.ToolStripMenuItem6.Size = New System.Drawing.Size(215, 22)
Me.ToolStripMenuItem6.Text = "Zollvollmacht AT"
'
'ToolStripMenuItem8
'
Me.ToolStripMenuItem8.Name = "ToolStripMenuItem8"
Me.ToolStripMenuItem8.Size = New System.Drawing.Size(204, 22)
Me.ToolStripMenuItem8.Size = New System.Drawing.Size(215, 22)
Me.ToolStripMenuItem8.Text = "Zollvollmacht AT - Fiskal"
'
'ZollvollmachtATEVToolStripMenuItem
'
Me.ZollvollmachtATEVToolStripMenuItem.Name = "ZollvollmachtATEVToolStripMenuItem"
Me.ZollvollmachtATEVToolStripMenuItem.Size = New System.Drawing.Size(204, 22)
Me.ZollvollmachtATEVToolStripMenuItem.Size = New System.Drawing.Size(215, 22)
Me.ZollvollmachtATEVToolStripMenuItem.Text = "Zollvollmacht AT - EV"
'
'VollmachtFinanzamtToolStripMenuItem
'
Me.VollmachtFinanzamtToolStripMenuItem.Name = "VollmachtFinanzamtToolStripMenuItem"
Me.VollmachtFinanzamtToolStripMenuItem.Size = New System.Drawing.Size(204, 22)
Me.VollmachtFinanzamtToolStripMenuItem.Size = New System.Drawing.Size(215, 22)
Me.VollmachtFinanzamtToolStripMenuItem.Text = "Vollmacht Finanzamt"
'
'ToolStripMenuItem9
@@ -1577,6 +1547,42 @@ Partial Class frmKundenUebersichtZOLL
Me.DataGridViewTextBoxColumn2.HeaderText = "KundenNr"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
'
'usrcntlKundenuebersicht
'
Me.usrcntlKundenuebersicht.BackColor = System.Drawing.Color.White
Me.usrcntlKundenuebersicht.BER_STUFE = 0
Me.usrcntlKundenuebersicht.Dock = System.Windows.Forms.DockStyle.Fill
Me.usrcntlKundenuebersicht.Location = New System.Drawing.Point(3, 3)
Me.usrcntlKundenuebersicht.Margin = New System.Windows.Forms.Padding(2)
Me.usrcntlKundenuebersicht.Name = "usrcntlKundenuebersicht"
Me.usrcntlKundenuebersicht.Size = New System.Drawing.Size(1176, 744)
Me.usrcntlKundenuebersicht.TabIndex = 0
'
'UsrCntlOfferte1
'
Me.UsrCntlOfferte1.BackColor = System.Drawing.Color.White
Me.UsrCntlOfferte1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrCntlOfferte1.Location = New System.Drawing.Point(3, 3)
Me.UsrCntlOfferte1.Margin = New System.Windows.Forms.Padding(2)
Me.UsrCntlOfferte1.Name = "UsrCntlOfferte1"
Me.UsrCntlOfferte1.Size = New System.Drawing.Size(1176, 744)
Me.UsrCntlOfferte1.TabIndex = 0
'
'UsrcntlFiskaluebersicht1
'
Me.UsrcntlFiskaluebersicht1.BackColor = System.Drawing.Color.White
Me.UsrcntlFiskaluebersicht1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UsrcntlFiskaluebersicht1.Location = New System.Drawing.Point(0, 0)
Me.UsrcntlFiskaluebersicht1.Name = "UsrcntlFiskaluebersicht1"
Me.UsrcntlFiskaluebersicht1.Size = New System.Drawing.Size(1182, 750)
Me.UsrcntlFiskaluebersicht1.TabIndex = 0
'
'ZollvollmachtDEIndirektToolStripMenuItem
'
Me.ZollvollmachtDEIndirektToolStripMenuItem.Name = "ZollvollmachtDEIndirektToolStripMenuItem"
Me.ZollvollmachtDEIndirektToolStripMenuItem.Size = New System.Drawing.Size(215, 22)
Me.ZollvollmachtDEIndirektToolStripMenuItem.Text = "Zollvollmacht DE - indirekt"
'
'frmKundenUebersichtZOLL
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -1754,4 +1760,5 @@ Partial Class frmKundenUebersichtZOLL
Friend WithEvents lblAvgTnr As Label
Friend WithEvents Button4 As Button
Friend WithEvents lbAvgTnrGesPos As Label
Friend WithEvents ZollvollmachtDEIndirektToolStripMenuItem As ToolStripMenuItem
End Class

View File

@@ -164,7 +164,7 @@ Public Class frmKundenUebersichtZOLL
' toolOptionen.Visible = False
mneBearbeiten.Visible = False
mnueOfferte.Visible = False
mneFormulare.Visible = False
' mneFormulare.Visible = False -> temoprär deaktiviert wegen einholung von Zoll-VM!!!!!!!!!!!
mnueFiskal.Visible = False
toolNeuerKunde.Visible = False
mnueFiskaluebersicht.Visible = False
@@ -365,6 +365,10 @@ Public Class frmKundenUebersichtZOLL
toolOptionen.Enabled = False
Else
mneFormulare.Enabled = True 'ebenfalls nach Erledigung deaktivieren!!!!!!!!!!!!!!!!!!!
End If
mnueFiskaluebersicht.Enabled = False
@@ -1522,7 +1526,9 @@ Public Class frmKundenUebersichtZOLL
End Sub
Private Sub ZollvollmachtDEIndirektToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ZollvollmachtDEIndirektToolStripMenuItem.Click
SDL.FormularManagerNEU.OPEN_FORM(SDL.FormularManagerArten.DE_Vollmacht_indirekt, kdNr, {})
End Sub
End Class

View File

@@ -21,6 +21,7 @@
ComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("0 - Sperre aufgehoben", "0")) 'Sperre aufgehoben
ComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("1 - Sperre gesetzt", "1")) 'Sperre gesetzt
ComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("3 - Stopped for Post-Pay", "3")) 'Stopped for Post-Pay
ComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("4 - temporär gesperrt", "4"))
ComboBox1.SelectedIndex = 0
bindingSDL.binddata(CheckBox1, "CheckState", bindingSDL.bindingSource, "Vertretungsvollmacht")

View File

@@ -820,6 +820,7 @@ Public Class usrCntlCBAM
,max(Warentarifnummer) Tarifnummer
,max(Eigenmasse) Eigenmasse
,max([VersendungsLand]) VersendungsLand
,max(Ursprungsland_ISO2) as 'Ursprungsland'
,'DE' Bestimmungsland
,max([DV1Rechnungsbetrag])Rechnungspreis
,max([Rechnungswährung]) Rechnungswaehrung

View File

@@ -2756,7 +2756,8 @@ Public Class usrCntlKundenuebersicht
Dim PdfTmp = SDL.FormularManagerNEU.UID_PRUEFUNG_PROTOKOLL(frmList.dgv.SelectedRows(0).Cells("uid_id").Value)
If PdfTmp <> "" Then
Process.Start(PdfTmp)
Else
MsgBox("UID-Vorlage konnte nicht geladen werden!")
End If
End Sub
frmList.Show(Me)
@@ -2780,7 +2781,8 @@ Public Class usrCntlKundenuebersicht
Dim PdfTmp = SDL.FormularManagerNEU.EORI_PRUEFUNG(msgErgebnis, eoripruef.eori_firma, eoripruef.eori_sessionID, KUNDE.EORITIN,, eoripruef.eori_sendungsid, eoripruef.eori_datum, eoripruef.eori_sachbearbeiter, eoripruef.eori_FirmaID)
If PdfTmp <> "" Then
Process.Start(PdfTmp)
Else
MsgBox("EORI-Vorlage konnte nicht geladen werden!")
End If
End Sub
'--------------------------

View File

@@ -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

View File

@@ -567,6 +567,7 @@ Public Class cIDS
tblIDSTransactionsNew.KdNrVERAG as Kundennummer,
ISNULL(tblIDSTransactionsNew.[OBONumber],ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) AS Rechnungsnummer,
tblIDSTransactionsNew.[YearMonthDay] AS Rechnungsdatum,
SUM(tblIDSTransactionsNew.[TotalNetAmount]) AS Nettobetrag,
SUM(tblIDSTransactionsNew.[VATAmount]) AS Steuerbetrag
FROM

View File

@@ -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,
@@ -341,7 +341,7 @@ Public Class cRMC
Dim SQLFirst As String = ""
If getInvoiceData Then
SQLFirst = "SELECT [rmc_kdNr], [rmc_kdName], [rmc_landKZ], [rmc_reDatum], [rmc_reNr], [rmc_waehrung], case WHEN rmc_daid IS NULL THEN 0 else 1 end as PDF_Rechnung, case WHEN rmc_daId_InvAtt IS NULL THEN 0 else 1 end as PDF_Anhang "
SQLFirst = "SELECT [rmc_kdNr], [rmc_kdName], [rmc_landKZ], [rmc_reDatum], [rmc_reNr], [rmc_waehrung],[rmc_betragNetto],([rmc_betragBrutto] - [rmc_betragNetto]) as MWST,[rmc_betragBrutto], case WHEN rmc_daid IS NULL THEN 0 else 1 end as PDF_Rechnung, case WHEN rmc_daId_InvAtt IS NULL THEN 0 else 1 end as PDF_Anhang "
Else
SQLFirst = "SELECT DISTINCT r.rmc_kdNr,r.rmc_kdName "
End If

View File

@@ -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)

View File

@@ -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

View File

@@ -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