Created
March 21, 2012 18:40
-
-
Save Capncavedan/2151003 to your computer and use it in GitHub Desktop.
closed / open logic from ye olde DOMINO systeme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLOSED LOGIC: | |
longExpDate := | |
@Middle(@Text(BDEXP);4;2) + "/" + | |
@Middle(@Text(BDEXP);6;2) + "/" + | |
@Left(@Text(BDEXP);4); | |
declinedOrCompletedStatReport := @If(progressStatus = "Closed" : "Completed" : "Declined";1;0); | |
cond1 := @TextToNumber(@Text(BDBAMT)) < 100000 & !BDDEL = "" : "P" & @Right(BIIC;1) = "Y"; | |
cond2 := BDDEL = "T" : "C"; | |
cond3 := @Right(BIIC;1) = "N" & BDDEL = "E"; | |
cond4 := declinedOrCompletedStatReport & @TextToNumber(@Text(BDBAMT)) >= 100000 & BDDEL = "E"; | |
cond5 := (isClosed = 1 : 2) & ProgressStatus != "In-Progress"; | |
isClosed := (cond1 | cond2 | cond3 | cond4 | cond5); | |
SELECT ((IsBidBond=0 | IsBidBond = 2 | !@IsAvailable(IsBidBond) & !@IsResponseDoc) & IsClosed) & ProgressStatus != "In-Progress" | |
--------------------------------------------------------------------------------------------------------------- | |
OPEN LOGIC: | |
declinedOrCompletedStatReport := @If(ProgressStatus = "Closed" : "Completed" : "Declined";1;0); | |
cond1 := @TextToNumber(@Text(BDBAMT)) < 100000 & !BDDEL = "" : "P" & @Right(BIIC;1) = "Y"; | |
cond2 := BDDEL = "T" : "C"; | |
cond3 := @Right(BIIC;1) = "N" & BDDEL = "E"; | |
cond4 := declinedOrCompletedStatReport & @TextToNumber(@Text(BDBAMT)) >= 100000 & BDDEL = "E"; | |
cond5 := (isClosed = 1 : 2) & ProgressStatus != "In-Progress"; | |
isClosed := (cond1 | cond2 | cond3 | cond4 | cond5); | |
SELECT ((IsBidBond=0 | IsBidBond = 2 | !@IsAvailable(IsBidBond) & !@IsResponseDoc) & !IsClosed) | ProgressStatus = "In-Progress" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment