faktMail, ustva, Auswertungen, etc.
This commit is contained in:
@@ -181,6 +181,10 @@ Public Class frmAbrechnungsMaske
|
||||
If Not loaded Then Exit Sub
|
||||
Dim dgv As VERAG_PROG_ALLGEMEIN.MyDatagridview = getDGV()
|
||||
|
||||
Dim reNrSQL As String = ""
|
||||
If cbx.Checked Then reNrSQL = " isnull(Rechnungsausgang.RechnungsNr,'-') as ReNr, "
|
||||
|
||||
|
||||
With dgv
|
||||
Dim sqlstr = ""
|
||||
|
||||
@@ -196,7 +200,7 @@ Public Class frmAbrechnungsMaske
|
||||
Else
|
||||
|
||||
' sqlstr &= " SELECT FilialenNr, AbfertigungsNr, UnterNr, Firma_ID, Status, Sammelrechnung, Sachbearbeiter, SteuerpflichtigerGesamtbetrag, SteuerfreierGesamtbetrag, RechnungsNr, RechnungsDatum, DruckDatumZeit, Buchungsjahr, RK_ID"
|
||||
sqlstr &= " SELECT FilialenNr, AbfertigungsNr, cast(FilialenNr as varchar) + ' ' + cast(AbfertigungsNr as varchar) as PosNr, UnterNr, Firma_ID,Rechnungsausgang.Sammelrechnung as Art, [RechnungsName 1] as Rechnungsempfänger, (isnull(SteuerpflichtigerGesamtbetrag,0) + isnull(SteuerfreierGesamtbetrag,0)) as Betrag, RK_ID,RechnungsLandKz,RechnungsKundenNr"
|
||||
sqlstr &= " SELECT " & reNrSQL & " FilialenNr, AbfertigungsNr, cast(FilialenNr as varchar) + ' ' + cast(AbfertigungsNr as varchar) as PosNr,UnterNr, Firma_ID,Rechnungsausgang.Sammelrechnung as Art, [RechnungsName 1] as Rechnungsempfänger, (isnull(SteuerpflichtigerGesamtbetrag,0) + isnull(SteuerfreierGesamtbetrag,0)) as Betrag, RK_ID,RechnungsLandKz,RechnungsKundenNr"
|
||||
sqlstr &= ",(CASE WHEN Rechnungsdruck =0 THEN 'POST' WHEN Rechnungsdruck=1 THEN 'FAX' WHEN Rechnungsdruck=2 THEN 'E-MAIL' WHEN Rechnungsdruck=5 THEN 'MAIL+KOPIE' ELSE '-' END) as Rechnungsdruck "
|
||||
sqlstr &= " FROM Rechnungsausgang INNER JOIN Adressen ON AdressenNr=Rechnungsausgang.RechnungsKundenNr"
|
||||
sqlstr &= " WHERE 1=1 "
|
||||
@@ -215,24 +219,26 @@ Public Class frmAbrechnungsMaske
|
||||
.Columns("Firma_ID").Visible = False
|
||||
.Columns("RechnungsLandKz").Visible = False
|
||||
.Columns("RechnungsKundenNr").Visible = False
|
||||
|
||||
.Columns("PosNr").HeaderText = "Pos-Nr."
|
||||
|
||||
If cbx.Checked Then .Columns("ReNr").HeaderText = "ReNr."
|
||||
|
||||
.Columns("UnterNr").Width = 35
|
||||
.Columns("Art").Width = 30
|
||||
.Columns("Betrag").Width = 100
|
||||
.Columns("Rechnungsempfänger").MinimumWidth = 150
|
||||
.Columns("Rechnungsempfänger").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.Columns("Art").Width = 30
|
||||
.Columns("Betrag").Width = 100
|
||||
.Columns("Rechnungsempfänger").MinimumWidth = 150
|
||||
.Columns("Rechnungsempfänger").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
|
||||
If Not cbxGutschriftenAnVerag.Checked Then
|
||||
.Columns("Rechnungsdruck").Width = 60
|
||||
.Columns("Rechnungsdruck").HeaderText = "Rg.Art"
|
||||
.Columns("Rechnungsdruck").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
If Not cbxGutschriftenAnVerag.Checked Then
|
||||
.Columns("Rechnungsdruck").Width = 60
|
||||
.Columns("Rechnungsdruck").HeaderText = "Rg.Art"
|
||||
.Columns("Rechnungsdruck").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
End If
|
||||
|
||||
|
||||
.Columns("Betrag").DefaultCellStyle.Format = "C2"
|
||||
End If
|
||||
|
||||
|
||||
.Columns("Betrag").DefaultCellStyle.Format = "C2"
|
||||
End If
|
||||
|
||||
End With
|
||||
End Sub
|
||||
|
||||
|
||||
15
SDL/Fakturierung/frmFaktEmail.Designer.vb
generated
15
SDL/Fakturierung/frmFaktEmail.Designer.vb
generated
@@ -85,6 +85,7 @@ Partial Class frmFaktEmail
|
||||
Me.lklcc = New System.Windows.Forms.LinkLabel()
|
||||
Me.cbxMDMReKopie = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxMDMAnh = New System.Windows.Forms.CheckBox()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
CType(Me.dgvEmailBCC, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvEmailCC, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvEmail, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -720,12 +721,25 @@ Partial Class frmFaktEmail
|
||||
Me.cbxMDMAnh.UseVisualStyleBackColor = True
|
||||
Me.cbxMDMAnh.Visible = False
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button6.Location = New System.Drawing.Point(15, 308)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(46, 21)
|
||||
Me.Button6.TabIndex = 97
|
||||
Me.Button6.Text = "SRB"
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
Me.Button6.Visible = False
|
||||
'
|
||||
'frmFaktEmail
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.ClientSize = New System.Drawing.Size(750, 850)
|
||||
Me.Controls.Add(Me.Button6)
|
||||
Me.Controls.Add(Me.cbxMDMAnh)
|
||||
Me.Controls.Add(Me.cbxMDMReKopie)
|
||||
Me.Controls.Add(Me.lklcc)
|
||||
@@ -837,4 +851,5 @@ Partial Class frmFaktEmail
|
||||
Friend WithEvents lklcc As LinkLabel
|
||||
Friend WithEvents cbxMDMReKopie As CheckBox
|
||||
Friend WithEvents cbxMDMAnh As CheckBox
|
||||
Friend WithEvents Button6 As Button
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Web.UI.WebControls.Expressions
|
||||
Imports System.Web.UI.HtmlControls
|
||||
Imports System.Web.UI.WebControls.Expressions
|
||||
Imports GrapeCity.DataVisualization.TypeScript
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -134,7 +135,7 @@ Public Class frmFaktEmail
|
||||
|
||||
|
||||
|
||||
setMailText(AD.LandKz)
|
||||
setMailText(KdNr, AD.LandKz)
|
||||
initList()
|
||||
cbxStb.Enabled = True : cbxStb.Checked = True
|
||||
cbxStbMitt.Enabled = True : cbxStbMitt.Checked = True
|
||||
@@ -161,7 +162,7 @@ Public Class frmFaktEmail
|
||||
|
||||
End If
|
||||
Else
|
||||
setMailText(RECHNUNG.RechnungsLandKz)
|
||||
setMailText(KdNr, RECHNUNG.RechnungsLandKz)
|
||||
|
||||
initRowSpedbuch(SPEDBUCH)
|
||||
|
||||
@@ -221,6 +222,8 @@ Public Class frmFaktEmail
|
||||
cbxFAEmail.Checked = (If(FISKAL.fisk_schreibenFA_Mail, "") <> "")
|
||||
txtFAEmail.Text = If(FISKAL.fisk_schreibenFA_Mail, "")
|
||||
End If
|
||||
Button6.Visible = True
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub wbShowHTML(ByVal WebBrowser As WebBrowser, ByVal HtmlText As String)
|
||||
@@ -247,7 +250,7 @@ Public Class frmFaktEmail
|
||||
Return RechnungsNr
|
||||
End Function
|
||||
|
||||
Sub setMailText(RechnungsLandKz)
|
||||
Sub setMailText(KdNr, RechnungsLandKz)
|
||||
Select Case RechnungsLandKz
|
||||
Case "A", "AT", "D", "DE", "CH" : cboFaStb_Sprache.changeItem("DE")
|
||||
Case Else : cboFaStb_Sprache.changeItem("EN")
|
||||
@@ -294,25 +297,93 @@ Public Class frmFaktEmail
|
||||
|
||||
Dim TextHTML = ""
|
||||
If SammelrechungArt <> 6 Then
|
||||
Select Case RechnungsLandKz
|
||||
Case "TR"
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Kredi Nr. ", "Fatura Nr. ") & txtRgNr
|
||||
TextHTML = "Sayin Bayanlar ve Baylar," & vbNewLine & vbNewLine & "ekte baslikta yazan faturayi bulabilirsinz."
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Saygilarimizla" & vbNewLine & vbNewLine & ""
|
||||
Case "A", "AT", "D", "DE", "CH"
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Gutschrift Nr. ", "Rechnung Nr. ") & txtRgNr
|
||||
TextHTML = "Sehr geehrte Damen und Herren" & vbNewLine & vbNewLine & "im Anhang senden wir Ihnen die o.g. " & If(BelegartenNr = 71, "Gutschrift(en).", "Rechnung(en).")
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Mit freundlichen Grüßen" & vbNewLine & vbNewLine & ""
|
||||
Case Else
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Credit No. ", "Invoice No. ") & txtRgNr
|
||||
TextHTML = "Dear Sir or Madam," & vbNewLine & vbNewLine & "attached we send you the " & If(BelegartenNr = 71, "credit note", "invoice") & " mentioned above."
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Best regards" & vbNewLine & vbNewLine & ""
|
||||
End Select
|
||||
Else
|
||||
|
||||
If RECHNUNG.Firma_ID <> 19 Then
|
||||
|
||||
Select Case RechnungsLandKz
|
||||
Case "TR"
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Kredi Nr. ", "Fatura Nr. ") & txtRgNr
|
||||
TextHTML = "Sayin Bayanlar ve Baylar," & vbNewLine & vbNewLine & "ekte baslikta yazan faturayi bulabilirsinz."
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Saygilarimizla" & vbNewLine & vbNewLine & ""
|
||||
Case "A", "AT", "D", "DE", "CH"
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Gutschrift Nr. ", "Rechnung Nr. ") & txtRgNr
|
||||
TextHTML = "Sehr geehrte Damen und Herren" & vbNewLine & vbNewLine & "im Anhang senden wir Ihnen die o.g. " & If(BelegartenNr = 71, "Gutschrift(en).", "Rechnung(en).")
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Mit freundlichen Grüßen" & vbNewLine & vbNewLine & ""
|
||||
Case Else
|
||||
txtSubject.Text = If(BelegartenNr = 71, "Credit No. ", "Invoice No. ") & txtRgNr
|
||||
TextHTML = "Dear Sir or Madam," & vbNewLine & vbNewLine & "attached we send you the " & If(BelegartenNr = 71, "credit note", "invoice") & " mentioned above."
|
||||
TextHTML &= TextHTMLADD
|
||||
TextHTML &= "" & vbNewLine & vbNewLine & vbNewLine & "Best regards" & vbNewLine & vbNewLine & ""
|
||||
End Select
|
||||
|
||||
Else
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim listOfTextconserven As cTextkonserve_LIST = New cTextkonserve_LIST(1, "", RECHNUNG.Firma_ID)
|
||||
|
||||
Dim mailText As String = ""
|
||||
Dim spracheRechnung As String = "EN" 'Defaultsprache
|
||||
Dim belegtyp As String = If(BelegartenNr = 71, "credit note", "invoice")
|
||||
|
||||
Select Case RechnungsLandKz
|
||||
Case "TR" : spracheRechnung = "TR" : spracheRechnung = RechnungsLandKz : belegtyp = If(BelegartenNr = 71, "Kredi", "Fatura")
|
||||
Case "RO" : spracheRechnung = "RO" : spracheRechnung = RechnungsLandKz : belegtyp = If(BelegartenNr = 71, "credit note", "invoice")
|
||||
Case "DE", "A", "AT", "D", "CH" : spracheRechnung = "DE" : belegtyp = If(BelegartenNr = 71, "Gutschrift", "Rechnung")
|
||||
Case "SRB", "HR", "SLO", "BIH", "MNE", "MK", "MO" : spracheRechnung = "SRB" : belegtyp = If(BelegartenNr = 71, "credit note", "invoice") 'Belegarten auf Englisch!
|
||||
End Select
|
||||
|
||||
If listOfTextconserven.LIST.Any(Function(c) c.txt_sprache = spracheRechnung) Then
|
||||
|
||||
Dim r As cTextkonserve = listOfTextconserven.LIST.Find(Function(c) c.txt_sprache = spracheRechnung)
|
||||
If r IsNot Nothing Then
|
||||
txtSubject.Text = r.txt_betreff
|
||||
txtSubject.Text = txtSubject.Text.Replace("%Belegtyp%", belegtyp)
|
||||
txtSubject.Text = txtSubject.Text.Replace("%BelegNr%", txtRgNr)
|
||||
|
||||
TextHTML &= r.txt_text
|
||||
|
||||
TextHTML = TextHTML.Replace("%Belegtyp%", belegtyp)
|
||||
|
||||
Dim KUNDE_ERW As New cKundenErweitert(KdNr)
|
||||
|
||||
If RECHNUNG.FilialenNr = 4817 And RECHNUNG.Firma_ID = 19 AndAlso RECHNUNG.ErfassungsNr IsNot Nothing Then
|
||||
Dim SPEDBUCH = New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(RECHNUNG.FilialenNr, RECHNUNG.AbfertigungsNr, RECHNUNG.UnterNr)
|
||||
If SPEDBUCH.hasEntry AndAlso (SPEDBUCH.Abfertigungsart = 114 Or SPEDBUCH.Abfertigungsart = 115) Then
|
||||
Dim USTV_ANTRAG As New cUSTVAntrag(RECHNUNG.ErfassungsNr)
|
||||
If USTV_ANTRAG.UStVAn_Sicherheit Then
|
||||
replaceKZ("KZ1", TextHTML)
|
||||
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||
|
||||
ElseIf KUNDE_ERW.kde_Erstattungsart = 4 Then
|
||||
replaceKZ("KZ1", TextHTML)
|
||||
TextHTML = TextHTML.ToString.Replace("%KZ4:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||
|
||||
ElseIf KUNDE_ERW.kde_Erstattungsart = 1 Then
|
||||
replaceKZ("KZ4", TextHTML)
|
||||
TextHTML = TextHTML.ToString.Replace("%KZ1:", "") : TextHTML = TextHTML.ToString.Replace("%", "")
|
||||
|
||||
Else
|
||||
replaceKZ("KZ1", TextHTML)
|
||||
replaceKZ("KZ4", TextHTML)
|
||||
TextHTML = TextHTML.ToString.Replace("%", "")
|
||||
End If
|
||||
|
||||
If mailText <> "" Then TextHTML &= mailText & vbNewLine
|
||||
'TextHTML &= "<br><br><br>" & cFakturierung.getSignature(RechnungsLandKz, Firma_ID)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
Dim mailText As String = ""
|
||||
If steuerbetrag = 0 Then
|
||||
@@ -410,12 +481,12 @@ Public Class frmFaktEmail
|
||||
Mail = outl.CreateItem(0)
|
||||
Mail.Subject = txtSubject.Text
|
||||
|
||||
If Firma_ID = 24 OrElse Firma_ID = 19 Then
|
||||
If RECHNUNG.Firma_ID = 24 OrElse RECHNUNG.Firma_ID = 19 Then
|
||||
Try
|
||||
Dim oAccount As Outlook.Account
|
||||
Dim accountToSent = ""
|
||||
|
||||
Select Case Firma_ID
|
||||
Select Case RECHNUNG.Firma_ID
|
||||
Case 24
|
||||
accountToSent = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
Case Else
|
||||
@@ -546,10 +617,18 @@ Public Class frmFaktEmail
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
If Firma_ID = 24 OrElse Firma_ID = 19 Then
|
||||
If RECHNUNG.Firma_ID = 24 OrElse RECHNUNG.Firma_ID = 19 Then
|
||||
Try
|
||||
Dim oAccount As Outlook.Account
|
||||
Dim accountToSent = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
Dim accountToSent = ""
|
||||
|
||||
Select Case RECHNUNG.Firma_ID
|
||||
Case 24
|
||||
accountToSent = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
Case Else
|
||||
accountToSent = "mmdabrechnung@verag.ag" 'bewusst falsch geschrieben!!!!
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
If outl.Session.Accounts.Count > 0 Then
|
||||
@@ -710,14 +789,14 @@ Public Class frmFaktEmail
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("Fehler beim Öffnen des Mail-Programmes." & ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
'Process.Start(a)
|
||||
End Try
|
||||
'Process.Start(a)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ATTACHMENTS.Clear()
|
||||
ATTACHMENTS.Clear()
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -1023,17 +1102,17 @@ Public Class frmFaktEmail
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
setMailText("DE")
|
||||
setMailText(KdNr, "DE")
|
||||
' cboFaStb_Sprache.changeItem("DE")
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
setMailText("TR")
|
||||
setMailText(KdNr, "TR")
|
||||
' cboFaStb_Sprache.changeItem("EN")
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
setMailText("EN")
|
||||
setMailText(KdNr, "EN")
|
||||
' cboFaStb_Sprache.changeItem("EN")
|
||||
End Sub
|
||||
|
||||
@@ -1053,7 +1132,7 @@ Public Class frmFaktEmail
|
||||
If SR_DT Is Nothing Then Exit Sub
|
||||
If SR_DT.Rows.Count = 0 Then Exit Sub
|
||||
|
||||
For Each r In SR_DT.Rows
|
||||
For Each r In SR_DT.Rows
|
||||
Dim SPEDBUCH As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(r("FilialenNr"), r("AbfertigungsNr"), r("SpeditionsbuchUnterNr"))
|
||||
initRowSpedbuch(SPEDBUCH)
|
||||
If SPEDBUCH IsNot Nothing AndAlso SPEDBUCH.Abfertigungsart IsNot Nothing AndAlso IsNumeric(SPEDBUCH.Abfertigungsart) AndAlso (SPEDBUCH.Abfertigungsart = 26 Or SPEDBUCH.Abfertigungsart = 28) AndAlso (SPEDBUCH.FilialenNr = 4805 Or SPEDBUCH.FilialenNr = 4811) Then
|
||||
@@ -1168,6 +1247,32 @@ Public Class frmFaktEmail
|
||||
Private Sub lklcc_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lklcc.LinkClicked
|
||||
dgvEmailCC.Rows.Add(lklcc.Tag)
|
||||
End Sub
|
||||
|
||||
Private Sub replaceKZ(KZ As String, ByRef TextHTML As String)
|
||||
|
||||
If TextHTML = "" Then Exit Sub
|
||||
|
||||
Dim index_start As Integer = TextHTML.ToString.IndexOf("%" & KZ & ":")
|
||||
Dim txtKZ = TextHTML.ToString.Substring(index_start)
|
||||
Dim index_end As Integer = txtKZ.ToString.IndexOf("%", 1)
|
||||
|
||||
If index_start <= 0 AndAlso index_end <= 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim txtKZ_replace As String = TextHTML.ToString.Substring(index_start, index_end)
|
||||
TextHTML = TextHTML.ToString.Replace(txtKZ_replace, "")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||
setMailText(KdNr, "SRB")
|
||||
End Sub
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
setMailText(KdNr, "RO")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -3024,10 +3024,37 @@ Public Class usrCntlFaktAbrechnung
|
||||
initSteuerbetraege(RECHNUNG, FixeTaxePOS)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Shared Sub setFixeTaxeMin(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, ByRef minBetrag As Double, fixeTaxe As Double)
|
||||
Dim FixeTaxe_Berechnungbetrag As Double = 0
|
||||
' Bei Leistungs-Nr 440 und Berechnungs-Code-Nr 9 wird Fixe Taxe berechnet.
|
||||
|
||||
|
||||
If Not leistungExistsInPos(RECHNUNG, 440, 9) Then Exit Sub 'Schauen, ob die Leistung in den Positionen vorhanden ist
|
||||
|
||||
If (RECHNUNG.SteuerfreierGesamtbetrag + RECHNUNG.SteuerpflichtigerGesamtbetrag) >= minBetrag Then Exit Sub
|
||||
|
||||
If fixeTaxe <= 0 Then Exit Sub
|
||||
|
||||
'Sucht, ob Fixetaxe schon vorhanden ist,...
|
||||
Dim FixeTaxePOS = RECHNUNG.POSITIONEN.Find(Function(x) x.LeistungsNr = 440 And x.BerechnungsartNr = 9)
|
||||
'... sonst wird eine neue Pos eingefügt...
|
||||
If FixeTaxePOS IsNot Nothing Then
|
||||
' FixeTaxePOS = New VERAG_PROG_ALLGEMEIN.cRechnungsausgangPositionen
|
||||
FixeTaxePOS.LeistungsNr = 440
|
||||
FixeTaxePOS.LeistungsBez = "P.P./Fixe Taxe"
|
||||
FixeTaxePOS.BerechnungsartNr = 9
|
||||
' RECHNUNG.POSITIONEN.Add(FixeTaxePOS)
|
||||
'...und der Wert gesetzt.
|
||||
FixeTaxePOS.Anzahl = 1
|
||||
FixeTaxePOS.Preis = getVorzeichen(RECHNUNG) * FixeTaxe
|
||||
|
||||
initSteuerbetraege(RECHNUNG, FixeTaxePOS)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Shared Function getVorzeichen(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang) As Integer
|
||||
Return 1
|
||||
Return If(RECHNUNG.Vorzeichen = "-", -1, 1)
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.4.1.9")>
|
||||
<Assembly: AssemblyFileVersion("1.4.1.9")>
|
||||
<Assembly: AssemblyVersion("1.4.2.0")>
|
||||
<Assembly: AssemblyFileVersion("1.4.2.0")>
|
||||
|
||||
@@ -876,6 +876,12 @@
|
||||
<Compile Include="kunden\usrCntlCBAM.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="kunden\usrCntlIDSPreise.Designer.vb">
|
||||
<DependentUpon>usrCntlIDSPreise.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="kunden\usrCntlIDSPreise.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="kunden\usrcntlVertraege.Designer.vb">
|
||||
<DependentUpon>usrcntlVertraege.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -3426,6 +3432,9 @@
|
||||
<EmbeddedResource Include="kunden\usrCntlCBAM.resx">
|
||||
<DependentUpon>usrCntlCBAM.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="kunden\usrCntlIDSPreise.resx">
|
||||
<DependentUpon>usrCntlIDSPreise.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="kunden\usrcntlVertraege.resx">
|
||||
<DependentUpon>usrcntlVertraege.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
18
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
18
SDL/USTV/frmMDM_USTVAntrag.Designer.vb
generated
@@ -138,6 +138,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
|
||||
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
|
||||
Me.cbxSicherheit = New System.Windows.Forms.CheckBox()
|
||||
Me.pnlBottom.SuspendLayout()
|
||||
CType(Me.pb_Beleg, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -520,6 +521,7 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
Me.Panel8.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.Panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel8.Controls.Add(Me.cbxSicherheit)
|
||||
Me.Panel8.Controls.Add(Me.Label16)
|
||||
Me.Panel8.Controls.Add(Me.txtRZam)
|
||||
Me.Panel8.Controls.Add(Me.Label17)
|
||||
@@ -1706,13 +1708,13 @@ Partial Class frmMDM_USTVAntrag
|
||||
'
|
||||
Me.cns_vorauszahlen.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.VorauszahlungToolStripMenuItem})
|
||||
Me.cns_vorauszahlen.Name = "cns_vorauszahlen"
|
||||
Me.cns_vorauszahlen.Size = New System.Drawing.Size(181, 48)
|
||||
Me.cns_vorauszahlen.Size = New System.Drawing.Size(152, 26)
|
||||
'
|
||||
'VorauszahlungToolStripMenuItem
|
||||
'
|
||||
Me.VorauszahlungToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AktivierenToolStripMenuItem, Me.DeaktivierenToolStripMenuItem})
|
||||
Me.VorauszahlungToolStripMenuItem.Name = "VorauszahlungToolStripMenuItem"
|
||||
Me.VorauszahlungToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.VorauszahlungToolStripMenuItem.Size = New System.Drawing.Size(151, 22)
|
||||
Me.VorauszahlungToolStripMenuItem.Text = "Vorauszahlung"
|
||||
'
|
||||
'AktivierenToolStripMenuItem
|
||||
@@ -1768,6 +1770,17 @@ Partial Class frmMDM_USTVAntrag
|
||||
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1280, 259)
|
||||
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
|
||||
'
|
||||
'cbxSicherheit
|
||||
'
|
||||
Me.cbxSicherheit.AutoSize = True
|
||||
Me.cbxSicherheit.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxSicherheit.ForeColor = System.Drawing.Color.White
|
||||
Me.cbxSicherheit.Location = New System.Drawing.Point(794, 10)
|
||||
Me.cbxSicherheit.Name = "cbxSicherheit"
|
||||
Me.cbxSicherheit.Size = New System.Drawing.Size(15, 14)
|
||||
Me.cbxSicherheit.TabIndex = 53
|
||||
Me.cbxSicherheit.UseVisualStyleBackColor = False
|
||||
'
|
||||
'frmMDM_USTVAntrag
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -1928,4 +1941,5 @@ Partial Class frmMDM_USTVAntrag
|
||||
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents ToolStripMenuItem2 As ToolStripMenuItem
|
||||
Friend WithEvents ToolStripMenuItem3 As ToolStripMenuItem
|
||||
Friend WithEvents cbxSicherheit As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports System.Windows.Documents
|
||||
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||
Imports itextsharp.text.pdf
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports sun.net.www.protocol
|
||||
Imports sun.swing
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
@@ -344,6 +345,7 @@ Public Class frmMDM_USTVAntrag
|
||||
cbxFiliale.changeItem(If(USTV_ANTRAG.FilialenNr, ""))
|
||||
cbxWahrung.changeItem(If(USTV_ANTRAG.UStVAn_Währungscode, ""))
|
||||
cbxRGretour.Checked = USTV_ANTRAG.UStVAn_RGRetour
|
||||
cbxSicherheit.Checked = USTV_ANTRAG.UStVAn_Sicherheit
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -362,7 +364,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
USTV_ANTRAG.FilialenNr = cbxFiliale._value
|
||||
|
||||
USTV_ANTRAG.FilialenNr = cbxFiliale._value
|
||||
USTV_ANTRAG.UStVAn_Sicherheit = cbxSicherheit.Checked
|
||||
|
||||
If txt3470.Text <> "" AndAlso IsNumeric(txt3470.Text) Then
|
||||
USTV_ANTRAG.UStVAn_3470 = CDbl(txt3470.Text)
|
||||
@@ -2283,12 +2285,14 @@ Public Class frmMDM_USTVAntrag
|
||||
' TextHTML = TextHTML.Replace("%FilialenNr%", row.Item("FilialenNr"))
|
||||
|
||||
Mail_HTMLBody = "<div style=""font-family:Calibri, Arial"">" & TextHTML & "</div>"
|
||||
Mail_To = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getMailAdress(USTV_ANTRAG.UStVAn_KuNr, "Rechnung an")
|
||||
Mail_CC = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getMailAdressCC(USTV_ANTRAG.UStVAn_KuNr, "Rechnung an")
|
||||
Mail_BCC = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getMailAdressBCC(USTV_ANTRAG.UStVAn_KuNr, "Rechnung an")
|
||||
Mail_HTMLBody &= "<br><br><br>" & cFakturierung.getSignature(USTV_ANTRAG.UStVAn_LandKz, 19)
|
||||
|
||||
|
||||
Dim AD = New VERAG_PROG_ALLGEMEIN.cAdressen(USTV_ANTRAG.UStVAn_KuNr)
|
||||
If AD.E_Mail IsNot Nothing AndAlso AD.E_Mail <> "" Then Mail_To &= AD.E_Mail & ";"
|
||||
If AD.E_Mail2 IsNot Nothing AndAlso AD.E_Mail2 <> "" Then Mail_To &= AD.E_Mail2 & ";"
|
||||
|
||||
Mail_HTMLBody &= "<br><br><br>" & cFakturierung.getSignature(USTV_ANTRAG.UStVAn_LandKz, 19)
|
||||
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
@@ -67,7 +67,7 @@ Public Class usrCntlUSTV
|
||||
DataGridViewCellStyleDate.Format = "MM/yyyy"
|
||||
|
||||
|
||||
.Columns("UStVAn_ID").Visible = False
|
||||
'.Columns("UStVAn_ID").Visible = False
|
||||
.Columns("UStVAn_AntragArt").HeaderText = "Art"
|
||||
.Columns("UStVAn_AntragArt").MinimumWidth = 50
|
||||
|
||||
|
||||
8
SDL/frmdynMailvorlage.Designer.vb
generated
8
SDL/frmdynMailvorlage.Designer.vb
generated
@@ -173,7 +173,7 @@ Partial Class frmdynMailvorlagen
|
||||
'Label11
|
||||
'
|
||||
Me.Label11.AutoSize = True
|
||||
Me.Label11.Location = New System.Drawing.Point(638, 71)
|
||||
Me.Label11.Location = New System.Drawing.Point(892, 68)
|
||||
Me.Label11.Name = "Label11"
|
||||
Me.Label11.Size = New System.Drawing.Size(89, 13)
|
||||
Me.Label11.TabIndex = 41
|
||||
@@ -183,10 +183,10 @@ Partial Class frmdynMailvorlagen
|
||||
'
|
||||
Me.rtb_txthtml.AcceptsTab = True
|
||||
Me.rtb_txthtml.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.rtb_txthtml.Location = New System.Drawing.Point(641, 87)
|
||||
Me.rtb_txthtml.Location = New System.Drawing.Point(895, 87)
|
||||
Me.rtb_txthtml.Name = "rtb_txthtml"
|
||||
Me.rtb_txthtml.ReadOnly = True
|
||||
Me.rtb_txthtml.Size = New System.Drawing.Size(625, 307)
|
||||
Me.rtb_txthtml.Size = New System.Drawing.Size(371, 307)
|
||||
Me.rtb_txthtml.TabIndex = 40
|
||||
Me.rtb_txthtml.Text = ""
|
||||
'
|
||||
@@ -355,7 +355,7 @@ Partial Class frmdynMailvorlagen
|
||||
Me.rtb_Emailtext.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.rtb_Emailtext.Location = New System.Drawing.Point(10, 87)
|
||||
Me.rtb_Emailtext.Name = "rtb_Emailtext"
|
||||
Me.rtb_Emailtext.Size = New System.Drawing.Size(625, 307)
|
||||
Me.rtb_Emailtext.Size = New System.Drawing.Size(868, 307)
|
||||
Me.rtb_Emailtext.TabIndex = 22
|
||||
Me.rtb_Emailtext.Text = ""
|
||||
'
|
||||
|
||||
@@ -52,16 +52,7 @@ Public Class frmdynMailvorlagen
|
||||
|
||||
cbxSendungsvermerk.fillWithSQL("SELECT VermerkCodeId,Bezeichnung FROM [VermerkeCodes]", True, "AVISO", True)
|
||||
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Sendung", "1"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Mahnung", "2"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("OP-Liste", "3"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MDM-SR", "4"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Erstattungsschreiben", "5"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Zu Wenig", "6"))
|
||||
cbxTyp.changeItem("")
|
||||
|
||||
|
||||
setTypes()
|
||||
|
||||
cbxFirma.Enabled = editall
|
||||
btnDelete.Enabled = editall
|
||||
@@ -299,7 +290,7 @@ Public Class frmdynMailvorlagen
|
||||
|
||||
Private Sub cbxFirma_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxFirma.SelectedValueChanged, cbxSpracheSelected.SelectedValueChanged
|
||||
Try
|
||||
|
||||
setTypes()
|
||||
dgvMailvorlagen.GetOrder()
|
||||
initDGVMailvorlagen(cbxFirma._value, txtSuche.Text, cbxSpracheSelected._value)
|
||||
dgvMailvorlagen.SetOrder()
|
||||
@@ -445,4 +436,31 @@ Public Class frmdynMailvorlagen
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub setTypes()
|
||||
|
||||
Select Case cbxFirma._value
|
||||
Case "VERAG360"
|
||||
cbxTyp.Items.Clear()
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MDM-Belege", "1"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Mahnung", "2"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("OP-Liste", "3"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MDM-SR", "4"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Erstattungsschreiben", "5"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Zu Wenig", "6"))
|
||||
cbxTyp.changeItem("")
|
||||
|
||||
Case Else
|
||||
cbxTyp.Items.Clear()
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Sendung", "1"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Mahnung", "2"))
|
||||
cbxTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("OP-Liste", "3"))
|
||||
cbxTyp.changeItem("")
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
404
SDL/kunden/usrCntlIDSPreise.Designer.vb
generated
Normal file
404
SDL/kunden/usrCntlIDSPreise.Designer.vb
generated
Normal file
@@ -0,0 +1,404 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class usrCntlIDSPreise
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.lblOffert = New System.Windows.Forms.TextBox()
|
||||
Me.Label11 = New System.Windows.Forms.Label()
|
||||
Me.dgvOfferteDetails = New System.Windows.Forms.DataGridView()
|
||||
Me.btnDeleteLeistung = New System.Windows.Forms.Button()
|
||||
Me.btnAddLeistung = New System.Windows.Forms.Button()
|
||||
Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.btnOfferteSpeichern = New System.Windows.Forms.Button()
|
||||
Me.btnHinzufuegen = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.lblLeistunAddErr = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.lblLeistunAddErr2 = New System.Windows.Forms.Label()
|
||||
Me.pnlEdit = New System.Windows.Forms.Panel()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.cboLeistungenAdd = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.MyTextBox1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.btnDeleteOfferte = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.sbLeistungAdd = New VERAG_PROG_ALLGEMEIN.MySearchBox()
|
||||
Me.btnCreateOffert = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.dgvIDS = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxtAddSdl.SuspendLayout()
|
||||
Me.pnlEdit.SuspendLayout()
|
||||
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblOffert
|
||||
'
|
||||
Me.lblOffert.BackColor = System.Drawing.Color.White
|
||||
Me.lblOffert.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.lblOffert.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblOffert.Location = New System.Drawing.Point(5, 10)
|
||||
Me.lblOffert.Multiline = True
|
||||
Me.lblOffert.Name = "lblOffert"
|
||||
Me.lblOffert.ReadOnly = True
|
||||
Me.lblOffert.Size = New System.Drawing.Size(171, 22)
|
||||
Me.lblOffert.TabIndex = 0
|
||||
Me.lblOffert.Text = "IDS"
|
||||
'
|
||||
'Label11
|
||||
'
|
||||
Me.Label11.AutoSize = True
|
||||
Me.Label11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label11.Location = New System.Drawing.Point(233, 16)
|
||||
Me.Label11.Name = "Label11"
|
||||
Me.Label11.Size = New System.Drawing.Size(50, 13)
|
||||
Me.Label11.TabIndex = 2
|
||||
Me.Label11.Text = "Details:"
|
||||
'
|
||||
'dgvOfferteDetails
|
||||
'
|
||||
Me.dgvOfferteDetails.AllowUserToAddRows = False
|
||||
Me.dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
Me.dgvOfferteDetails.AllowUserToOrderColumns = True
|
||||
Me.dgvOfferteDetails.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvOfferteDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.dgvOfferteDetails.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.dgvOfferteDetails.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvOfferteDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
|
||||
Me.dgvOfferteDetails.Location = New System.Drawing.Point(235, 32)
|
||||
Me.dgvOfferteDetails.MultiSelect = False
|
||||
Me.dgvOfferteDetails.Name = "dgvOfferteDetails"
|
||||
Me.dgvOfferteDetails.RowHeadersVisible = False
|
||||
Me.dgvOfferteDetails.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvOfferteDetails.Size = New System.Drawing.Size(796, 475)
|
||||
Me.dgvOfferteDetails.TabIndex = 5
|
||||
'
|
||||
'btnDeleteLeistung
|
||||
'
|
||||
Me.btnDeleteLeistung.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnDeleteLeistung.BackgroundImage = Global.SDL.My.Resources.Resources.del
|
||||
Me.btnDeleteLeistung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnDeleteLeistung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnDeleteLeistung.Location = New System.Drawing.Point(348, 228)
|
||||
Me.btnDeleteLeistung.Name = "btnDeleteLeistung"
|
||||
Me.btnDeleteLeistung.Size = New System.Drawing.Size(28, 23)
|
||||
Me.btnDeleteLeistung.TabIndex = 8
|
||||
Me.btnDeleteLeistung.UseVisualStyleBackColor = True
|
||||
Me.btnDeleteLeistung.Visible = False
|
||||
'
|
||||
'btnAddLeistung
|
||||
'
|
||||
Me.btnAddLeistung.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnAddLeistung.BackgroundImage = Global.SDL.My.Resources.Resources.plus
|
||||
Me.btnAddLeistung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnAddLeistung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnAddLeistung.Location = New System.Drawing.Point(375, 228)
|
||||
Me.btnAddLeistung.Name = "btnAddLeistung"
|
||||
Me.btnAddLeistung.Size = New System.Drawing.Size(28, 23)
|
||||
Me.btnAddLeistung.TabIndex = 9
|
||||
Me.btnAddLeistung.UseVisualStyleBackColor = True
|
||||
Me.btnAddLeistung.Visible = False
|
||||
'
|
||||
'cntxtAddSdl
|
||||
'
|
||||
Me.cntxtAddSdl.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DToolStripMenuItem})
|
||||
Me.cntxtAddSdl.Name = "cntxtAddSdl"
|
||||
Me.cntxtAddSdl.Size = New System.Drawing.Size(82, 26)
|
||||
'
|
||||
'DToolStripMenuItem
|
||||
'
|
||||
Me.DToolStripMenuItem.Name = "DToolStripMenuItem"
|
||||
Me.DToolStripMenuItem.Size = New System.Drawing.Size(81, 22)
|
||||
Me.DToolStripMenuItem.Text = "d"
|
||||
'
|
||||
'btnOfferteSpeichern
|
||||
'
|
||||
Me.btnOfferteSpeichern.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnOfferteSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnOfferteSpeichern.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnOfferteSpeichern.Image = Global.SDL.My.Resources.Resources.save
|
||||
Me.btnOfferteSpeichern.ImageAlign = System.Drawing.ContentAlignment.TopLeft
|
||||
Me.btnOfferteSpeichern.Location = New System.Drawing.Point(664, 0)
|
||||
Me.btnOfferteSpeichern.Name = "btnOfferteSpeichern"
|
||||
Me.btnOfferteSpeichern.Size = New System.Drawing.Size(132, 36)
|
||||
Me.btnOfferteSpeichern.TabIndex = 15
|
||||
Me.btnOfferteSpeichern.Tag = ""
|
||||
Me.btnOfferteSpeichern.Text = "Speichern"
|
||||
Me.btnOfferteSpeichern.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnHinzufuegen
|
||||
'
|
||||
Me.btnHinzufuegen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnHinzufuegen.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnHinzufuegen.Image = Global.SDL.My.Resources.Resources.plus
|
||||
Me.btnHinzufuegen.ImageAlign = System.Drawing.ContentAlignment.TopLeft
|
||||
Me.btnHinzufuegen.Location = New System.Drawing.Point(235, 1)
|
||||
Me.btnHinzufuegen.Name = "btnHinzufuegen"
|
||||
Me.btnHinzufuegen.Size = New System.Drawing.Size(106, 36)
|
||||
Me.btnHinzufuegen.TabIndex = 14
|
||||
Me.btnHinzufuegen.Tag = ""
|
||||
Me.btnHinzufuegen.Text = "Hinzufügen"
|
||||
Me.btnHinzufuegen.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnHinzufuegen.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(105, 13)
|
||||
Me.Label1.TabIndex = 10
|
||||
Me.Label1.Text = "Leistung hinzufügen:"
|
||||
'
|
||||
'lblLeistunAddErr
|
||||
'
|
||||
Me.lblLeistunAddErr.AutoSize = True
|
||||
Me.lblLeistunAddErr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblLeistunAddErr.ForeColor = System.Drawing.Color.Red
|
||||
Me.lblLeistunAddErr.Location = New System.Drawing.Point(179, 3)
|
||||
Me.lblLeistunAddErr.Name = "lblLeistunAddErr"
|
||||
Me.lblLeistunAddErr.Size = New System.Drawing.Size(50, 13)
|
||||
Me.lblLeistunAddErr.TabIndex = 11
|
||||
Me.lblLeistunAddErr.Text = "Auswahl!"
|
||||
Me.lblLeistunAddErr.Visible = False
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label2.ForeColor = System.Drawing.Color.Red
|
||||
Me.Label2.Location = New System.Drawing.Point(420, 283)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(50, 13)
|
||||
Me.Label2.TabIndex = 7
|
||||
Me.Label2.Text = "Auswahl!"
|
||||
Me.Label2.Visible = False
|
||||
'
|
||||
'lblLeistunAddErr2
|
||||
'
|
||||
Me.lblLeistunAddErr2.AutoSize = True
|
||||
Me.lblLeistunAddErr2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblLeistunAddErr2.ForeColor = System.Drawing.Color.Red
|
||||
Me.lblLeistunAddErr2.Location = New System.Drawing.Point(2, 38)
|
||||
Me.lblLeistunAddErr2.Name = "lblLeistunAddErr2"
|
||||
Me.lblLeistunAddErr2.Size = New System.Drawing.Size(174, 13)
|
||||
Me.lblLeistunAddErr2.TabIndex = 16
|
||||
Me.lblLeistunAddErr2.Text = "Diese Bezeichnung existiert bereits!"
|
||||
Me.lblLeistunAddErr2.Visible = False
|
||||
'
|
||||
'pnlEdit
|
||||
'
|
||||
Me.pnlEdit.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.pnlEdit.Controls.Add(Me.Label3)
|
||||
Me.pnlEdit.Controls.Add(Me.Label1)
|
||||
Me.pnlEdit.Controls.Add(Me.btnHinzufuegen)
|
||||
Me.pnlEdit.Controls.Add(Me.lblLeistunAddErr2)
|
||||
Me.pnlEdit.Controls.Add(Me.lblLeistunAddErr)
|
||||
Me.pnlEdit.Controls.Add(Me.btnOfferteSpeichern)
|
||||
Me.pnlEdit.Controls.Add(Me.cboLeistungenAdd)
|
||||
Me.pnlEdit.Controls.Add(Me.MyTextBox1)
|
||||
Me.pnlEdit.Location = New System.Drawing.Point(244, 513)
|
||||
Me.pnlEdit.Name = "pnlEdit"
|
||||
Me.pnlEdit.Size = New System.Drawing.Size(797, 60)
|
||||
Me.pnlEdit.TabIndex = 20
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label3.ForeColor = System.Drawing.Color.Red
|
||||
Me.Label3.Location = New System.Drawing.Point(55, 40)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(110, 13)
|
||||
Me.Label3.TabIndex = 17
|
||||
Me.Label3.Text = "Zuerst Offert anlegen!"
|
||||
Me.Label3.Visible = False
|
||||
'
|
||||
'cboLeistungenAdd
|
||||
'
|
||||
Me.cboLeistungenAdd._allowedValuesFreiText = Nothing
|
||||
Me.cboLeistungenAdd._allowFreiText = False
|
||||
Me.cboLeistungenAdd._value = ""
|
||||
Me.cboLeistungenAdd.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
|
||||
Me.cboLeistungenAdd.DropDownWidth = 350
|
||||
Me.cboLeistungenAdd.FormattingEnabled = True
|
||||
Me.cboLeistungenAdd.Location = New System.Drawing.Point(6, 16)
|
||||
Me.cboLeistungenAdd.Name = "cboLeistungenAdd"
|
||||
Me.cboLeistungenAdd.Size = New System.Drawing.Size(47, 21)
|
||||
Me.cboLeistungenAdd.TabIndex = 12
|
||||
'
|
||||
'MyTextBox1
|
||||
'
|
||||
Me.MyTextBox1._DateTimeOnly = False
|
||||
Me.MyTextBox1._numbersOnly = False
|
||||
Me.MyTextBox1._numbersOnlyKommastellen = ""
|
||||
Me.MyTextBox1._numbersOnlyTrennzeichen = True
|
||||
Me.MyTextBox1._Prozent = False
|
||||
Me.MyTextBox1._ShortDateNew = False
|
||||
Me.MyTextBox1._ShortDateOnly = False
|
||||
Me.MyTextBox1._TimeOnly = False
|
||||
Me.MyTextBox1._TimeOnly_Seconds = False
|
||||
Me.MyTextBox1._value = Nothing
|
||||
Me.MyTextBox1._Waehrung = False
|
||||
Me.MyTextBox1._WaehrungZeichen = True
|
||||
Me.MyTextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||
Me.MyTextBox1.ForeColor = System.Drawing.Color.Black
|
||||
Me.MyTextBox1.Location = New System.Drawing.Point(52, 16)
|
||||
Me.MyTextBox1.MaxLineLength = -1
|
||||
Me.MyTextBox1.MaxLines_Warning = ""
|
||||
Me.MyTextBox1.MaxLines_Warning_Label = Nothing
|
||||
Me.MyTextBox1.Name = "MyTextBox1"
|
||||
Me.MyTextBox1.Size = New System.Drawing.Size(177, 21)
|
||||
Me.MyTextBox1.TabIndex = 13
|
||||
'
|
||||
'btnDeleteOfferte
|
||||
'
|
||||
Me.btnDeleteOfferte.allowBorder = False
|
||||
Me.btnDeleteOfferte.BackgroundImage = Global.SDL.My.Resources.Resources.del_small
|
||||
Me.btnDeleteOfferte.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnDeleteOfferte.FlatAppearance.BorderSize = 0
|
||||
Me.btnDeleteOfferte.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnDeleteOfferte.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnDeleteOfferte.Location = New System.Drawing.Point(182, 9)
|
||||
Me.btnDeleteOfferte.Name = "btnDeleteOfferte"
|
||||
Me.btnDeleteOfferte.Size = New System.Drawing.Size(20, 20)
|
||||
Me.btnDeleteOfferte.TabIndex = 21
|
||||
Me.btnDeleteOfferte.UseVisualStyleBackColor = True
|
||||
Me.btnDeleteOfferte.Visible = False
|
||||
'
|
||||
'sbLeistungAdd
|
||||
'
|
||||
Me.sbLeistungAdd._allowFreitext = False
|
||||
Me.sbLeistungAdd._AllowSetValue = False
|
||||
Me.sbLeistungAdd._allowSpaceAsSplitter = False
|
||||
Me.sbLeistungAdd._autoSizeGross = False
|
||||
Me.sbLeistungAdd._hideIfListEmpty = True
|
||||
Me.sbLeistungAdd._value = Nothing
|
||||
Me.sbLeistungAdd.conn_art = "FMZOLL"
|
||||
Me.sbLeistungAdd.dgvpos = "LEFT"
|
||||
Me.sbLeistungAdd.DISPLAY_PARAM = Nothing
|
||||
Me.sbLeistungAdd.INVISIBLE_COLUMNS = Nothing
|
||||
Me.sbLeistungAdd.key_visible = False
|
||||
Me.sbLeistungAdd.KEYPARAM = Nothing
|
||||
Me.sbLeistungAdd.Location = New System.Drawing.Point(348, 255)
|
||||
Me.sbLeistungAdd.Name = "sbLeistungAdd"
|
||||
Me.sbLeistungAdd.searchActive = True
|
||||
Me.sbLeistungAdd.Size = New System.Drawing.Size(223, 20)
|
||||
Me.sbLeistungAdd.SQL_ORDER_BY = Nothing
|
||||
Me.sbLeistungAdd.SQL_SELECT = Nothing
|
||||
Me.sbLeistungAdd.SQL_WHERE = Nothing
|
||||
Me.sbLeistungAdd.SQL_WhereParamList = Nothing
|
||||
Me.sbLeistungAdd.TabIndex = 6
|
||||
Me.sbLeistungAdd.usrcntl = Nothing
|
||||
Me.sbLeistungAdd.Visible = False
|
||||
'
|
||||
'btnCreateOffert
|
||||
'
|
||||
Me.btnCreateOffert.allowBorder = False
|
||||
Me.btnCreateOffert.BackgroundImage = Global.SDL.My.Resources.Resources.stift
|
||||
Me.btnCreateOffert.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnCreateOffert.FlatAppearance.BorderSize = 0
|
||||
Me.btnCreateOffert.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnCreateOffert.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnCreateOffert.Location = New System.Drawing.Point(208, 10)
|
||||
Me.btnCreateOffert.Name = "btnCreateOffert"
|
||||
Me.btnCreateOffert.Size = New System.Drawing.Size(20, 20)
|
||||
Me.btnCreateOffert.TabIndex = 1
|
||||
Me.btnCreateOffert.UseVisualStyleBackColor = True
|
||||
'
|
||||
'dgvIDS
|
||||
'
|
||||
Me.dgvIDS.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvIDS.AllowUserToAddRows = False
|
||||
Me.dgvIDS.AllowUserToDeleteRows = False
|
||||
Me.dgvIDS.AllowUserToOrderColumns = True
|
||||
Me.dgvIDS.AllowUserToResizeRows = False
|
||||
Me.dgvIDS.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.dgvIDS.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvIDS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvIDS.Location = New System.Drawing.Point(0, 63)
|
||||
Me.dgvIDS.MultiSelect = False
|
||||
Me.dgvIDS.Name = "dgvIDS"
|
||||
Me.dgvIDS.ReadOnly = True
|
||||
Me.dgvIDS.RowHeadersVisible = False
|
||||
Me.dgvIDS.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvIDS.Size = New System.Drawing.Size(228, 444)
|
||||
Me.dgvIDS.TabIndex = 30
|
||||
'
|
||||
'usrCntlIDSPreise
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.Controls.Add(Me.dgvIDS)
|
||||
Me.Controls.Add(Me.btnDeleteOfferte)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.sbLeistungAdd)
|
||||
Me.Controls.Add(Me.btnDeleteLeistung)
|
||||
Me.Controls.Add(Me.btnAddLeistung)
|
||||
Me.Controls.Add(Me.btnCreateOffert)
|
||||
Me.Controls.Add(Me.Label11)
|
||||
Me.Controls.Add(Me.lblOffert)
|
||||
Me.Controls.Add(Me.dgvOfferteDetails)
|
||||
Me.Controls.Add(Me.pnlEdit)
|
||||
Me.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.Name = "usrCntlIDSPreise"
|
||||
Me.Size = New System.Drawing.Size(1041, 576)
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.cntxtAddSdl.ResumeLayout(False)
|
||||
Me.pnlEdit.ResumeLayout(False)
|
||||
Me.pnlEdit.PerformLayout()
|
||||
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lblOffert As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label11 As System.Windows.Forms.Label
|
||||
Friend WithEvents dgvOfferteDetails As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents btnCreateOffert As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents btnDeleteLeistung As Button
|
||||
Friend WithEvents btnAddLeistung As Button
|
||||
Friend WithEvents cntxtAddSdl As ContextMenuStrip
|
||||
Friend WithEvents DToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents btnOfferteSpeichern As Button
|
||||
Friend WithEvents btnHinzufuegen As Button
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents sbLeistungAdd As VERAG_PROG_ALLGEMEIN.MySearchBox
|
||||
Friend WithEvents lblLeistunAddErr As Label
|
||||
Friend WithEvents cboLeistungenAdd As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents MyTextBox1 As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents lblLeistunAddErr2 As Label
|
||||
Friend WithEvents pnlEdit As Panel
|
||||
' Friend WithEvents CheckVatService1 As eu.europa.ec.checkVatService
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents btnDeleteOfferte As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents dgvIDS As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
End Class
|
||||
123
SDL/kunden/usrCntlIDSPreise.resx
Normal file
123
SDL/kunden/usrCntlIDSPreise.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="cntxtAddSdl.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
629
SDL/kunden/usrCntlIDSPreise.vb
Normal file
629
SDL/kunden/usrCntlIDSPreise.vb
Normal file
@@ -0,0 +1,629 @@
|
||||
|
||||
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
|
||||
|
||||
Public Class usrCntlIDSPreise
|
||||
|
||||
Dim FUNC As New cProgramFunctions
|
||||
Dim SQL As New SQL
|
||||
Public Event OfferteChanged()
|
||||
|
||||
|
||||
Dim OFFERTEBind As cEasyBinding
|
||||
Dim table
|
||||
Public BIND_DB = "FMZOLL"
|
||||
Dim tmpDataTable As New DataTable
|
||||
Dim currentOffert As VERAG_PROG_ALLGEMEIN.cOfferte
|
||||
Dim currentOffertArchiv As VERAG_PROG_ALLGEMEIN.cOfferteArchiv
|
||||
Dim edit As Boolean
|
||||
Dim DGVHasChaged = False
|
||||
Dim isStandard
|
||||
Dim loaded = False
|
||||
Dim isNew = False
|
||||
Dim addLeistung = False
|
||||
Dim ofID As Integer
|
||||
Dim isVerag360 As Boolean = False
|
||||
|
||||
Sub New()
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub init(Optional _isVerag360 As Boolean = False)
|
||||
initDGVOfferte()
|
||||
edit = False
|
||||
handleEditMode(edit)
|
||||
isVerag360 = _isVerag360
|
||||
|
||||
End Sub
|
||||
Sub initDGVOfferte()
|
||||
dgvOfferteDetails.Columns.Clear()
|
||||
|
||||
|
||||
With dgvIDS
|
||||
.DataSource = SQL.loadDgvBySql("SELECT OutletCountry, Lieferland_ISO2 FROM [VERAG].[dbo].[tbl_IDS_Länder] ORDER BY OutletCountry", "FMZOLL")
|
||||
|
||||
.Columns("Lieferland_ISO2").HeaderText = "Land"
|
||||
.Columns("OutletCountry").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.Columns("OutletCountry").HeaderText = "Bezeichnung"
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub initDGVOfferteDetails(OffertenNr)
|
||||
loaded = False
|
||||
Try
|
||||
|
||||
With dgvOfferteDetails
|
||||
'.Columns.Clear()
|
||||
|
||||
|
||||
Try
|
||||
OFFERTEBind = New cEasyBinding(BIND_DB)
|
||||
OFFERTEBind.initBinding(" SELECT [LeistungsNr],[LeistungsBez],[BerechnungsartNr],[Preis],[Anzahl],[BGebLeistungsNr],[BGebProzent],[BGebMinBetrag],BerechnungsartPosInkludiert,[Eingegeben am],[Geändert am],[Sachbearbeiter],[PreisänderungProzent],[PreisAlt],[Preisänderung],KundenNr,OffertenNr
|
||||
From [Offertenpositionen] " &
|
||||
" Where OffertenNr='" & OffertenNr & "' ORDER BY LeistungsNr, Preis DESC", "Offertenpositionen")
|
||||
For Each c As DataColumn In OFFERTEBind.bindingdataTable.Columns
|
||||
If c.ColumnName = "SSMA_TimeStamp" Then
|
||||
OFFERTEBind.bindingdataTable.Columns.Remove(c)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' KASSENBind.initBinding("SELECT * FROM " & table & "", table)
|
||||
|
||||
.DataSource = OFFERTEBind.bindingdataTable
|
||||
' DataGridView.AutoSize = True
|
||||
' OFFERTEBind.bindingdataTable.PrimaryKey = {OFFERTEBind.bindingdataTable.Columns("KundenNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsBez")}
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
|
||||
'.DataSource = SQL.loadDgvBySql(" SELECT [LeistungsNr],[LeistungsBez],[BerechnungsartNr],[Preis],[Anzahl],[BGebLeistungsNr],[BGebProzent],[BGebMinBetrag],[Eingegeben am],[Geändert am],[Sachbearbeiter],[PreisänderungProzent],[PreisAlt],[Preisänderung] " &
|
||||
' " FROM [Offertenpositionen] " &
|
||||
' " WHERE KundenNr='" & kdNr & "' and OffertenNr='" & OffertenNr & "' ORDER BY LeistungsNr ", "FMZOLL")
|
||||
|
||||
FUNC.dgvCellToCbo(dgvOfferteDetails, 2, "Berechnungsart", "BerechnungsartNr", " SELECT [BerechnungsartNr], CAST(BerechnungsartNr as varchar(3)) + ' - ' + [BerechnungsartBez] as [BerechnungsartBez] FROM [Berechnungsart] ORDER BY BerechnungsartNr ", "FMZOLL", 150)
|
||||
FUNC.dgvCellToCbo(dgvOfferteDetails, 5, "BGebLeist.", "BGebLeistungsNr", " SELECT [LeistungsNr], CAST(LeistungsNr as varchar(3)) + ' - ' + [LeistungsBez] as LeistungsBez FROM [Leistungen] ORDER BY [LeistungsNr] ", "FMZOLL", 250)
|
||||
|
||||
checkPerimissionsDGVDetails()
|
||||
|
||||
.Columns("OffertenNr").Visible = False
|
||||
.Columns("KundenNr").Visible = False
|
||||
.Columns("LeistungsNr").Width = 30
|
||||
.Columns("LeistungsNr").HeaderText = "Nr"
|
||||
.Columns("LeistungsBez").MinimumWidth = 200
|
||||
.Columns("LeistungsBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
.Columns("LeistungsBez").HeaderText = "Leistung"
|
||||
.Columns("BerechnungsartNr").MinimumWidth = 150
|
||||
.Columns("Preis").Width = 60
|
||||
.Columns("Preis").DefaultCellStyle.Format = "N2"
|
||||
.Columns("Preis").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("Anzahl").Width = 50
|
||||
.Columns("Anzahl").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
|
||||
|
||||
.Columns("BerechnungsartPosInkludiert").HeaderText = "Pos.inkl."
|
||||
.Columns("BerechnungsartPosInkludiert").Width = 45
|
||||
|
||||
.Columns("BGebLeistungsNr").Width = 60
|
||||
.Columns("BGebProzent").Width = 55
|
||||
.Columns("BGebProzent").HeaderText = "BGeb %"
|
||||
.Columns("BGebProzent").DefaultCellStyle.Format = "P"
|
||||
.Columns("BGebProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("BGebMinBetrag").Width = 60
|
||||
.Columns("BGebMinBetrag").HeaderText = "BGebMinBetr."
|
||||
.Columns("BGebMinBetrag").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("Eingegeben am").Visible = False
|
||||
' .Columns("Sachbearbeiter").Visible = False
|
||||
' .Columns("Geändert am").Visible = False
|
||||
.Columns("PreisänderungProzent").Width = 70
|
||||
.Columns("PreisänderungProzent").HeaderText = "Preisänd. %"
|
||||
.Columns("PreisänderungProzent").DefaultCellStyle.Format = "p"
|
||||
.Columns("PreisänderungProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("PreisAlt").Width = 60
|
||||
.Columns("PreisAlt").DefaultCellStyle.Format = "N2"
|
||||
.Columns("PreisAlt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("Preisänderung").Width = 60
|
||||
.Columns("Preisänderung").HeaderText = "PreisNeu"
|
||||
.Columns("Preisänderung").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
' .Columns("OffertenBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
' .Columns("OffertenBez").HeaderText = "Bezeichnung"
|
||||
|
||||
.Columns("PreisänderungProzent").Visible = False
|
||||
.Columns("PreisAlt").Visible = False
|
||||
.Columns("Preisänderung").Visible = False
|
||||
|
||||
loaded = True
|
||||
End With
|
||||
|
||||
DGVHasChaged = False
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub dgvOfferteDetails_SelectionChanged(sender As Object, e As EventArgs) Handles dgvIDS.SelectionChanged
|
||||
Try
|
||||
|
||||
|
||||
checkPermissions()
|
||||
|
||||
If dgvIDS.SelectedRows.Count > 0 Then
|
||||
initDGVOfferteDetails(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub usrCntlOfferte_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
init(isVerag360)
|
||||
|
||||
' sbLeistungAdd.initSearchBox(Me.FindForm, " [Code] ,[LeistungsNr],[LeistungsBez] FROM [Leistungen]", {"LeistungsNr", "LeistungsBez"}, " ", "LeistungsNr", "LeistungsNr", , "FMZOLL", , 400, 200)
|
||||
cboLeistungenAdd.fillWithSQL("SELECT [LeistungsNr],Replace([LeistungsBez],'P.P./', '') FROM [Leistungen] ORDER BY LeistungsNr", , "FMZOLL", True)
|
||||
|
||||
checkPermissions()
|
||||
|
||||
|
||||
'AddHandler OFFERTEBind.bindingdataTable.ColumnChanged, Sub(ev As EventArgs, change As DataColumnChangeEventArgs)
|
||||
' ' If change.Column.ColumnName=""
|
||||
' 'Dim r_index = dgvOfferteDetails.Rows.IndexOf(change.Row)
|
||||
' 'Dim c_index = dgvOfferteDetails.Columns.IndexOf(change.Column.ColumnName)
|
||||
' 'dgvOfferteDetails.Rows(change.Row)
|
||||
|
||||
' End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnAddLeistung_Click(sender As Object, e As EventArgs) Handles btnAddLeistung.Click
|
||||
|
||||
Try
|
||||
|
||||
Dim SQLsrt = " SELECT (select case when COUNT(*)>0 then 1 else 0 end FROM Offertenpositionen where [Offertenpositionen].[OffertenNr]=[Offertenstamm].[OffertenNr]) as vorhanden," &
|
||||
" [Offertenstamm].[OffertenNr],[OffertenBez] FROM Offertenstamm "
|
||||
|
||||
For Each r As DataRow In SQL.loadDgvBySql(SQLsrt, "FMZOLL").Rows
|
||||
If Not CBool(r("vorhanden")) Then
|
||||
Dim i As New ToolStripMenuItem
|
||||
i.Text = r("OffertenNr") & " - " & r("OffertenBez")
|
||||
i.Name = "tsmiOffertNr_" & r("OffertenNr")
|
||||
i.Tag = r("OffertenNr")
|
||||
cntxtAddSdl.Items.Add(i)
|
||||
' If s.Sperre <> 0 Then i.Enabled = False : i.Text = i.Text & " (gesperrt)"
|
||||
AddHandler i.Click, AddressOf AddOffert_Click
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
btnAddLeistung.ContextMenuStrip = cntxtAddSdl
|
||||
' cntxtAddSdl
|
||||
Dim ptLowerLeft As New Point(sender.width, sender.Height)
|
||||
ptLowerLeft = sender.PointToScreen(ptLowerLeft)
|
||||
ptLowerLeft.X -= sender.width
|
||||
cntxtAddSdl.Show(ptLowerLeft)
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub AddOffert_Click(sender As Object, e As EventArgs) Handles DToolStripMenuItem.Click
|
||||
If sender.name.contains("tsmiOffertNr_") Then
|
||||
' MsgBox(sender.name.ToString.Replace("tsmiSDLNr_", ""))
|
||||
Dim OffertenNr As String = sender.tag
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btnHinzufuegen_Click_1(sender As Object, e As EventArgs) Handles btnHinzufuegen.Click
|
||||
|
||||
Try
|
||||
|
||||
|
||||
If edit = False Then
|
||||
MsgBox("Bitte vorher in den Editiermodus wechseln")
|
||||
Exit Sub
|
||||
End If
|
||||
lblLeistunAddErr.Visible = False
|
||||
lblLeistunAddErr2.Visible = False
|
||||
Label3.Visible = False
|
||||
|
||||
If dgvIDS.SelectedRows.Count <> 1 Then
|
||||
Label3.Visible = True
|
||||
End If
|
||||
'Fehlerprüfung:
|
||||
'-------
|
||||
If cboLeistungenAdd._value = "" Then lblLeistunAddErr.Visible = True : Exit Sub
|
||||
'-------
|
||||
|
||||
Dim l As New VERAG_PROG_ALLGEMEIN.cLeistungen(cboLeistungenAdd._value)
|
||||
Dim o As New VERAG_PROG_ALLGEMEIN.cOffertPosition
|
||||
o.LeistungsNr = l.LeistungsNr
|
||||
o.LeistungsBez = MyTextBox1.Text
|
||||
o.OffertenNr = dgvIDS.SelectedRows(0).Cells("OffertenNr").Value
|
||||
'o.Preis=l.preis
|
||||
o.BerechnungsartNr = l.BerechnungsartNr
|
||||
'o.Anzahl = l.m
|
||||
'o.BGebLeistungsNr = l.BGebUStV
|
||||
'o.BGebProzent = l.XXXXXXXXXX
|
||||
'o.BGebMinBetrag = l.XXXXXXXXXX
|
||||
o.Eingegeben_am = Now
|
||||
'o.Geändert_am = l.XXXXXXXXXX
|
||||
o.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
'o.Preisänderung = l.Preissperre
|
||||
'o.PreisänderungProzent = l.XXXXXXXXXX
|
||||
'o.PreisAlt = l.XXXXXXXXXX
|
||||
If o.INSERT() Then
|
||||
cboLeistungenAdd.changeItem("")
|
||||
initDGVOfferteDetails(o.OffertenNr)
|
||||
addLeistung = True
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub cboLeistungenAdd_KeyDown(sender As Object, e As KeyEventArgs) Handles cboLeistungenAdd.KeyDown, MyTextBox1.KeyDown
|
||||
If e.KeyCode = Keys.Return Then
|
||||
btnHinzufuegen.PerformClick()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboLeistungenAdd_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboLeistungenAdd.SelectedIndexChanged
|
||||
If cboLeistungenAdd._value <> "" Then
|
||||
MyTextBox1.Text = cboLeistungenAdd.Text.ToString.Replace(cboLeistungenAdd._value & " - ", "").Trim()
|
||||
Else
|
||||
MyTextBox1.Text = ""
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetails.CellValueChanged
|
||||
Try
|
||||
|
||||
If loaded = True Then
|
||||
dgvOfferteDetails.Rows(e.RowIndex).Cells("Sachbearbeiter").Value = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
dgvOfferteDetails.Rows(e.RowIndex).Cells("Geändert am").Value = Now
|
||||
DGVHasChaged = True
|
||||
'saveCurrentOffert()
|
||||
If isNew Then
|
||||
currentOffert.Art = "Neuanlage"
|
||||
Else
|
||||
currentOffert.Art = "Geändert"
|
||||
End If
|
||||
currentOffert.SAVE()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnDeleteOfferte_Click(sender As Object, e As EventArgs) Handles btnDeleteOfferte.Click
|
||||
Try
|
||||
|
||||
If dgvIDS.SelectedRows.Count = 1 Then
|
||||
If vbYes = MsgBox("Möchten Sie das Offert '" & dgvIDS.SelectedRows(0).Cells("OffertenBez").Value & "' wirklich löschen", vbYesNoCancel) Then
|
||||
saveCurrentOffert()
|
||||
currentOffert.Art = "Offert gelöscht"
|
||||
currentOffert.SAVE()
|
||||
OfferteArchivieren()
|
||||
If SQL.doSQL("DELETE FROM Offerten where [OffertenNr]='" & dgvIDS.SelectedRows(0).Cells("OffertenNr").Value & "' ", "FMZOLL") Then
|
||||
initDGVOfferte()
|
||||
RaiseEvent OfferteChanged()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub btnOfferteSpeichern_Click(sender As Object, e As EventArgs) Handles btnOfferteSpeichern.Click
|
||||
Try
|
||||
|
||||
checkPerimissionsDGVDetails()
|
||||
edit = False
|
||||
handleEditMode(edit)
|
||||
saveToArchive()
|
||||
|
||||
OFFERTEBind.updateBinding()
|
||||
RaiseEvent OfferteChanged()
|
||||
DGVHasChaged = False
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnOffertbearbeiten_Click(sender As Object, e As EventArgs)
|
||||
|
||||
edit = True
|
||||
handleEditMode(edit)
|
||||
checkPerimissionsDGVDetails()
|
||||
saveCurrentOffert()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OfferteArchivieren(Optional Art As String = "")
|
||||
|
||||
Try
|
||||
|
||||
currentOffertArchiv = New VERAG_PROG_ALLGEMEIN.cOfferteArchiv()
|
||||
currentOffertArchiv.KundenNr = currentOffert.KundenNr
|
||||
currentOffertArchiv.FilialenNr = currentOffert.FilialenNr
|
||||
currentOffertArchiv.OffertenNr = currentOffert.OffertenNr
|
||||
currentOffertArchiv.Standardofferte = currentOffert.Standardofferte
|
||||
currentOffertArchiv.Besonderheiten = currentOffert.Besonderheiten
|
||||
currentOffertArchiv.Eingegeben_am = currentOffert.Eingegeben_am
|
||||
currentOffertArchiv.Geändert_am = currentOffert.Geändert_am
|
||||
currentOffertArchiv.Sachbearbeiter = currentOffert.Sachbearbeiter
|
||||
currentOffertArchiv.SSMA_TimeStamp = currentOffert.SSMA_TimeStamp
|
||||
currentOffertArchiv.Gesperrt = currentOffert.Gesperrt
|
||||
currentOffertArchiv.Gesperrt_Datum = currentOffert.Gesperrt_Datum
|
||||
currentOffertArchiv.Gesperrt_Grund = currentOffert.Gesperrt_Grund
|
||||
currentOffertArchiv.Art = currentOffert.Art
|
||||
ofID = currentOffertArchiv.SAVERETURNID()
|
||||
|
||||
If ofID > 0 Then
|
||||
For Each row As DataRow In tmpDataTable.Rows
|
||||
If tmpDataTable.Rows.Count = 0 Then Exit Sub
|
||||
Dim oP As New VERAG_PROG_ALLGEMEIN.cOffertPositionArchiv
|
||||
oP.OfID = ofID
|
||||
oP.KundenNr = currentOffertArchiv.KundenNr
|
||||
oP.LeistungsNr = row("LeistungsNr")
|
||||
oP.LeistungsBez = row("LeistungsBez")
|
||||
oP.OffertenNr = currentOffertArchiv.OffertenNr
|
||||
oP.BerechnungsartNr = row("BerechnungsartNr")
|
||||
oP.Preis = row("Preis")
|
||||
oP.Anzahl = row("Anzahl")
|
||||
oP.BGebLeistungsNr = row("BGebLeistungsNr")
|
||||
oP.BGebProzent = row("BGebProzent")
|
||||
oP.BGebMinBetrag = row("BGebMinBetrag")
|
||||
oP.Eingegeben_am = row("Eingegeben am")
|
||||
oP.Geändert_am = row("Geändert am")
|
||||
oP.Sachbearbeiter = row("Sachbearbeiter")
|
||||
oP.Preisänderung = row("Preisänderung")
|
||||
oP.PreisänderungProzent = row("PreisänderungProzent")
|
||||
oP.PreisAlt = row("PreisAlt")
|
||||
oP.BerechnungsartPosInkludiert = row("BerechnungsartPosInkludiert")
|
||||
oP.INSERT()
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub cbxArchivierteOfferten_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
checkPerimissionsDGVDetails()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cbxArchivierteOffertenAnzeigen_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If dgvIDS.SelectedRows.Count = 0 Then Exit Sub
|
||||
|
||||
initDGVOfferteDetails(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub checkPerimissionsDGVDetails()
|
||||
|
||||
Try
|
||||
With dgvOfferteDetails
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_BEARBEITEN", "SDL") Then
|
||||
For Each c As DataGridViewColumn In .Columns
|
||||
c.ReadOnly = True
|
||||
handleEditMode(False)
|
||||
Next
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
Else
|
||||
|
||||
For Each c As DataGridViewColumn In .Columns
|
||||
|
||||
If isVerag360 Then
|
||||
If (c.Name = "Preis" Or c.Name = "LeistungsBez" Or c.Name = "Anzahl" Or c.Name = "BerechnungsartNr" Or c.Name = "BerechnungsartPosInkludiert" Or c.Name = "BGebLeistungsNr" Or c.Name = "BGebProzent" Or c.Name = "BGebMinBetrag" Or c.Name = "Land" Or c.Name = "VZ" Or c.Name = "RMC" Or c.Name = "Fremd") Then
|
||||
If edit Then
|
||||
c.ReadOnly = False
|
||||
handleEditMode(edit)
|
||||
Else
|
||||
c.ReadOnly = True
|
||||
handleEditMode(edit)
|
||||
End If
|
||||
Else
|
||||
c.ReadOnly = True
|
||||
|
||||
End If
|
||||
Else
|
||||
If (c.Name = "Preis" Or c.Name = "LeistungsBez" Or c.Name = "Anzahl" Or c.Name = "BerechnungsartNr" Or c.Name = "BerechnungsartPosInkludiert") Then
|
||||
If edit Then
|
||||
c.ReadOnly = False
|
||||
handleEditMode(edit)
|
||||
Else
|
||||
c.ReadOnly = True
|
||||
handleEditMode(edit)
|
||||
End If
|
||||
Else
|
||||
c.ReadOnly = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = edit
|
||||
End If
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub saveCurrentOffert()
|
||||
Try
|
||||
|
||||
|
||||
dgvIDS.Enabled = False
|
||||
'currentOffert = New VERAG_PROG_ALLGEMEIN.cOfferte(kdNr, dgvIDS.SelectedRows(0).Cells("OffertenNr").Value, False)
|
||||
Dim orgDataTable As DataTable = dgvOfferteDetails.DataSource
|
||||
tmpDataTable = orgDataTable.Copy
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub checkPermissions()
|
||||
|
||||
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_BEARBEITEN", "SDL") Then
|
||||
pnlEdit.Visible = False
|
||||
btnCreateOffert.Visible = False
|
||||
dgvIDS.ReadOnly = True
|
||||
|
||||
Else
|
||||
dgvOfferteDetails.AllowUserToAddRows = True
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = True
|
||||
dgvOfferteDetails.RowHeadersVisible = True
|
||||
|
||||
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_LOESCHEN", "SDL") Then
|
||||
btnDeleteOfferte.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If dgvIDS.SelectedRows.Count = 0 Then
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub handleEditMode(isInEditMode As Boolean)
|
||||
|
||||
If isInEditMode Then
|
||||
|
||||
dgvIDS.Enabled = False
|
||||
dgvOfferteDetails.ReadOnly = False
|
||||
btnOfferteSpeichern.Enabled = True
|
||||
Else
|
||||
|
||||
dgvIDS.Enabled = True
|
||||
dgvOfferteDetails.ReadOnly = True
|
||||
btnOfferteSpeichern.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub saveToArchive()
|
||||
Try
|
||||
|
||||
|
||||
|
||||
If isNew = False AndAlso isStandard = False Or isNew AndAlso isStandard = False Then 'Neuanlage oder Anlage über "Standardoffert laden" speichern,
|
||||
If DGVHasChaged = False Then Exit Sub
|
||||
End If
|
||||
|
||||
If isStandard Then
|
||||
If isNew Then
|
||||
OfferteArchivieren()
|
||||
isNew = False
|
||||
|
||||
End If
|
||||
isStandard = False
|
||||
Else
|
||||
|
||||
If DGVHasChaged Then
|
||||
If isNew = False Then
|
||||
OfferteArchivieren()
|
||||
Exit Sub
|
||||
|
||||
Else
|
||||
If isNew Then
|
||||
OfferteArchivieren()
|
||||
isNew = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_UserDeletingRow(sender As Object, e As DataGridViewRowCancelEventArgs) Handles dgvOfferteDetails.UserDeletingRow
|
||||
DGVHasChaged = True
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs)
|
||||
cProgramFunctions.genExcelFromDGV_NEW(dgvOfferteDetails, True)
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvOfferteDetails.KeyUp
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
|
||||
|
||||
dgvOfferteDetails.CurrentCell = GetNextCell(dgvOfferteDetails.CurrentCell)
|
||||
e.Handled = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GetNextCell(currentCell As DataGridViewCell) As DataGridViewCell
|
||||
|
||||
Dim i As Integer = 0
|
||||
Dim nextCell As DataGridViewCell = currentCell
|
||||
Dim j = 0
|
||||
Do
|
||||
Dim nextCellIndex As Integer = (nextCell.ColumnIndex + j) Mod dgvOfferteDetails.ColumnCount
|
||||
Dim nextRowIndex As Integer = If(nextCellIndex = 0, (nextCell.RowIndex + 1) Mod dgvOfferteDetails.RowCount, nextCell.RowIndex)
|
||||
lblOffert.Text = "C" & nextCellIndex & "R" & nextRowIndex & "RO" & IIf(nextCell.[ReadOnly], "1", "0") & "H" & IIf(Not nextCell.Visible, "1", "0")
|
||||
nextCell = dgvOfferteDetails.Rows(nextRowIndex).Cells(nextCellIndex)
|
||||
i += 1
|
||||
j = 1
|
||||
Loop While (i < (dgvOfferteDetails.RowCount * dgvOfferteDetails.ColumnCount) AndAlso (nextCell.[ReadOnly]) Or i < (dgvOfferteDetails.RowCount * dgvOfferteDetails.ColumnCount) AndAlso Not nextCell.Visible)
|
||||
|
||||
Return nextCell
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -3800,6 +3800,8 @@ Partial Class usrcntlKundeBearbeitenFull
|
||||
'
|
||||
'dgvIDS_Rabatte
|
||||
'
|
||||
Me.dgvIDS_Rabatte.AllowUserToAddRows = False
|
||||
Me.dgvIDS_Rabatte.AllowUserToDeleteRows = False
|
||||
Me.dgvIDS_Rabatte.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvIDS_Rabatte.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
|
||||
@@ -3958,6 +3960,8 @@ Partial Class usrcntlKundeBearbeitenFull
|
||||
'
|
||||
'dgvSonst_IDSKunden
|
||||
'
|
||||
Me.dgvSonst_IDSKunden.AllowUserToAddRows = False
|
||||
Me.dgvSonst_IDSKunden.AllowUserToDeleteRows = False
|
||||
Me.dgvSonst_IDSKunden.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvSonst_IDSKunden.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
|
||||
|
||||
@@ -1254,9 +1254,9 @@
|
||||
Case "100000-199999"
|
||||
|
||||
If isVerag360 Then
|
||||
cbxFiBu.Checked = True : cboFirma.changeItem("19") : cboFiliale.changeItem("8001")
|
||||
cbxFiBu.Checked = True : cboFirma.changeItem("19") : cboFiliale.changeItem("8001") : cbxErstattungsart.changeItem("1")
|
||||
Else
|
||||
cbxFiBu.Checked = False : cboFirma.changeItem("1") : cboFiliale.changeItem("4803")
|
||||
cbxFiBu.Checked = False : cboFirma.changeItem("1") : cboFiliale.changeItem("4803") :: cbxErstattungsart.changeItem("0")
|
||||
End If
|
||||
|
||||
End Select
|
||||
@@ -2176,7 +2176,7 @@
|
||||
With dgvIDS_Rabatte
|
||||
|
||||
|
||||
.DataSource = sql.loadDgvBySql("SELECT P.ProductDescription, C.OutletCountry, S.OutletName, RW.Rechenwert, Kz FROM [VERAG].[dbo].[tbl_IDS_Rechenwerte] as RW
|
||||
.DataSource = sql.loadDgvBySql("SELECT P.ProductDescription, C.OutletCountry, S.OutletName, RW.Rechenwert, Kz, RW.KategorieNr as KatNr FROM [VERAG].[dbo].[tbl_IDS_Rechenwerte] as RW
|
||||
left join [VERAG].[dbo].[tbl_IDS_Produkte] as P on P.ProductTypeCode = RW.ProductTypeCode
|
||||
left join [VERAG].[dbo].[tbl_IDS_Länder] as C on C.OutletCountryCode = RW.OutletCountryCode
|
||||
left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode where CustomerCode =" & KUNDE.KundenNr, "FMZOLL")
|
||||
@@ -2188,6 +2188,7 @@
|
||||
.Columns(1).HeaderText = "Land"
|
||||
.Columns(2).HeaderText = "Station"
|
||||
.Columns(4).HeaderText = "Rabatt/Preis"
|
||||
.Columns(2).AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
|
||||
End With
|
||||
|
||||
|
||||
98
SDL/mdm/usrCntlMDMAuswertungen.Designer.vb
generated
98
SDL/mdm/usrCntlMDMAuswertungen.Designer.vb
generated
@@ -122,6 +122,10 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.TabPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.UsrCntlWoelfl_IM_CSVRg1 = New SDL.usrCntlWoelfl_IM_CSVRg()
|
||||
Me.tbIDS = New System.Windows.Forms.TabPage()
|
||||
Me.Label62 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox13 = New System.Windows.Forms.GroupBox()
|
||||
Me.Button18 = New System.Windows.Forms.Button()
|
||||
Me.Button14 = New System.Windows.Forms.Button()
|
||||
Me.Label60 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox18 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label57 = New System.Windows.Forms.Label()
|
||||
@@ -178,10 +182,6 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.btnContractdaten = New System.Windows.Forms.Button()
|
||||
Me.Button15 = New System.Windows.Forms.Button()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.GroupBox13 = New System.Windows.Forms.GroupBox()
|
||||
Me.Button14 = New System.Windows.Forms.Button()
|
||||
Me.Label62 = New System.Windows.Forms.Label()
|
||||
Me.Button18 = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -201,6 +201,7 @@ Partial Class usrCntlMDMAuswertungen
|
||||
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
Me.tbIDS.SuspendLayout()
|
||||
Me.GroupBox13.SuspendLayout()
|
||||
Me.GroupBox18.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.GroupBox10.SuspendLayout()
|
||||
@@ -214,7 +215,6 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.GroupBox15.SuspendLayout()
|
||||
Me.GroupBox14.SuspendLayout()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.GroupBox13.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GroupBox1
|
||||
@@ -1353,6 +1353,49 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.tbIDS.Text = "IDS"
|
||||
Me.tbIDS.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label62
|
||||
'
|
||||
Me.Label62.AutoSize = True
|
||||
Me.Label62.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label62.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label62.Location = New System.Drawing.Point(325, 162)
|
||||
Me.Label62.Name = "Label62"
|
||||
Me.Label62.Size = New System.Drawing.Size(146, 17)
|
||||
Me.Label62.TabIndex = 26
|
||||
Me.Label62.Text = "IDS Preise/Rabatte"
|
||||
'
|
||||
'GroupBox13
|
||||
'
|
||||
Me.GroupBox13.Controls.Add(Me.Button18)
|
||||
Me.GroupBox13.Controls.Add(Me.Button14)
|
||||
Me.GroupBox13.Location = New System.Drawing.Point(322, 182)
|
||||
Me.GroupBox13.Name = "GroupBox13"
|
||||
Me.GroupBox13.Size = New System.Drawing.Size(297, 134)
|
||||
Me.GroupBox13.TabIndex = 25
|
||||
Me.GroupBox13.TabStop = False
|
||||
'
|
||||
'Button18
|
||||
'
|
||||
Me.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button18.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button18.Location = New System.Drawing.Point(153, 19)
|
||||
Me.Button18.Name = "Button18"
|
||||
Me.Button18.Size = New System.Drawing.Size(121, 49)
|
||||
Me.Button18.TabIndex = 5
|
||||
Me.Button18.Text = "Produktpreise"
|
||||
Me.Button18.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button14
|
||||
'
|
||||
Me.Button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button14.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button14.Location = New System.Drawing.Point(6, 19)
|
||||
Me.Button14.Name = "Button14"
|
||||
Me.Button14.Size = New System.Drawing.Size(121, 49)
|
||||
Me.Button14.TabIndex = 4
|
||||
Me.Button14.Text = "Kunden/Preise"
|
||||
Me.Button14.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label60
|
||||
'
|
||||
Me.Label60.AutoSize = True
|
||||
@@ -1937,49 +1980,6 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.pnl.Size = New System.Drawing.Size(1057, 54)
|
||||
Me.pnl.TabIndex = 26
|
||||
'
|
||||
'GroupBox13
|
||||
'
|
||||
Me.GroupBox13.Controls.Add(Me.Button18)
|
||||
Me.GroupBox13.Controls.Add(Me.Button14)
|
||||
Me.GroupBox13.Location = New System.Drawing.Point(322, 182)
|
||||
Me.GroupBox13.Name = "GroupBox13"
|
||||
Me.GroupBox13.Size = New System.Drawing.Size(297, 134)
|
||||
Me.GroupBox13.TabIndex = 25
|
||||
Me.GroupBox13.TabStop = False
|
||||
'
|
||||
'Button14
|
||||
'
|
||||
Me.Button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button14.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button14.Location = New System.Drawing.Point(6, 19)
|
||||
Me.Button14.Name = "Button14"
|
||||
Me.Button14.Size = New System.Drawing.Size(121, 49)
|
||||
Me.Button14.TabIndex = 4
|
||||
Me.Button14.Text = "Kunden"
|
||||
Me.Button14.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label62
|
||||
'
|
||||
Me.Label62.AutoSize = True
|
||||
Me.Label62.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label62.ForeColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.Label62.Location = New System.Drawing.Point(325, 162)
|
||||
Me.Label62.Name = "Label62"
|
||||
Me.Label62.Size = New System.Drawing.Size(146, 17)
|
||||
Me.Label62.TabIndex = 26
|
||||
Me.Label62.Text = "IDS Preise/Rabatte"
|
||||
'
|
||||
'Button18
|
||||
'
|
||||
Me.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button18.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button18.Location = New System.Drawing.Point(153, 19)
|
||||
Me.Button18.Name = "Button18"
|
||||
Me.Button18.Size = New System.Drawing.Size(121, 49)
|
||||
Me.Button18.TabIndex = 5
|
||||
Me.Button18.Text = "Preise"
|
||||
Me.Button18.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrCntlMDMAuswertungen
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -2020,6 +2020,7 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.TabPage3.PerformLayout()
|
||||
Me.tbIDS.ResumeLayout(False)
|
||||
Me.tbIDS.PerformLayout()
|
||||
Me.GroupBox13.ResumeLayout(False)
|
||||
Me.GroupBox18.ResumeLayout(False)
|
||||
Me.GroupBox18.PerformLayout()
|
||||
Me.TabPage2.ResumeLayout(False)
|
||||
@@ -2045,7 +2046,6 @@ Partial Class usrCntlMDMAuswertungen
|
||||
Me.GroupBox14.PerformLayout()
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
Me.GroupBox13.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1411,6 +1411,34 @@ Public Class usrCntlMDMAuswertungen
|
||||
|
||||
Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click
|
||||
|
||||
|
||||
|
||||
Dim sql = "SELECT CustomerCode, P.ProductDescription, C.OutletCountry, S.OutletName, RW.Rechenwert, Kz, RW.KategorieNr as KatNr FROM [VERAG].[dbo].[tbl_IDS_Rechenwerte] as RW
|
||||
left join [VERAG].[dbo].[tbl_IDS_Produkte] as P on P.ProductTypeCode = RW.ProductTypeCode
|
||||
left join [VERAG].[dbo].[tbl_IDS_Länder] as C on C.OutletCountryCode = RW.OutletCountryCode
|
||||
left join [VERAG].[dbo].[tbl_IDS_Stationen] as S on S.[OutletCode] = RW.OutletCode
|
||||
where CustomerCode is not null
|
||||
order by CustomerCode"
|
||||
|
||||
Dim dt As New DataTable
|
||||
dt = (New SQL).loadDgvBySql(sql, "FMZOLL")
|
||||
frmShowData.Show()
|
||||
frmShowData.DataGridView1.DataSource = dt
|
||||
frmShowData.Label2.Text = "Anzahl: " & frmShowData.DataGridView1.RowCount
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
|
||||
|
||||
|
||||
Dim uscCntl As New usrCntlIDSPreise
|
||||
|
||||
uscCntl.init(True)
|
||||
|
||||
uscCntl.Show()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -462,6 +462,178 @@ Public Class usrcntlFakturierung
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
isSet = True
|
||||
|
||||
End If
|
||||
|
||||
Return isSet
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Function FixeTaxe(Sachbearbeiter As String, rechnungsdatum As Date, Optional kdNr As Integer = -1) As Boolean
|
||||
|
||||
|
||||
' Die Abfrage ermittelt aus den Rechnungspositonen,
|
||||
' das Vorkommen (Anzahl Porto/Papiere) pro RechnungsKundenNr
|
||||
' Status=0, Sammelrechnung=6, LeistungsNr=440.
|
||||
|
||||
Dim isSet As Boolean = False
|
||||
Dim sqlString = "SELECT
|
||||
Rechnungsausgang.Firma_ID,
|
||||
Rechnungsausgang.Status,
|
||||
Rechnungsausgang.Sammelrechnung,
|
||||
Rechnungsausgang.Sachbearbeiter,
|
||||
Rechnungsausgang.RechnungsKundenNr,
|
||||
Rechnungsausgang.BelegartenNr,
|
||||
Rechnungsausgang.Währungscode,
|
||||
isnull(Rechnungsausgang.[Steuersatz %],0) as [Steuersatz %],
|
||||
cast(Rechnungsausgang.Lastschrift as bit) as Lastschrift,
|
||||
SUM(CASE WHEN LeistungsNr = 440 THEN Anzahl ELSE 0 END) AS AnzahlPP,
|
||||
SUM(CASE WHEN LeistungsNr = 440 THEN 0 ELSE SteuerpflichtigerBetrag + SteuerfreierBetrag END) AS BetragExclusivPP
|
||||
FROM
|
||||
Rechnungsausgang
|
||||
INNER JOIN
|
||||
RechnungsausgangPositionen ON Rechnungsausgang.RK_ID = RechnungsausgangPositionen.RK_ID
|
||||
WHERE
|
||||
Rechnungsausgang.Status in " & If(kdNr > 0, "(0,2)", "(0)") & "
|
||||
AND Rechnungsausgang.Sammelrechnung = 6
|
||||
AND UPPER(Rechnungsausgang.Sachbearbeiter) = '" & Sachbearbeiter & "'
|
||||
AND cast(Abfertigungsdatum as Date) = '" & rechnungsdatum & "' " & IIf(kdNr > 0, " AND RechnungsKundenNr = " & kdNr, "") & "
|
||||
|
||||
GROUP BY
|
||||
Rechnungsausgang.Firma_ID,
|
||||
Rechnungsausgang.Status,
|
||||
Rechnungsausgang.Sammelrechnung,
|
||||
Rechnungsausgang.Sachbearbeiter,
|
||||
Rechnungsausgang.RechnungsKundenNr,
|
||||
Rechnungsausgang.BelegartenNr,
|
||||
Rechnungsausgang.Währungscode,
|
||||
Rechnungsausgang.[Steuersatz %],
|
||||
Rechnungsausgang.Lastschrift
|
||||
HAVING
|
||||
SUM(CASE WHEN LeistungsNr = 440 THEN Anzahl ELSE 0 END) > 0
|
||||
ORDER BY
|
||||
Rechnungsausgang.Firma_ID,
|
||||
Rechnungsausgang.Status,
|
||||
Rechnungsausgang.Sammelrechnung,
|
||||
Rechnungsausgang.Sachbearbeiter,
|
||||
Rechnungsausgang.RechnungsKundenNr,
|
||||
Rechnungsausgang.BelegartenNr,
|
||||
Rechnungsausgang.Währungscode,
|
||||
Rechnungsausgang.[Steuersatz %],
|
||||
Rechnungsausgang.Lastschrift"
|
||||
|
||||
Dim dtPP As DataTable = (New SQL).loadDgvBySql(sqlString, "FMZOLL")
|
||||
|
||||
If dtPP.Rows.Count > 0 Then
|
||||
|
||||
For Each r In dtPP.Rows
|
||||
|
||||
Dim intZlr As Integer = 0
|
||||
|
||||
' Bei BetragExclusivPP kleiner als 150€ wird 1x P.P. verrechnet, bei grösser/gleich 150€ wird kein P.P. verrechnet.
|
||||
' Zähler auf die Anzahl der P.P. Löschungen einstellen.
|
||||
|
||||
If Not IsDBNull(r("BetragExclusivPP")) AndAlso r("BetragExclusivPP") > 0 Then
|
||||
|
||||
If r("BetragExclusivPP") < 150 Then
|
||||
intZlr = r("AnzahlPP") - 1
|
||||
Else
|
||||
intZlr = r("AnzahlPP")
|
||||
End If
|
||||
Else
|
||||
If (0 - r("BetragExclusivPP")) < 150 Then
|
||||
intZlr = r("AnzahlPP") - 1
|
||||
Else
|
||||
intZlr = r("AnzahlPP") - 1
|
||||
End If
|
||||
End If
|
||||
If intZlr > 0 Then
|
||||
|
||||
|
||||
Dim steuersatz As Single = r("Steuersatz %") 'Single same as real-datatype in SQL (wichtig, sonst findet er den wert nicht!!!)
|
||||
'Dim SteuersatzString As String = steuersatz.ToString.Replace(",", ".")
|
||||
|
||||
' Die Abfrage liest in der Tabelle Rechnungsausgang,
|
||||
' passend zu den durch die vorherige Abfrage bereitgestellten Parametern.
|
||||
|
||||
Dim sqlStringRechnungen As String = "Select DISTINCT
|
||||
Rechnungsausgang.OffertenNr,
|
||||
Rechnungsausgang.RK_ID,
|
||||
Rechnungsausgang.SteuerpflichtigerGesamtbetrag,
|
||||
Rechnungsausgang.SteuerfreierGesamtbetrag,
|
||||
Rechnungsausgang.upsize_ts
|
||||
FROM Rechnungsausgang
|
||||
WHERE
|
||||
Rechnungsausgang.Firma_ID = " & r("Firma_ID") & "
|
||||
And Rechnungsausgang.Status = " & r("Status") & "
|
||||
And Rechnungsausgang.Sammelrechnung = " & r("Sammelrechnung") & "
|
||||
And Rechnungsausgang.UPPER(Sachbearbeiter) = '" & Sachbearbeiter & "'
|
||||
And Rechnungsausgang.RechnungsKundenNr = " & r("RechnungsKundenNr") & "
|
||||
And Rechnungsausgang.BelegartenNr = " & r("BelegartenNr") & "
|
||||
And Rechnungsausgang.Währungscode = '" & r("Währungscode") & "'
|
||||
And Rechnungsausgang.[Steuersatz %] = " & steuersatz.ToString.Replace(",", ".") & "
|
||||
And Rechnungsausgang.Lastschrift = " & IIf(r("Lastschrift"), 1, 0) & "
|
||||
AND cast(Rechnungsausgang.Abfertigungsdatum as Date) = '" & rechnungsdatum & "'
|
||||
ORDER by
|
||||
Rechnungsausgang.OffertenNr"
|
||||
|
||||
|
||||
|
||||
|
||||
Dim dtRechnungen As DataTable = (New SQL).loadDgvBySql(sqlStringRechnungen, "FMZOLL")
|
||||
|
||||
If dtRechnungen.Rows.Count > 0 Then
|
||||
|
||||
For Each re In dtRechnungen.Rows
|
||||
|
||||
|
||||
|
||||
Dim dtREPOSANZ As DataTable = (New SQL).loadDgvBySql("Select [RK_ID], [LeistungsNr], cast([Steuerpflichtig] as bit) as Steuerpflichtig, [LeistungsBez],[IndexZkteing], Anzahl, SteuerpflichtigerBetrag, SteuerfreierBetrag,upsize_ts From RechnungsausgangPositionen Where RechnungsausgangPositionen.RK_ID = " & re("RK_ID") & " And RechnungsausgangPositionen.LeistungsNr = 440", "FMZOLL")
|
||||
|
||||
If dtREPOSANZ.Rows.Count > 0 Then
|
||||
|
||||
Dim stgesBetr = re("SteuerpflichtigerGesamtbetrag")
|
||||
Dim stfregesBetr = re("SteuerfreierGesamtbetrag")
|
||||
|
||||
Dim RECHNUNG As New cRechnungsausgang(re("RK_ID"))
|
||||
|
||||
For Each row In dtREPOSANZ.Rows
|
||||
|
||||
intZlr = intZlr - row("Anzahl")
|
||||
|
||||
If Not IsDBNull(row("SteuerpflichtigerBetrag")) AndAlso IsNumeric(row("SteuerpflichtigerBetrag")) Then stgesBetr = stgesBetr - CDbl(row("SteuerpflichtigerBetrag"))
|
||||
If Not IsDBNull(row("SteuerfreierBetrag")) AndAlso IsNumeric(row("SteuerfreierBetrag")) Then stfregesBetr = stfregesBetr - CDbl(row("SteuerfreierBetrag"))
|
||||
|
||||
If RECHNUNG.DELETE_POSITIONEN(RECHNUNG.RK_ID, row("LeistungsNr"), row("Steuerpflichtig"), row("LeistungsBez"), row("IndexZkteing")) Then
|
||||
RECHNUNG.SteuerfreierGesamtbetrag = stfregesBetr
|
||||
RECHNUNG.SteuerpflichtigerGesamtbetrag = stgesBetr
|
||||
isSet = RECHNUNG.SAVE(False)
|
||||
End If
|
||||
|
||||
If intZlr = 0 Then Exit For
|
||||
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user