project QadFinancials > include BGL.ApiGLTransExtCalculation.i
include parameters
Internal usage
QadFinancials
include code
assign vlSafOK{&SAFNBR} = false.
/* If ConceptCode is not null then need to check as below */
if vcSafConceptCode{&SAFNBR} <> ? and vcSafConceptCode{&SAFNBR} <> ""
then do:
if vcSafCode{&SAFNBR} <> ? and vcSafCode{&SAFNBR} <> ""
then do:
/* If ConceptCode1-5 and saf1-5 is matched then this one need to be loaded */
if vcSafConceptdb1 = vcSafConceptCode{&SAFNBR} and
vcSafCodedb1 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
else
if vcSafConceptdb2 = vcSafConceptCode{&SAFNBR} and
vcSafCodedb2 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
else
if vcSafConceptdb3 = vcSafConceptCode{&SAFNBR} and
vcSafCodedb3 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
else
if vcSafConceptdb4 = vcSafConceptCode{&SAFNBR} and
vcSafCodedb4 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
else
if vcSafConceptdb5 = vcSafConceptCode{&SAFNBR} and
vcSafCodedb5 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
end.
else do:
/* If ConceptCode is not null and Saf if null then whichever safconcept1-5 is matched the record will be loaded */
if vcSafConceptdb1 = vcSafConceptCode{&SAFNBR} or
vcSafConceptdb2 = vcSafConceptCode{&SAFNBR} or
vcSafConceptdb3 = vcSafConceptCode{&SAFNBR} or
vcSafConceptdb4 = vcSafConceptCode{&SAFNBR} or
vcSafConceptdb5 = vcSafConceptCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
end.
end.
/* If ConceptCode is null then whichever safcode1-5 is matched the record will be loaded */
else do:
if vcSafCode{&SAFNBR} <> ? and vcSafCode{&SAFNBR} <> ""
then do:
if vcSafCodedb1 = vcSafCode{&SAFNBR} or
vcSafCodedb2 = vcSafCode{&SAFNBR} or
vcSafCodedb3 = vcSafCode{&SAFNBR} or
vcSafCodedb4 = vcSafCode{&SAFNBR} or
vcSafCodedb5 = vcSafCode{&SAFNBR}
then assign vlSafOK{&SAFNBR} = true.
end.
/* if ConceptCode and Saf are both null , matched. */
else assign vlSafOK{&SAFNBR} = true.
end.