Creating Operations

  1. In the manager station, go to Service > Scripts > Operations
  2. Right-click in the Scripts section and select New Script
  3. Call the new script Bill and change its status to Active
  4. Double-click the created script. In the window that opens, insert the following script after the first string:

    var
    
    summa:double;
    
    begin
    
      if not RKCheck.Valid then Exit;
    
      summa:=RKCheck.CurrentOrder.Visit.GuestCnt*10;
    
      if RKCheck.CurrentOrder.ToPaySum < summa then
        
       begin
    
        RKCheck.CreateCheckItemByReferenceCode(rkrefDiscounts, '150');
    
        if SYS.ObjectInheritsFrom(TObject(RKCheck.CurrentCheckItem), 'TDiscountItem') then
         
         begin
    
          TDiscountItem(RKCheck.CurrentCheckItem).SrcAmount := summa - RKCheck.CurrentOrder.ToPaySum;
    
          TDiscountItem(RKCheck.CurrentCheckItem).ValueChanged := True;      
    
          TDiscountItem(RKCheck.CurrentCheckItem).ChargeSource := chsHuman;      
    
         end;
    
       end;
    
      RK7.PostOperation(rkoPrintBill, 0);
    
    end;
    CODE

    where 10 is the minimal charge sum in the basic currency and 150 is the discount code

  5. Click Ok
  6. In the same way, create another script called Receipt and insert the following script:

    var
    
    summa:double;
    
    begin
    
      if not RKCheck.Valid then Exit;
    
      summa:=RKCheck.CurrentOrder.Visit.GuestCnt*10;
    
      if RKCheck.CurrentOrder.ToPaySum < summa then
       
       begin
    
        RKCheck.CreateCheckItemByReferenceCode(rkrefDiscounts, '150');
    
        if SYS.ObjectInheritsFrom(TObject(RKCheck.CurrentCheckItem), 'TDiscountItem') then
         
         begin
    
          TDiscountItem(RKCheck.CurrentCheckItem).SrcAmount := summa - RKCheck.CurrentOrder.ToPaySum;
    
          TDiscountItem(RKCheck.CurrentCheckItem).ValueChanged := True;      
    
          TDiscountItem(RKCheck.CurrentCheckItem).ChargeSource := chsHuman;      
    
        end;
    
      end; 
    
    RK7.PostOperation(RKOCalcOrder,0);
    
    end;
    CODE

    where 10 is the minimal charge sum in the basic currency and 150 is the discount code.

Creating New Markup

  1. Go to Money > Discounts and Markups and create a new markup with the following parameters:
    • Code — 150. It may be different but must coincide with the rkrefDiscounts, '...' parameter in the body script
    • Name — Minimal Charge or Minimal Charge Rest
    • Changeable Value — On
    • Count Type — Amount
    • Combine Any — On
    • On Order — On
    • Other checkboxes must be off, and the rest parameters must be default
  2. Create Details for this new markup without setting any values in the details properties
  3. Change the markup status to Active

Configuring User Operations

  1. Go to Service > Operations > User Operations
  2. Select User operation 01. In the Script field of the operation properties, select Bill. You can also change the operation name to Bill, for example

  3. Select User operation 10. In the Script field of the operation properties, select Receipt. You can also change the operation name to Receipt.

Configuring Function Keys

  1.  Options > User interface > Function Keys > Order Operations > Operations Selector
  2. Right-click in the middle section of the window and select the New Function Key item
  3. Specify Bill in the Name field
  4. In the Operation and Operation For Empty fields, select the Bill operation
  5. Change the key's status to Active
  6. In the same way, create the Receipt button with the Receipt value in the Operation and Operation For Empty fields.

Configuring Operation Selectors

  1. In the manager station, go to Options > User Interface > Selectors > Order > Operation's Selector > Receipt: Operation's Selector
  2. Copy the Receipt: operations item with all subitems. Change its name, for example, to Minimal Charge
  3. Open the copy
  4. In the tree of selectors, click on the Operations selector subitem. Delete the existing Bill key
  5. Add here a newly created Bill key:
    1. Call the context menu and select Add selector button > Function key
    2. In new window, select Order operations > Operation Selector. Find the created Bill key and click Ok. You can change the position of the key at the cash station, using green arrows in the context menu, called on the required key
  6. In the tree of selectors, click on the Pay subitem and delete the default Bill and Receipt function keys. Add the newly created Bill and Receipt keys in the way described above
  7. Be sure to change the status of the Minimal Charge selector and all its subitems to Active
  8. Click on the Minimal Charge selector and then click on the gear icon
  9. The Usage of Selectors window opens. Select the created selector from the left part of the window to the right one.

Done! The Minimal Charge is configured.