Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024
This commit is contained in:
@@ -1,43 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SDL.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<section name="SDL.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<connectionStrings/>
|
||||
<connectionStrings />
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<system.serviceModel>
|
||||
<bindings>
|
||||
<basicHttpBinding>
|
||||
<binding name="BasicHttpBinding_IRKSVWcf"/>
|
||||
<binding name="checkVatBinding"/>
|
||||
<binding name="BasicHttpBinding_IRKSVWcf" />
|
||||
<binding name="checkVatBinding" />
|
||||
</basicHttpBinding>
|
||||
</bindings>
|
||||
<client>
|
||||
<endpoint address="http://localhost:8733/Design_Time_Addresses/RKSVCompleteServer/Service1/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRKSVWcf" contract="RKSVServer.IRKSVWcf" name="BasicHttpBinding_IRKSVWcf"/>
|
||||
<endpoint address="http://ec.europa.eu/taxation_customs/vies/services/checkVatService" binding="basicHttpBinding" bindingConfiguration="checkVatBinding" contract="EU_UID_Pruefung.checkVatPortType" name="checkVatPort"/>
|
||||
<endpoint address="http://localhost:8733/Design_Time_Addresses/RKSVCompleteServer/Service1/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRKSVWcf" contract="RKSVServer.IRKSVWcf" name="BasicHttpBinding_IRKSVWcf" />
|
||||
<endpoint address="http://ec.europa.eu/taxation_customs/vies/services/checkVatService" binding="basicHttpBinding" bindingConfiguration="checkVatBinding" contract="EU_UID_Pruefung.checkVatPortType" name="checkVatPort" />
|
||||
</client>
|
||||
</system.serviceModel>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.5631.0" newVersion="2.5.5631.0"/>
|
||||
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.5631.0" newVersion="2.5.5631.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WindowsBase" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="WindowsBase" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.2.0" newVersion="2.7.2.0"/>
|
||||
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.7.2.0" newVersion="2.7.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Spire.Pdf" publicKeyToken="663f351905198cb3" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.7.21.0" newVersion="10.7.21.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
@@ -64,18 +68,18 @@
|
||||
</SDL.My.MySettings>
|
||||
</applicationSettings>
|
||||
<appSettings>
|
||||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
|
||||
<add key="ClientSettingsProvider.ServiceUri" value=""/>
|
||||
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
|
||||
@@ -8,9 +8,11 @@ Imports GrapeCity.ActiveReports.ReportsCore.Tools
|
||||
Imports itextsharp.text.pdf
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.Factur_X_1_07_2_EN16931
|
||||
Imports VERAG_PROG_ALLGEMEIN.Spire.Pdf
|
||||
Imports VERAG_PROG_ALLGEMEIN.Spire.Pdf.Attachments
|
||||
Imports s2industries.ZUGFeRD
|
||||
Imports System.IO
|
||||
|
||||
|
||||
Public Class cFakturierung
|
||||
|
||||
@@ -1541,14 +1543,22 @@ Public Class cFakturierung
|
||||
|
||||
p.Export(rpt.Document, tmpPath)
|
||||
|
||||
Dim Paramslist As New cParameterList(VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID)
|
||||
Dim enableZugpferd = Paramslist.GET_PARAMETER_VALUE_BOOL("ZUGFeRD")
|
||||
If enableZugpferd Then
|
||||
tmpPath = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.addAttachementToPDF(tmpPath, createZUGFeRD(RECHNUNG))
|
||||
Else
|
||||
|
||||
Dim Zugferdpath = createZUGFeRD(RECHNUNG)
|
||||
Dim fileInfo_ZP As New FileInfo(Zugferdpath)
|
||||
Dim ZUGF_DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "ZUGFERD", Now().Year, "", "", fileInfo_ZP.Name, -1, False)
|
||||
ZUGF_DS.uploadDataToDATENSERVER(Zugferdpath, fileInfo_ZP.Name, fileInfo_ZP.Extension,,,, True)
|
||||
|
||||
End If
|
||||
|
||||
'e-Rechnung ZUGFeRD aktuell noch deaktiviert!
|
||||
If False Then tmpPath = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.addAttachementToPDF(tmpPath, createZUGFeRD(RECHNUNG))
|
||||
|
||||
Path = tmpPath
|
||||
|
||||
|
||||
|
||||
'THEREFORE IMPORT:
|
||||
'-------------------------------------------------------------------------------
|
||||
Try
|
||||
@@ -1735,25 +1745,164 @@ Public Class cFakturierung
|
||||
|
||||
Shared Function createZUGFeRD(RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang) As String
|
||||
|
||||
Dim ZZTage = 10
|
||||
Dim vatSeller As ElectronicAddressSchemeIdentifiers
|
||||
Dim vatBuyer As ElectronicAddressSchemeIdentifiers
|
||||
|
||||
' ZUGFeRD XML-Dokument erzeugen
|
||||
Dim inv As New CrossIndustryInvoiceType
|
||||
If RECHNUNG.RechnungsKundenNr > 0 Then
|
||||
|
||||
inv.ExchangedDocument.ID.Value = RECHNUNG.RK_ID
|
||||
inv.ExchangedDocument.TypeCode.Value = 632
|
||||
Dim RECHNUNG_AD As New VERAG_PROG_ALLGEMEIN.cAdressen(RECHNUNG.RechnungsKundenNr)
|
||||
Dim RECHNUNG_KD As New VERAG_PROG_ALLGEMEIN.cKunde(RECHNUNG.RechnungsKundenNr)
|
||||
|
||||
If RECHNUNG_KD.Zahlungsziel IsNot Nothing AndAlso IsNumeric(RECHNUNG_KD.Zahlungsziel) Then
|
||||
ZZTage = RECHNUNG_KD.Zahlungsziel
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim zahlungszieldatum As Date = CDate(RECHNUNG.RechnungsDatum).AddDays(ZZTage)
|
||||
Dim FIRMA As New VERAG_PROG_ALLGEMEIN.cFirmen(RECHNUNG.Firma_ID)
|
||||
Dim desc As InvoiceDescriptor = InvoiceDescriptor.CreateInvoice(RECHNUNG.RechnungsNr, RECHNUNG.RechnungsDatum, IIf(FIRMA.Firma_ID = 26, CurrencyCodes.GBP, CurrencyCodes.EUR))
|
||||
|
||||
Select Case RECHNUNG.BelegartenKz
|
||||
Case "AR"
|
||||
desc.Name = "SPEDITIONSRECHNUNG"
|
||||
desc.Type = InvoiceType.ForwardersInvoice
|
||||
Case "AG"
|
||||
desc.Name = "GUTSCHRIFT"
|
||||
desc.Type = InvoiceType.CreditNote
|
||||
End Select
|
||||
|
||||
If RECHNUNG.Besonderheiten IsNot Nothing Then desc.AddNote(RECHNUNG.Besonderheiten.ToString, SubjectCodes.AAI)
|
||||
If RECHNUNG.Text IsNot Nothing Then desc.AddNote(RECHNUNG.Text.ToString, SubjectCodes.AAI)
|
||||
desc.AddNote("Es bestehen Rabatt- und Bonusvereinbarungen.", SubjectCodes.AAK)
|
||||
|
||||
desc.SetBuyer(RECHNUNG.RechnungsName_1, RECHNUNG.RechnungsOrt, RECHNUNG.RechnungsOrt, RECHNUNG.RechnungsStraße, GetCountryCodeFromLandKZ(RECHNUNG.RechnungsLandKz, vatBuyer), IIf(Not IsDBNull(RECHNUNG.KundenNrZentrale), RECHNUNG.KundenNrZentrale, ""))
|
||||
|
||||
desc.SetSeller(FIRMA.Firma_Bez, FIRMA.Firma_Ort, FIRMA.Firma_Ort, FIRMA.Firma_Straße, GetCountryCodeFromLandKZ(FIRMA.Firma_LandKz, vatSeller))
|
||||
desc.AddSellerTaxRegistration(FIRMA.Firma_UID.ToString.Replace("UID: ", ""), TaxRegistrationSchemeID.VA)
|
||||
|
||||
' Optionally, to support Peppol-----------------------------
|
||||
|
||||
|
||||
If Not IsDBNull(RECHNUNG.RechnungsUstIdNr) AndAlso RECHNUNG.RechnungsUstIdNr IsNot Nothing AndAlso Not IsDBNull(RECHNUNG.RechnungsUstIdKz) AndAlso RECHNUNG.RechnungsUstIdKz IsNot Nothing Then
|
||||
desc.AddBuyerTaxRegistration(RECHNUNG.RechnungsUstIdKz & RECHNUNG.RechnungsUstIdNr, TaxRegistrationSchemeID.VA)
|
||||
If vatBuyer Then
|
||||
desc.SetBuyerElectronicAddress(RECHNUNG.RechnungsUstIdKz & RECHNUNG.RechnungsUstIdNr, vatBuyer)
|
||||
desc.SetSellerElectronicAddress(FIRMA.Firma_UID.ToString.Replace("UID: ", ""), vatSeller)
|
||||
End If
|
||||
|
||||
End If
|
||||
'-----------------------------
|
||||
|
||||
|
||||
Dim tmpPathZugpferd = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("ZUGFeRD_Invoice", ".xml", , False)
|
||||
inv.SaveToFile(tmpPathZugpferd)
|
||||
Dim steuerProzent As Double = SQL.DLookup(" isnull([Steuersatz %],0)", "[Steuertabelle] ", "[Steuerschlüssel]='" & checkNull(RECHNUNG.Steuerschlüssel) & "'", "FMZOLL", 0)
|
||||
|
||||
|
||||
desc.SetTotals(
|
||||
lineTotalAmount:=Convert.ToDecimal(RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag), 'Summe aller Rechnungspositions-Nettobeträge der Rechnung
|
||||
chargeTotalAmount:=0, 'Summe aller in der Rechnung enthaltenen Zuschläge der Dokumentenebene
|
||||
allowanceTotalAmount:=0, 'Summe aller in der Rechnung enthaltenen Abschläge der Dokumenteneben
|
||||
taxBasisAmount:=Convert.ToDecimal(RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag + 0 - 0), ' Die Gesamtsumme der Rechnung ohne Umsatzsteuer
|
||||
taxTotalAmount:=Convert.ToDecimal(RECHNUNG.SteuerpflichtigerGesamtbetrag) * steuerProzent, 'Der Gesamtbetrag der Umsatzsteuer für die Rechnung
|
||||
grandTotalAmount:=Convert.ToDecimal(RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag * steuerProzent), 'Der Gesamtbetrag der Rechnung mit Umsatzsteuer
|
||||
totalPrepaidAmount:=0, 'Die Summe der im Voraus gezahlten Beträge
|
||||
duePayableAmount:=Convert.ToDecimal(RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag * steuerProzent), 'Der ausstehende Betrag, um dessen Zahlung gebeten wird. Dieser Betrag ist der Rechnungsgesamtbetrag einschließlich Umsatzsteuer abzüglich des im Voraus gezahlten Betrages.Im Falle einer vollständig beglichenen Rechnung ist dieser Betrag gleich null. Der Betrag kann negativ sein; In diesem Fall schuldet der Verkäufer dem Käufer den Betrag
|
||||
roundingAmount:=0 'Der Betrag, der dem Rechnungsgesamtbetrag hinzuzufügen ist, um den zu zahlenden Betrag zu runden
|
||||
)
|
||||
|
||||
Dim lineTotalAmont = RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag
|
||||
|
||||
desc.AddTradePaymentTerms(RECHNUNG.TextZZ, zahlungszieldatum)
|
||||
|
||||
For Each p In RECHNUNG.POSITIONEN
|
||||
|
||||
Dim tradeLineItemNew As TradeLineItem = desc.AddTradeLineItem(
|
||||
name:=p.LeistungsBez,
|
||||
billedQuantity:=Convert.ToDecimal(p.Anzahl),
|
||||
unitCode:=QuantityCodes.C62, ' Stück
|
||||
netUnitPrice:=Convert.ToDecimal(p.Preis),
|
||||
grossUnitPrice:=IIf(p.Steuerpflichtig, Convert.ToDecimal(p.Preis * RECHNUNG.Steuersatz_Proz), Convert.ToDecimal(p.Preis)),
|
||||
categoryCode:=IIf(p.Steuerpflichtig, TaxCategoryCodes.S, TaxCategoryCodes.Z),
|
||||
taxPercent:=IIf(p.Steuerpflichtig, Convert.ToDecimal(RECHNUNG.Steuersatz_Proz), 0),
|
||||
taxType:=IIf(p.Steuerpflichtig, TaxTypes.VAT, TaxTypes.VAT)
|
||||
)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim isReverseCharge = isReverseChargeSumme(FIRMA, RECHNUNG)
|
||||
|
||||
If RECHNUNG.SteuerfreierGesamtbetrag > 0 Then
|
||||
desc.AddApplicableTradeTax(Convert.ToDecimal(RECHNUNG.SteuerfreierGesamtbetrag), 0, TaxTypes.VAT, TaxCategoryCodes.Z)
|
||||
End If
|
||||
|
||||
If RECHNUNG.SteuerpflichtigerGesamtbetrag > 0 Then
|
||||
desc.AddApplicableTradeTax(Convert.ToDecimal(RECHNUNG.SteuerpflichtigerGesamtbetrag), Convert.ToDecimal(RECHNUNG.Steuersatz_Proz), Convert.ToDecimal(RECHNUNG.SteuerpflichtigerGesamtbetrag * RECHNUNG.Steuersatz_Proz), TaxTypes.VAT, IIf(isReverseCharge, TaxCategoryCodes.AE, TaxCategoryCodes.S))
|
||||
End If
|
||||
|
||||
|
||||
Dim tmpPathZugpferd = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath("ZUGFeRD_Invoice_" & RECHNUNG.RechnungsNr, ".xml", True, False)
|
||||
Dim stream As FileStream = New FileStream(tmpPathZugpferd, FileMode.Create, FileAccess.Write)
|
||||
desc.Save(stream, ZUGFeRDVersion.Version20, Profile.Comfort)
|
||||
|
||||
stream.Flush()
|
||||
stream.Close()
|
||||
|
||||
Return tmpPathZugpferd
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function GetCountryCodeFromLandKZ(LandKZ As String, easi As ElectronicAddressSchemeIdentifiers) As CountryCodes
|
||||
|
||||
If LandKZ = "" Then Return CountryCodes.Unknown
|
||||
|
||||
Dim landKZISO2 = VERAG_PROG_ALLGEMEIN.cProgramFunctions.getISO2Land(LandKZ)
|
||||
Dim cc As CountryCodes
|
||||
|
||||
|
||||
Select Case landKZISO2
|
||||
Case "AT" : cc = CountryCodes.AT : easi = ElectronicAddressSchemeIdentifiers.AustriaVatNumber
|
||||
Case "DE" : cc = CountryCodes.DE : easi = ElectronicAddressSchemeIdentifiers.GermanyVatNumber
|
||||
Case "TR" : cc = CountryCodes.TR : easi = ElectronicAddressSchemeIdentifiers.TurkeyVatNumber
|
||||
Case "GB" : cc = CountryCodes.GB : easi = ElectronicAddressSchemeIdentifiers.UnitedKingdomVatNumber
|
||||
Case "AL" : cc = CountryCodes.AL : easi = ElectronicAddressSchemeIdentifiers.AlbaniaVatNumber
|
||||
Case "AZ" : cc = CountryCodes.AZ
|
||||
Case "BG" : cc = CountryCodes.BG : easi = ElectronicAddressSchemeIdentifiers.BulgariaVatNumber
|
||||
Case "BA" : cc = CountryCodes.BA : easi = ElectronicAddressSchemeIdentifiers.BosniaAndHerzegovinaVatNumber
|
||||
Case "CH" : cc = CountryCodes.CH : easi = ElectronicAddressSchemeIdentifiers.SwitzerlandVatNumber
|
||||
Case "CO" : cc = CountryCodes.CO
|
||||
Case "CY" : cc = CountryCodes.CY : easi = ElectronicAddressSchemeIdentifiers.CyprusVatNumber
|
||||
Case "CZ" : cc = CountryCodes.CZ : easi = ElectronicAddressSchemeIdentifiers.CzechRepublicVatNumber
|
||||
Case "DK" : cc = CountryCodes.DK
|
||||
Case "DZ" : cc = CountryCodes.DZ
|
||||
Case "ES" : cc = CountryCodes.ES
|
||||
Case "FR" : cc = CountryCodes.FR : easi = ElectronicAddressSchemeIdentifiers.FrenchVatNumber
|
||||
Case "FN" : cc = CountryCodes.FI
|
||||
Case "HR" : cc = CountryCodes.HR : easi = ElectronicAddressSchemeIdentifiers.CroatiaVatNumber
|
||||
Case "GE" : cc = CountryCodes.GE
|
||||
Case "HK" : cc = CountryCodes.HK
|
||||
Case "IN" : cc = CountryCodes.IN
|
||||
Case "IR" : cc = CountryCodes.IR : easi = ElectronicAddressSchemeIdentifiers.UnitedKingdomVatNumber
|
||||
Case "IQ" : cc = CountryCodes.IQ
|
||||
Case "LT" : cc = CountryCodes.LT : easi = ElectronicAddressSchemeIdentifiers.LithuaniaVatNumber
|
||||
Case "LV" : cc = CountryCodes.LV : easi = ElectronicAddressSchemeIdentifiers.LatviaVatNumber
|
||||
Case "US" : cc = CountryCodes.US
|
||||
Case "MK" : cc = CountryCodes.MK : easi = ElectronicAddressSchemeIdentifiers.MacedoniaVatNumber
|
||||
Case "PL" : cc = CountryCodes.PL : easi = ElectronicAddressSchemeIdentifiers.PolandVatNumber
|
||||
Case "RS" : cc = CountryCodes.RS : easi = ElectronicAddressSchemeIdentifiers.SerbiaVatNumber
|
||||
Case "AE" : cc = CountryCodes.AE
|
||||
Case "SI" : cc = CountryCodes.SI : easi = ElectronicAddressSchemeIdentifiers.SloveniaVatNumber
|
||||
Case "SK" : cc = CountryCodes.SK : easi = ElectronicAddressSchemeIdentifiers.SlovakiaVatNumber
|
||||
|
||||
Case Else
|
||||
cc = CountryCodes.Unknown
|
||||
End Select
|
||||
|
||||
|
||||
Return cc
|
||||
|
||||
End Function
|
||||
|
||||
Shared Sub printSpedBuchAnhaenge(RG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, Optional printStb As Boolean = False, Optional printVbD As Boolean = False)
|
||||
Try
|
||||
Dim SPEDBCUH = New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(RG.FilialenNr, RG.AbfertigungsNr, RG.SpeditionsbuchUnterNr)
|
||||
@@ -2789,7 +2938,7 @@ Public Class cFakturierung
|
||||
|
||||
Dim dt As DataTable
|
||||
If VorschauID = "" Then
|
||||
dt = SQL.loadDgvBySql("Select * FROM Rechnungsausgang WHERE Rechnungsausgang.Status In(3) And CONVERT(datetime,DruckDatumZeit ,104)='" & DruckdatumUhrzeit.ToString("dd.MM.yyyy HH:mm:ss.fff") & "' and RechnungsNr='" & RechnungsNr & "' ORDER BY FilialenNr, AbfertigungsNr", "FMZOLL")
|
||||
dt = SQL.loadDgvBySql("Select * FROM Rechnungsausgang WHERE Rechnungsausgang.Status In(3,4) And CONVERT(datetime,DruckDatumZeit ,104)='" & DruckdatumUhrzeit.ToString("dd.MM.yyyy HH:mm:ss.fff") & "' and RechnungsNr='" & RechnungsNr & "' ORDER BY FilialenNr, AbfertigungsNr", "FMZOLL")
|
||||
Else
|
||||
dt = SQL.loadDgvBySql("Select * FROM Rechnungsausgang WHERE RechnungsNr is null AND VorschauID='" & VorschauID & "' ORDER BY FilialenNr, AbfertigungsNr", "FMZOLL")
|
||||
End If
|
||||
|
||||
@@ -342,6 +342,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\RKAesIcm.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="s2industries.ZUGFeRD, Version=16.0.2.0, Culture=neutral, PublicKeyToken=eae19aa9fbd2251d, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\Aviso\AVISO\packages\ZUGFeRD-csharp.16.0.2\lib\net48\s2industries.ZUGFeRD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.ComponentModel.Composition.Registration" />
|
||||
@@ -389,9 +392,6 @@
|
||||
<HintPath>..\..\..\AVISO\Aviso\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ZUGFeRD.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=807dc6d06b184af9, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ZUGFeRD.NET.1.0.1\lib\ZUGFeRD.NET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
@@ -3379,6 +3379,7 @@
|
||||
<EmbeddedResource Include="mdm\usrCntlMDMDatenverarbeitungAuswertungen_divers.resx">
|
||||
<DependentUpon>usrCntlMDMDatenverarbeitungAuswertungen_divers.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||
<EmbeddedResource Include="OriginalArchiv_ATR\frmATR.resx">
|
||||
<DependentUpon>frmATR.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
328
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
328
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -32,11 +32,15 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.lbl_EintrageVerarbetiet = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.KdSearchBox1 = New VERAG_PROG_ALLGEMEIN.KdSearchBox()
|
||||
Me.cboAntragArt = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblKdNr = New System.Windows.Forms.Label()
|
||||
Me.Panel9 = New System.Windows.Forms.Panel()
|
||||
Me.cbxLand = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblLand = New System.Windows.Forms.Label()
|
||||
Me.Panel8 = New System.Windows.Forms.Panel()
|
||||
Me.cbxWahrung = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblWahrung = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.txt3470 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
@@ -71,12 +75,23 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.btnEintragloeschen = New System.Windows.Forms.Button()
|
||||
Me.btnNeuerEintrag = New System.Windows.Forms.Button()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.lblWarnung = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.txtBezugsNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.cbxFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.txtAbfNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.txtVZ = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label11 = New System.Windows.Forms.Label()
|
||||
Me.txtStNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.Panel3.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel9.SuspendLayout()
|
||||
@@ -171,6 +186,8 @@ Partial Class frmMDM_USTVAntrag
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Panel1.Controls.Add(Me.lblWarnung)
|
||||
Me.Panel1.Controls.Add(Me.KdSearchBox1)
|
||||
Me.Panel1.Controls.Add(Me.cboAntragArt)
|
||||
Me.Panel1.Controls.Add(Me.lblKdNr)
|
||||
Me.Panel1.Controls.Add(Me.Panel9)
|
||||
@@ -190,6 +207,34 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel1.Size = New System.Drawing.Size(1454, 177)
|
||||
Me.Panel1.TabIndex = 0
|
||||
'
|
||||
'KdSearchBox1
|
||||
'
|
||||
Me.KdSearchBox1._AlleFirmenCLUSTER = False
|
||||
Me.KdSearchBox1._AllowSetValue = False
|
||||
Me.KdSearchBox1._autoSizeGross = False
|
||||
Me.KdSearchBox1._display_Name1 = False
|
||||
Me.KdSearchBox1._displayAVISO_Email = False
|
||||
Me.KdSearchBox1._displayFullName = False
|
||||
Me.KdSearchBox1._displayWoelflKd = False
|
||||
Me.KdSearchBox1._hideIfListEmpty = True
|
||||
Me.KdSearchBox1._loadKdData = False
|
||||
Me.KdSearchBox1._searchName1 = True
|
||||
Me.KdSearchBox1._UseFIRMA = ""
|
||||
Me.KdSearchBox1._ValueKdAndName = True
|
||||
Me.KdSearchBox1.dgvpos = "LEFT"
|
||||
Me.KdSearchBox1.KdName = Nothing
|
||||
Me.KdSearchBox1.KdNr = "-1"
|
||||
Me.KdSearchBox1.kdNrField = Nothing
|
||||
Me.KdSearchBox1.KdNrNullInt = Nothing
|
||||
Me.KdSearchBox1.Location = New System.Drawing.Point(298, 10)
|
||||
Me.KdSearchBox1.Name = "KdSearchBox1"
|
||||
Me.KdSearchBox1.nurAktive = True
|
||||
Me.KdSearchBox1.searchActive = True
|
||||
Me.KdSearchBox1.Size = New System.Drawing.Size(171, 20)
|
||||
Me.KdSearchBox1.TabIndex = 22
|
||||
Me.KdSearchBox1.TIMER_SEARCH = True
|
||||
Me.KdSearchBox1.usrcntl = Nothing
|
||||
'
|
||||
'cboAntragArt
|
||||
'
|
||||
Me.cboAntragArt._allowedValuesFreiText = Nothing
|
||||
@@ -220,6 +265,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
'Panel9
|
||||
'
|
||||
Me.Panel9.Controls.Add(Me.cbxLand)
|
||||
Me.Panel9.Controls.Add(Me.lblLand)
|
||||
Me.Panel9.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Panel9.Location = New System.Drawing.Point(0, 0)
|
||||
@@ -227,6 +273,21 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel9.Size = New System.Drawing.Size(65, 90)
|
||||
Me.Panel9.TabIndex = 20
|
||||
'
|
||||
'cbxLand
|
||||
'
|
||||
Me.cbxLand._allowedValuesFreiText = Nothing
|
||||
Me.cbxLand._allowFreiText = False
|
||||
Me.cbxLand._value = ""
|
||||
Me.cbxLand.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.cbxLand.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.cbxLand.FormattingEnabled = True
|
||||
Me.cbxLand.Location = New System.Drawing.Point(0, 0)
|
||||
Me.cbxLand.Name = "cbxLand"
|
||||
Me.cbxLand.Size = New System.Drawing.Size(65, 28)
|
||||
Me.cbxLand.TabIndex = 23
|
||||
Me.cbxLand.Text = "USTV-Antrag"
|
||||
Me.cbxLand.Visible = False
|
||||
'
|
||||
'lblLand
|
||||
'
|
||||
Me.lblLand.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
@@ -245,6 +306,18 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
Me.Panel8.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.Panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel8.Controls.Add(Me.Label11)
|
||||
Me.Panel8.Controls.Add(Me.txtStNr)
|
||||
Me.Panel8.Controls.Add(Me.Label9)
|
||||
Me.Panel8.Controls.Add(Me.txtVZ)
|
||||
Me.Panel8.Controls.Add(Me.txtAbfNr)
|
||||
Me.Panel8.Controls.Add(Me.Label8)
|
||||
Me.Panel8.Controls.Add(Me.cbxFiliale)
|
||||
Me.Panel8.Controls.Add(Me.Label4)
|
||||
Me.Panel8.Controls.Add(Me.Label2)
|
||||
Me.Panel8.Controls.Add(Me.txtBezugsNr)
|
||||
Me.Panel8.Controls.Add(Me.cbxWahrung)
|
||||
Me.Panel8.Controls.Add(Me.lblWahrung)
|
||||
Me.Panel8.Controls.Add(Me.Label1)
|
||||
Me.Panel8.Controls.Add(Me.txt3470)
|
||||
Me.Panel8.Controls.Add(Me.Label3)
|
||||
@@ -257,6 +330,31 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel8.Size = New System.Drawing.Size(973, 87)
|
||||
Me.Panel8.TabIndex = 19
|
||||
'
|
||||
'cbxWahrung
|
||||
'
|
||||
Me.cbxWahrung._allowedValuesFreiText = Nothing
|
||||
Me.cbxWahrung._allowFreiText = False
|
||||
Me.cbxWahrung._value = ""
|
||||
Me.cbxWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxWahrung.FormattingEnabled = True
|
||||
Me.cbxWahrung.Location = New System.Drawing.Point(447, 9)
|
||||
Me.cbxWahrung.Name = "cbxWahrung"
|
||||
Me.cbxWahrung.Size = New System.Drawing.Size(71, 24)
|
||||
Me.cbxWahrung.TabIndex = 12
|
||||
'
|
||||
'lblWahrung
|
||||
'
|
||||
Me.lblWahrung.AutoSize = True
|
||||
Me.lblWahrung.BackColor = System.Drawing.Color.Transparent
|
||||
Me.lblWahrung.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.lblWahrung.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblWahrung.ForeColor = System.Drawing.Color.Black
|
||||
Me.lblWahrung.Location = New System.Drawing.Point(363, 13)
|
||||
Me.lblWahrung.Name = "lblWahrung"
|
||||
Me.lblWahrung.Size = New System.Drawing.Size(70, 17)
|
||||
Me.lblWahrung.TabIndex = 11
|
||||
Me.lblWahrung.Text = "Währung:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
@@ -264,7 +362,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Label1.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label1.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label1.Location = New System.Drawing.Point(785, 6)
|
||||
Me.Label1.Location = New System.Drawing.Point(815, 13)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(44, 17)
|
||||
Me.Label1.TabIndex = 10
|
||||
@@ -286,14 +384,14 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.txt3470._WaehrungZeichen = True
|
||||
Me.txt3470.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.txt3470.ForeColor = System.Drawing.Color.Black
|
||||
Me.txt3470.Location = New System.Drawing.Point(858, 3)
|
||||
Me.txt3470.Location = New System.Drawing.Point(865, 7)
|
||||
Me.txt3470.MaxLength = 10
|
||||
Me.txt3470.MaxLineLength = -1
|
||||
Me.txt3470.MaxLines_Warning = ""
|
||||
Me.txt3470.MaxLines_Warning_Label = Nothing
|
||||
Me.txt3470.Name = "txt3470"
|
||||
Me.txt3470.Size = New System.Drawing.Size(100, 23)
|
||||
Me.txt3470.TabIndex = 9
|
||||
Me.txt3470.TabIndex = 10
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
@@ -744,14 +842,6 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.Panel2.Size = New System.Drawing.Size(1300, 269)
|
||||
Me.Panel2.TabIndex = 1
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1298, 267)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
@@ -802,6 +892,205 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.ContextMenuStrip2.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'lblWarnung
|
||||
'
|
||||
Me.lblWarnung.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblWarnung.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.lblWarnung.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.lblWarnung.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblWarnung.ForeColor = System.Drawing.Color.Red
|
||||
Me.lblWarnung.Location = New System.Drawing.Point(475, 10)
|
||||
Me.lblWarnung.Name = "lblWarnung"
|
||||
Me.lblWarnung.Size = New System.Drawing.Size(183, 18)
|
||||
Me.lblWarnung.TabIndex = 23
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label2.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label2.Location = New System.Drawing.Point(524, 13)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(111, 17)
|
||||
Me.Label2.TabIndex = 13
|
||||
Me.Label2.Text = "Bezugs/Pos-Nr.:"
|
||||
'
|
||||
'txtBezugsNr
|
||||
'
|
||||
Me.txtBezugsNr._DateTimeOnly = False
|
||||
Me.txtBezugsNr._numbersOnly = True
|
||||
Me.txtBezugsNr._numbersOnlyKommastellen = ""
|
||||
Me.txtBezugsNr._numbersOnlyTrennzeichen = False
|
||||
Me.txtBezugsNr._Prozent = False
|
||||
Me.txtBezugsNr._ShortDateNew = False
|
||||
Me.txtBezugsNr._ShortDateOnly = False
|
||||
Me.txtBezugsNr._TimeOnly = False
|
||||
Me.txtBezugsNr._TimeOnly_Seconds = False
|
||||
Me.txtBezugsNr._value = ""
|
||||
Me.txtBezugsNr._Waehrung = False
|
||||
Me.txtBezugsNr._WaehrungZeichen = False
|
||||
Me.txtBezugsNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.txtBezugsNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtBezugsNr.Location = New System.Drawing.Point(654, 9)
|
||||
Me.txtBezugsNr.MaxLength = 10
|
||||
Me.txtBezugsNr.MaxLineLength = -1
|
||||
Me.txtBezugsNr.MaxLines_Warning = ""
|
||||
Me.txtBezugsNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtBezugsNr.Name = "txtBezugsNr"
|
||||
Me.txtBezugsNr.Size = New System.Drawing.Size(146, 23)
|
||||
Me.txtBezugsNr.TabIndex = 14
|
||||
'
|
||||
'cbxFiliale
|
||||
'
|
||||
Me.cbxFiliale._allowedValuesFreiText = Nothing
|
||||
Me.cbxFiliale._allowFreiText = False
|
||||
Me.cbxFiliale._value = ""
|
||||
Me.cbxFiliale.DropDownWidth = 120
|
||||
Me.cbxFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxFiliale.FormattingEnabled = True
|
||||
Me.cbxFiliale.Location = New System.Drawing.Point(429, 39)
|
||||
Me.cbxFiliale.Name = "cbxFiliale"
|
||||
Me.cbxFiliale.Size = New System.Drawing.Size(89, 24)
|
||||
Me.cbxFiliale.TabIndex = 16
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label4.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label4.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label4.Location = New System.Drawing.Point(363, 44)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(48, 17)
|
||||
Me.Label4.TabIndex = 15
|
||||
Me.Label4.Text = "Filiale:"
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.AutoSize = True
|
||||
Me.Label8.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label8.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label8.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label8.Location = New System.Drawing.Point(524, 44)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(112, 17)
|
||||
Me.Label8.TabIndex = 17
|
||||
Me.Label8.Text = "Abfertigungs-Nr:"
|
||||
'
|
||||
'txtAbfNr
|
||||
'
|
||||
Me.txtAbfNr._DateTimeOnly = False
|
||||
Me.txtAbfNr._numbersOnly = True
|
||||
Me.txtAbfNr._numbersOnlyKommastellen = ""
|
||||
Me.txtAbfNr._numbersOnlyTrennzeichen = False
|
||||
Me.txtAbfNr._Prozent = False
|
||||
Me.txtAbfNr._ShortDateNew = False
|
||||
Me.txtAbfNr._ShortDateOnly = False
|
||||
Me.txtAbfNr._TimeOnly = False
|
||||
Me.txtAbfNr._TimeOnly_Seconds = False
|
||||
Me.txtAbfNr._value = ""
|
||||
Me.txtAbfNr._Waehrung = False
|
||||
Me.txtAbfNr._WaehrungZeichen = False
|
||||
Me.txtAbfNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.txtAbfNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtAbfNr.Location = New System.Drawing.Point(654, 40)
|
||||
Me.txtAbfNr.MaxLength = 10
|
||||
Me.txtAbfNr.MaxLineLength = -1
|
||||
Me.txtAbfNr.MaxLines_Warning = ""
|
||||
Me.txtAbfNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtAbfNr.Name = "txtAbfNr"
|
||||
Me.txtAbfNr.Size = New System.Drawing.Size(146, 23)
|
||||
Me.txtAbfNr.TabIndex = 18
|
||||
'
|
||||
'Label9
|
||||
'
|
||||
Me.Label9.AutoSize = True
|
||||
Me.Label9.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label9.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label9.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label9.Location = New System.Drawing.Point(815, 44)
|
||||
Me.Label9.Name = "Label9"
|
||||
Me.Label9.Size = New System.Drawing.Size(30, 17)
|
||||
Me.Label9.TabIndex = 19
|
||||
Me.Label9.Text = "VZ:"
|
||||
'
|
||||
'txtVZ
|
||||
'
|
||||
Me.txtVZ._DateTimeOnly = False
|
||||
Me.txtVZ._numbersOnly = True
|
||||
Me.txtVZ._numbersOnlyKommastellen = ""
|
||||
Me.txtVZ._numbersOnlyTrennzeichen = True
|
||||
Me.txtVZ._Prozent = False
|
||||
Me.txtVZ._ShortDateNew = False
|
||||
Me.txtVZ._ShortDateOnly = False
|
||||
Me.txtVZ._TimeOnly = False
|
||||
Me.txtVZ._TimeOnly_Seconds = False
|
||||
Me.txtVZ._value = ""
|
||||
Me.txtVZ._Waehrung = True
|
||||
Me.txtVZ._WaehrungZeichen = True
|
||||
Me.txtVZ.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.txtVZ.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtVZ.Location = New System.Drawing.Point(865, 38)
|
||||
Me.txtVZ.MaxLength = 10
|
||||
Me.txtVZ.MaxLineLength = -1
|
||||
Me.txtVZ.MaxLines_Warning = ""
|
||||
Me.txtVZ.MaxLines_Warning_Label = Nothing
|
||||
Me.txtVZ.Name = "txtVZ"
|
||||
Me.txtVZ.Size = New System.Drawing.Size(100, 23)
|
||||
Me.txtVZ.TabIndex = 20
|
||||
'
|
||||
'Label11
|
||||
'
|
||||
Me.Label11.AutoSize = True
|
||||
Me.Label11.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label11.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label11.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label11.ForeColor = System.Drawing.Color.Black
|
||||
Me.Label11.Location = New System.Drawing.Point(10, 47)
|
||||
Me.Label11.Name = "Label11"
|
||||
Me.Label11.Size = New System.Drawing.Size(74, 17)
|
||||
Me.Label11.TabIndex = 21
|
||||
Me.Label11.Text = "Steuer-Nr:"
|
||||
'
|
||||
'txtStNr
|
||||
'
|
||||
Me.txtStNr._DateTimeOnly = False
|
||||
Me.txtStNr._numbersOnly = False
|
||||
Me.txtStNr._numbersOnlyKommastellen = ""
|
||||
Me.txtStNr._numbersOnlyTrennzeichen = False
|
||||
Me.txtStNr._Prozent = False
|
||||
Me.txtStNr._ShortDateNew = False
|
||||
Me.txtStNr._ShortDateOnly = False
|
||||
Me.txtStNr._TimeOnly = False
|
||||
Me.txtStNr._TimeOnly_Seconds = False
|
||||
Me.txtStNr._value = ""
|
||||
Me.txtStNr._Waehrung = False
|
||||
Me.txtStNr._WaehrungZeichen = False
|
||||
Me.txtStNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
|
||||
Me.txtStNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtStNr.Location = New System.Drawing.Point(101, 44)
|
||||
Me.txtStNr.MaxLength = 10
|
||||
Me.txtStNr.MaxLineLength = -1
|
||||
Me.txtStNr.MaxLines_Warning = ""
|
||||
Me.txtStNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtStNr.Name = "txtStNr"
|
||||
Me.txtStNr.Size = New System.Drawing.Size(100, 23)
|
||||
Me.txtStNr.TabIndex = 22
|
||||
'
|
||||
'UstCntlUSTV_AntragPosition1
|
||||
'
|
||||
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
|
||||
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1298, 267)
|
||||
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
|
||||
'
|
||||
'frmMDM_USTVAntrag
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -890,4 +1179,19 @@ Partial Class frmMDM_USTVAntrag
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents txt3470 As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents ContextMenuStrip2 As ContextMenuStrip
|
||||
Friend WithEvents KdSearchBox1 As VERAG_PROG_ALLGEMEIN.KdSearchBox
|
||||
Friend WithEvents cbxLand As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents cbxWahrung As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents lblWahrung As Label
|
||||
Friend WithEvents lblWarnung As Label
|
||||
Friend WithEvents Label11 As Label
|
||||
Friend WithEvents txtStNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label9 As Label
|
||||
Friend WithEvents txtVZ As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtAbfNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label8 As Label
|
||||
Friend WithEvents cbxFiliale As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents txtBezugsNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
End Class
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
|
||||
Imports System.Reflection
|
||||
Imports DocumentFormat.OpenXml.Office2010.Drawing.Charts
|
||||
Imports java.text.Normalizer
|
||||
Imports jdk.nashorn.internal.objects.annotations
|
||||
'Imports DocumentFormat.OpenXml.Drawing.Charts
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports org.BouncyCastle.Pqc.Crypto
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim UStVAn_ID As Integer
|
||||
Dim KundenNr As Integer
|
||||
Dim USTV_ANTRAG As VERAG_PROG_ALLGEMEIN.cUSTVAntrag = Nothing
|
||||
Dim Antrag_LandKz As String = ""
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Dim von, bis As Date
|
||||
|
||||
Sub New(UStVAn_ID)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -20,6 +28,19 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(Antrag_KundenNr As Integer, Antrag_LandKz As String, von As Date, bis As Date)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Me.KundenNr = Antrag_KundenNr
|
||||
Me.Antrag_LandKz = Antrag_LandKz
|
||||
Me.von = von
|
||||
Me.bis = bis
|
||||
|
||||
End Sub
|
||||
|
||||
Sub init(Optional Lieferant As String = "")
|
||||
pnlFilter.AutoScroll = False
|
||||
|
||||
@@ -27,6 +48,17 @@ Public Class frmMDM_USTVAntrag
|
||||
lblGesamtErstattung.Text = "-"
|
||||
lblDiffernezbetrag.Text = "-"
|
||||
|
||||
btnAntrageeinarbeiten.Enabled = Not UStVAn_ID <= 0
|
||||
FlowLayoutPanel.Enabled = Not UStVAn_ID <= 0
|
||||
btnEintragloeschen.Enabled = Not UStVAn_ID <= 0
|
||||
btnNeuerEintrag.Enabled = Not UStVAn_ID <= 0
|
||||
UstCntlUSTV_AntragPosition1.Enabled = Not UStVAn_ID <= 0
|
||||
|
||||
cbxLand.Visible = UStVAn_ID <= 0
|
||||
|
||||
|
||||
|
||||
|
||||
With dgvUSTVPositionen
|
||||
.ClearSelection()
|
||||
|
||||
@@ -171,6 +203,18 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
|
||||
If UStVAn_ID > 0 Then
|
||||
KdSearchBox1.Visible = False
|
||||
USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
|
||||
Antrag_LandKz = SQL.DLookup("LandKz", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL")
|
||||
setValue(USTV_ANTRAG)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub setValue(USTV_ANTRAG As VERAG_PROG_ALLGEMEIN.cUSTVAntrag)
|
||||
@@ -187,9 +231,15 @@ Public Class frmMDM_USTVAntrag
|
||||
rtbStatusText.Text = If(USTV_ANTRAG.UStVAn_StatusText, "")
|
||||
txt3470.Text = If(USTV_ANTRAG.UStVAn_3470, "")
|
||||
|
||||
txtVZ.Text = If(USTV_ANTRAG.UStVAn_VZBetrag, "")
|
||||
txtBezugsNr.Text = If(USTV_ANTRAG.UStVAn_BezugsNr, "")
|
||||
txtAbfNr.Text = If(USTV_ANTRAG.AbfertigungsNr, "")
|
||||
cbxFiliale.changeItem(If(USTV_ANTRAG.FilialenNr, ""))
|
||||
cbxWahrung.changeItem(If(USTV_ANTRAG.UStVAn_Währungscode, ""))
|
||||
|
||||
End Sub
|
||||
|
||||
Sub getValue(ByRef USTV_ANTRAG As VERAG_PROG_ALLGEMEIN.cUSTVAntrag)
|
||||
Sub getValue(ByRef USTV_ANTRAG As VERAG_PROG_ALLGEMEIN.cUSTVAntrag, Optional ADR As cAdressen = Nothing, Optional FIRMA As cFirmen = Nothing)
|
||||
|
||||
If Me_Validate() Then
|
||||
'lblFirma.Text = USTV_ANTRAG.UStVAn_Name
|
||||
@@ -209,7 +259,66 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_ANTRAG.UStVAn_3470 = Nothing
|
||||
End If
|
||||
|
||||
If txtVZ.Text <> "" AndAlso IsNumeric(txtVZ.Text) Then
|
||||
USTV_ANTRAG.UStVAn_RZBetragVZ = CDbl(txtVZ.Text)
|
||||
Else
|
||||
USTV_ANTRAG.UStVAn_RZBetragVZ = Nothing
|
||||
End If
|
||||
|
||||
If txtBezugsNr.Text <> "" Then
|
||||
USTV_ANTRAG.UStVAn_BezugsNr = txtBezugsNr
|
||||
Else
|
||||
USTV_ANTRAG.UStVAn_BezugsNr = ""
|
||||
End If
|
||||
|
||||
If txtAbfNr.Text <> "" Then
|
||||
USTV_ANTRAG.AbfertigungsNr = txtAbfNr
|
||||
Else
|
||||
USTV_ANTRAG.AbfertigungsNr = ""
|
||||
End If
|
||||
|
||||
If txtAbfNr.Text <> "" Then
|
||||
USTV_ANTRAG.AbfertigungsNr = txtAbfNr
|
||||
Else
|
||||
USTV_ANTRAG.AbfertigungsNr = ""
|
||||
End If
|
||||
|
||||
|
||||
If ADR IsNot Nothing Then
|
||||
USTV_ANTRAG.UStVAn_KuNr = ADR.AdressenNr
|
||||
USTV_ANTRAG.UStVAn_Name = ADR.Name_1
|
||||
USTV_ANTRAG.UStVAn_Straße = ADR.Straße
|
||||
USTV_ANTRAG.UStVAn_LandKz = ADR.LandKz
|
||||
USTV_ANTRAG.UStVAn_Ort = ADR.Ort
|
||||
USTV_ANTRAG.UStVAn_Steuernummer = ADR.Steuernummer
|
||||
End If
|
||||
|
||||
|
||||
If FIRMA IsNot Nothing Then
|
||||
USTV_ANTRAG.UStVAn_Kontoinhaber = FIRMA.Firma_Bez & "; " & FIRMA.Firma_Straße & ";" & FIRMA.Firma_Ort
|
||||
USTV_ANTRAG.UStVAn_Bankverbindung = FIRMA.Firma_Bankverbindung1
|
||||
USTV_ANTRAG.UStVAn_BLZ = FIRMA.Firma_BLZ1
|
||||
USTV_ANTRAG.UStVAn_KTO = FIRMA.Firma_KTO1
|
||||
|
||||
|
||||
'fallback laut FM-ZOLL
|
||||
If USTV_ANTRAG.UStVAn_Kontoinhaber Is Nothing Then USTV_ANTRAG.UStVAn_Kontoinhaber = "VERAG 360 GmbH; 4975 Suben"
|
||||
If USTV_ANTRAG.UStVAn_Bankverbindung Is Nothing Then USTV_ANTRAG.UStVAn_Bankverbindung = "Raiba Suben"
|
||||
If USTV_ANTRAG.UStVAn_KTO Is Nothing Then USTV_ANTRAG.UStVAn_KTO = "4210225"
|
||||
If USTV_ANTRAG.UStVAn_BLZ Is Nothing Then USTV_ANTRAG.UStVAn_BLZ = "34620"
|
||||
If USTV_ANTRAG.UStVAn_Gewerbe Is Nothing Then USTV_ANTRAG.UStVAn_Gewerbe = "Transportunternehmer"
|
||||
If USTV_ANTRAG.UStVAn_Erklärung_9_a Is Nothing Then USTV_ANTRAG.UStVAn_Erklärung_9_a = "Warentransport"
|
||||
If USTV_ANTRAG.UStVAn_Ausstellungsort Is Nothing Then USTV_ANTRAG.UStVAn_Ausstellungsort = "Suben"
|
||||
|
||||
If USTV_ANTRAG.UStVAn_Erklärung_9_b_1 Is Nothing Then USTV_ANTRAG.UStVAn_Erklärung_9_b_1 = 0
|
||||
If USTV_ANTRAG.UStVAn_Erklärung_9_b_2 Is Nothing Then USTV_ANTRAG.UStVAn_Erklärung_9_b_2 = 0
|
||||
If USTV_ANTRAG.UStVAn_Erklärung_9_b_3 Is Nothing Then USTV_ANTRAG.UStVAn_Erklärung_9_b_3 = 0
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Function Me_Validate() As Boolean
|
||||
If Not IsDate(txtVon._value) Then MsgBox("Datumsformat: Von") : Return False
|
||||
@@ -250,17 +359,85 @@ Public Class frmMDM_USTVAntrag
|
||||
cboAntragArt.changeItem("MWST")
|
||||
|
||||
|
||||
cbxWahrung.fillWithSQL("SELECT [Länderverzeichnis für die Außenhandelsstatistik].Währungscode FROM [Länderverzeichnis für die Außenhandelsstatistik] WHERE ((([Länderverzeichnis für die Außenhandelsstatistik].Umsatzsteuervergütungsverfahren)=1)) GROUP BY [Länderverzeichnis für die Außenhandelsstatistik].Währungscode
|
||||
ORDER BY [Länderverzeichnis für die Außenhandelsstatistik].Währungscode", False, "FMZOLL", True)
|
||||
cboAntragArt.changeItem(" ")
|
||||
|
||||
cbxFiliale.fillWithSQL("SELECT Filialen.FilialenNr, Filialen.Grenzstelle FROM Filialen WHERE Filialen.FilialenNr>=4800 AND Filialen.Fil_Status='A' ORDER BY Filialen.FilialenNr",, "FMZOLL", True)
|
||||
cboAntragArt.changeItem(" ")
|
||||
|
||||
|
||||
|
||||
|
||||
lbl_EintrageVerarbetiet.Text = ""
|
||||
|
||||
If UStVAn_ID > 0 Then
|
||||
cbxWahrung.Enabled = False
|
||||
KdSearchBox1.Visible = False
|
||||
USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
|
||||
Antrag_LandKz = SQL.DLookup("LandKz", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL")
|
||||
setValue(USTV_ANTRAG)
|
||||
|
||||
|
||||
Else
|
||||
Dim sqlWhere As String = ""
|
||||
'neuer USTVA-Antrag
|
||||
KdSearchBox1.Visible = True
|
||||
cbxWahrung.Enabled = True
|
||||
|
||||
|
||||
KdSearchBox1.initKdBox(Me)
|
||||
AddHandler KdSearchBox1.PropertyChanged, Sub()
|
||||
Try
|
||||
|
||||
|
||||
lblKdNr.Text = KdSearchBox1.KdNr
|
||||
KundenNr = KdSearchBox1.KdNr
|
||||
|
||||
|
||||
Dim ADR As New cAdressen(KdSearchBox1.KdNr)
|
||||
lblFirma.Text = ADR.Name_1
|
||||
|
||||
|
||||
cbxLand.fillWithSQL("SELECT [Länderverzeichnis für die Außenhandelsstatistik].LandNr, [Länderverzeichnis für die Außenhandelsstatistik].LandKz
|
||||
FROM [Länderverzeichnis für die Außenhandelsstatistik] INNER JOIN tblSteuernummern On [Länderverzeichnis für die Außenhandelsstatistik].LandNr = tblSteuernummern.LandNr
|
||||
WHERE[Länderverzeichnis für die Außenhandelsstatistik].Umsatzsteuervergütungsverfahren = 1 And (tblSteuernummern.AdressenNr)=" & KdSearchBox1.KdNr & " And tblSteuernummern.UStV = 1
|
||||
group by [Länderverzeichnis für die Außenhandelsstatistik].LandKz,[Länderverzeichnis für die Außenhandelsstatistik].LandNr
|
||||
order by [Länderverzeichnis für die Außenhandelsstatistik].LandKz,[Länderverzeichnis für die Außenhandelsstatistik].LandNr", False, "FMZOLL")
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
If KundenNr > 0 Then
|
||||
KdSearchBox1.KdNr = KundenNr
|
||||
sqlWhere = "And tblSteuernummern.AdressenNr=" & KundenNr
|
||||
End If
|
||||
|
||||
cbxLand.Visible = True
|
||||
cbxLand.fillWithSQL("SELECT [Länderverzeichnis für die Außenhandelsstatistik].LandNr, [Länderverzeichnis für die Außenhandelsstatistik].LandKz
|
||||
FROM [Länderverzeichnis für die Außenhandelsstatistik] INNER JOIN tblSteuernummern On [Länderverzeichnis für die Außenhandelsstatistik].LandNr = tblSteuernummern.LandNr
|
||||
WHERE[Länderverzeichnis für die Außenhandelsstatistik].Umsatzsteuervergütungsverfahren = 1 And tblSteuernummern.UStV = 1 " & sqlWhere &
|
||||
"group by [Länderverzeichnis für die Außenhandelsstatistik].LandKz,[Länderverzeichnis für die Außenhandelsstatistik].LandNr
|
||||
order by [Länderverzeichnis für die Außenhandelsstatistik].LandKz,[Länderverzeichnis für die Außenhandelsstatistik].LandNr", False, "FMZOLL")
|
||||
|
||||
cbxLand.changeItem(Antrag_LandKz)
|
||||
|
||||
txtVon._value = von
|
||||
txtBis._value = bis
|
||||
|
||||
If cbxLand.SelectedValue IsNot Nothing AndAlso Antrag_LandKz <> cbxLand.SelectedValue.ToString Then
|
||||
lblWarnung.Text = "keine StNr für " & Antrag_LandKz
|
||||
Else
|
||||
lblWarnung.Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
btnAntrageeinarbeiten.Enabled = False
|
||||
FlowLayoutPanel.Enabled = False
|
||||
btnEintragloeschen.Enabled = False
|
||||
@@ -269,8 +446,6 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
init()
|
||||
|
||||
End Sub
|
||||
@@ -285,12 +460,15 @@ Public Class frmMDM_USTVAntrag
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
End If
|
||||
|
||||
If Not ContextMenuStrip2.Items.ContainsKey("ploseneu") Then
|
||||
Dim plose = New ToolStripMenuItem() With {.Text = "Plose NEUE LOGIK", .Name = "ploseneu", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip2.Items.Add(plose)
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
If False Then 'wenn INFO von PLOSE WÄHRUNGSCODE IN INV_DATA, dann freischalten
|
||||
If Not ContextMenuStrip2.Items.ContainsKey("ploseneu") Then
|
||||
Dim plose = New ToolStripMenuItem() With {.Text = "Plose NEUE LOGIK", .Name = "ploseneu", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip2.Items.Add(plose)
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ContextMenuStrip2.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
|
||||
@@ -349,7 +527,6 @@ Public Class frmMDM_USTVAntrag
|
||||
ElseIf item.Name = "ids" Then
|
||||
loadUSTVFrom_IDS(UStVAn_ID, Antrag_LandKz, cbxArchivierteEintracheNochmalsEinarbetien.Checked)
|
||||
init()
|
||||
|
||||
ElseIf item.Name = "verag" Then
|
||||
loadUSTVFrom_VERAG(UStVAn_ID, Antrag_LandKz, cbxArchivierteEintracheNochmalsEinarbetien.Checked)
|
||||
init()
|
||||
@@ -397,6 +574,9 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If GET_Antraege IsNot Nothing Then
|
||||
|
||||
Return True
|
||||
|
||||
|
||||
For Each ANTRAG In GET_Antraege
|
||||
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
@@ -412,18 +592,23 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_Schnittstelle = True
|
||||
USTV_POS.UStVPo_Leistungsbezeichnung = "Maut"
|
||||
USTV_POS.UStVPo_Leistender = ANTRAG.plose_Lieferant
|
||||
If ANTRAG.plose_Lieferant = "PLOSE Then Sistem Service" Then
|
||||
If ANTRAG.plose_Lieferant = "PLOSE Sistem Service" Then
|
||||
USTV_POS.UStVPo_Leistender = USTV_POS.UStVPo_Leistender.ToString.Replace("", "PLOSE Sistem Service")
|
||||
End If
|
||||
|
||||
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
USTV_POS.UStVPo_Zeitstempel = Now()
|
||||
' Berechnungen
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
|
||||
'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
|
||||
USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
|
||||
USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
|
||||
' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
|
||||
If Not MWSTSummenAusBeleg Then
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
|
||||
'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
|
||||
USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
|
||||
USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
|
||||
' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
|
||||
Else
|
||||
'TODO - hier Umrechnungslogik von FRMDW und EUR und EUR/FRMDWR für Belegsebene
|
||||
End If
|
||||
|
||||
|
||||
|
||||
USTV_POS.INSERT()
|
||||
@@ -443,6 +628,11 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Shared Function loadUSTVFrom_VERAG(UStVAn_ID, Antrag_LandKz, ArchivierteEintracheNochmalsEinarbetien) As Boolean
|
||||
Try
|
||||
|
||||
If Antrag_LandKz <> "AT" Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim bytSchnittstellenNr = 1
|
||||
Dim USTV_ANTRAG As New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
|
||||
Dim dt_RE As New DataTable
|
||||
@@ -504,11 +694,11 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End If
|
||||
|
||||
'Berechnungen
|
||||
'Berechnungen - Beträge IMMER in EUR!
|
||||
Dim umrechKurs As Double = 1
|
||||
Dim UST_EUR = CDbl(r.Item("SteuerbetragLokal"))
|
||||
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR 'Math.Round((UST_org / umrechKurs), 2)
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = UST_EUR
|
||||
|
||||
@@ -527,10 +717,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Next
|
||||
|
||||
'Einträge als archivert setzen ' vormals wichtig
|
||||
Return verarbeitet
|
||||
|
||||
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
@@ -568,13 +756,19 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_Zeitstempel = Now()
|
||||
|
||||
' Berechnungen
|
||||
'von RMC bekommen wir Fremdwährung und EUR, d.b. wir können und den Umrechnungskurs selbst berechnen!
|
||||
|
||||
Dim umrechKurs As Double = 1
|
||||
If (CDbl(r.Item("rmc_betragBrutto")) > 0 AndAlso CDbl(r.Item("rmc_euroBrutto")) > 0) Then
|
||||
|
||||
Dim eur As Double = CDbl(r.Item("rmc_euroBrutto"))
|
||||
Dim frmdw As Double = CDbl(r.Item("rmc_betragBrutto"))
|
||||
|
||||
umrechKurs = frmdw / eur
|
||||
'umrechKurs = frmdw / eur
|
||||
|
||||
umrechKurs = (frmdw / eur * 100 + 0.5) / 100
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -592,8 +786,6 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
@@ -611,6 +803,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If GET_Antraege Then
|
||||
|
||||
Return True
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
Dim kdNr = r.Item("customer_id")
|
||||
@@ -631,10 +825,7 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_Zeitstempel = Now()
|
||||
|
||||
' Berechnungen
|
||||
|
||||
'!UStVPo_USteuerbetrag = rst1!Umsatzsteuerbetrag
|
||||
'!UStVPo_Umrechnungskurs = fktEurokurs(Me![UStVAn_Währungscode], ![UStVPo_ReDat])
|
||||
'!UStVPo_USteuerbetragEUR = Int(![UStVPo_USteuerbetrag] / !UStVPo_Umrechnungskurs * 100 + 0.5) / 100
|
||||
'von MSE bekommen wir Fremdwährung und EUR, d.b. wir können den Umrechnungskurs selbst berechnen!
|
||||
|
||||
Dim umrechKurs As Double = 1
|
||||
Dim UST_EUR = CDbl(r.Item("UST_EUR"))
|
||||
@@ -642,7 +833,8 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If (UST_EUR > 0 AndAlso UST_org > 0 AndAlso UST_org <> UST_EUR) Then
|
||||
|
||||
umrechKurs = UST_org / UST_EUR
|
||||
'umrechKurs = UST_org / UST_EUR
|
||||
umrechKurs = (UST_org / UST_EUR * 100 + 0.5) / 100
|
||||
|
||||
End If
|
||||
|
||||
@@ -697,24 +889,22 @@ Public Class frmMDM_USTVAntrag
|
||||
USTV_POS.UStVPo_Zeitstempel = Now()
|
||||
|
||||
' Berechnungen
|
||||
|
||||
'!UStVPo_USteuerbetrag = rst1!Umsatzsteuerbetrag
|
||||
'!UStVPo_Umrechnungskurs = fktEurokurs(Me![UStVAn_Währungscode], ![UStVPo_ReDat])
|
||||
'!UStVPo_USteuerbetragEUR = Int(![UStVPo_USteuerbetrag] / !UStVPo_Umrechnungskurs * 100 + 0.5) / 100
|
||||
'UTA liefert Beträge immer in EUR und in FREMDW!
|
||||
|
||||
Dim umrechKurs As Double = 1
|
||||
|
||||
Dim UST_org = CDbl(r.Item("Umsatzsteuerbetrag_in_Lieferlandwährung"))
|
||||
Dim UST_EUR = CDbl(r.Item("Umsatzsteuerbetrag_in_Darstellwährung")) 'ist immer EUR
|
||||
|
||||
If (UST_org > 0 AndAlso UST_org <> UST_EUR AndAlso r.Item("Darstellwährung_ISO") = "EUR") Then
|
||||
|
||||
umrechKurs = UST_org / UST_EUR
|
||||
|
||||
If (UST_org > 0 AndAlso UST_org <> UST_EUR) Then
|
||||
umrechKurs = (UST_org / UST_EUR * 100 + 0.5) / 100
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If UST_org > 0 Then
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_org 'Math.Round((UST_org / umrechKurs), 2)
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = UST_org
|
||||
End If
|
||||
@@ -766,17 +956,23 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim umrechKurs As Double = 1
|
||||
|
||||
Dim UST_org = CDbl(r.Item("Steuerbetrag"))
|
||||
'IDS liefert Beträge immer in EUR, wir müssen allerdings die Beträge in FREMDW umrechnen!
|
||||
|
||||
Dim UST_EUR = CDbl(r.Item("Steuerbetrag")) 'ist immer EUR
|
||||
Dim UST_org = CDbl(r.Item("Steuerbetrag"))
|
||||
|
||||
If (UST_org > 0 AndAlso UST_org <> UST_EUR) Then
|
||||
|
||||
umrechKurs = (UST_org / UST_EUR * 100 + 0.5) / 100
|
||||
|
||||
If USTV_ANTRAG.UStVAn_Währungscode <> "EUR" Then
|
||||
Dim kurs As New cEZB_Waehrungskurse(USTV_ANTRAG.UStVAn_Währungscode)
|
||||
UST_org = Math.Round(kurs.EXCHANGE_EURTOCUR(UST_EUR, USTV_ANTRAG.UStVAn_Währungscode, CDate(USTV_POS.UStVPo_ReDat)), 2)
|
||||
End If
|
||||
|
||||
If (UST_org > 0 AndAlso UST_org <> UST_EUR) Then
|
||||
umrechKurs = (UST_org / UST_EUR * 100 + 0.5) / 100
|
||||
End If
|
||||
|
||||
|
||||
If UST_org > 0 Then
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_org 'Math.Round((UST_org / umrechKurs), 2)
|
||||
USTV_POS.UStVPo_USteuerbetragEUR = UST_EUR
|
||||
USTV_POS.UStVPo_Umrechnungskurs = umrechKurs
|
||||
USTV_POS.UStVPo_USteuerbetrag = UST_org
|
||||
End If
|
||||
@@ -800,13 +996,46 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
|
||||
dgvUSTVPositionen.GetOrder()
|
||||
If UStVAn_ID > 0 Then
|
||||
|
||||
dgvUSTVPositionen.GetOrder()
|
||||
|
||||
getValue(USTV_ANTRAG)
|
||||
If USTV_ANTRAG.SAVE Then
|
||||
init()
|
||||
dgvUSTVPositionen.SetOrder()
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag()
|
||||
Dim ADR As New cAdressen(KundenNr)
|
||||
Dim ERW As New cKundenErweitert(KundenNr)
|
||||
Dim FIRMA As New cFirmen(1)
|
||||
|
||||
If ERW.kde_keineMWSt Then
|
||||
If Not vbYes = MsgBox("Der ausgewählte Kunde " & ADR.Name_1 & " ist als KEIN MWST-Kunde deklariert!" & vbNewLine & "Trotzdem den Antrag speichern?", vbYesNoCancel) Then Exit Sub
|
||||
End If
|
||||
|
||||
USTV_ANTRAG.UStVAn_LandNr = cbxLand._value
|
||||
|
||||
If cbxWahrung.SelectedValue Is Nothing Then
|
||||
USTV_ANTRAG.UStVAn_Währungscode = SQL.DLookup("Währungscode", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL")
|
||||
Else
|
||||
USTV_ANTRAG.UStVAn_Währungscode = cbxWahrung.SelectedValue
|
||||
End If
|
||||
|
||||
USTV_ANTRAG.UStVAn_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
USTV_ANTRAG.UStVAn_Zeitstempel = Now()
|
||||
|
||||
getValue(USTV_ANTRAG, ADR, FIRMA)
|
||||
|
||||
Me.UStVAn_ID = USTV_ANTRAG.SAVEID()
|
||||
|
||||
getValue(USTV_ANTRAG)
|
||||
If USTV_ANTRAG.SAVE Then
|
||||
init()
|
||||
dgvUSTVPositionen.SetOrder()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initPosition(UStVPo_ID)
|
||||
@@ -983,12 +1212,15 @@ Public Class frmMDM_USTVAntrag
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles btnEintragloeschen.Click
|
||||
|
||||
If vbYes = MsgBox("Möchten Sie den Eintrag wirklich löschen?", vbYesNoCancel) Then
|
||||
|
||||
If UstCntlUSTV_AntragPosition1.cbxAPI IsNot Nothing AndAlso UstCntlUSTV_AntragPosition1.cboSchnittstellennr._value IsNot Nothing Then
|
||||
Dim updated As Boolean = False
|
||||
Dim sqlText = ""
|
||||
Dim test As Boolean = False
|
||||
|
||||
|
||||
Select Case UstCntlUSTV_AntragPosition1.cboSchnittstellennr._value
|
||||
|
||||
Case 1 'VERAG 360 GmbH; 4975 Suben
|
||||
@@ -1080,10 +1312,6 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("excel") Then
|
||||
@@ -1100,7 +1328,7 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("offeneAntraege") Then
|
||||
Dim oa = New ToolStripMenuItem() With {.Text = "offene Anträge", .Name = "offeneAntraege", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
Dim oa = New ToolStripMenuItem() With {.Text = "nicht eingearbeitet USTV-Anträge", .Name = "offeneAntraege", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler oa.Click, AddressOf mnuItem_Clicked
|
||||
ContextMenuStrip1.Items.Add(oa)
|
||||
End If
|
||||
@@ -1203,7 +1431,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Private Sub dgvUSTVPositionen_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvUSTVPositionen.CellContentDoubleClick
|
||||
|
||||
Try
|
||||
If e.RowIndex >= 0 AndAlso e.ColumnIndex = 17 Then
|
||||
If e.RowIndex >= 0 AndAlso e.ColumnIndex >= 0 Then
|
||||
|
||||
|
||||
Dim schnnittstellenNr = dgvUSTVPositionen.Rows(e.RowIndex).Cells("UStVPo_SchnittstellenNr").Value
|
||||
@@ -1256,13 +1484,18 @@ Public Class frmMDM_USTVAntrag
|
||||
Case 4, 9 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & reDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & USTV_ANTRAG.UStVAn_KuNr & " AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 10 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & reDat & "' and Abrechnungsnummer='" & reNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 7 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & reDat & "' and rmc_reNr='" & reNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
|
||||
Case 8 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & reDat & "' and tblIDSTransactionsNew.[Paymentsummarynumber]='" & reNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
|
||||
Case 8 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & reDat & "' AND ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & reNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
|
||||
End Select
|
||||
|
||||
Return da_id
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub cbxLand_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxLand.SelectedValueChanged
|
||||
|
||||
lblLand.Text = IIf(cbxLand.SelectedItem IsNot Nothing, cbxLand.SelectedItem.Text, "")
|
||||
End Sub
|
||||
|
||||
Private Sub dgvUSTVPositionen_Sorted(sender As Object, e As EventArgs) Handles dgvUSTVPositionen.Sorted
|
||||
|
||||
For Each r As DataGridViewRow In dgvUSTVPositionen.Rows
|
||||
|
||||
342
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
342
SDL/USTV/frmUSTVoffeneAntraege.Designer.vb
generated
@@ -23,30 +23,43 @@ Partial Class frmUSTVoffeneAntraege
|
||||
<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()
|
||||
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
|
||||
Me.btn = New System.Windows.Forms.Button()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.btnAlle = New System.Windows.Forms.Button()
|
||||
Me.lbl = New System.Windows.Forms.Label()
|
||||
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Panel4 = New System.Windows.Forms.Panel()
|
||||
Me.Label46 = New System.Windows.Forms.Label()
|
||||
Me.dat_Sum_Bis = New System.Windows.Forms.DateTimePicker()
|
||||
Me.Label45 = New System.Windows.Forms.Label()
|
||||
Me.dat_Sum_Von = New System.Windows.Forms.DateTimePicker()
|
||||
Me.txtmaxAnz = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.cbxAlleoffenen = New System.Windows.Forms.CheckBox()
|
||||
Me.lblKunde = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.pnlLand = New System.Windows.Forms.Panel()
|
||||
Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox()
|
||||
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.txtmaxAnz = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.cbxSteuerNr = New System.Windows.Forms.CheckBox()
|
||||
Me.FlowLayoutPanel.SuspendLayout()
|
||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel4.SuspendLayout()
|
||||
Me.pnlLand.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'FlowLayoutPanel
|
||||
@@ -60,6 +73,7 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button1)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button2)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.Button3)
|
||||
Me.FlowLayoutPanel.Controls.Add(Me.btnAlle)
|
||||
Me.FlowLayoutPanel.Location = New System.Drawing.Point(12, 29)
|
||||
Me.FlowLayoutPanel.Name = "FlowLayoutPanel"
|
||||
Me.FlowLayoutPanel.Size = New System.Drawing.Size(1409, 31)
|
||||
@@ -120,34 +134,26 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.Button3.Text = "IDS"
|
||||
Me.Button3.UseVisualStyleBackColor = False
|
||||
'
|
||||
'btnAlle
|
||||
'
|
||||
Me.btnAlle.BackColor = System.Drawing.Color.FloralWhite
|
||||
Me.btnAlle.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnAlle.Location = New System.Drawing.Point(633, 3)
|
||||
Me.btnAlle.Name = "btnAlle"
|
||||
Me.btnAlle.Size = New System.Drawing.Size(120, 23)
|
||||
Me.btnAlle.TabIndex = 5
|
||||
Me.btnAlle.Text = "ALLE"
|
||||
Me.btnAlle.UseVisualStyleBackColor = False
|
||||
'
|
||||
'lbl
|
||||
'
|
||||
Me.lbl.AutoSize = True
|
||||
Me.lbl.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lbl.Location = New System.Drawing.Point(12, 9)
|
||||
Me.lbl.Name = "lbl"
|
||||
Me.lbl.Size = New System.Drawing.Size(162, 17)
|
||||
Me.lbl.Size = New System.Drawing.Size(253, 17)
|
||||
Me.lbl.TabIndex = 29
|
||||
Me.lbl.Text = "USTV offene Anträge"
|
||||
'
|
||||
'MyDatagridview1
|
||||
'
|
||||
Me.MyDatagridview1.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.MyDatagridview1.AllowUserToAddRows = False
|
||||
Me.MyDatagridview1.AllowUserToDeleteRows = False
|
||||
Me.MyDatagridview1.AllowUserToResizeColumns = False
|
||||
Me.MyDatagridview1.AllowUserToResizeRows = False
|
||||
Me.MyDatagridview1.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)
|
||||
Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98)
|
||||
Me.MyDatagridview1.Name = "MyDatagridview1"
|
||||
Me.MyDatagridview1.ReadOnly = True
|
||||
Me.MyDatagridview1.RowHeadersWidth = 62
|
||||
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528)
|
||||
Me.MyDatagridview1.TabIndex = 30
|
||||
Me.lbl.Text = "nicht eingearbeitet USTV-Anträge"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
@@ -159,31 +165,6 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.Label2.TabIndex = 38
|
||||
Me.Label2.Text = "Anzahl:"
|
||||
'
|
||||
'txtAnzahl
|
||||
'
|
||||
Me.txtAnzahl._DateTimeOnly = False
|
||||
Me.txtAnzahl._numbersOnly = False
|
||||
Me.txtAnzahl._numbersOnlyKommastellen = ""
|
||||
Me.txtAnzahl._numbersOnlyTrennzeichen = True
|
||||
Me.txtAnzahl._Prozent = False
|
||||
Me.txtAnzahl._ShortDateNew = False
|
||||
Me.txtAnzahl._ShortDateOnly = False
|
||||
Me.txtAnzahl._TimeOnly = False
|
||||
Me.txtAnzahl._TimeOnly_Seconds = False
|
||||
Me.txtAnzahl._value = ""
|
||||
Me.txtAnzahl._Waehrung = False
|
||||
Me.txtAnzahl._WaehrungZeichen = True
|
||||
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtAnzahl.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtAnzahl.Location = New System.Drawing.Point(1321, 636)
|
||||
Me.txtAnzahl.MaxLineLength = -1
|
||||
Me.txtAnzahl.MaxLines_Warning = ""
|
||||
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
|
||||
Me.txtAnzahl.Name = "txtAnzahl"
|
||||
Me.txtAnzahl.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtAnzahl.TabIndex = 37
|
||||
Me.txtAnzahl.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
@@ -194,31 +175,6 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.Label1.TabIndex = 40
|
||||
Me.Label1.Text = "MWSt:"
|
||||
'
|
||||
'txtMWST
|
||||
'
|
||||
Me.txtMWST._DateTimeOnly = False
|
||||
Me.txtMWST._numbersOnly = False
|
||||
Me.txtMWST._numbersOnlyKommastellen = ""
|
||||
Me.txtMWST._numbersOnlyTrennzeichen = True
|
||||
Me.txtMWST._Prozent = False
|
||||
Me.txtMWST._ShortDateNew = False
|
||||
Me.txtMWST._ShortDateOnly = False
|
||||
Me.txtMWST._TimeOnly = False
|
||||
Me.txtMWST._TimeOnly_Seconds = False
|
||||
Me.txtMWST._value = ""
|
||||
Me.txtMWST._Waehrung = True
|
||||
Me.txtMWST._WaehrungZeichen = True
|
||||
Me.txtMWST.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtMWST.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMWST.Location = New System.Drawing.Point(1321, 658)
|
||||
Me.txtMWST.MaxLineLength = -1
|
||||
Me.txtMWST.MaxLines_Warning = ""
|
||||
Me.txtMWST.MaxLines_Warning_Label = Nothing
|
||||
Me.txtMWST.Name = "txtMWST"
|
||||
Me.txtMWST.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtMWST.TabIndex = 39
|
||||
Me.txtMWST.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'Panel4
|
||||
'
|
||||
Me.Panel4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
@@ -266,6 +222,96 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.dat_Sum_Von.Size = New System.Drawing.Size(103, 20)
|
||||
Me.dat_Sum_Von.TabIndex = 22
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(1295, 71)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(50, 13)
|
||||
Me.Label3.TabIndex = 43
|
||||
Me.Label3.Text = "max. DS:"
|
||||
'
|
||||
'cbxAlleoffenen
|
||||
'
|
||||
Me.cbxAlleoffenen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxAlleoffenen.AutoSize = True
|
||||
Me.cbxAlleoffenen.Checked = True
|
||||
Me.cbxAlleoffenen.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.cbxAlleoffenen.Location = New System.Drawing.Point(1137, 62)
|
||||
Me.cbxAlleoffenen.Name = "cbxAlleoffenen"
|
||||
Me.cbxAlleoffenen.Size = New System.Drawing.Size(128, 17)
|
||||
Me.cbxAlleoffenen.TabIndex = 44
|
||||
Me.cbxAlleoffenen.Text = "alle Kunden anzeigen"
|
||||
Me.cbxAlleoffenen.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblKunde
|
||||
'
|
||||
Me.lblKunde.AutoSize = True
|
||||
Me.lblKunde.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblKunde.Location = New System.Drawing.Point(455, 74)
|
||||
Me.lblKunde.Name = "lblKunde"
|
||||
Me.lblKunde.Size = New System.Drawing.Size(0, 16)
|
||||
Me.lblKunde.TabIndex = 45
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(3, 10)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label4.TabIndex = 47
|
||||
Me.Label4.Text = "Land:"
|
||||
'
|
||||
'pnlLand
|
||||
'
|
||||
Me.pnlLand.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.pnlLand.Controls.Add(Me.cbxNichtEroeffneteAntraege)
|
||||
Me.pnlLand.Controls.Add(Me.Label4)
|
||||
Me.pnlLand.Controls.Add(Me.MyComboBox1)
|
||||
Me.pnlLand.Location = New System.Drawing.Point(863, 62)
|
||||
Me.pnlLand.Name = "pnlLand"
|
||||
Me.pnlLand.Size = New System.Drawing.Size(268, 33)
|
||||
Me.pnlLand.TabIndex = 42
|
||||
Me.pnlLand.Visible = False
|
||||
'
|
||||
'cbxNichtEroeffneteAntraege
|
||||
'
|
||||
Me.cbxNichtEroeffneteAntraege.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxNichtEroeffneteAntraege.AutoSize = True
|
||||
Me.cbxNichtEroeffneteAntraege.Checked = True
|
||||
Me.cbxNichtEroeffneteAntraege.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.cbxNichtEroeffneteAntraege.Location = New System.Drawing.Point(126, 9)
|
||||
Me.cbxNichtEroeffneteAntraege.Name = "cbxNichtEroeffneteAntraege"
|
||||
Me.cbxNichtEroeffneteAntraege.Size = New System.Drawing.Size(134, 17)
|
||||
Me.cbxNichtEroeffneteAntraege.TabIndex = 46
|
||||
Me.cbxNichtEroeffneteAntraege.Text = "nicht eröffnete Anträge"
|
||||
Me.cbxNichtEroeffneteAntraege.UseVisualStyleBackColor = True
|
||||
'
|
||||
'MyComboBox1
|
||||
'
|
||||
Me.MyComboBox1._allowedValuesFreiText = Nothing
|
||||
Me.MyComboBox1._allowFreiText = False
|
||||
Me.MyComboBox1._value = ""
|
||||
Me.MyComboBox1.FormattingEnabled = True
|
||||
Me.MyComboBox1.Location = New System.Drawing.Point(48, 7)
|
||||
Me.MyComboBox1.Name = "MyComboBox1"
|
||||
Me.MyComboBox1.Size = New System.Drawing.Size(72, 21)
|
||||
Me.MyComboBox1.TabIndex = 46
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AntragEröffnenToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(159, 26)
|
||||
'
|
||||
'AntragEröffnenToolStripMenuItem
|
||||
'
|
||||
Me.AntragEröffnenToolStripMenuItem.Name = "AntragEröffnenToolStripMenuItem"
|
||||
Me.AntragEröffnenToolStripMenuItem.Size = New System.Drawing.Size(158, 22)
|
||||
Me.AntragEröffnenToolStripMenuItem.Text = "Antrag eröffnen"
|
||||
'
|
||||
'txtmaxAnz
|
||||
'
|
||||
Me.txtmaxAnz._DateTimeOnly = False
|
||||
@@ -289,46 +335,123 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.txtmaxAnz.Name = "txtmaxAnz"
|
||||
Me.txtmaxAnz.Size = New System.Drawing.Size(59, 20)
|
||||
Me.txtmaxAnz.TabIndex = 42
|
||||
Me.txtmaxAnz.Text = "200"
|
||||
Me.txtmaxAnz.Text = "1000"
|
||||
Me.txtmaxAnz.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'Label3
|
||||
'txtMWST
|
||||
'
|
||||
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(1295, 71)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(50, 13)
|
||||
Me.Label3.TabIndex = 43
|
||||
Me.Label3.Text = "max. DS:"
|
||||
Me.txtMWST._DateTimeOnly = False
|
||||
Me.txtMWST._numbersOnly = False
|
||||
Me.txtMWST._numbersOnlyKommastellen = ""
|
||||
Me.txtMWST._numbersOnlyTrennzeichen = True
|
||||
Me.txtMWST._Prozent = False
|
||||
Me.txtMWST._ShortDateNew = False
|
||||
Me.txtMWST._ShortDateOnly = False
|
||||
Me.txtMWST._TimeOnly = False
|
||||
Me.txtMWST._TimeOnly_Seconds = False
|
||||
Me.txtMWST._value = ""
|
||||
Me.txtMWST._Waehrung = True
|
||||
Me.txtMWST._WaehrungZeichen = True
|
||||
Me.txtMWST.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtMWST.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMWST.Location = New System.Drawing.Point(1321, 658)
|
||||
Me.txtMWST.MaxLineLength = -1
|
||||
Me.txtMWST.MaxLines_Warning = ""
|
||||
Me.txtMWST.MaxLines_Warning_Label = Nothing
|
||||
Me.txtMWST.Name = "txtMWST"
|
||||
Me.txtMWST.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtMWST.TabIndex = 39
|
||||
Me.txtMWST.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'cbxAlleoffenen
|
||||
'txtAnzahl
|
||||
'
|
||||
Me.cbxAlleoffenen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxAlleoffenen.AutoSize = True
|
||||
Me.cbxAlleoffenen.Location = New System.Drawing.Point(1137, 70)
|
||||
Me.cbxAlleoffenen.Name = "cbxAlleoffenen"
|
||||
Me.cbxAlleoffenen.Size = New System.Drawing.Size(128, 17)
|
||||
Me.cbxAlleoffenen.TabIndex = 44
|
||||
Me.cbxAlleoffenen.Text = "alle Kunden anzeigen"
|
||||
Me.cbxAlleoffenen.UseVisualStyleBackColor = True
|
||||
Me.txtAnzahl._DateTimeOnly = False
|
||||
Me.txtAnzahl._numbersOnly = False
|
||||
Me.txtAnzahl._numbersOnlyKommastellen = ""
|
||||
Me.txtAnzahl._numbersOnlyTrennzeichen = True
|
||||
Me.txtAnzahl._Prozent = False
|
||||
Me.txtAnzahl._ShortDateNew = False
|
||||
Me.txtAnzahl._ShortDateOnly = False
|
||||
Me.txtAnzahl._TimeOnly = False
|
||||
Me.txtAnzahl._TimeOnly_Seconds = False
|
||||
Me.txtAnzahl._value = ""
|
||||
Me.txtAnzahl._Waehrung = False
|
||||
Me.txtAnzahl._WaehrungZeichen = True
|
||||
Me.txtAnzahl.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtAnzahl.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtAnzahl.Location = New System.Drawing.Point(1321, 636)
|
||||
Me.txtAnzahl.MaxLineLength = -1
|
||||
Me.txtAnzahl.MaxLines_Warning = ""
|
||||
Me.txtAnzahl.MaxLines_Warning_Label = Nothing
|
||||
Me.txtAnzahl.Name = "txtAnzahl"
|
||||
Me.txtAnzahl.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtAnzahl.TabIndex = 37
|
||||
Me.txtAnzahl.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'lblKunde
|
||||
'MyDatagridview1
|
||||
'
|
||||
Me.lblKunde.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblKunde.AutoSize = True
|
||||
Me.lblKunde.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblKunde.Location = New System.Drawing.Point(455, 74)
|
||||
Me.lblKunde.Name = "lblKunde"
|
||||
Me.lblKunde.Size = New System.Drawing.Size(0, 16)
|
||||
Me.lblKunde.TabIndex = 45
|
||||
Me.MyDatagridview1.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.MyDatagridview1.AllowUserToAddRows = False
|
||||
Me.MyDatagridview1.AllowUserToDeleteRows = False
|
||||
Me.MyDatagridview1.AllowUserToResizeColumns = False
|
||||
Me.MyDatagridview1.AllowUserToResizeRows = False
|
||||
Me.MyDatagridview1.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)
|
||||
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
|
||||
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText
|
||||
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
|
||||
Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2
|
||||
Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98)
|
||||
Me.MyDatagridview1.Name = "MyDatagridview1"
|
||||
Me.MyDatagridview1.ReadOnly = True
|
||||
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control
|
||||
DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText
|
||||
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
|
||||
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
|
||||
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||
Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3
|
||||
Me.MyDatagridview1.RowHeadersWidth = 62
|
||||
Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528)
|
||||
Me.MyDatagridview1.TabIndex = 30
|
||||
'
|
||||
'cbxSteuerNr
|
||||
'
|
||||
Me.cbxSteuerNr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.cbxSteuerNr.AutoSize = True
|
||||
Me.cbxSteuerNr.Checked = True
|
||||
Me.cbxSteuerNr.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.cbxSteuerNr.Location = New System.Drawing.Point(1137, 78)
|
||||
Me.cbxSteuerNr.Name = "cbxSteuerNr"
|
||||
Me.cbxSteuerNr.Size = New System.Drawing.Size(105, 17)
|
||||
Me.cbxSteuerNr.TabIndex = 46
|
||||
Me.cbxSteuerNr.Text = " nur mit SteuerNr"
|
||||
Me.cbxSteuerNr.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmUSTVoffeneAntraege
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1457, 681)
|
||||
Me.Controls.Add(Me.cbxSteuerNr)
|
||||
Me.Controls.Add(Me.lblKunde)
|
||||
Me.Controls.Add(Me.pnlLand)
|
||||
Me.Controls.Add(Me.cbxAlleoffenen)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.txtmaxAnz)
|
||||
@@ -341,11 +464,14 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Me.Controls.Add(Me.lbl)
|
||||
Me.Controls.Add(Me.FlowLayoutPanel)
|
||||
Me.Name = "frmUSTVoffeneAntraege"
|
||||
Me.Text = "offene Anträge"
|
||||
Me.Text = "nicht eingearbeitet USTV Anträge"
|
||||
Me.FlowLayoutPanel.ResumeLayout(False)
|
||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel4.ResumeLayout(False)
|
||||
Me.Panel4.PerformLayout()
|
||||
Me.pnlLand.ResumeLayout(False)
|
||||
Me.pnlLand.PerformLayout()
|
||||
Me.ContextMenuStrip1.ResumeLayout(False)
|
||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -372,4 +498,12 @@ Partial Class frmUSTVoffeneAntraege
|
||||
Friend WithEvents cbxAlleoffenen As CheckBox
|
||||
Friend WithEvents lblKunde As Label
|
||||
Friend WithEvents Button3 As Button
|
||||
Friend WithEvents btnAlle As Button
|
||||
Friend WithEvents MyComboBox1 As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents pnlLand As Panel
|
||||
Friend WithEvents cbxNichtEroeffneteAntraege As CheckBox
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
Friend WithEvents AntragEröffnenToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents cbxSteuerNr As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,4 +1,8 @@
|
||||
Imports GrapeCity.ActiveReports.FormattedText.Layout.Utils
|
||||
Imports System.Windows.Documents
|
||||
Imports com.sun.org.apache.bcel.internal.generic
|
||||
Imports GrapeCity.ActiveReports.FormattedText.Layout.Utils
|
||||
Imports jdk.nashorn.internal.objects.annotations
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmUSTVoffeneAntraege
|
||||
|
||||
@@ -55,6 +59,8 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
Private Sub initLieferant(l As String, btn As Button)
|
||||
|
||||
pnlLand.Visible = False
|
||||
|
||||
MyDatagridview1.DataSource = Nothing
|
||||
Me.LIEFERANT = l
|
||||
|
||||
@@ -66,6 +72,8 @@ Public Class frmUSTVoffeneAntraege
|
||||
End If
|
||||
Next
|
||||
|
||||
pnlLand.Visible = Me.LIEFERANT = "alle"
|
||||
|
||||
init()
|
||||
|
||||
End Sub
|
||||
@@ -84,9 +92,11 @@ Public Class frmUSTVoffeneAntraege
|
||||
sqlwhere &= " and plose_POLSEKundennummer = " & kdnr
|
||||
End If
|
||||
|
||||
.SET_SQL("select " & top & " plose_POLSEKundennummer, Adressen.[Name 1] ,[plose_Lieferant],[plose_RechnungsDatum],[plose_RechnungsNr], sum([plose_MWSTBetrag])[plose_MWSTBetrag] FROM [tblPLOSE_Details] INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
.SET_SQL("select " & top & " plose_POLSEKundennummer, Adressen.[Name 1] ,[plose_Lieferant],[plose_RechnungsDatum],[plose_RechnungsNr],plp_Land, sum([plose_MWSTBetrag])[plose_MWSTBetrag] FROM [tblPLOSE_Details]
|
||||
INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
INNER JOIN [tblPLOSE_Produktbeschreibung] ON [plp_ProductCode]=[plose_ProduktCode]
|
||||
WHERE plose_Archiv <> 1 AND plose_LieferantCode IN (0,1,7) AND cast(plose_RechnungsDatum as date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' and plose_RechnungsNr is not null " & sqlwhere &
|
||||
"group by plose_POLSEKundennummer, Adressen.[Name 1] ,[plose_RechnungsDatum],[plose_RechnungsNr],[plose_Lieferant]
|
||||
"group by plose_POLSEKundennummer, Adressen.[Name 1] ,[plose_RechnungsDatum],[plose_RechnungsNr],[plose_Lieferant], plp_Land
|
||||
having sum(plose_MWSTBetrag)>0", "FMZOLL")
|
||||
.LOAD()
|
||||
If .Columns.Count > 0 Then
|
||||
@@ -96,6 +106,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
.Columns("plose_Lieferant").HeaderText = "PLOSE-Lieferant"
|
||||
.Columns("plose_RechnungsDatum").HeaderText = "RE-Datum"
|
||||
.Columns("plose_RechnungsNr").HeaderText = "RE-Nr"
|
||||
.Columns("plp_Land").HeaderText = "Land"
|
||||
.Columns("Name 1").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.Columns("plose_MWSTBetrag").HeaderText = "MWST"
|
||||
|
||||
@@ -321,7 +332,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
.Columns.Clear()
|
||||
'Exit Sub
|
||||
'MsgBox(.sql)
|
||||
Dim sqlstring = "SELECT
|
||||
Dim sqlstring = "SELECT " & top & "
|
||||
tblIDSTransactionsNew.KdNrVERAG,
|
||||
Adressen.[Name 1],
|
||||
tbl_IDS_Länder.OutletCountry as Land,
|
||||
@@ -397,13 +408,201 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initDgv_gesamt(anz As Integer, nichtEroeffneteAntraege As Boolean, Optional kdnr As Integer = -1)
|
||||
|
||||
Dim top = ""
|
||||
'If anz > 0 Then top = "TOP (" & anz & ")"
|
||||
|
||||
Dim sqlwhereIDS = ""
|
||||
Dim sqlwhereUTA = ""
|
||||
Dim sqlwhereRMC = ""
|
||||
Dim sqlwherePLOSE = ""
|
||||
Dim sqlwhereMSE = ""
|
||||
Dim sqlwhereLand = ""
|
||||
Dim sqlwhereSteuerNr = ""
|
||||
|
||||
If kdnr > 0 Then
|
||||
sqlwherePLOSE &= " and plose_POLSEKundennummer = " & kdnr
|
||||
sqlwhereIDS &= " and tblIDSTransactionsNew.KdNrVERAG = " & kdnr
|
||||
sqlwhereUTA &= " and Kundennummer = " & kdnr
|
||||
sqlwhereRMC &= " and rmc_kdNr = " & kdnr
|
||||
sqlwhereMSE &= " and partner_customer_number = " & kdnr
|
||||
End If
|
||||
|
||||
If MyComboBox1._value <> "" Then
|
||||
sqlwhereLand &= " and land = '" & MyComboBox1._value & "'"
|
||||
End If
|
||||
|
||||
If cbxSteuerNr.Checked Then
|
||||
sqlwhereSteuerNr &= " and isnull(tblSteuernummern.UStV,0) <> 0"
|
||||
End If
|
||||
|
||||
If nichtEroeffneteAntraege Then
|
||||
sqlwhereLand &= " and isnull(UStVAn_ID,0) = 0 "
|
||||
End If
|
||||
|
||||
|
||||
With MyDatagridview1
|
||||
.Columns.Clear()
|
||||
'Exit Sub
|
||||
'MsgBox(.sql)
|
||||
Dim sqlstring = "select isnull(UStVAn_ID,0) as antragExisitiert,tblSteuernummern.UStV as SteuerNr , KdNr, Kundenname, Land from ( select " & top & "
|
||||
'PLOSE' as Lieferant,
|
||||
plose_POLSEKundennummer as KdNr,
|
||||
Adressen.[Name 1] as Kundenname,
|
||||
plp_Land as Land,
|
||||
[plose_RechnungsDatum] AS Rechnungsdatum,
|
||||
sum([plose_MWSTBetrag]) as MWST
|
||||
FROM [tblPLOSE_Details]
|
||||
INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
INNER JOIN [tblPLOSE_Produktbeschreibung] ON [plp_ProductCode]=[plose_ProduktCode]
|
||||
WHERE plose_Archiv <> 1 AND plose_LieferantCode IN (0,1,7) AND
|
||||
cast(plose_RechnungsDatum as date) between '" & dat_Sum_Von.Value & "' and '" & dat_Sum_Bis.Value & "' and plose_RechnungsNr is not null " & sqlwherePLOSE & "
|
||||
group by plose_POLSEKundennummer, Adressen.[Name 1] ,[plose_RechnungsDatum],plp_Land
|
||||
having sum(plose_MWSTBetrag)>0
|
||||
|
||||
UNION ALL
|
||||
|
||||
Select " & top & "
|
||||
'RMC' as Lieferant,
|
||||
[rmc_kdNr] as KdNr,
|
||||
[rmc_kdName] as Kundenname,
|
||||
[rmc_landKZ] as Land,
|
||||
[rmc_reDatum] AS Rechnungsdatum,
|
||||
[rmc_betragMWST] as MWST
|
||||
FROM [tblRMCImport]
|
||||
where cast(rmc_reDatum As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "'
|
||||
And UStVAn_ID is null " & sqlwhereRMC & "
|
||||
group by rmc_reDatum, rmc_kdNr,[rmc_kdName], [rmc_landKZ],[rmc_reNr], [rmc_betragMWST]
|
||||
having [rmc_betragMWST] > 0
|
||||
|
||||
UNION ALL
|
||||
|
||||
Select " & top & "
|
||||
'UTA' as Lieferant,
|
||||
Adressen.AdressenNr as KdNr,
|
||||
Adressen.[Name 1] as Kundenname,
|
||||
[Lieferland_ISO2] as Land,
|
||||
[Rechnungsdatum] AS Rechnungsdatum,
|
||||
sum([Gesamtbetrag_Umsatzsteuer_in_Darstellwährung]) as MWSt
|
||||
FROM [tblUTAImportNew]
|
||||
INNER JOIN Adressen on Adressen.UTAKundenNr = tblUTAImportNew.Kundennummer
|
||||
where cast([Rechnungsdatum] As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' And [tblUTAImportNew].UStVAn_ID is null
|
||||
" & sqlwhereUTA & "group by Adressen.AdressenNr, Kundennummer,Adressen.[Name 1],[Rechnungsdatum], [Lieferland_ISO2]
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
Select " & top & "
|
||||
'MSE' as Lieferant,
|
||||
partner_customer_number as KdNr,
|
||||
customer_name as Kundenname,
|
||||
country as Land,
|
||||
invoice_date AS Rechnungsdatum,
|
||||
sum(total_vat_amount_euro) as MWST
|
||||
FROM [VERAG].[dbo].[tblMSEInvoices] inner join [tblMSECustomers] on [customer_number] = [customer_id]
|
||||
|
||||
where cast(invoice_date As Date) between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "'
|
||||
|
||||
And [UStVAn_ID] is null " & sqlwhereMSE & "
|
||||
|
||||
group by invoice_date, partner_customer_number,customer_name, country
|
||||
|
||||
UNION ALL
|
||||
|
||||
--IDS
|
||||
SELECT " & top & "
|
||||
'IDS' as Lieferant,
|
||||
tblIDSTransactionsNew.KdNrVERAG as KdNr,
|
||||
Adressen.[Name 1] as Kundenname,
|
||||
tbl_IDS_Länder.Lieferland_ISO2 as Land,
|
||||
cast(tblIDSTransactionsNew.[YearMonthDay] as date) AS Rechnungsdatum,
|
||||
SUM(tblIDSTransactionsNew.[VATAmount]) AS MWST
|
||||
FROM
|
||||
tblIDSTransactionsNew
|
||||
INNER JOIN
|
||||
tbl_IDS_Länder
|
||||
ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode
|
||||
INNER JOIN
|
||||
Adressen on Adressen.AdressenNr = tblIDSTransactionsNew.KdNrVERAG
|
||||
LEFT JOIN
|
||||
tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber
|
||||
WHERE
|
||||
tblIDSTransactionsNew.[YearMonthDay] BETWEEN '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' " & sqlwhereIDS & "
|
||||
AND tblIDSTransactionsNew.[VATAmount] <> 0
|
||||
AND tblIDSTransactionsNew.UStVAn_ID IS NULL
|
||||
GROUP BY
|
||||
tblIDSTransactionsNew.KdNrVERAG,
|
||||
Adressen.[Name 1],
|
||||
tbl_IDS_Länder.Lieferland_ISO2,
|
||||
tblIDSTransactionsNew.[YearMonthDay] ) as temp
|
||||
inner join tblKundenErweitert on temp.kdnr = kde_KundenNr
|
||||
left join tblUStVAntrag on UStVAn_KuNr = temp.kdnr and UStVAn_ReDatVon <= temp.Rechnungsdatum and UStVAn_ReDatBis >= temp.Rechnungsdatum
|
||||
left JOIN tblSteuernummern On temp.Land = tblSteuernummern.LandKz and KdNr = tblSteuernummern.AdressenNr
|
||||
where 1 = 1 and isnull(kde_keineMWSt,0) = 0 " & sqlwhereLand & sqlwhereSteuerNr &
|
||||
" group by isnull(UStVAn_ID,0) , KdNr, Kundenname, Land, tblSteuernummern.UStV"
|
||||
|
||||
.SET_SQL(sqlstring, "FMZOLL")
|
||||
.LOAD()
|
||||
If .Columns.Count > 0 Then
|
||||
|
||||
.Columns("KdNr").HeaderText = "KdNr"
|
||||
.Columns("SteuerNr").HeaderText = "SteuerNr"
|
||||
.Columns("Kundenname").HeaderText = "Kunde"
|
||||
.Columns("Land").HeaderText = "Land"
|
||||
.Columns("Kundenname").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If kdnr > 0 Then
|
||||
|
||||
MyComboBox1.Items.Clear()
|
||||
MyComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
|
||||
End If
|
||||
|
||||
Dim sumMwSt As Double = 0
|
||||
If Not MyComboBox1._value <> "" Then
|
||||
MyComboBox1.Items.Clear()
|
||||
MyComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
Dim list As New List(Of String)
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
|
||||
If r.Cells("Land").Value IsNot Nothing And r.Cells("Land").Value <> "" Then
|
||||
|
||||
If Not list.Any(Function(c) c = r.Cells("Land").Value) Then
|
||||
list.Add(r.Cells("Land").Value)
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each l In list
|
||||
Dim listItem As New VERAG_PROG_ALLGEMEIN.MyListItem(l, l)
|
||||
MyComboBox1.Items.Add(listItem)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
txtAnzahl.Text = .Rows.Count
|
||||
txtMWST.Text = sumMwSt
|
||||
|
||||
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
Sub init()
|
||||
Select Case LIEFERANT.ToString.ToLower
|
||||
Case "plose" : initDgv_PLOSE(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "rmc" : initDgv_RMC(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "mse" : initDgv_MSE(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "uta" : initDgv_UTA(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "ids" : initDgv_IDS(txtmaxAnz.Text, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
Case "plose" : initDgv_PLOSE(txtmaxAnz.Text, kdNr)
|
||||
Case "rmc" : initDgv_RMC(txtmaxAnz.Text, kdNr)
|
||||
Case "mse" : initDgv_MSE(txtmaxAnz.Text, kdNr)
|
||||
Case "uta" : initDgv_UTA(txtmaxAnz.Text, kdNr)
|
||||
Case "ids" : initDgv_IDS(txtmaxAnz.Text, kdNr)
|
||||
Case "alle" : initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -422,7 +621,7 @@ Public Class frmUSTVoffeneAntraege
|
||||
initLieferant("IDS", sender)
|
||||
End Sub
|
||||
|
||||
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged
|
||||
Private Sub cbxAlleoffenen_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAlleoffenen.CheckedChanged, cbxSteuerNr.CheckedChanged, cbxNichtEroeffneteAntraege.CheckedChanged
|
||||
init()
|
||||
End Sub
|
||||
|
||||
@@ -430,6 +629,9 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
|
||||
Try
|
||||
|
||||
If Not MyDatagridview1.Columns.Contains("daId") Then Exit Sub
|
||||
|
||||
If e.RowIndex >= 0 AndAlso e.ColumnIndex = 7 Then
|
||||
Dim dsID = MyDatagridview1.Rows(e.RowIndex).Cells("daId").Value
|
||||
|
||||
@@ -455,10 +657,54 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
Private Sub MyDatagridview1_Sorted(sender As Object, e As EventArgs) Handles MyDatagridview1.Sorted
|
||||
|
||||
If Not MyDatagridview1.Columns.Contains("daId") Then Exit Sub
|
||||
|
||||
For Each r As DataGridViewRow In MyDatagridview1.Rows
|
||||
|
||||
If Not IsDBNull(r.Cells("daId").Value) AndAlso r.Cells("daId").Value > 0 Then DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnAlle_Click(sender As Object, e As EventArgs) Handles btnAlle.Click
|
||||
initLieferant("ALLE", sender)
|
||||
End Sub
|
||||
|
||||
Private Sub MyComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles MyComboBox1.SelectedIndexChanged
|
||||
initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
End Sub
|
||||
|
||||
Private Sub AntragEröffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AntragEröffnenToolStripMenuItem.Click
|
||||
|
||||
If MyDatagridview1.SelectedRows.Count = 0 Then Exit Sub
|
||||
Dim index As Integer = -1
|
||||
If (MyDatagridview1.SelectedRows.Count > 0) Then index = MyDatagridview1.SelectedRows(0).Index
|
||||
|
||||
Dim frm = New frmMDM_USTVAntrag(MyDatagridview1.SelectedRows(0).Cells("KdNr").Value, MyDatagridview1.SelectedRows(0).Cells("Land").Value, dat_Sum_Von.Value, dat_Sum_Bis.Value)
|
||||
frm.ShowDialog()
|
||||
|
||||
MyDatagridview1.GetOrder()
|
||||
initDgv_gesamt(txtmaxAnz.Text, cbxNichtEroeffneteAntraege.Checked, IIf(cbxAlleoffenen.Checked, -1, kdNr))
|
||||
MyDatagridview1.SetOrder()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyDatagridview1_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles MyDatagridview1.CellMouseClick
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub
|
||||
If e.RowIndex < 0 Then Exit Sub
|
||||
|
||||
DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True
|
||||
If e.Button = MouseButtons.Right Then
|
||||
|
||||
If sender Is MyDatagridview1 AndAlso LIEFERANT.ToString.ToLower = "alle" Then
|
||||
If MyDatagridview1.SelectedRows.Count = 0 Then Exit Sub '
|
||||
MyDatagridview1.CurrentCell = MyDatagridview1.Rows(e.RowIndex).Cells(e.ColumnIndex)
|
||||
ContextMenuStrip1.Show(Cursor.Position)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SqlClient
|
||||
Imports GrapeCity.DataVisualization.Options
|
||||
Imports MDM_Worker
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -370,12 +367,15 @@ Public Class usrCntlUSTV
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
End If
|
||||
|
||||
If Not ContextMenuStrip2.Items.ContainsKey("ploseneu") Then
|
||||
Dim plose = New ToolStripMenuItem() With {.Text = "Plose-NEUE LOGIK", .Name = "ploseneu", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip2.Items.Add(plose)
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
If False Then 'wenn INFO von PLOSE WÄHRUNGSCODE IN INV_DATA, dann freischalten
|
||||
If Not ContextMenuStrip2.Items.ContainsKey("ploseneu") Then
|
||||
Dim plose = New ToolStripMenuItem() With {.Text = "Plose-NEUE LOGIK", .Name = "ploseneu", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
ContextMenuStrip2.Items.Add(plose)
|
||||
AddHandler plose.Click, AddressOf mnuItemAuftrauege_Clicked
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ContextMenuStrip2.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
|
||||
@@ -499,7 +499,7 @@ Public Class usrCntlUSTV
|
||||
If vbYes = MsgBox("Es werden " & item.Text & " Daten für " & cnt & " USTV-Anträge eingearbeitet. Möchten Sie fortfahren?", vbYesNoCancel) Then
|
||||
For Each r As DataGridViewRow In dgvUSTV.Rows
|
||||
If r.Cells("UStVAn_AntragEingereichtAm").Value Is DBNull.Value Then
|
||||
frmMDM_USTVAntrag.loadUSTVFrom_VERAG(r.Cells("UStVAn_ID").Value, r.Cells("LandKz").Value, False)
|
||||
If r.Cells("LandKz").Value = "AT" Then frmMDM_USTVAntrag.loadUSTVFrom_VERAG(r.Cells("UStVAn_ID").Value, r.Cells("LandKz").Value, False)
|
||||
End If
|
||||
Next
|
||||
init()
|
||||
@@ -538,7 +538,7 @@ Public Class usrCntlUSTV
|
||||
End If
|
||||
|
||||
If Not ContextMenuStrip1.Items.ContainsKey("offeneAntraege") Then
|
||||
Dim oa = New ToolStripMenuItem() With {.Text = "offene Anträge", .Name = "offeneAntraege", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
Dim oa = New ToolStripMenuItem() With {.Text = "nicht eingearbeitet USTV-Anträge", .Name = "offeneAntraege", .Font = New Font(Me.Font.FontFamily, Me.Font.Size)}
|
||||
AddHandler oa.Click, AddressOf mnuItem_Clicked
|
||||
ContextMenuStrip1.Items.Add(oa)
|
||||
End If
|
||||
@@ -690,12 +690,63 @@ Public Class usrCntlUSTV
|
||||
|
||||
Private Sub btnNeuerUSTVA_Click(sender As Object, e As EventArgs) Handles btnNeuerUSTVA.Click
|
||||
|
||||
MsgBox("Bevor das Antragsformular geöffnet werden kann," & vbNewLine & " müssen Sie Angaben zum Antrag in der Antragserfassung machen." & vbNewLine & "Aktuell noch im FM-Zoll durchzuführen!")
|
||||
'frmUStVAntrag im SDL bauen!
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
MsgBox("Nicht berechtigt!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim frm = New frmMDM_USTVAntrag(-1, "AT", New Date(Now.Year(), 1, 1), New Date(Now.Year(), 12, 31))
|
||||
frm.ShowDialog()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnUSTVAloeschen_Click(sender As Object, e As EventArgs) Handles btnUSTVAloeschen.Click
|
||||
MsgBox("NOCH NICHT IMPLEMENTIERT!")
|
||||
|
||||
If Not dgvUSTV.SelectedRows.Count = 0 Then
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
MsgBox("Nicht berechtigt!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If vbYes = MsgBox("Möchten Sie den " & dgvUSTV.SelectedRows(0).Cells("LandKz").Value & " Antrag von " & dgvUSTV.SelectedRows(0).Cells("UStVAn_Name").Value & "( " & dgvUSTV.SelectedRows(0).Cells("UStVAn_ReDatVon").Value & " - " & dgvUSTV.SelectedRows(0).Cells("UStVAn_ReDatBis").Value & ") wirklich löschen?", vbYesNoCancel) Then
|
||||
|
||||
Dim del_antrag As New cUSTVAntrag(dgvUSTV.SelectedRows(0).Cells("UStVAn_ID").Value)
|
||||
|
||||
If del_antrag.UStVAn_AntragEingereichtAm IsNot Nothing Then
|
||||
MsgBox("Dieser Antrag wurde bereits eingereicht. Der Antrag kann nicht gelöscht werden.",, "UStV-Antrag " & del_antrag.UStVAn_ID)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If del_antrag.UStVAn_3470 IsNot Nothing Then
|
||||
MsgBox("Dieser Antrag enthält einen 3470-Betrag. Der Antrag kann nicht gelöscht werden.",, "UStV-Antrag " & del_antrag.UStVAn_ID)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If del_antrag.UStVAn_VZBetrag IsNot Nothing Then
|
||||
MsgBox("Dieser Antrag enthält einen VZ-Betrag. Der Antrag kann nicht gelöscht werden.",, "UStV-Antrag " & del_antrag.UStVAn_ID)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If del_antrag.UStVAn_Erstattungsbetrag IsNot Nothing Then
|
||||
MsgBox("Dieser Antrag enthält einen Erstattungsbetrag. Der Antrag kann nicht gelöscht werden.",, "UStV-Antrag " & del_antrag.UStVAn_ID)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
For Each pos In del_antrag.POSITIONEN
|
||||
If pos.UStVPo_SchnittstellenNr > 0 Then
|
||||
MsgBox("Antrag enthält Positionen, die über die Schnittstelle geladen wurden." & vbNewLine & "Positionen manuell löschen.")
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
If del_antrag.DELETE() Then
|
||||
init()
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -73,7 +73,7 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
|
||||
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
|
||||
Case 8 : da_id = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & UStV_POS.UStVPo_ReDat & "' and tblIDSTransactionsNew.[Paymentsummarynumber]='" & UStV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
|
||||
Case 8 : da_id = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & UStV_POS.UStVPo_ReDat & "' and ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & UStV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
|
||||
|
||||
End Select
|
||||
scanSonstiges.INIT_daId(da_id)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Windows.Documents
|
||||
Imports io.konik.zugferd.unqualified
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class UsrCntlessensbestellungen
|
||||
|
||||
2
SDL/kunden/frmKundenblatt.Designer.vb
generated
2
SDL/kunden/frmKundenblatt.Designer.vb
generated
@@ -2241,7 +2241,7 @@ Partial Class frmKundenblatt
|
||||
'
|
||||
Me.cntxtCntxtMDM.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||
Me.cntxtCntxtMDM.Name = "cntxtCntxtMDM"
|
||||
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem4
|
||||
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem8
|
||||
Me.cntxtCntxtMDM.Size = New System.Drawing.Size(61, 4)
|
||||
Me.cntxtCntxtMDM.Text = "cntxtMDM"
|
||||
'
|
||||
|
||||
@@ -59,9 +59,17 @@ Public Class usrCntlCBAM
|
||||
and eza_VertretungsVerhaeltnisCode=2
|
||||
"
|
||||
Else
|
||||
'Die Unterabfrage hat mehr als einen Wert zurückgegeben. Das ist nicht zulässig, wenn die Unterabfrage auf =, !=, <, <=, > oder >= folgt oder als Ausdruck verwendet wird.
|
||||
'SQLSTR &= "
|
||||
' and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
' "
|
||||
'korrigierte Query:
|
||||
SQLSTR &= "
|
||||
and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
and EXISTS (SELECT 1 FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId = eza_Id AND [ezaAd_AdressTyp] = 'CN' AND isnull([ezaAd_NameFirma1], [ezaAd_TeilnehmerEORI]) ='" & EORI & "')
|
||||
"
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim dt = SQL.loadDgvBySql(SQLSTR, "FMZOLL", 600)
|
||||
@@ -389,8 +397,14 @@ Public Class usrCntlCBAM
|
||||
and eza_VertretungsVerhaeltnisCode=2
|
||||
"
|
||||
Else
|
||||
'Das ist nicht zulässig, wenn die Unterabfrage auf =, !=, <, <=, > oder >= folgt oder als Ausdruck verwendet wird.
|
||||
|
||||
'SQLSTR &= "
|
||||
' and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
' "
|
||||
|
||||
SQLSTR &= "
|
||||
and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
and EXISTS (select 1 FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN' AND isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI])='" & EORI & "')
|
||||
"
|
||||
End If
|
||||
|
||||
@@ -466,9 +480,15 @@ Public Class usrCntlCBAM
|
||||
and eza_VertretungsVerhaeltnisCode=2
|
||||
"
|
||||
Else
|
||||
'Die Unterabfrage hat mehr als einen Wert zurückgegeben. Das ist nicht zulässig, wenn die Unterabfrage auf =, !=, <, <=, > oder >= folgt oder als Ausdruck verwendet wird.
|
||||
'SQLSTR &= "
|
||||
' and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
' "
|
||||
|
||||
SQLSTR &= "
|
||||
and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
and EXISTS (select 1 FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN' and isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI])='" & EORI & "')
|
||||
"
|
||||
|
||||
End If
|
||||
|
||||
If SQLSTR_WHERE_FIRMEN <> "" Then SQLSTR &= " and EZA_firma in ( " & SQLSTR_WHERE_FIRMEN & ")"
|
||||
@@ -570,8 +590,13 @@ Public Class usrCntlCBAM
|
||||
and eza_VertretungsVerhaeltnisCode=2
|
||||
"
|
||||
Else
|
||||
''Die Unterabfrage hat mehr als einen Wert zurückgegeben. Das ist nicht zulässig, wenn die Unterabfrage auf =, !=, <, <=, > oder >= folgt oder als Ausdruck verwendet wird.
|
||||
'SQLSTR &= "
|
||||
' and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
' "
|
||||
|
||||
SQLSTR &= "
|
||||
and (select isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI]) FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN')='" & EORI & "'
|
||||
and EXISTS(select 1 FROM tblDakosy_EZA_Adressen WHERE ezaAd_EZAId=eza_Id and [ezaAd_AdressTyp]='CN' AND isnull([ezaAd_NameFirma1],[ezaAd_TeilnehmerEORI])='" & EORI & "')
|
||||
"
|
||||
End If
|
||||
|
||||
|
||||
4970
SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb
generated
4970
SDL/kunden/usrcntlKundeBearbeitenFull.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@@ -110,6 +110,7 @@ Public Class usrcntlKundeBearbeitenFull
|
||||
bntGOBOXUmstellung.Enabled = isVerag360
|
||||
btnKKhinzufuegen.Enabled = isVerag360
|
||||
Button9.Enabled = isVerag360
|
||||
cbxkeineMWSt.Visible = isVerag360
|
||||
|
||||
usrCntlAufschubkonten.initMe(kdnr)
|
||||
|
||||
@@ -360,6 +361,7 @@ Public Class usrcntlKundeBearbeitenFull
|
||||
cbxSonst_CsvMSE.Checked = loadValue(ADRESSE.MSEExportCSV, False)
|
||||
cbxSonst_CsvUTA.Checked = loadValue(ADRESSE.UTAExportCSV, False)
|
||||
cbxUIDMehrfachverwendung.Checked = KUNDE_ERW.kde_UIDMehrfachverwendung
|
||||
cbxkeineMWSt.Checked = KUNDE_ERW.kde_keineMWSt
|
||||
|
||||
|
||||
txtAbf_ZollVmVom.Enabled = cbxAbf_ZollVM.Checked
|
||||
@@ -1856,6 +1858,7 @@ Public Class usrcntlKundeBearbeitenFull
|
||||
Private Sub dgvBankverbindungen_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvBankverbindungen.CellMouseClick
|
||||
|
||||
If e.RowIndex < 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
If e.ColumnIndex < 0 Then Exit Sub
|
||||
|
||||
DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True
|
||||
If e.Button = MouseButtons.Right Then
|
||||
@@ -1864,7 +1867,7 @@ Public Class usrcntlKundeBearbeitenFull
|
||||
|
||||
If sender Is dgvBankverbindungen Then
|
||||
If Not bankverbindungBearbeiten Then Exit Sub
|
||||
If dgvBankverbindungen.SelectedRows.Count = 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
If dgvBankverbindungen.SelectedCells.Count = 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
dgvBankverbindungen.CurrentCell = dgvBankverbindungen.Rows(e.RowIndex).Cells(e.ColumnIndex)
|
||||
|
||||
If dgvBankverbindungen.CurrentRow.Cells("bnk_archiv").Value Is Nothing OrElse (Not IsDBNull(dgvBankverbindungen.CurrentRow.Cells("bnk_archiv").Value) AndAlso dgvBankverbindungen.CurrentRow.Cells("bnk_archiv").Value) AndAlso dgvBankverbindungen.CurrentRow.Cells("bnk_id").Value IsNot Nothing Then
|
||||
@@ -2163,4 +2166,23 @@ Public Class usrcntlKundeBearbeitenFull
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cbxkeineMWSt_Click(sender As Object, e As EventArgs) Handles cbxkeineMWSt.Click
|
||||
If cbxkeineMWSt.Checked Then
|
||||
|
||||
Dim sqlStringSteuerNr = "SELECT count(*) from tblSteuernummern where UStV = 1 and tblSteuernummern.AdressenNr = " & ADRESSE.AdressenNr
|
||||
Dim aktiveSteuerNr As Integer = CInt((New SQL).getValueTxtBySql(sqlStringSteuerNr, "FMZOLL"))
|
||||
|
||||
If aktiveSteuerNr > 0 Then
|
||||
If vbYes = MsgBox("Der Kunde hat aktuell " & aktiveSteuerNr & " aktive Steuer-Nummern!" & vbNewLine & "Trotzdem setzen? ", vbYesNoCancel) Then
|
||||
cbxkeineMWSt.Checked = True
|
||||
Else
|
||||
cbxkeineMWSt.Checked = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -554,7 +554,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
|
||||
sqlstr &= "SELECT Adressen.AdressenNr, Adressen.[Name 1] as Name, tblIDSTransactionsNew.[CustomerCode], Sum(tblIDSTransactionsNew.[TransactionVolume]) AS Liter, Sum(tblIDSTransactionsNew.AmminclVAT) AS Brutto, Sum(tblIDSTransactionsNew.[TotalNetAmount]) AS Netto, Sum(tblIDSTransactionsNew.Rabattbetrag) AS Rabatt
|
||||
FROM ((tblIDSTransactionsNew INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode) INNER JOIN tbl_IDS_Produkte ON tblIDSTransactionsNew.[ProductTypeCode] = tbl_IDS_Produkte.ProductTypeCode) INNER JOIN Adressen ON tblIDSTransactionsNew.KdNrVERAG = Adressen.AdressenNr
|
||||
WHERE tblIDSTransactionsNew.[OutletCountryCode]" & sqlwhere &
|
||||
WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[OutletCountryCode]" & sqlwhere &
|
||||
"GROUP BY Adressen.AdressenNr, Adressen.[Name 1], tblIDSTransactionsNew.[CustomerCode];"
|
||||
|
||||
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
|
||||
@@ -1685,6 +1685,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
outFile.WriteLine(clmns)
|
||||
|
||||
Next
|
||||
outFile.Flush()
|
||||
outFile.Close()
|
||||
Next
|
||||
End If
|
||||
@@ -4318,7 +4319,7 @@ Public Class frmMDMDatenverarbetiung
|
||||
From [VERAG].[dbo].[tblMSESettlements] as bills
|
||||
inner join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||
inner join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is not null and isnull(trans.charged) = 0 ", "FMZOLL") Then
|
||||
where bills.invoice_date = '" & DateTimePicker2.Text & "' and trans.chargedDatetime is not null and isnull(trans.charged,0) = 0 ", "FMZOLL") Then
|
||||
PictureBox1.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net47" />
|
||||
<package id="TAlex.WPF.Controls" version="2.0.1.0" targetFramework="net40-Client" />
|
||||
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net45" />
|
||||
<package id="ZUGFeRD.NET" version="1.0.1" targetFramework="net47" />
|
||||
<package id="ZUGFeRD-csharp" version="16.0.2" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user