This commit is contained in:
2023-03-31 12:23:09 +02:00
5 changed files with 62 additions and 30 deletions

View File

@@ -143,7 +143,7 @@ Partial Class frmKundenZOLLVollmachten
Me.MyComboBox1.FormattingEnabled = True
Me.MyComboBox1.Location = New System.Drawing.Point(98, 6)
Me.MyComboBox1.Name = "MyComboBox1"
Me.MyComboBox1.Size = New System.Drawing.Size(243, 21)
Me.MyComboBox1.Size = New System.Drawing.Size(191, 21)
Me.MyComboBox1.TabIndex = 15
Me.MyComboBox1.Visible = False
'
@@ -187,7 +187,7 @@ Partial Class frmKundenZOLLVollmachten
Me.lbl.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbl.Location = New System.Drawing.Point(11, 0)
Me.lbl.Name = "lbl"
Me.lbl.Size = New System.Drawing.Size(214, 30)
Me.lbl.Size = New System.Drawing.Size(278, 30)
Me.lbl.TabIndex = 20
Me.lbl.Text = "VOLLMACHT"
Me.lbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft

View File

@@ -51,7 +51,7 @@ Public Class frmKundenZOLLVollmachten
End Sub
Private Sub frmKundenZOLLVollmachten_Load(sender As Object, e As EventArgs) Handles Me.Load
MyComboBox1.fillWithSQL("SELECT [kdvma_Id],[kdvma_Bezeichnung] FROM [tblKundenVollmachtenArt]", False, "FMZOLL", False)
MyComboBox1.fillWithSQL("SELECT [kdvma_Id],[kdvma_Bezeichnung] + ' - ' + kdvma_Firma FROM [tblKundenVollmachtenArt]", False, "FMZOLL", False)
Me.MyComboBox1._value = vollmachtartId
initDGVVollmachtenEmbedded(False)
@@ -176,7 +176,20 @@ Public Class frmKundenZOLLVollmachten
Sub initDGVVollmachtenEmbedded(enalblePanel As Boolean)
Dim where = " And art.kdvma_Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "'"
Dim FirmaTmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Dim where = " And art.kdvma_Firma='" & FirmaTmp & "'"
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGIMEX", "SDL") Then
FirmaTmp = "VERAGIMEX"
End If
Select Case FirmaTmp
Case "VERAGIMEX"
where = " AND art.kdvma_Firma IN ('VERAG', 'IMEX') "
End Select
If dgvVollmachtenEmbedded.Enabled = False Then
dgvVollmachtenEmbedded.Enabled = True

View File

@@ -22,7 +22,6 @@ Partial Class frmKundenblatt
'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()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
@@ -152,21 +151,21 @@ Partial Class frmKundenblatt
Me.tbBesuchsberichte = New System.Windows.Forms.TabPage()
Me.tbOfferte = New System.Windows.Forms.TabPage()
Me.UsrCntlOfferte1 = New SDL.usrCntlOfferte()
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip()
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem()
Me.btnAbfVerb = New System.Windows.Forms.Button()
Me.lblAbfVerb = New System.Windows.Forms.Label()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip()
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip()
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.mne = New System.Windows.Forms.MenuStrip()
Me.AllgemeinToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem4 = New System.Windows.Forms.ToolStripMenuItem()
Me.cntxtCntxtMDM = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.cntxtCntxtMDM = New System.Windows.Forms.ContextMenuStrip()
Me.ToolStripMenuItem5 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem7 = New System.Windows.Forms.ToolStripMenuItem()
Me.pnl = New System.Windows.Forms.Panel()

View File

@@ -840,12 +840,28 @@ Public Class usrCntlKundenuebersicht
Sub initDGVVollmachten()
With dgvVollmachten
.Columns.Clear()
Dim where = " AND art.kdvma_Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' "
Dim FirmaTmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Dim where = " AND art.kdvma_Firma='" & FirmaTmp & "' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.isCLUSTER Then
where = " AND art.kdvma_Firma='" & VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KUNDE.FilialenNr) & "' "
End If
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGIMEX", "SDL") Then
FirmaTmp = "VERAGIMEX"
End If
Select Case FirmaTmp
Case "VERAGIMEX"
where = " AND art.kdvma_Firma IN ('VERAG', 'IMEX') "
End Select
.DataSource = SQL.loadDgvBySql("SELECT * FROM (SELECT abf.kdvm_Id, art.kdvma_Id, art.kdvma_Bezeichnung, abf.[kdvm_KundenNr], abf.[kdvm_erhalten],abf.[kdvm_erhalten_Datum], abf.[kdvm_gueltig_bis], abf.kdvm_datenarchivId, abf.kdvm_Info, abf.[kdvm_vermerk], abf.[kdvm_archiviert],ROW_NUMBER() OVER(PARTITION BY art.kdvma_Id ORDER BY kdvm_archiviert asc, abf.kdvm_gueltig_bis asc, abf.kdvm_erhalten_Datum desc) RowNumber" &
" FROM [tblKundenVollmachtenArt] as art LEFT JOIN (select * from [tblKundenVollmachten] where [kdvm_KundenNr]='" & kdNr & "' ) as abf on art.[kdvma_Id]=abf.[kdvm_kdvmaId] WHERE art.kdvma_visible=1 AND abf.kdvm_erhalten = 1 AND ISNULL(abf.[kdvm_geloescht],0) != 1 " & where &
" ) A WHERE RowNumber = 1", "FMZOLL")
@@ -932,12 +948,6 @@ Public Class usrCntlKundenuebersicht
.Columns.Add(c)
End If
Dim FirmaTmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("FAKTURIERUNG_VERAGIMEX", "SDL") Then
FirmaTmp = "VERAGIMEX"
End If
Select Case FirmaTmp
' Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Case "UNISPED", "IMEX"

View File

@@ -219,7 +219,7 @@ Public Class usrcntlKundeBearbeitenFull
txtAbf_Zahlungsziel3.Text = loadValue(KUNDE_ERW.Zahlungsziel3, "")
txtAbf_Euroeinführung._value = loadValue(KUNDE.Euroeinführung, "")
txtCreditsafe.Text = loadValue(KUNDE_ERW.kde_CreditSaveId, "")
cboAbf_Steuerschluessel._value = loadValue(KUNDE.Steuerschlüssel, "")
cboAbf_Waehrung._value = loadValue(KUNDE.Währungscode, "EUR")
cbxSammelrechnungBerichtLeistungsdetails.Checked = loadValue(KUNDE_ERW.kde_FakturierungSR_Details, False)
@@ -517,7 +517,6 @@ Public Class usrcntlKundeBearbeitenFull
KUNDE.Sammelrechnung = cboAbf_Sammelrechnung._value
KUNDE_ERW.kde_FakturierungSR_Details = cbxSammelrechnungBerichtLeistungsdetails.Checked
KUNDE_ERW.kde_CreditSaveId =
KUNDE.EORITIN = isLeerNothing(txtEORI.Text)
If IsNumeric(txtEORINL.Text) Then
@@ -586,6 +585,8 @@ Public Class usrcntlKundeBearbeitenFull
KUNDE_ERW.kde_API_Tradeshift = cbxAPITradeshift.Checked
KUNDE_ERW.kde_Fakturierung_Sprache = isLeerNothing(cboRechnungSprache._value)
KUNDE_ERW.kde_CreditSaveId = isLeerNothing(txtCreditsafe.Text)
' ----- Fremdsped -----
@@ -1478,23 +1479,32 @@ Public Class usrcntlKundeBearbeitenFull
If tmpForm.ShowDialog() = DialogResult.OK Then
txtKurzname.Text = UserControl1.comp.name & ";" & UserControl1.comp.city
txtFirmenname1.Text = UserControl1.comp.name
cboUSt_UstIdNrLand.changeItem(UserControl1.comp.country)
If UserControl1.comp.country IsNot Nothing Then
txtUSt_UstIdNr.Text = UserControl1.comp.vatNo.Replace(UserControl1.comp.country, "")
Else
txtUSt_UstIdNr.Text = UserControl1.comp.vatNo
End If
txtCreditsafe.Text = UserControl1.comp.credissafeId
txtStrasse.Text = UserControl1.comp.street
txtOrt.Text = UserControl1.comp.city
txtPlz.Text = UserControl1.comp.postCode
txtTel.Text = UserControl1.comp.phoneNo
txtOrt.Text = UserControl1.comp.city
txtPlz.Text = UserControl1.comp.postCode
txtTel.Text = UserControl1.comp.phoneNo
If UserControl1.comp.country IsNot Nothing Then
cbxLandKz.changeItem(UserControl1.comp.country.Substring(0, 1))
End If
If UserControl1.comp.vatNo IsNot Nothing Then
cboUSt_UstIdNrLand.changeItem(UserControl1.comp.vatNo.Substring(0, 2))
If UserControl1.comp.country IsNot Nothing Then
txtUSt_UstIdNr.Text = UserControl1.comp.vatNo.Replace(UserControl1.comp.country, "")
Else
txtUSt_UstIdNr.Text = UserControl1.comp.vatNo
End If
End If
End If
End Using
End Using