smusba
16th September 2008, 10:42
Dear All,
see the code below. I want to accumulate this code in only one if block.
Please guide me thru the process.
if tcmcs910.type = tctype.perc then
element=lc.element.method1()
ele.pur.cur = (tdpur045.amnt*tdpur910.valu)/100
lc.curr = tdpur040.ccur
if tdpur040.ratf = 0 then
tdpur040.ratf = 1
endif
lc.rate = tdpur040.ratp/tdpur040.ratf
lc.rate.hist = tdpur040.ratp
lc.ratf.hist = tdpur040.ratf
insert.lc.history()
post.to.finance(1)
else
element=lc.element.method2()
ele.pur.cur = wt.element.value()
lc.curr = tdpur910.curr
if i.ratf = 0 then
i.ratf = 1
endif
lc.rate = i.ratp/i.ratf
lc.rate.hist = i.ratp
lc.ratf.hist = i.ratf
insert.lc.history()
post.to.finance(1)
endif
|if tcmcs910.type = tctype.perc then
|element=lc.element.method3()
|ele.pur.cur = (tdpur045.amnt*tdpur910.valu)/100
|lc.curr = tdpur040.ccur
|if tdpur040.ratf = 0 then
| tdpur040.ratf = 1
|endif
|lc.rate = tdpur040.ratp/tdpur040.ratf
|lc.rate.hist = tdpur040.ratp
|lc.ratf.hist = tdpur040.ratf
|insert.lc.history()
|post.to.finance(1)
|endif
see the code below. I want to accumulate this code in only one if block.
Please guide me thru the process.
if tcmcs910.type = tctype.perc then
element=lc.element.method1()
ele.pur.cur = (tdpur045.amnt*tdpur910.valu)/100
lc.curr = tdpur040.ccur
if tdpur040.ratf = 0 then
tdpur040.ratf = 1
endif
lc.rate = tdpur040.ratp/tdpur040.ratf
lc.rate.hist = tdpur040.ratp
lc.ratf.hist = tdpur040.ratf
insert.lc.history()
post.to.finance(1)
else
element=lc.element.method2()
ele.pur.cur = wt.element.value()
lc.curr = tdpur910.curr
if i.ratf = 0 then
i.ratf = 1
endif
lc.rate = i.ratp/i.ratf
lc.rate.hist = i.ratp
lc.ratf.hist = i.ratf
insert.lc.history()
post.to.finance(1)
endif
|if tcmcs910.type = tctype.perc then
|element=lc.element.method3()
|ele.pur.cur = (tdpur045.amnt*tdpur910.valu)/100
|lc.curr = tdpur040.ccur
|if tdpur040.ratf = 0 then
| tdpur040.ratf = 1
|endif
|lc.rate = tdpur040.ratp/tdpur040.ratf
|lc.rate.hist = tdpur040.ratp
|lc.ratf.hist = tdpur040.ratf
|insert.lc.history()
|post.to.finance(1)
|endif