Offerten, Fremdrechnungen
This commit is contained in:
@@ -820,19 +820,13 @@ Public Class usrCntlOfferte
|
||||
If True Then
|
||||
|
||||
|
||||
|
||||
|
||||
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr)
|
||||
Dim ADR As New VERAG_PROG_ALLGEMEIN.cAdressen(kdNr)
|
||||
Dim FIRMA_TMP = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KD.FilialenNr)
|
||||
|
||||
If dgvOfferteDetails.Rows.Count = 0 Then Exit Sub
|
||||
|
||||
Dim sqlKostenkalk = " Select OffertenNr, isnull(LeistungsNr,'') as LeistungsNr,isnull(LeistungsBez,'' ) as LeistungsBez,isnull(Preis,'') as Preis,isnull([Geändert am],[Eingegeben am]) as Datum
|
||||
FROM [VERAG].[dbo].[Offertenpositionen] where KundenNr = " & kdNr & " and OffertenNr in (38, 1) and LeistungsNr in (340, 324, 348, 440)
|
||||
order by Preis desc"
|
||||
|
||||
|
||||
Dim dtKostenkalk As DataTable = (New SQL).loadDgvBySql(sqlKostenkalk, "FMZOLL")
|
||||
Dim dtKostenkalk As DataTable = cProgramFunctions.dgridViewTods(dgvOfferteDetails)
|
||||
|
||||
If dtKostenkalk.Rows.Count < 1 Then
|
||||
MsgBox("keine Daten!")
|
||||
@@ -895,11 +889,16 @@ Public Class usrCntlOfferte
|
||||
|
||||
Dim currentRow As Integer = 13
|
||||
|
||||
Dim DatumDerZollabf As String = SQL.getValueTxtBySql("select top(1) isnull([Geändert am],[Eingegeben am]) as Datum FROM [VERAG].[dbo].[Offertenpositionen] where KundenNr = " & kdNr & " and OffertenNr in (38, 1) and LeistungsNr in (340, 324, 348, 440) order by Preis desc", "FMZOLL")
|
||||
Dim dtkeineMdtKostenkalk_mitPreise As DataTable = dtKostenkalk.Select("Preis <> ''", "Preis desc").CopyToDataTable
|
||||
|
||||
For Each row In dtkeineMdtKostenkalk_mitPreise.Rows
|
||||
|
||||
For Each row In dtKostenkalk.Rows
|
||||
Blatt.Range("A" & currentRow).Value = row("LeistungsBez")
|
||||
Blatt.Range("B" & currentRow).Value = row("Preis")
|
||||
Blatt.Range("B" & currentRow).Value = CDbl(row("Preis"))
|
||||
|
||||
Dim DatumDerZollabf As String = dtkeineMdtKostenkalk_mitPreise.Rows(0).Item("Geändert am")
|
||||
|
||||
If DatumDerZollabf = "" Then DatumDerZollabf = dtkeineMdtKostenkalk_mitPreise.Rows(0).Item("Eingegeben am")
|
||||
|
||||
If IsDate(DatumDerZollabf) Then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user