Vorauskasse > Offerte laden
This commit is contained in:
@@ -155,6 +155,9 @@ Partial Class usrcntlVorauskasse
|
||||
Me.txtFirma = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label17 = New System.Windows.Forms.Label()
|
||||
Me.cboSprache = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.btnOffertladen = New System.Windows.Forms.Button()
|
||||
Me.txtPos = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label47 = New System.Windows.Forms.Label()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnlBottom.SuspendLayout()
|
||||
Me.Panel4.SuspendLayout()
|
||||
@@ -1195,6 +1198,9 @@ Partial Class usrcntlVorauskasse
|
||||
'
|
||||
'Panel5
|
||||
'
|
||||
Me.Panel5.Controls.Add(Me.Label47)
|
||||
Me.Panel5.Controls.Add(Me.txtPos)
|
||||
Me.Panel5.Controls.Add(Me.btnOffertladen)
|
||||
Me.Panel5.Controls.Add(Me.lblWaehrung)
|
||||
Me.Panel5.Controls.Add(Me.Button5)
|
||||
Me.Panel5.Controls.Add(Me.txtSonstigeKostenText)
|
||||
@@ -1299,7 +1305,7 @@ Partial Class usrcntlVorauskasse
|
||||
'
|
||||
Me.LinkLabel1.AutoSize = True
|
||||
Me.LinkLabel1.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.LinkLabel1.Location = New System.Drawing.Point(268, 88)
|
||||
Me.LinkLabel1.Location = New System.Drawing.Point(287, 84)
|
||||
Me.LinkLabel1.Name = "LinkLabel1"
|
||||
Me.LinkLabel1.Size = New System.Drawing.Size(39, 13)
|
||||
Me.LinkLabel1.TabIndex = 10
|
||||
@@ -2296,6 +2302,49 @@ Partial Class usrcntlVorauskasse
|
||||
Me.cboSprache.Size = New System.Drawing.Size(89, 21)
|
||||
Me.cboSprache.TabIndex = 51
|
||||
'
|
||||
'btnOffertladen
|
||||
'
|
||||
Me.btnOffertladen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnOffertladen.Location = New System.Drawing.Point(332, 81)
|
||||
Me.btnOffertladen.Name = "btnOffertladen"
|
||||
Me.btnOffertladen.Size = New System.Drawing.Size(73, 21)
|
||||
Me.btnOffertladen.TabIndex = 37
|
||||
Me.btnOffertladen.Text = "Offert laden"
|
||||
Me.btnOffertladen.UseVisualStyleBackColor = True
|
||||
Me.btnOffertladen.Visible = False
|
||||
'
|
||||
'txtPos
|
||||
'
|
||||
Me.txtPos._DateTimeOnly = False
|
||||
Me.txtPos._numbersOnly = False
|
||||
Me.txtPos._numbersOnlyKommastellen = ""
|
||||
Me.txtPos._numbersOnlyTrennzeichen = True
|
||||
Me.txtPos._Prozent = False
|
||||
Me.txtPos._ShortDateNew = False
|
||||
Me.txtPos._ShortDateOnly = False
|
||||
Me.txtPos._TimeOnly = False
|
||||
Me.txtPos._TimeOnly_Seconds = False
|
||||
Me.txtPos._value = Nothing
|
||||
Me.txtPos._Waehrung = False
|
||||
Me.txtPos._WaehrungZeichen = True
|
||||
Me.txtPos.Location = New System.Drawing.Point(300, 100)
|
||||
Me.txtPos.MaxLength = 200
|
||||
Me.txtPos.MaxLineLength = -1
|
||||
Me.txtPos.MaxLines_Warning = ""
|
||||
Me.txtPos.MaxLines_Warning_Label = Nothing
|
||||
Me.txtPos.Name = "txtPos"
|
||||
Me.txtPos.Size = New System.Drawing.Size(26, 20)
|
||||
Me.txtPos.TabIndex = 38
|
||||
'
|
||||
'Label47
|
||||
'
|
||||
Me.Label47.AutoSize = True
|
||||
Me.Label47.Location = New System.Drawing.Point(269, 103)
|
||||
Me.Label47.Name = "Label47"
|
||||
Me.Label47.Size = New System.Drawing.Size(25, 13)
|
||||
Me.Label47.TabIndex = 39
|
||||
Me.Label47.Text = "Pos"
|
||||
'
|
||||
'usrcntlVorauskasse
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -2501,4 +2550,7 @@ Partial Class usrcntlVorauskasse
|
||||
Friend WithEvents Label17 As Label
|
||||
Friend WithEvents cboSprache As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents btnFremdWaehrungBerechnen As Button
|
||||
Friend WithEvents btnOffertladen As Button
|
||||
Friend WithEvents Label47 As Label
|
||||
Public WithEvents txtPos As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Public Class usrcntlVorauskasse
|
||||
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class usrcntlVorauskasse
|
||||
Implements FormualrInterface
|
||||
'IMPORTAVISO_AG
|
||||
Public Event CHANGED(name, value)
|
||||
@@ -10,10 +13,11 @@
|
||||
Public KdNR As Integer = -1
|
||||
Public KdFirma As String = ""
|
||||
Public SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen = Nothing
|
||||
Public AVISO As VERAG_PROG_ALLGEMEIN.caviso = Nothing
|
||||
Public AVISO As VERAG_PROG_ALLGEMEIN.cAviso = Nothing
|
||||
|
||||
Public ROLLE As String = ""
|
||||
Dim VK_ID = -1
|
||||
Dim SQL As New SQL
|
||||
|
||||
|
||||
Sub New()
|
||||
@@ -167,10 +171,13 @@
|
||||
LinkLabel1.Visible = True
|
||||
Button2.Visible = True
|
||||
LinkLabel3.Visible = True
|
||||
btnOffertladen.Visible = True
|
||||
btnOffertladen.Enabled = CInt(SQL.getValueTxtBySql("Select count([LeistungsNr]) From Offertenpositionen WHERE KundenNr='" & KdNR & "' and OffertenNr='1'", "FMZOLL")) > 0
|
||||
Else
|
||||
LinkLabel1.Visible = False
|
||||
Button2.Visible = False
|
||||
LinkLabel3.Visible = False
|
||||
btnOffertladen.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -534,7 +541,7 @@
|
||||
btnDelFD.Visible = False
|
||||
lklEintragAufheben.Visible = False
|
||||
End If
|
||||
initKdNRLbl()
|
||||
initKdNrLbl()
|
||||
End Sub
|
||||
Private Sub lklEintragAufheben_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lklEintragAufheben.LinkClicked
|
||||
initControlsSave(Nothing)
|
||||
@@ -768,6 +775,60 @@
|
||||
lblRechnungsbetrag._value = f.txtWarenwertUmrechnung.Text
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnOffertladen_Click(sender As Object, e As EventArgs) Handles btnOffertladen.Click
|
||||
|
||||
|
||||
'Dim SQL As New SQL
|
||||
Dim dt As DataTable = SQL.loadDgvBySql("SELECT [LeistungsNr], [BerechnungsartNr], [Preis], [Anzahl], [BGebLeistungsNr], [BGebProzent], [BGebMinBetrag], BerechnungsartPosInkludiert,[Eingegeben am],[Geändert am], [Sachbearbeiter], [PreisänderungProzent], [PreisAlt], [Preisänderung], KundenNr, OffertenNr FROM [Offertenpositionen] WHERE KundenNr='" & KdNR & "' and OffertenNr='1'", "FMZOLL")
|
||||
|
||||
' wenn AnzahlPos angegeben, dann nur Berechnungsart = 10 verwenden,
|
||||
If txtPos.Text <> "" AndAlso CInt(txtPos.Text) > 0 Then
|
||||
For Each row As DataRow In dt.Select("BerechnungsartNr = '10'")
|
||||
If row("LeistungsNr") = 340 AndAlso Not IsDBNull(row("Preis")) Then
|
||||
|
||||
If IsDBNull(row("BerechnungsartPosInkludiert")) Then
|
||||
txtWeitereTarifPos.Text = row("Preis") * txtPos.Text
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If row("BerechnungsartPosInkludiert") >= txtPos.Text Then
|
||||
txtWeitereTarifPos.Text = row("Preis") * 1
|
||||
Exit For
|
||||
Else
|
||||
txtWeitereTarifPos.Text = row("Preis") * (txtPos.Text - row("BerechnungsartPosInkludiert") + 1)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'Automatisches laden der Offerte -> Parameter müssen noch angepasst werden!
|
||||
|
||||
'For Each row As DataRow In dt.Select("BerechnungsartNr = '1' AND Preis is not null")
|
||||
' If row("LeistungsNr") = 348 Then txtAviso.Text = row("Preis")
|
||||
|
||||
'Next
|
||||
|
||||
'For Each row As DataRow In dt.Select("BerechnungsartNr = '8' AND Preis is not null")
|
||||
|
||||
' If row("LeistungsNr") = 60 Then txtVerzollungskosten.Text = row("Preis")
|
||||
' If row("LeistungsNr") = 20 Then txtZoll._value = row("Preis")
|
||||
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user