Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024
This commit is contained in:
@@ -1897,6 +1897,8 @@ Public Class cFakturierung
|
|||||||
|
|
||||||
Dim BelegartenKz = If(Gesamt_RG_Betrag < 0, "AG", "AR")
|
Dim BelegartenKz = If(Gesamt_RG_Betrag < 0, "AG", "AR")
|
||||||
|
|
||||||
|
If ROW("RechnungsNr") Is DBNull.Value Then Return ""
|
||||||
|
|
||||||
Dim RechnungsNr = If(ROW("RechnungsNr") IsNot DBNull.Value, addYeartoRgNr(FIRMA.Firma_ID, ROW("Buchungsjahr")) & ROW("RechnungsNr"), "Vorschau")
|
Dim RechnungsNr = If(ROW("RechnungsNr") IsNot DBNull.Value, addYeartoRgNr(FIRMA.Firma_ID, ROW("Buchungsjahr")) & ROW("RechnungsNr"), "Vorschau")
|
||||||
Dim RechnungsDatum = If(ROW("RechnungsDatum") IsNot DBNull.Value, ROW("RechnungsDatum"), "Vorschau")
|
Dim RechnungsDatum = If(ROW("RechnungsDatum") IsNot DBNull.Value, ROW("RechnungsDatum"), "Vorschau")
|
||||||
Dim zahlungszieldatum As Date = CDate(RechnungsDatum).AddDays(ZZTage)
|
Dim zahlungszieldatum As Date = CDate(RechnungsDatum).AddDays(ZZTage)
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ Public Class frmAbrechnungsMaske
|
|||||||
FirmaTmp = "VERAGIMEX"
|
FirmaTmp = "VERAGIMEX"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not IsDBNull(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) AndAlso CInt(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) = 19 Then
|
||||||
|
FirmaTmp = "VERAG360"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||||
'FirmaTmp = "AMBAR"
|
'FirmaTmp = "AMBAR"
|
||||||
'End If
|
'End If
|
||||||
@@ -90,6 +96,12 @@ Public Class frmAbrechnungsMaske
|
|||||||
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE FIRMENGRUPPE IN ('AMBAR') ", False, "FMZOLL")
|
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE FIRMENGRUPPE IN ('AMBAR') ", False, "FMZOLL")
|
||||||
cboFirma.changeItem("24")
|
cboFirma.changeItem("24")
|
||||||
MyComboBox2.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
MyComboBox2.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
||||||
|
|
||||||
|
Case "VERAG360"
|
||||||
|
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID=19", False, "FMZOLL")
|
||||||
|
cboFirma.changeItem("19")
|
||||||
|
MyComboBox2.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where isnull(mit_firmaFMZoll,0)=19 and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
||||||
|
|
||||||
Case "VERAGIMEX"
|
Case "VERAGIMEX"
|
||||||
Dim whereFirma = " AND FIRMENGRUPPE IN ('VERAG','IMEX','ATILLA','VERAGUNISPED','FRONTOFFICE') "
|
Dim whereFirma = " AND FIRMENGRUPPE IN ('VERAG','IMEX','ATILLA','VERAGUNISPED','FRONTOFFICE') "
|
||||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGAG_DE", "SDL") Then
|
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGAG_DE", "SDL") Then
|
||||||
|
|||||||
24
SDL/Fakturierung/frmFaktSammelRgDrucken.Designer.vb
generated
24
SDL/Fakturierung/frmFaktSammelRgDrucken.Designer.vb
generated
@@ -58,6 +58,7 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
Me.Label6 = New System.Windows.Forms.Label()
|
Me.Label6 = New System.Windows.Forms.Label()
|
||||||
Me.cboAbfertigungsart = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
Me.cboAbfertigungsart = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
Me.Button2 = New System.Windows.Forms.Button()
|
Me.Button2 = New System.Windows.Forms.Button()
|
||||||
|
Me.RadioButton5 = New System.Windows.Forms.RadioButton()
|
||||||
Me.pnl.SuspendLayout()
|
Me.pnl.SuspendLayout()
|
||||||
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
@@ -66,6 +67,7 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
'
|
'
|
||||||
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||||
Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.pnl.Controls.Add(Me.RadioButton5)
|
||||||
Me.pnl.Controls.Add(Me.RadioButton6)
|
Me.pnl.Controls.Add(Me.RadioButton6)
|
||||||
Me.pnl.Controls.Add(Me.RadioButton4)
|
Me.pnl.Controls.Add(Me.RadioButton4)
|
||||||
Me.pnl.Controls.Add(Me.RadioButton3)
|
Me.pnl.Controls.Add(Me.RadioButton3)
|
||||||
@@ -74,13 +76,13 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
Me.pnl.Controls.Add(Me.RadioButton)
|
Me.pnl.Controls.Add(Me.RadioButton)
|
||||||
Me.pnl.Location = New System.Drawing.Point(12, 12)
|
Me.pnl.Location = New System.Drawing.Point(12, 12)
|
||||||
Me.pnl.Name = "pnl"
|
Me.pnl.Name = "pnl"
|
||||||
Me.pnl.Size = New System.Drawing.Size(113, 145)
|
Me.pnl.Size = New System.Drawing.Size(113, 167)
|
||||||
Me.pnl.TabIndex = 0
|
Me.pnl.TabIndex = 0
|
||||||
'
|
'
|
||||||
'RadioButton6
|
'RadioButton6
|
||||||
'
|
'
|
||||||
Me.RadioButton6.AutoSize = True
|
Me.RadioButton6.AutoSize = True
|
||||||
Me.RadioButton6.Location = New System.Drawing.Point(8, 122)
|
Me.RadioButton6.Location = New System.Drawing.Point(8, 141)
|
||||||
Me.RadioButton6.Name = "RadioButton6"
|
Me.RadioButton6.Name = "RadioButton6"
|
||||||
Me.RadioButton6.Size = New System.Drawing.Size(76, 17)
|
Me.RadioButton6.Size = New System.Drawing.Size(76, 17)
|
||||||
Me.RadioButton6.TabIndex = 5
|
Me.RadioButton6.TabIndex = 5
|
||||||
@@ -92,7 +94,7 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
'RadioButton4
|
'RadioButton4
|
||||||
'
|
'
|
||||||
Me.RadioButton4.AutoSize = True
|
Me.RadioButton4.AutoSize = True
|
||||||
Me.RadioButton4.Location = New System.Drawing.Point(8, 99)
|
Me.RadioButton4.Location = New System.Drawing.Point(8, 95)
|
||||||
Me.RadioButton4.Name = "RadioButton4"
|
Me.RadioButton4.Name = "RadioButton4"
|
||||||
Me.RadioButton4.Size = New System.Drawing.Size(91, 17)
|
Me.RadioButton4.Size = New System.Drawing.Size(91, 17)
|
||||||
Me.RadioButton4.TabIndex = 4
|
Me.RadioButton4.TabIndex = 4
|
||||||
@@ -104,7 +106,7 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
'RadioButton3
|
'RadioButton3
|
||||||
'
|
'
|
||||||
Me.RadioButton3.AutoSize = True
|
Me.RadioButton3.AutoSize = True
|
||||||
Me.RadioButton3.Location = New System.Drawing.Point(8, 76)
|
Me.RadioButton3.Location = New System.Drawing.Point(8, 74)
|
||||||
Me.RadioButton3.Name = "RadioButton3"
|
Me.RadioButton3.Name = "RadioButton3"
|
||||||
Me.RadioButton3.Size = New System.Drawing.Size(72, 17)
|
Me.RadioButton3.Size = New System.Drawing.Size(72, 17)
|
||||||
Me.RadioButton3.TabIndex = 3
|
Me.RadioButton3.TabIndex = 3
|
||||||
@@ -498,6 +500,19 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||||
Me.Button2.UseVisualStyleBackColor = True
|
Me.Button2.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'RadioButton5
|
||||||
|
'
|
||||||
|
Me.RadioButton5.AutoSize = True
|
||||||
|
Me.RadioButton5.Enabled = False
|
||||||
|
Me.RadioButton5.Location = New System.Drawing.Point(8, 118)
|
||||||
|
Me.RadioButton5.Name = "RadioButton5"
|
||||||
|
Me.RadioButton5.Size = New System.Drawing.Size(92, 17)
|
||||||
|
Me.RadioButton5.TabIndex = 6
|
||||||
|
Me.RadioButton5.TabStop = True
|
||||||
|
Me.RadioButton5.Tag = "6"
|
||||||
|
Me.RadioButton5.Text = "6 Maut/Diesel"
|
||||||
|
Me.RadioButton5.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'frmFaktSammelRgDrucken
|
'frmFaktSammelRgDrucken
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -578,4 +593,5 @@ Partial Class frmFaktSammelRgDrucken
|
|||||||
Friend WithEvents Label6 As Label
|
Friend WithEvents Label6 As Label
|
||||||
Friend WithEvents cboAbfertigungsart As VERAG_PROG_ALLGEMEIN.MyComboBox
|
Friend WithEvents cboAbfertigungsart As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||||
Friend WithEvents Button2 As Button
|
Friend WithEvents Button2 As Button
|
||||||
|
Friend WithEvents RadioButton5 As RadioButton
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ Public Class frmFaktSammelRgDrucken
|
|||||||
FirmaTmp = "VERAGIMEX"
|
FirmaTmp = "VERAGIMEX"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not IsDBNull(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) AndAlso CInt(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) = 19 Then
|
||||||
|
FirmaTmp = "VERAG360"
|
||||||
|
End If
|
||||||
|
|
||||||
Label5.Visible = True
|
Label5.Visible = True
|
||||||
cboFaktGrp.Visible = True
|
cboFaktGrp.Visible = True
|
||||||
|
|
||||||
@@ -133,6 +137,10 @@ Public Class frmFaktSammelRgDrucken
|
|||||||
cboSB.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
cboSB.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
||||||
Label5.Visible = False
|
Label5.Visible = False
|
||||||
cboFaktGrp.Visible = False
|
cboFaktGrp.Visible = False
|
||||||
|
Case "VERAG360"
|
||||||
|
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID=19", False, "FMZOLL")
|
||||||
|
cboFirma.changeItem("19")
|
||||||
|
cboSB.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where isnull(mit_firmaFMZoll,0)=19 and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True)
|
||||||
End Select
|
End Select
|
||||||
' cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) ORDER BY Firma_ID ", True, "FMZOLL")
|
' cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) ORDER BY Firma_ID ", True, "FMZOLL")
|
||||||
cboFirma.changeItem(Firma)
|
cboFirma.changeItem(Firma)
|
||||||
@@ -140,8 +148,10 @@ Public Class frmFaktSammelRgDrucken
|
|||||||
|
|
||||||
|
|
||||||
cboFaktGrp.Items.Clear()
|
cboFaktGrp.Items.Clear()
|
||||||
|
If FirmaTmp <> "VERAG360" Then
|
||||||
cboFaktGrp.fillWithSQL("SELECT [Code],[Bezeichnung] FROM tblFakturierungsgruppe", False, "ADMIN", False)
|
cboFaktGrp.fillWithSQL("SELECT [Code],[Bezeichnung] FROM tblFakturierungsgruppe", False, "ADMIN", False)
|
||||||
cboFaktGrp.changeItem(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_fakturierungsgruppe)
|
cboFaktGrp.changeItem(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_fakturierungsgruppe)
|
||||||
|
End If
|
||||||
|
|
||||||
cProgramFunctions.initDrucker(cboPrinter)
|
cProgramFunctions.initDrucker(cboPrinter)
|
||||||
|
|
||||||
|
|||||||
@@ -559,6 +559,10 @@ Public Class usrCntlFaktAbrechnung
|
|||||||
FirmaTmp = "VERAGIMEX"
|
FirmaTmp = "VERAGIMEX"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not IsDBNull(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) AndAlso CInt(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_firmaFMZoll) = 19 Then
|
||||||
|
FirmaTmp = "VERAG360"
|
||||||
|
End If
|
||||||
|
|
||||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||||
'FirmaTmp = "AMBAR"
|
'FirmaTmp = "AMBAR"
|
||||||
'End If
|
'End If
|
||||||
@@ -594,8 +598,15 @@ Public Class usrCntlFaktAbrechnung
|
|||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
Select Case FirmaTmp
|
||||||
|
|
||||||
|
Case "VERAG360"
|
||||||
|
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID=19", False, "FMZOLL")
|
||||||
|
cboFirma.changeItem("19")
|
||||||
|
Case Else
|
||||||
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) " & whereFirma & " ORDER BY Firma_ID ", True, "FMZOLL", firstEmpty)
|
cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) " & whereFirma & " ORDER BY Firma_ID ", True, "FMZOLL", firstEmpty)
|
||||||
cboFirma.SelectedIndex = 0
|
cboFirma.SelectedIndex = 0
|
||||||
|
End Select
|
||||||
|
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE <> "" And Not VERAG_PROG_ALLGEMEIN.cAllgemein.isCLUSTER And FirmaTmp <> "VERAGIMEX" Then
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE <> "" And Not VERAG_PROG_ALLGEMEIN.cAllgemein.isCLUSTER And FirmaTmp <> "VERAGIMEX" Then
|
||||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "ATILLA" Then
|
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "ATILLA" Then
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Challenge
|
Imports Challenge
|
||||||
Imports com.sun.org.glassfish.external.probe.provider.annotations
|
Imports com.sun.org.glassfish.external.probe.provider.annotations
|
||||||
|
Imports GrapeCity.ActiveReports.Export.Pdf.Section.Signing
|
||||||
Imports itextsharp.text.pdf
|
Imports itextsharp.text.pdf
|
||||||
Imports MDM_Worker
|
Imports MDM_Worker
|
||||||
|
Imports sun.swing
|
||||||
Imports TAlex.WPF.Helpers
|
Imports TAlex.WPF.Helpers
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||||
@@ -1272,18 +1274,20 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
||||||
Dim verarbOK = IIf(test, False, True)
|
Dim verarbOK = IIf(test, False, True)
|
||||||
|
Dim RECHNUNG As cRechnungsausgang = Nothing
|
||||||
|
|
||||||
|
|
||||||
If Not gen_SPEDBUCH_ByKdNr(uta("Customer Nr"), SPEDBUCH, "UTA",,,, datPloseAnhang.Value) Then verarbOK = False
|
If Not gen_SPEDBUCH_ByKdNr(uta("Customer Nr"), SPEDBUCH, "UTA",,,, datPloseAnhang.Value) Then verarbOK = False
|
||||||
If Not gen_RECHNUNG_BySPEDBUCH(uta("Customer Nr"), SPEDBUCH, "UTA") Then verarbOK = False
|
If Not gen_RECHNUNG_BySPEDBUCH(uta("Customer Nr"), SPEDBUCH, "UTA",,,, RECHNUNG) Then verarbOK = False
|
||||||
|
|
||||||
genUTAAttachmentByKdNr(uta("Customer Nr"), uta("Customer ID"), dir, datPloseAnhang.Value)
|
Dim pathFile = genUTAAttachmentByKdNr(uta("Customer Nr"), uta("Customer ID"), dir, datPloseAnhang.Value)
|
||||||
|
|
||||||
|
If Not AddAttachementToRE(pathFile, uta("Customer Nr"), RECHNUNG, "UTA") Then verarbOK = False
|
||||||
|
|
||||||
If verarbOK Then
|
If verarbOK Then
|
||||||
'UPDATE Fakturiert
|
'UPDATE Fakturiert
|
||||||
SQL.doSQL("UPDATE [tblUTAImportNew] set chargedDatetime=GETDATE() where chargedDatetime is null and [Rechnungsdatum] = '" & DateTimePicker2.Text & "' and Kundennummer = " & uta("Customer ID"), "FMZOLL")
|
SQL.doSQL("UPDATE [tblUTAImportNew] set chargedDatetime=GETDATE() where chargedDatetime is null and [Rechnungsdatum] = '" & DateTimePicker2.Text & "' and Kundennummer = " & uta("Customer ID"), "FMZOLL")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If True Then 'cnt Mod 10 = 0 Then
|
If True Then 'cnt Mod 10 = 0 Then
|
||||||
txtPloseAnh_Einarbeitung.Text = cnt & " / " & dt_Main.Rows.Count
|
txtPloseAnh_Einarbeitung.Text = cnt & " / " & dt_Main.Rows.Count
|
||||||
Dim proz As Double = (cnt / dt_Main.Rows.Count) * 100
|
Dim proz As Double = (cnt / dt_Main.Rows.Count) * 100
|
||||||
@@ -1306,20 +1310,16 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
If Not Directory.Exists(dirAnhang) Then Directory.CreateDirectory(dirAnhang)
|
If Not Directory.Exists(dirAnhang) Then Directory.CreateDirectory(dirAnhang)
|
||||||
|
|
||||||
For Each f In Directory.GetFiles(dir)
|
For Each f In Directory.GetFiles(dir)
|
||||||
File.Copy(f, dirAnhang & (New FileInfo(f)).Name)
|
File.Copy(f, dirAnhang & (New FileInfo(f)).Name)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
pbPloseAnh_Proz.Value = 100
|
pbPloseAnh_Proz.Value = 100
|
||||||
txtPloseAnh_Einarbeitung.Text = dt_Main.Rows.Count & " / " & dt_Main.Rows.Count
|
txtPloseAnh_Einarbeitung.Text = dt_Main.Rows.Count & " / " & dt_Main.Rows.Count
|
||||||
lblPloseAnh_Proz.Text = "100.00 %"
|
lblPloseAnh_Proz.Text = "100.00 %"
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function genRGAtt_MSE(mseParam As cMSEAPI) As Boolean
|
Function genRGAtt_MSE(mseParam As cMSEAPI) As Boolean
|
||||||
Dim top = ""
|
Dim top = ""
|
||||||
'top = " TOP 20 "
|
'top = " TOP 20 "
|
||||||
@@ -1409,11 +1409,24 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
|
|
||||||
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
||||||
Dim verarbOK = IIf(test, False, True)
|
Dim verarbOK = IIf(test, False, True)
|
||||||
|
Dim RECHNUNG As cRechnungsausgang = Nothing
|
||||||
|
|
||||||
If Not gen_SPEDBUCH_ByKdNr(MSE("Customer Nr"), SPEDBUCH, "MSE",,,, datPloseAnhang.Value) Then verarbOK = False
|
If Not gen_SPEDBUCH_ByKdNr(MSE("Customer Nr"), SPEDBUCH, "MSE",,,, datPloseAnhang.Value) Then verarbOK = False
|
||||||
If Not gen_RECHNUNG_BySPEDBUCH(MSE("Customer Nr"), SPEDBUCH, "MSE") Then verarbOK = False
|
If Not gen_RECHNUNG_BySPEDBUCH(MSE("Customer Nr"), SPEDBUCH, "MSE",,,, RECHNUNG) Then verarbOK = False
|
||||||
|
|
||||||
|
Dim pathfilePDF = genMSEAttachmentByKdNr(MSE("Customer Nr"), MSE("Customer ID"), dir, datPloseAnhang.Value)
|
||||||
|
If Not AddAttachementToRE(pathfilePDF, MSE("Customer Nr"), RECHNUNG, "MSE") Then verarbOK = False
|
||||||
|
|
||||||
|
If Directory.Exists(dir) Then
|
||||||
|
For Each f In Directory.GetFiles(dir)
|
||||||
|
If f.Contains(MSE("Customer Nr") & "_Maut_MSE.csv") Then
|
||||||
|
Dim pathFileCSV As String = New FileInfo(f).FullName
|
||||||
|
If Not AddAttachementToRE(pathFileCSV, MSE("Customer Nr"), RECHNUNG, "MSE") Then verarbOK = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
genMSEAttachmentByKdNr(MSE("Customer Nr"), MSE("Customer ID"), dir, datPloseAnhang.Value)
|
|
||||||
|
|
||||||
If verarbOK Then
|
If verarbOK Then
|
||||||
'Update Fakturiert
|
'Update Fakturiert
|
||||||
@@ -1491,7 +1504,7 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
tblIDSInvoicesNew
|
tblIDSInvoicesNew
|
||||||
on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber
|
on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber
|
||||||
WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null and isnull(charged,0) = 0 " & sqlWhere & "
|
WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null and isnull(charged,0) <> 0 " & sqlWhere & "
|
||||||
order by tblIDSTransactionsNew.KdNrVERAG"
|
order by tblIDSTransactionsNew.KdNrVERAG"
|
||||||
|
|
||||||
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
|
Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200)
|
||||||
@@ -1522,18 +1535,20 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
Directory.CreateDirectory(dir)
|
Directory.CreateDirectory(dir)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For Each IDS In dt_Main.Rows
|
For Each IDS In dt_Main.Rows
|
||||||
|
|
||||||
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
||||||
Dim verarbOK = IIf(test, False, True)
|
Dim verarbOK = IIf(test, False, True)
|
||||||
|
Dim RECHNUNG As cRechnungsausgang = Nothing
|
||||||
|
|
||||||
If Not gen_SPEDBUCH_ByKdNr(IDS("KdNrVERAG"), SPEDBUCH, art,,,, datPloseAnhang.Value) Then verarbOK = False
|
If Not gen_SPEDBUCH_ByKdNr(IDS("KdNrVERAG"), SPEDBUCH, art,,,, datPloseAnhang.Value) Then verarbOK = False
|
||||||
If Not gen_RECHNUNG_BySPEDBUCH(IDS("KdNrVERAG"), SPEDBUCH, art) Then verarbOK = False
|
If Not gen_RECHNUNG_BySPEDBUCH(IDS("KdNrVERAG"), SPEDBUCH, art,,,, RECHNUNG) Then verarbOK = False
|
||||||
|
|
||||||
If IDS("Rechnungsdruck") = 2 Then
|
If IDS("Rechnungsdruck") = 2 Then
|
||||||
If genIDSAttachmentByKdNr(IDS("KdNrVERAG"), IDS("CustomerCode"), dir, datPloseAnhang.Value, art) = "" Then verarbOK = False
|
|
||||||
|
Dim pathfile = genIDSAttachmentByKdNr(IDS("KdNrVERAG"), IDS("CustomerCode"), dir, datPloseAnhang.Value, art)
|
||||||
|
If Not AddAttachementToRE(pathfile, IDS("KdNrVERAG"), RECHNUNG, "IDS") Then verarbOK = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IDS("InvoiceID") > 0 Then
|
If IDS("InvoiceID") > 0 Then
|
||||||
@@ -1552,6 +1567,9 @@ Public Class frmMDMDatenverarbetiung
|
|||||||
pdfReader.Close()
|
pdfReader.Close()
|
||||||
|
|
||||||
Dim PdfTmp = fm.fillPDFVorhandenesLokalesPDF_Path(DS.GET_TOP1_PATH, listTowrite, , , , ,)
|
Dim PdfTmp = fm.fillPDFVorhandenesLokalesPDF_Path(DS.GET_TOP1_PATH, listTowrite, , , , ,)
|
||||||
|
|
||||||
|
If Not AddAttachementToRE(PdfTmp, IDS("KdNrVERAG"), RECHNUNG, "IDS") Then verarbOK = False
|
||||||
|
|
||||||
File.Copy(PdfTmp, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True)
|
File.Copy(PdfTmp, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True)
|
||||||
|
|
||||||
|
|
||||||
@@ -1718,8 +1736,29 @@ End If
|
|||||||
For Each R_ASFINAG In distinctDT_distKunden.Rows
|
For Each R_ASFINAG In distinctDT_distKunden.Rows
|
||||||
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
|
||||||
Dim verarbOK = IIf(test, False, True)
|
Dim verarbOK = IIf(test, False, True)
|
||||||
|
Dim RECHNUNG As cRechnungsausgang = Nothing
|
||||||
If Not gen_SPEDBUCH_ByKdNr(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG",,,, abrechnungsdatum) Then verarbOK = False
|
If Not gen_SPEDBUCH_ByKdNr(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG",,,, abrechnungsdatum) Then verarbOK = False
|
||||||
If Not gen_RECHNUNG_BySPEDBUCH(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG") Then verarbOK = False
|
If Not gen_RECHNUNG_BySPEDBUCH(R_ASFINAG("KundenNr"), SPEDBUCH, "ASFINAG",,,, RECHNUNG) Then verarbOK = False
|
||||||
|
|
||||||
|
If Directory.Exists(dir) Then
|
||||||
|
For Each f In Directory.GetFiles(dir)
|
||||||
|
If f.Contains(R_ASFINAG("KundenNr") & "_Maut_AT.csv") Then
|
||||||
|
Dim pathFileCSV As String = New FileInfo(f).FullName
|
||||||
|
If Not AddAttachementToRE(pathFileCSV, R_ASFINAG("KundenNr"), RECHNUNG, "ASFINAG") Then verarbOK = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Directory.Exists(dir) Then
|
||||||
|
For Each f In Directory.GetFiles(dir)
|
||||||
|
If f.Contains(R_ASFINAG("KundenNr") & "_Maut_AT.pdf") Then
|
||||||
|
Dim pathFilePDF As String = New FileInfo(f).FullName
|
||||||
|
If Not AddAttachementToRE(pathFilePDF, R_ASFINAG("KundenNr"), RECHNUNG, "ASFINAG") Then verarbOK = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If verarbOK Then
|
If verarbOK Then
|
||||||
|
|
||||||
@@ -3327,7 +3366,7 @@ End If
|
|||||||
|
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
Function gen_RECHNUNG_BySPEDBUCH(KdNr As String, SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, Lieferant As String, Optional PLOSEKundenNr As String = "", Optional von As Date = Nothing, Optional bis As Date = Nothing)
|
Function gen_RECHNUNG_BySPEDBUCH(KdNr As String, SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, Lieferant As String, Optional PLOSEKundenNr As String = "", Optional von As Date = Nothing, Optional bis As Date = Nothing, Optional RE As cRechnungsausgang = Nothing)
|
||||||
Try
|
Try
|
||||||
|
|
||||||
If KdNr = "" Then Return False
|
If KdNr = "" Then Return False
|
||||||
@@ -3621,7 +3660,20 @@ End If
|
|||||||
Call usrCntlFaktAbrechnung.przPP(RG) ' Porto/Papiere errechnen
|
Call usrCntlFaktAbrechnung.przPP(RG) ' Porto/Papiere errechnen
|
||||||
Call usrCntlFaktAbrechnung.przBS415(RG) ' Bankspesen errechnen
|
Call usrCntlFaktAbrechnung.przBS415(RG) ' Bankspesen errechnen
|
||||||
|
|
||||||
Return IIf(test, True, RG.SAVE)
|
RE = RG
|
||||||
|
|
||||||
|
If test Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
|
||||||
|
If RG.SAVE Then
|
||||||
|
RE = RG
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As System.Exception
|
Catch ex As System.Exception
|
||||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
@@ -4604,11 +4656,6 @@ RabattBerechnen:
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If trans.TransactionVolume <> 0 Then
|
If trans.TransactionVolume <> 0 Then
|
||||||
trans.RabattbetragProLiter = trans.Rabattbetrag / trans.TransactionVolume
|
trans.RabattbetragProLiter = trans.Rabattbetrag / trans.TransactionVolume
|
||||||
trans.RabattbetragProLiterOrig = trans.RabattbetragProLiter
|
trans.RabattbetragProLiterOrig = trans.RabattbetragProLiter
|
||||||
@@ -4631,182 +4678,6 @@ RabattBerechnen:
|
|||||||
initDgv_IDS()
|
initDgv_IDS()
|
||||||
MsgBox(i & " Rechenwerte wurden gesetzt!")
|
MsgBox(i & " Rechenwerte wurden gesetzt!")
|
||||||
|
|
||||||
' Public Function fktDieselIDSImportiereCSV()
|
|
||||||
|
|
||||||
|
|
||||||
'1380 If Not IsNull(![KdNrVERAG]) Then
|
|
||||||
|
|
||||||
' ' Kunde ohne Rabatt
|
|
||||||
'1390 strSQL = "SELECT *" & _
|
|
||||||
' " FROM tbl_IDS_Kunden_ohne_Rabatt" & _
|
|
||||||
' " WHERE (((tbl_IDS_Kunden_ohne_Rabatt.CustomerCode)=" & ![KdNrVERAG] & "));"
|
|
||||||
'1400 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
|
||||||
'1410 If Not rstIDSRechenwert.EOF Then
|
|
||||||
'1420 GoTo Rabatt_errechnen
|
|
||||||
'1430 End If
|
|
||||||
'1440 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
' ' Rechenwert für Land/Station/Kunde/Produkt ermitteln
|
|
||||||
'1450 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
|
|
||||||
' " FROM tbl_IDS_Rechenwerte" & _
|
|
||||||
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
|
|
||||||
' " AND ((OutletCode)=" & ![Outlet Code] & ")" & _
|
|
||||||
' " AND ((CustomerCode)=" & ![KdNrVERAG] & ")" & _
|
|
||||||
' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
|
|
||||||
' " ORDER BY Zeitstempel DESC;"
|
|
||||||
'1460 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
|
||||||
'1470 If Not rstIDSRechenwert.EOF Then
|
|
||||||
'1480 GoTo Rechenwert_eintragen
|
|
||||||
'1490 End If
|
|
||||||
'1500 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
' ' Rechenwert für Land/Kunde/Produkt ermittteln
|
|
||||||
'1510 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
|
|
||||||
' " FROM tbl_IDS_Rechenwerte" & _
|
|
||||||
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
|
|
||||||
' " AND ((OutletCode) Is Null)" & _
|
|
||||||
' " AND ((CustomerCode)=" & ![KdNrVERAG] & ")" & _
|
|
||||||
' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
|
|
||||||
' " ORDER BY Zeitstempel DESC;"
|
|
||||||
'1520 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
|
||||||
'1530 If Not rstIDSRechenwert.EOF Then
|
|
||||||
'1540 GoTo Rechenwert_eintragen
|
|
||||||
'1550 End If
|
|
||||||
'1560 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
'1570 End If
|
|
||||||
|
|
||||||
' ' Rechenwert für Land/Station/Produkt ermitteln
|
|
||||||
'1580 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
|
|
||||||
' " FROM tbl_IDS_Rechenwerte" & _
|
|
||||||
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
|
|
||||||
' " AND ((OutletCode)=" & ![Outlet Code] & ")" & _
|
|
||||||
' " AND ((CustomerCode) Is Null)" & _
|
|
||||||
' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
|
|
||||||
' " ORDER BY Zeitstempel DESC;"
|
|
||||||
'1590 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
|
||||||
'1600 If Not rstIDSRechenwert.EOF Then
|
|
||||||
'1610 GoTo Rechenwert_eintragen
|
|
||||||
'1620 End If
|
|
||||||
'1630 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
' ' Rechenwert für Land/Produkt ermitteln
|
|
||||||
'1640 strSQL = "SELECT Rechenwert, Kz, KategorieNr" & _
|
|
||||||
' " FROM tbl_IDS_Rechenwerte" & _
|
|
||||||
' " WHERE (((OutletCountryCode)=" & ![Outlet Country Code] & ")" & _
|
|
||||||
' " AND ((OutletCode) Is Null)" & _
|
|
||||||
' " AND ((CustomerCode) Is Null)" & _
|
|
||||||
' " AND ((ProductTypeCode)=" & ![Product Type Code] & "))" & _
|
|
||||||
' " ORDER BY Zeitstempel DESC;"
|
|
||||||
'1650 Set rstIDSRechenwert = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
|
|
||||||
'1660 If Not rstIDSRechenwert.EOF Then
|
|
||||||
'1670 GoTo Rechenwert_eintragen
|
|
||||||
'1680 End If
|
|
||||||
'1690 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
'1700 GoTo Rabatt_errechnen
|
|
||||||
|
|
||||||
'Rechenwert_eintragen:
|
|
||||||
'1710 !Rechenwert = rstIDSRechenwert!Rechenwert
|
|
||||||
'1720 !Kz = rstIDSRechenwert!Kz
|
|
||||||
'1730 If Not IsNull(rstIDSRechenwert!KategorieNr) Then
|
|
||||||
'1740 Set qry = dbs.QueryDefs("qry_IDS_KategorieNr_ProductTypeCode_Rechenwert")
|
|
||||||
'1750 qry.Parameters("[prmKategorieNr]") = rstIDSRechenwert!KategorieNr
|
|
||||||
'1760 qry.Parameters("[prmProductTypeCode]") = ![Product Type Code]
|
|
||||||
'1770 Set rst = qry.OpenRecordset(dbOpenSnapshot)
|
|
||||||
'1780 If Not rst.EOF Then
|
|
||||||
'1790 !Rechenwert = !Rechenwert + rst!Rechenwert
|
|
||||||
'1800 If !Rechenwert < 0 Then
|
|
||||||
'1810 !Rechenwert = 0
|
|
||||||
'1820 End If
|
|
||||||
'1830 End If
|
|
||||||
'1840 rst.Close
|
|
||||||
'1850 qry.Close
|
|
||||||
'1860 End If
|
|
||||||
'1870 rstIDSRechenwert.Close
|
|
||||||
|
|
||||||
|
|
||||||
'Rabatt_errechnen:
|
|
||||||
'1880 Select Case !Kz
|
|
||||||
' Case "P" 'Rechenwert ist Preis pro Liter
|
|
||||||
'1890 !Rabattbetrag = ![Total Net Amount] - Int(!Rechenwert * ![Transaction Volume] * 100 + 0.5) / 100
|
|
||||||
'1900 Case "R" 'Rechenwert ist Rabatt pro Liter
|
|
||||||
'1910 !Rabattbetrag = Int(!Rechenwert * ![Transaction Volume] * 100 + 0.5) / 100
|
|
||||||
'1920 End Select
|
|
||||||
'1930 If ![Transaction Volume] <> 0 Then
|
|
||||||
'1940 !RabattbetragProLiter = !Rabattbetrag / ![Transaction Volume]
|
|
||||||
'1950 End If
|
|
||||||
|
|
||||||
' ' Zeitstempel und Sachbearbeiter in tblDiesel eintragen
|
|
||||||
'1960 !Zeitstempel = Now
|
|
||||||
'1970 !Sachbearbeiter = CurrentUser()
|
|
||||||
'1980 .Update
|
|
||||||
|
|
||||||
' ' Daten in das Archiv schreiben.
|
|
||||||
'1990 Set qryIDSDieselArchiv = dbs.QueryDefs("qryDieselArchivPKey")
|
|
||||||
'2000 qryIDSDieselArchiv.Parameters("[prmYearMonthDay]") = ![Year Month Day]
|
|
||||||
'2010 qryIDSDieselArchiv.Parameters("[prmPaymentSummaryNumber]") = ![Payment summary number]
|
|
||||||
'2020 qryIDSDieselArchiv.Parameters("[prmCustomerCode]") = ![Customer Code]
|
|
||||||
'2030 qryIDSDieselArchiv.Parameters("[prmOutletCountryCode]") = ![Outlet Country Code]
|
|
||||||
'2040 qryIDSDieselArchiv.Parameters("[prmOutletCode]") = ![Outlet Code]
|
|
||||||
'2050 qryIDSDieselArchiv.Parameters("[prmProductTypeCode]") = ![Product Type Code]
|
|
||||||
'2060 Set rstIDSDieselArchiv = qryIDSDieselArchiv.OpenRecordset(dbOpenDynaset)
|
|
||||||
'2070 If rstIDSDieselArchiv.EOF Then
|
|
||||||
'2080 rstIDSDieselArchiv.AddNew
|
|
||||||
'2090 lngDatensätzeAngefügt = lngDatensätzeAngefügt + 1
|
|
||||||
'2100 Call SysCmd(acSysCmdSetStatus, "IDS-Diesel-Archiv Neuzugang: " & ![Year Month Day] & "-" & ![Payment summary number] & "-" & ![Customer Code] & "-" & ![Outlet Country Code] & "-" & ![Outlet Code] & "-" & ![Product Type Code])
|
|
||||||
'2110 Else
|
|
||||||
'2120 rstIDSDieselArchiv.Edit
|
|
||||||
'2130 lngDatensätzeAktualisiert = lngDatensätzeAktualisiert + 1
|
|
||||||
'2140 Call SysCmd(acSysCmdSetStatus, "IDS-Diesel-Archiv Änderung: " & ![Year Month Day] & "-" & ![Payment summary number] & "-" & ![Customer Code] & "-" & ![Outlet Country Code] & "-" & ![Outlet Code] & "-" & ![Product Type Code])
|
|
||||||
'2150 End If
|
|
||||||
'2160 For Each fld In .Fields
|
|
||||||
'2170 rstIDSDieselArchiv(fld.Name) = fld.Value
|
|
||||||
'2180 Next
|
|
||||||
'2190 rstIDSDieselArchiv.Update
|
|
||||||
'2200 rstIDSDieselArchiv.Close
|
|
||||||
'2210 qryIDSDieselArchiv.Close
|
|
||||||
|
|
||||||
'2220 DoEvents
|
|
||||||
'2230 .MoveNext
|
|
||||||
'2240 Loop
|
|
||||||
'2250 wrk.CommitTrans
|
|
||||||
'2260 On Error GoTo Fehler
|
|
||||||
'2270 .Close
|
|
||||||
'2280 End With
|
|
||||||
'2290 Call SysCmd(acSysCmdClearStatus)
|
|
||||||
'2300 DoCmd.Hourglass False
|
|
||||||
'2310 strPrompt = "Es wurden " & lngDatensätzeAngefügt & " Datensätze in das Archiv übernommen."
|
|
||||||
'2320 If lngDatensätzeAktualisiert > 0 Then
|
|
||||||
'2330 strPrompt = strPrompt & vbNewLine & lngDatensätzeAktualisiert & " Archivsätze wurden aktualisiert."
|
|
||||||
'2340 End If
|
|
||||||
'2350 strTitle = "Diesel-Datenarchiv"
|
|
||||||
'2360 MsgBox strPrompt, , strTitle
|
|
||||||
' ' intAntwort = MsgBox("Das Einlesen ist beendet. Soll die Datei gelöscht werden?", vbYesNo + vbQuestion + vbDefaultButton2, Trim(dlg.SelectedItems(1)))
|
|
||||||
' ' If intAntwort = vbYes Then Kill (Trim(dlg.SelectedItems(1)))
|
|
||||||
'2370 Else
|
|
||||||
'2380 MsgBox "Es wurde keine Datei ausgewählt.", vbInformation, "Daten einlesen."
|
|
||||||
'2390 End If
|
|
||||||
|
|
||||||
'Ende:
|
|
||||||
'2400 DoCmd.Hourglass False
|
|
||||||
'2410 Exit Function
|
|
||||||
|
|
||||||
'Rollback:
|
|
||||||
'2420 wrk.Rollback
|
|
||||||
|
|
||||||
'Fehler:
|
|
||||||
'2430 Call SysCmd(acSysCmdClearStatus)
|
|
||||||
'2440 DoCmd.Hourglass False
|
|
||||||
'2450 DoCmd.Beep
|
|
||||||
'2460 MsgBox "Error: " & Err.Number & ". " & Err.Description, , "fktDieselIDSImportiereCSV"
|
|
||||||
'2470 Resume Ende
|
|
||||||
|
|
||||||
' End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -4958,4 +4829,35 @@ RabattBerechnen:
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function AddAttachementToRE(pathFile As String, kdNr As Integer, RECHNUNG As cRechnungsausgang, Lieferant As String) As Boolean
|
||||||
|
|
||||||
|
If Not IO.File.Exists(pathFile) Then Return False
|
||||||
|
|
||||||
|
Dim fi As New System.IO.FileInfo(pathFile)
|
||||||
|
|
||||||
|
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_ABRECHNUNG", Lieferant, datPloseAnhang.Value.ToString("ddMMyyyy"), "", fi.Name,)
|
||||||
|
If Not DS.uploadDataToDATENSERVER(pathFile, fi.Name, fi.Extension,,,, True) Then
|
||||||
|
MsgBox("Fehler beim Speichern: Datenserver! KDNR:" & kdNr)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If CInt(DS.da_id) <= 0 Then
|
||||||
|
MsgBox("Keine DocId!")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Dim da_id = DS.da_id
|
||||||
|
Dim destPath = DS.GET_TOP1_PATH
|
||||||
|
|
||||||
|
If RECHNUNG IsNot Nothing Then
|
||||||
|
RECHNUNG.ANHAENGE.Clear()
|
||||||
|
Dim ANH As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangAnhaenge
|
||||||
|
ANH.dsId = CInt(DS.da_id)
|
||||||
|
ANH.Bezeichnung = DS.da_name
|
||||||
|
RECHNUNG.ANHAENGE.Add(ANH)
|
||||||
|
Return RECHNUNG.SAVE_ANHAENGE(RECHNUNG.RK_ID)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2277,10 +2277,14 @@ Public Class DATENVERVER_OPTIONS
|
|||||||
Dim docPdf As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument()
|
Dim docPdf As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument()
|
||||||
docPdf.LoadFromFile(File)
|
docPdf.LoadFromFile(File)
|
||||||
|
|
||||||
|
If attPath <> "" Then
|
||||||
|
|
||||||
Dim attachment As PdfAttachment = New PdfAttachment(attPath)
|
Dim attachment As PdfAttachment = New PdfAttachment(attPath)
|
||||||
|
|
||||||
docPdf.Attachments.Add(attachment)
|
docPdf.Attachments.Add(attachment)
|
||||||
docPdf.SaveToFile(File)
|
docPdf.SaveToFile(File)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return File
|
Return File
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user