Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagedelphi
procedure DesignFormOnOperation(Sender: TBasePanel; Operation, Param: integer; var res: integer);

var   ed: TObject;

begin

  if (Operation=rkoPrepaySelector) then

  begin

    ed := TObject(gui.FindComponentByName('Editor'));

    if SYS.ObjectInheritsFrom(TObject(ed), 'TNumEditor') then

      if 0.0 >= StrToFloat(TNumEditor(ed).Text) then  

        gui.showmessage('НеAmount is указанаnot суммаspecified!!!');

    end;

end;

A warning will be displayed when you click the «Prepayment» button.

...

Code Block
languagedelphi
procedure DesignFormOnOperation(Sender: TBasePanel; Operation, Param: integer; var res: integer);

begin

  if Operation = 455 then  //   operation code verification - payment  {455 420}

    if RKCheck.CurrentOrder.UserTag1 <> 1 then  // verification if this dialog has been shown before

    begin

      if GUI.RKMessageDlg('Is the guest willing to donate?', 0, 3, 100000) = 6 then

      begin

        RK7.PerformRefObject(RK7.FindItemByCode(rkrefCategList, 22));  // {Menu group code}

        res := 1;

      end;

      RKCheck.CurrentOrder.UserTag1 := 1;  // labeltag to avoid dialog reopening

    end; 

end;

...