I understand that we are looping. what I really dont get is how the variable (rdebits) is assigned a value. Can someone explain whats going on? thanks!
WhilePrintingRecords;
numbervar rdebits;
local numbervar amt:= abs(rdebits/{ACCRUAL_SUMMARY.HOURSPERDAYINSECS});
local numbervar days:= abs(truncate(amt));//gets the whole # of days
local numbervar secs:= remainder(abs(rdebits),{ACCRUAL_SUMMARY.HOURSPERDAYINSECS});
local stringvar con:= totext(secs/3600,"00") + ":" + totext(remainder(abs(secs),3600)/60,"00");//gets the remaining hrs:min
local stringvar sign := if rdebits < 0 then '-' else '';
select {ACCRUAL_SUMMARY.ACCRUALCODETYPE}
Case 1: if {?decimal format} = 0 then totext(rdebits/3600) else
totext(rdebits/3600, "0") + ":" + totext(remainder(abs(rdebits), 3600)/60, "00")
Case 2: if {?decimal format} = 0 then sign + totext(amt) else//gets days.days
sign + totext(days,0) + ":" + con //gets days:hrs:min
Case 3: totext($(rdebits))
WhilePrintingRecords;
numbervar rdebits;
local numbervar amt:= abs(rdebits/{ACCRUAL_SUMMARY.HOURSPERDAYINSECS});
local numbervar days:= abs(truncate(amt));//gets the whole # of days
local numbervar secs:= remainder(abs(rdebits),{ACCRUAL_SUMMARY.HOURSPERDAYINSECS});
local stringvar con:= totext(secs/3600,"00") + ":" + totext(remainder(abs(secs),3600)/60,"00");//gets the remaining hrs:min
local stringvar sign := if rdebits < 0 then '-' else '';
select {ACCRUAL_SUMMARY.ACCRUALCODETYPE}
Case 1: if {?decimal format} = 0 then totext(rdebits/3600) else
totext(rdebits/3600, "0") + ":" + totext(remainder(abs(rdebits), 3600)/60, "00")
Case 2: if {?decimal format} = 0 then sign + totext(amt) else//gets days.days
sign + totext(days,0) + ":" + con //gets days:hrs:min
Case 3: totext($(rdebits))