Versions Compared

Key

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

...

Changing the color of the dish in the order window

Code Block
    procedure CheckViewOnGetColors(Sender: TObject; CheckItem: TObject; Selected: boolean; var Color, FontColor: TColor);

...


    begin

...


      if SYS.ObjectInheritsFrom(CheckItem, 'TDish') then begin

...


        if (TDish(CheckItem).Quantity = 0) and (TDish(CheckItem).State = disOpened) then begin

...


          // bug#10226 red color for dishes with quantity = 0

...


          Color := $004646FF;

...


          FontColor := clBlack;

...


        end;

...


      end;

...


    end;

...


    Trk7menuitem(CheckItem.RefItem).VisualType_BColor - background color

...


    Trk7menuitem(CheckItem.RefItem).VisualType_TextColor - font color

Displaying a previously created message when adding the first dish to an order

Code Block
procedure CheckViewOnAfterCheckViewEdit(Sender: TObject; AEditType: TEditType; AObjectBef, AObjectAft: TObject);
var i, CntDish: integer;
it: TCheckItem;
begin
if SYS.ObjectInheritsFrom(AObjectAft, 'TDish') then
begin
CntDish := 0;
for i := 0 to RKCheck.CurrentOrder.Sessions.LinesCount - 1 do begin
it := RKCheck.CurrentOrder.Sessions.Lines[i];
if SYS.ObjectInheritsFrom(TObject(it), 'TDish') then
CntDish := CntDish + 1;
end;
if CntDish = 1 then
gui.ShowMessage('Сообщение');
end;
end;

Compliance with the requirements of the Lithuanian Tax Inspectorate

...

Such records have the following lines:|

Code Block
DELETED=1
ISBILL=1
IGNOREINREP=1

...