|
Returns TRUE if specified register is shared between companies |
|
RegisterName |
The name of the register to check. |
|
function Boolean VSVcExists(string cucode,Boolean pof)
BEGIN
Boolean res;
string 255 sharedincomp,comp;
Integer curcomp;
Integer pos;
if (RegisterIsShared("CUVc")) then begin
sharedincomp = RegisterSharedInCompanies("CUVc");
if (nonblank(sharedincomp)) then begin
curcomp = CurrentCompany;
pos = 0;
ExtractObj(sharedincomp,pos,comp);
while (nonblank(comp)) begin
if (SetCompany(StringToInt(comp),false)) then begin
// if (SetCompanyCode(comp,false)) then begin
res = TestVSVcExists(cucode,pof);
if (res) then begin
ResetCompany(curcomp);
goto LVSVcExists;
end;
end;
ExtractObj(sharedincomp,pos,comp);
end;
ResetCompany(curcomp);
end;
end else begin
res = TestVSVcExists(cucode,pof);
end;
LVSVcExists:;
VSVcExists = res;
return;
end;
««