Versions Compared

Key

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

...

Assign the user operation with the above-mentioned script to selectors and be sure to indicate the code of a relevant modifier in the Parameter for Empty and Parameter properties.

Adding a

...

New Dish to the

...

Order by

...

Pressing the Saved Dish Line and the Quantity

...

Button

MissionTask: When a saved dish item is selected and the Quantity button is pressed, it is required to add a new item to the bottom of the item list. ( This function was available in R-r_keeper _ 6). When the saved dish item is pressed now, the Quantity button is disabled.

Solution:

  1. Add a script to the operation scripts.
  2. Assign the script to the specific user operation.
  3. Bind the operation to a function button and assign the button to a new selector.

Script:

Code Block
procedure ProcessOperation1001322(Parameter: integer);

...


var i, code: integer;

...



CurItem: TCheckItem;

...



begin

...



if not RKCheck.Valid then

...



exit //important checking

...



else

...



begin

...



CurItem := RKCheck.CurrentCheckItem;

...



if SYS.ObjectInheritsFrom(TObject(CurItem), 'TDish') then

...



begin

...



code := CurItem.code;

...



RKCheck.CreateCheckItem(rkrefMenuItems, IntToStr(code), '1'); // add dish with code 39

...



end;

...



end;

...



end;

Adding the Quantity Button with the

...

"Plus One Serving of a Saved Dish

...

" Function

MissionTaskto merge the functions of the buttons Quantity and Plus One Serving of a Saved Dish (additional order) ?buttons 

Solution:

Code Block
procedure ProcessOperation1001322(Parameter: integer);

...



var i, code: integer;

...



CurItem: TCheckItem;

...



ed: TObject;

...



begin

...



if not RKCheck.Valid then

...



exit //important checking

...



else

...



begin

...



CurItem := RKCheck.CurrentCheckItem;

...



if SYS.ObjectInheritsFrom(TObject(CurItem), 'TDish') then

...



begin

...



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

...



if (TNumEditor(ed).Text='') then

...



begin

...



code := CurItem.code;

...



RKCheck.CreateCheckItem(rkrefMenuItems, IntToStr(code), '1'); // add dish with code

...



end

...



else

...



begin

...



RK7.PerformOperation(rkoEditAmount, 0);

...



end;

...



end;

...



end;

...



end;


Quick Payment in Rubles in

...

r_

...

keeper 7

MissionTask: when the buttons Pay in Rubles or Pay Pay buttons are pressed in the quick receipt mode, the cash payment window should open skipping the payment type selection.

Solution:

Code Block
procedure ProcessOperation1002215(Parameter: integer);

...



begin

...



if not RKCheck.Valid then

...



exit //important checking

...



else

...



begin

...



RK7.PerformRefObject(RK7.FindItemByCode(rkrefCurrencies, 1)); // 1 - currency code

...



end;

...



end;


Checking the Visit Prepayment Balance

Mission: A restaurant operates restaurant operates in the entry card mode via the MSR algorithm. A script is required that can display the visit prepayment balance.

Solution:

Code Block
procedure ProcessOperation1001537(Parameter: integer);

...



var i: integer;

...



Limit: double;

...



CardCode: string;

...



McrPay: TMcrPay;

...



begin

...



if TObject(RKCheck.CurrentOrder) = Nil then Exit;

...




// Limit calculation

...



Limit := 0;

...



CardCode := '';

...



for i := 0 to RKCheck.CurrentOrder.Sessions.McrPays.ItemCount - 1 do begin

...



McrPay := TMcrPay(RKCheck.CurrentOrder.Sessions.McrPays.Items[i]);

...



Limit := Limit + McrPay.MaxAmount;

...



CardCode := McrPay.CardNum;

...



end;

...



if CardCode = '' then Exit

...



else

...



gui.Showmessage('Card '+CardCode+' balance '+FloatToStr(Limit)+' р.');

...



end;

Limiting the 100% Category Discount

Mission: The 100% discount should apply only to one dish item belonging to the category.

...