Spedbucht, Fakt, cbam, bearbeiten, etc.
This commit is contained in:
@@ -2765,7 +2765,7 @@ Public Class usrCntlFaktAbrechnung
|
||||
Else
|
||||
curBGebBetrag = curBGebMinBetrag 'Mindestbetrag verwenden
|
||||
summeFremdBearb += If(OFFERT_FREMD, curBGebErrBetrag, 0)
|
||||
summeRMCBearb += If(OFFERT_FREMD, curBGebErrBetrag, 0)
|
||||
summeRMCBearb += If(OFFERT_RMC, curBGebErrBetrag, 0)
|
||||
minBetragRMCUsed = IIf(OFFERT_FREMD OrElse OFFERT_RMC, True, False)
|
||||
End If
|
||||
|
||||
@@ -2805,6 +2805,7 @@ Public Class usrCntlFaktAbrechnung
|
||||
preisInital = (summeRMCBearb + summeFremdBearb) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1)
|
||||
row.Cells("Preis").Value = preisInital
|
||||
Exit For
|
||||
|
||||
Else
|
||||
row.Cells("Preis").Value = preisInital
|
||||
Exit For
|
||||
@@ -2843,7 +2844,43 @@ Public Class usrCntlFaktAbrechnung
|
||||
If (sumOffertRMC + sumOffertFremd) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1) <> POS.Preis Then
|
||||
For Each row As DataGridViewRow In dgvOfferteDetailsUebersicht.Rows
|
||||
If row.Cells("LeistungsNr").Value = BGebLeistungsNr And row.Cells("BerechnungsartNr").Value = 9 Then
|
||||
If row.Cells("Preis").Value <> (sumOffertRMC + sumOffertFremd) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1) Then
|
||||
|
||||
Dim preisecChanged = row.Cells("Preis").Value
|
||||
|
||||
If preisecChanged <> (sumOffertRMC + sumOffertFremd) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1) Then
|
||||
|
||||
' If row.Cells("Preis").Value = curBGebBetrag * 2 AndAlso minBetragRMCUsed Then 'wenn RMCPOS und MIND-BERTAG 2x verrechnet -> nur 1x berechnen v
|
||||
|
||||
' row.Cells("Preis").Value = preisecChanged / 2
|
||||
' POS.Anzahl = 1
|
||||
' initSteuerbetraege(RECHNUNG, POS)
|
||||
' POSChanged = True
|
||||
' Exit For
|
||||
|
||||
' ElseIf preisecChanged <> curBGebBetrag * 2 AndAlso (summeRMCBearb + summeFremdBearb) <> preisecChanged AndAlso (minBetragRMCUsed OrElse isRMC OrElse isFREMD) AndAlso (summeRMCBearb + summeFremdBearb) > curBGebMinBetrag Then 'wenn RMCPOS und Summe der berechneten Bearb > Mindestbetrag --> berechnetBearb verrechnet!
|
||||
|
||||
' preisecChanged = (summeRMCBearb + summeFremdBearb) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1)
|
||||
' row.Cells("Preis").Value = preisecChanged
|
||||
' POS.Anzahl = 1
|
||||
' initSteuerbetraege(RECHNUNG, POS)
|
||||
' POSChanged = True
|
||||
|
||||
' If FremdUndRMC AndAlso summeRMCBearb > 0 AndAlso summeFremdBearb > 0 Then Exit For
|
||||
|
||||
' ElseIf sumOffertRMC + sumOffertFremd > curBGebMinBetrag Then
|
||||
|
||||
' row.Cells("Preis").Value = (sumOffertRMC + sumOffertFremd) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1)
|
||||
' POS.Anzahl = 1
|
||||
' initSteuerbetraege(RECHNUNG, POS)
|
||||
' POSChanged = True
|
||||
' 'Exit For
|
||||
|
||||
' End If
|
||||
|
||||
'End if
|
||||
|
||||
|
||||
|
||||
row.Cells("Preis").Value = (sumOffertRMC + sumOffertFremd) * IIf(RECHNUNG.Vorzeichen = "-", -1, 1)
|
||||
POS.Anzahl = 1
|
||||
initSteuerbetraege(RECHNUNG, POS)
|
||||
@@ -2853,6 +2890,7 @@ Public Class usrCntlFaktAbrechnung
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user