API, etc.
This commit is contained in:
@@ -4865,10 +4865,17 @@ LEFT JOIN VERAG.dbo.tbl_IDS_Länder land
|
||||
Select Case Lieferant
|
||||
Case "PLOSE"
|
||||
If SQL.doSQL("UPDATE tblPLOSE_Details SET plose_Fakturiert=1 WHERE plose_Fakturiert = 0 AND plose_DatumTransaktion between '" & dat_Sum_Von.Value.ToShortDateString & "' and '" & dat_Sum_Bis.Value.ToShortDateString & "' ", "FMZOLL") Then
|
||||
|
||||
setBillingDateCompleted(Lieferant, datPloseAnhang.Value)
|
||||
|
||||
PictureBox1.Visible = True
|
||||
End If
|
||||
Case "UTA"
|
||||
If SQL.doSQL("UPDATE [tblUTAImportNew] set charged=1 where chargedDatetime is not null and isnull(charged,0) = 0 And tblUTAImportNew.Rechnungsdatum = '" & DateTimePicker2.Text & "'", "FMZOLL") Then
|
||||
|
||||
setBillingDateCompleted(Lieferant, datPloseAnhang.Value)
|
||||
setBillingDateCompleted("UTA_VERAG", datPloseAnhang.Value)
|
||||
|
||||
PictureBox1.Visible = True
|
||||
End If
|
||||
Case "MSE"
|
||||
@@ -4877,6 +4884,9 @@ LEFT JOIN VERAG.dbo.tbl_IDS_Länder land
|
||||
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) = 0 ", "FMZOLL") Then
|
||||
|
||||
setBillingDateCompleted(Lieferant, datPloseAnhang.Value)
|
||||
|
||||
PictureBox1.Visible = True
|
||||
End If
|
||||
|
||||
@@ -4887,6 +4897,9 @@ LEFT JOIN VERAG.dbo.tbl_IDS_Länder land
|
||||
PictureBox1.Visible = True
|
||||
End If
|
||||
|
||||
setBillingDateCompleted(Lieferant, datPloseAnhang.Value)
|
||||
setBillingDateCompleted("IDS_Details", datPloseAnhang.Value)
|
||||
|
||||
Case "IDS_AT"
|
||||
If SQL.doSQL("UPDATE [VERAG].[dbo].[tblIDSTransactionsNew] Set charged = 1
|
||||
FROM [VERAG].[dbo].[tblIDSTransactionsNew]
|
||||
@@ -4897,8 +4910,16 @@ LEFT JOIN VERAG.dbo.tbl_IDS_Länder land
|
||||
MsgBox("Funktion setFakturiert für den Lieferant " & Lieferant & " nicht definiert!")
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub setBillingDateCompleted(Lieferant_ As String, date_ As Date)
|
||||
SQL.doSQL("UPDATE tblMDMEinarbeitung SET cast(billingdate as Date)='" & date_.ToShortDateString & "' WHERE supplier = " & Lieferant_ & " AND billingdate is null ", "FMZOLL")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
|
||||
If test Then
|
||||
@@ -5000,6 +5021,9 @@ LEFT JOIN VERAG.dbo.tbl_IDS_Länder land
|
||||
If f.DialogResult = DialogResult.OK Then
|
||||
datum = f.Datum
|
||||
SQL.doSQL("DELETE FROM tblAsfinagMaut", "FMZOLL")
|
||||
|
||||
setBillingDateCompleted("ASFINAG", f.Datum)
|
||||
|
||||
If SQL.doSQL("Update Abrechnungsdatum SET Abrechnungsdatum = '" & f.Datum.ToShortDateString & "'", "ASFINAG") Then
|
||||
If SQL.doSQL("UPDATE dbo.TTRBody SET Abrechnungsdatum = '" & f.Datum.ToShortDateString & "' WHERE (PKHistory = 0) AND (PKFileName LIKE N'" & checkifTestfiles() & ".%') AND (FileCreationDate <= '" & (f.Datum).AddDays(1).ToShortDateString & "') AND abrechnungsdatum IS NULL AND belegerstellungsdatum IS NULL", "ASFINAG") Then
|
||||
|
||||
|
||||
96
SDL/seriendruck/usrCntlFakturierung.Designer.vb
generated
96
SDL/seriendruck/usrCntlFakturierung.Designer.vb
generated
@@ -46,6 +46,7 @@ Partial Class usrcntlFakturierung
|
||||
Me.Button18 = New System.Windows.Forms.Button()
|
||||
Me.Label44 = New System.Windows.Forms.Label()
|
||||
Me.GBSammelrechnung = New System.Windows.Forms.GroupBox()
|
||||
Me.btnRE_Text = New System.Windows.Forms.Button()
|
||||
Me.btnFixeTaxe = New System.Windows.Forms.Button()
|
||||
Me.Label11 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox6 = New System.Windows.Forms.PictureBox()
|
||||
@@ -99,7 +100,11 @@ Partial Class usrcntlFakturierung
|
||||
Me.btnRePos = New System.Windows.Forms.Button()
|
||||
Me.Validation1 = New SDL.EORI.validation()
|
||||
Me.btnWikiStatusmails = New System.Windows.Forms.Button()
|
||||
Me.btnRE_Text = New System.Windows.Forms.Button()
|
||||
Me.brnSR_abgeschlossen = New System.Windows.Forms.Button()
|
||||
Me.PictureBox11 = New System.Windows.Forms.PictureBox()
|
||||
Me.Label12 = New System.Windows.Forms.Label()
|
||||
Me.Label13 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox12 = New System.Windows.Forms.PictureBox()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GBMautberichte.SuspendLayout()
|
||||
CType(Me.dgvMautbericht, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -114,6 +119,8 @@ Partial Class usrcntlFakturierung
|
||||
CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox11, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox12, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GroupBox1
|
||||
@@ -344,6 +351,11 @@ Partial Class usrcntlFakturierung
|
||||
'
|
||||
'GBSammelrechnung
|
||||
'
|
||||
Me.GBSammelrechnung.Controls.Add(Me.PictureBox12)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.Label13)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.PictureBox11)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.Label12)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.brnSR_abgeschlossen)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.btnRE_Text)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.btnFixeTaxe)
|
||||
Me.GBSammelrechnung.Controls.Add(Me.Label11)
|
||||
@@ -399,10 +411,22 @@ Partial Class usrcntlFakturierung
|
||||
Me.GBSammelrechnung.Enabled = False
|
||||
Me.GBSammelrechnung.Location = New System.Drawing.Point(10, 356)
|
||||
Me.GBSammelrechnung.Name = "GBSammelrechnung"
|
||||
Me.GBSammelrechnung.Size = New System.Drawing.Size(880, 403)
|
||||
Me.GBSammelrechnung.Size = New System.Drawing.Size(880, 456)
|
||||
Me.GBSammelrechnung.TabIndex = 14
|
||||
Me.GBSammelrechnung.TabStop = False
|
||||
'
|
||||
'btnRE_Text
|
||||
'
|
||||
Me.btnRE_Text.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnRE_Text.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.btnRE_Text.Location = New System.Drawing.Point(744, 223)
|
||||
Me.btnRE_Text.Name = "btnRE_Text"
|
||||
Me.btnRE_Text.Size = New System.Drawing.Size(107, 32)
|
||||
Me.btnRE_Text.TabIndex = 127
|
||||
Me.btnRE_Text.Text = "RE-Text setzen"
|
||||
Me.btnRE_Text.UseVisualStyleBackColor = True
|
||||
Me.btnRE_Text.Visible = False
|
||||
'
|
||||
'btnFixeTaxe
|
||||
'
|
||||
Me.btnFixeTaxe.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
@@ -829,7 +853,7 @@ Partial Class usrcntlFakturierung
|
||||
'
|
||||
Me.btn_setRENr.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btn_setRENr.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.btn_setRENr.Location = New System.Drawing.Point(10, 191)
|
||||
Me.btn_setRENr.Location = New System.Drawing.Point(10, 203)
|
||||
Me.btn_setRENr.Name = "btn_setRENr"
|
||||
Me.btn_setRENr.Size = New System.Drawing.Size(121, 49)
|
||||
Me.btn_setRENr.TabIndex = 32
|
||||
@@ -943,17 +967,54 @@ Partial Class usrcntlFakturierung
|
||||
Me.btnWikiStatusmails.TabIndex = 72
|
||||
Me.btnWikiStatusmails.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnRE_Text
|
||||
'brnSR_abgeschlossen
|
||||
'
|
||||
Me.btnRE_Text.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnRE_Text.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.btnRE_Text.Location = New System.Drawing.Point(744, 223)
|
||||
Me.btnRE_Text.Name = "btnRE_Text"
|
||||
Me.btnRE_Text.Size = New System.Drawing.Size(107, 32)
|
||||
Me.btnRE_Text.TabIndex = 127
|
||||
Me.btnRE_Text.Text = "RE-Text setzen"
|
||||
Me.btnRE_Text.UseVisualStyleBackColor = True
|
||||
Me.btnRE_Text.Visible = False
|
||||
Me.brnSR_abgeschlossen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.brnSR_abgeschlossen.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.brnSR_abgeschlossen.Location = New System.Drawing.Point(10, 388)
|
||||
Me.brnSR_abgeschlossen.Name = "brnSR_abgeschlossen"
|
||||
Me.brnSR_abgeschlossen.Size = New System.Drawing.Size(121, 49)
|
||||
Me.brnSR_abgeschlossen.TabIndex = 128
|
||||
Me.brnSR_abgeschlossen.Text = "SR abschliesen"
|
||||
Me.brnSR_abgeschlossen.UseVisualStyleBackColor = True
|
||||
'
|
||||
'PictureBox11
|
||||
'
|
||||
Me.PictureBox11.BackgroundImage = Global.SDL.My.Resources.Resources.ok
|
||||
Me.PictureBox11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.PictureBox11.Location = New System.Drawing.Point(148, 398)
|
||||
Me.PictureBox11.Name = "PictureBox11"
|
||||
Me.PictureBox11.Size = New System.Drawing.Size(14, 14)
|
||||
Me.PictureBox11.TabIndex = 130
|
||||
Me.PictureBox11.TabStop = False
|
||||
Me.PictureBox11.Visible = False
|
||||
'
|
||||
'Label12
|
||||
'
|
||||
Me.Label12.Location = New System.Drawing.Point(168, 398)
|
||||
Me.Label12.Name = "Label12"
|
||||
Me.Label12.Size = New System.Drawing.Size(224, 17)
|
||||
Me.Label12.TabIndex = 129
|
||||
Me.Label12.Text = "Sammelrechnung abgeschlossen"
|
||||
'
|
||||
'Label13
|
||||
'
|
||||
Me.Label13.Location = New System.Drawing.Point(168, 412)
|
||||
Me.Label13.Name = "Label13"
|
||||
Me.Label13.Size = New System.Drawing.Size(224, 17)
|
||||
Me.Label13.TabIndex = 131
|
||||
Me.Label13.Text = "Auswertung per Mail geschickt"
|
||||
'
|
||||
'PictureBox12
|
||||
'
|
||||
Me.PictureBox12.BackgroundImage = Global.SDL.My.Resources.Resources.ok
|
||||
Me.PictureBox12.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.PictureBox12.Location = New System.Drawing.Point(148, 414)
|
||||
Me.PictureBox12.Name = "PictureBox12"
|
||||
Me.PictureBox12.Size = New System.Drawing.Size(14, 14)
|
||||
Me.PictureBox12.TabIndex = 132
|
||||
Me.PictureBox12.TabStop = False
|
||||
Me.PictureBox12.Visible = False
|
||||
'
|
||||
'usrcntlFakturierung
|
||||
'
|
||||
@@ -968,7 +1029,7 @@ Partial Class usrcntlFakturierung
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Name = "usrcntlFakturierung"
|
||||
Me.Size = New System.Drawing.Size(1149, 782)
|
||||
Me.Size = New System.Drawing.Size(1149, 815)
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GBMautberichte.ResumeLayout(False)
|
||||
Me.GBMautberichte.PerformLayout()
|
||||
@@ -985,6 +1046,8 @@ Partial Class usrcntlFakturierung
|
||||
CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PictureBox11, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PictureBox12, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -1065,4 +1128,9 @@ Partial Class usrcntlFakturierung
|
||||
Friend WithEvents PictureBox6 As PictureBox
|
||||
Friend WithEvents btnFixeTaxe As Button
|
||||
Friend WithEvents btnRE_Text As Button
|
||||
Friend WithEvents PictureBox11 As PictureBox
|
||||
Friend WithEvents Label12 As Label
|
||||
Friend WithEvents brnSR_abgeschlossen As Button
|
||||
Friend WithEvents PictureBox12 As PictureBox
|
||||
Friend WithEvents Label13 As Label
|
||||
End Class
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Web.UI.WebControls.Expressions
|
||||
Imports com.sun.xml.internal.rngom.digested
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class usrcntlFakturierung
|
||||
@@ -1946,6 +1947,37 @@ Public Class usrcntlFakturierung
|
||||
btn_Mautanh_entfernen.Enabled = sammelrechnung0vorhanden
|
||||
|
||||
|
||||
Dim SR_vorhanden As Integer = CInt((New SQL).getValueTxtBySqlVarList("SELECT COUNT(*) From tblMDMEinarbeitung
|
||||
where cast(billingdate as Date) = '" & CDate(dtRechnungsdatum.Text) & "'", "FMZOLL",, 0))
|
||||
|
||||
If SR_vorhanden > 0 Then
|
||||
|
||||
Dim SR_nicht_abgeschlossen As Integer = CInt((New SQL).getValueTxtBySqlVarList("SELECT COUNT(*) From tblMDMEinarbeitung where cast(billingdate as Date) = '" & CDate(dtRechnungsdatum.Text) & "' AND isnull(billing_completed,0) = 0", "FMZOLL",, 0))
|
||||
|
||||
If SR_nicht_abgeschlossen > 0 Then
|
||||
brnSR_abgeschlossen.Enabled = True
|
||||
|
||||
showPic(False, PictureBox11)
|
||||
showPic(False, PictureBox12)
|
||||
|
||||
Else
|
||||
brnSR_abgeschlossen.Enabled = False
|
||||
|
||||
showPic(True, PictureBox11)
|
||||
showPic(True, PictureBox12)
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
brnSR_abgeschlossen.Enabled = False
|
||||
showPic(False, PictureBox11)
|
||||
showPic(False, PictureBox12)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2259,4 +2291,125 @@ Public Class usrcntlFakturierung
|
||||
|
||||
showPic(setRechnungstext(Sachbearbeiter, rechnungsdatum, dtSammelrechnungen, setText), PictureBox3)
|
||||
End Sub
|
||||
|
||||
Private Sub brnSR_abgeschlossen_Click(sender As Object, e As EventArgs) Handles brnSR_abgeschlossen.Click
|
||||
|
||||
Dim setAbschlossen As Boolean = False
|
||||
Dim rechnungsdatum As Date = CDate(dtRechnungsdatum.Text)
|
||||
|
||||
Dim res As MsgBoxResult
|
||||
res = MsgBox("Möchten Sie die MDM Sammelrechnung für den " & rechnungsdatum.ToShortDateString & " abschließen?", vbYesNoCancel)
|
||||
Select Case res
|
||||
Case MsgBoxResult.Yes : setAbschlossen = True
|
||||
Case MsgBoxResult.Cancel : Exit Sub
|
||||
End Select
|
||||
|
||||
If setAbschlossen Then
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
If SQL.doSQL("Update tblMDMEinarbeitung set billing_completed = 1, billing_completed_user = '" & cAllgemein.USRKURZNAME & "' where cast(billingdate as Date) = '" & rechnungsdatum.ToShortDateString & "' and isnull(billing_completed,0) = 0 ", "FMZOLL") Then
|
||||
showPic(True, PictureBox11)
|
||||
|
||||
|
||||
If rechnungsdatum.Day = Date.DaysInMonth(rechnungsdatum.Year, rechnungsdatum.Month) Then 'Mailversand nur am SR am Ende des Monats mit Daten des Vormonats
|
||||
If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||
Dim firstDayLastMonth As Date = New Date(Today.Year, Today.Month, 1).AddMonths(-1)
|
||||
Dim lastDayLastMonth As Date = New Date(Today.Year, Today.Month, 1).AddDays(-1)
|
||||
Dim path = createAuswertung(firstDayLastMonth, lastDayLastMonth)
|
||||
If path <> "" Then
|
||||
If sendAuswertung(path, firstDayLastMonth, lastDayLastMonth) Then
|
||||
showPic(True, PictureBox12)
|
||||
Else
|
||||
showPic(False, PictureBox12)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
showPic(False, PictureBox12)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
showPic(False, PictureBox11)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function createAuswertung(von As Date, bis As Date) As String
|
||||
|
||||
'Daten sind immer vom Vormonat!
|
||||
|
||||
|
||||
|
||||
|
||||
Dim SQLString = "SELECT year(rechnungsdatum)Year,MONTH(rechnungsdatum)Month,RechnungsKundenNr CustomerNo, Adressen.Ordnungsbegriff Customer,Adressen.LandKz Ctry, Offertenstamm.OffertenNr, Offertenstamm.OffertenBez,leistungen.LeistungsNr ProdNo,leistungen.LeistungsBez ProdDscr, /*count(distinct([Rechnungsausgang].Rk_ID)) CountInv,*/ sum(RechnungsausgangPositionen.SteuerfreierBetrag+RechnungsausgangPositionen.SteuerpflichtigerBetrag)NetSum,ReverseCharge
|
||||
FROM [VERAG].[dbo].[Rechnungsausgang]
|
||||
inner join Adressen on RechnungsKundenNr=AdressenNr
|
||||
inner join RechnungsausgangPositionen on Rechnungsausgang.RK_ID= RechnungsausgangPositionen.rk_id
|
||||
inner join leistungen on leistungen.LeistungsNr=RechnungsausgangPositionen.LeistungsNr
|
||||
inner join Offertenstamm on Offertenstamm.OffertenNr=Rechnungsausgang.OffertenNr
|
||||
where Firma_ID=19
|
||||
AND RechnungsDatum >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) - 1, 0)
|
||||
AND RechnungsDatum < DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
|
||||
group by year(rechnungsdatum),MONTH(rechnungsdatum),RechnungsKundenNr,Offertenstamm.OffertenNr,Offertenstamm.OffertenBez,Adressen.Ordnungsbegriff,Adressen.LandKz , leistungen.LeistungsNr,leistungen.LeistungsBez,ReverseCharge
|
||||
order by Year,Month,CustomerNo,Offertenstamm.OffertenNr,Offertenstamm.OffertenBez,leistungen.LeistungsNr"
|
||||
|
||||
Dim dt As DataTable = (New SQL).loadDgvBySql(SQLString, "FMZOLL", 300)
|
||||
|
||||
If dt.Rows.Count > 0 Then
|
||||
|
||||
Dim filepath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, False, "Report-Invoice-Data_" & von.ToShortDateString & "-" & bis.ToShortDateString)
|
||||
Return filepath
|
||||
Else
|
||||
|
||||
Return ""
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
Private Function sendAuswertung(pfad As String, von As Date, bis As Date)
|
||||
|
||||
Dim betreff = ""
|
||||
Dim pfadList As New List(Of String)
|
||||
pfadList.Add(pfad)
|
||||
|
||||
Dim EMails As String = "mahin.abbasi@360pays.com;lara.jednacak@360pays.com"
|
||||
Dim EMails_CC As String = ""
|
||||
Dim EMails_BCC As String = "d.breimaier@verag.ag,al@verag.ag"
|
||||
|
||||
Dim Body = "Attached are the reports for the Verag 360 invoice from " & von.ToShortDateString & " to " & bis.ToShortDateString & "." &
|
||||
"<br><br>Created on: " & Now.ToShortDateString & " at " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatically generated email. Please do not reply to this email."
|
||||
|
||||
|
||||
betreff = betreff.Replace(vbNewLine, "").Replace(vbCr, "").Replace(vbLf, "").Replace(vbCrLf, "").Replace(System.Environment.NewLine, " ")
|
||||
|
||||
Dim API = VERAG_PROG_ALLGEMEIN.cAPI.INSERT_API(VERAG_PROG_ALLGEMEIN.cAPI_INOUT.OUT, VERAG_PROG_ALLGEMEIN.cAPI_Type.MAIL, VERAG_PROG_ALLGEMEIN.cAPI_ART.SDL_OUT_MDM_AUSWERTUNG)
|
||||
API.api_EMail = EMails
|
||||
API.api_EMailCC = EMails_CC
|
||||
API.api_EMailBCC = EMails_BCC
|
||||
API.api_EMailSubject = betreff
|
||||
API.api_EMailText = Body
|
||||
API.api_EMailAttCnt = pfadList.Count
|
||||
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(EMails, betreff, Body,, False, False, EMails_CC, EMails_BCC, pfadList) Then
|
||||
API.UPDTAE_OK()
|
||||
brnSR_abgeschlossen.Enabled = False
|
||||
|
||||
Else
|
||||
API.UPDTAE_ERR()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -31,6 +31,7 @@ Public Enum cAPI_ART
|
||||
AVISO_OUT_SAMMELRECHNUNG = 84
|
||||
AVISO_OUT_EINZELRECHNUNG = 85
|
||||
SDL_OUT_RS_ORIGINALRECHNUNGEN = 86
|
||||
SDL_OUT_MDM_AUSWERTUNG = 87
|
||||
|
||||
|
||||
End Enum
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class cAdressen
|
||||
Property Auswahl As Object = Nothing
|
||||
@@ -166,7 +167,7 @@ Public Class cAdressen
|
||||
'Prüfung Neuanlage: Nur Hinweismeldung! -> speichern soll trotzdem möglich sein!
|
||||
If checkUID(KD, kundenNameUID, UIDMehfachverwendung) Then ERROR_TXT = "Die UID Nummer existiert bereits " & kundenNameUID & "!" & vbNewLine & "Bitte prüfen, damit es zu keiner doppelten Erfassung des Kunden kommt." : Return False
|
||||
Else
|
||||
Try
|
||||
Try
|
||||
Dim kunde = DirectCast(KD, cKunde)
|
||||
Dim addresseTemp = New cAdressen(kunde.KundenNr)
|
||||
If Not (addresseTemp.UstIdKz = UstIdKz And addresseTemp.UstIdNr = UstIdNr) Then
|
||||
@@ -314,7 +315,7 @@ Public Class cAdressen
|
||||
|
||||
Try
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL(False)
|
||||
Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & UIDNr & "') AND (WölflKundenNr = " & woelflKdNr & " OR weitereWölflKundenNr = " & woelflKdNr & ") " & IIf(isWoelfKdNr, " AND (AdressenNr LIKE '15%' or AdressenNr LIKE '18%')", ""), conn)
|
||||
Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & Regex.Replace(UIDNr, "[^0-9.-]", "") & "') AND (WölflKundenNr = " & woelflKdNr & " OR weitereWölflKundenNr = " & woelflKdNr & ") " & IIf(isWoelfKdNr, " AND (AdressenNr LIKE '15%' or AdressenNr LIKE '18%')", ""), conn)
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
|
||||
@@ -13,6 +13,9 @@ Public Class cMDMEinarbeitung
|
||||
Property completed_date As Object = Nothing
|
||||
Property import_date As Object = Nothing
|
||||
Property importfilename As Object = Nothing
|
||||
Property billingdate As Object = Nothing
|
||||
Property billing_completed As Boolean = False
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
@@ -48,6 +51,8 @@ Public Class cMDMEinarbeitung
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("completed_date", completed_date))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("import_date", import_date))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("importfilename", importfilename))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("billingdate", billingdate))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("billing_completed", billing_completed))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports System.Web.Configuration
|
||||
Imports io.konik.zugferd
|
||||
|
||||
Public Class cRMC
|
||||
Property rmc_id As Integer
|
||||
|
||||
Reference in New Issue
Block a user