|
Reduces the LoopPosition of specified record by 1. Usually used after deleting a record inside a loop to avoid skipping the record that comes right after the one that was deleted. |
|
LoopRecord |
The record that is being looped through either with LoopMain, LoopKey, etc. |
|
// Alternative:
// SetLoopPosition(LoopRecord,GetLoopPosition(LoopRecord)-1);
global
updating procedure RemoveUnconfirmedMn(Record RcVc RepSpec)
begin
Record SalaryCalcVc SCr;
Record SalaryPaymentVc SPr;
Boolean found;
if (RepSpec.flags[1] != 0) then begin
// arvestuskaartide kustutamine
found = true;
SCr.OKFlag = 0;
resetLoop(SCr);
while (loopKey("OKFlag",SCr,1,found)) begin
if (SCr.OKFlag != 0) then begin found = false; end;
if (found) then begin
recordDelete(SCr);
stepBack(SCr);
end;
end;
end;
if (RepSpec.flags[2] != 0) then begin
// v‰ljamakse kustutamine
found = true;
SPr.OKFlag = 0;
resetLoop(SPr);
while (loopKey("OKFlag",SPr,1,found)) begin
if (SPr.OKFlag != 0) then begin found = false; end;
if (found) then begin
recordDelete(SPr);
stepBack(SPr);
end;
end;
end;
return;
end;
««