Table of Content
HAL Forum
function string GetWindowPasteName (
integer window_nr,string field_name)
Description:
Returns name of the paste window.
Parameters:
window_nr Window number.
field_name Name of the field.
global
function Boolean IVDClassBeforeEditField(Integer wn,string fieldname,Integer fn, Integer rownr)
BEGIN
  Boolean res;
  Integer nwn;
  record IVVc IVr;
  row IVVc IVrw;

  switch (fieldname) begin  
    case "Quant": 
      GetWindowRecord(wn,IVr);      
      MatRowGet(IVr,rownr,IVrw);
      if (IVrw.Quant==0) then begin
        if (TestForMATVARINS(wn)) then begin end;
      end;
    case "ArtCode": ;
    case "CustCode": 
      if (TouchScreenLook) then begin      
        GetWindowRecord(wn,IVr);      
          if (WindowState(wn)!=0) then begin
            nwn = OpenPasteWindow(wn,GetWindowPasteName(wn,fieldname),IVr.CustCode);
          end;
      end;
    otherwise
      if (TouchScreenLook) then begin      
        if (WindowState(wn)!=0) then begin
          nwn = OpenPasteWindow(wn,GetWindowPasteName(wn,fieldname),IVr.CustCode);
        end;
      end;
  end;
  IVDClassBeforeEditField = res;
  RETURN;
END;
Related topics:
««