Global R-Keeper:

Technology

For instance from the request in the restaurant Hoang Yen - Vietnam.

Script to test food on order, if any dish is "open unit" and while the data entry staff do not forget to enter the price (default = 0), the software will let employees know what to enter cost, the payment will be made. Otherwise the system will not allow the cashier to cash out. Similarly one can add this script in provisional votes. In case payment is conditioned Operation = rkoCalcOrder and provisional in case it is rkoPrintBill conditions.

 

 

procedure CheckOperation1001433(Operation, Parameter: integer; var ValidResult, CallNextTime: boolean);
var
i: integer;
it: TCheckItem; 
begin

// usual important check
if not RkCheck.Valid then Exit;

if Operation=rkoCalcOrder then //script is performed
begin
for i := 0 to RKCheck.CurrentOrder.Sessions.LinesCount - 1 do //cycle for all lines in order
begin
it := RKCheck.CurrentOrder.Sessions.Lines[i];
if SYS.ObjectInheritsFrom(TObject(it), 'TDish') then //element of current line is dish (not discount, markup, etc)
begin
//check if dish has property 'open price' and price=0              
if (TRK7MenuItem(it.RefItem).OpenPrice = true) and (TDish(it).PaySum = 0) then 
begin
gui.ShowMessage('Vui lòng nhập giá trước khi thanh toán!')
ValidResult := false;  //forbids to calculate order
end;
end;
end;
end;
end;

Script perform filtering list has been charged bill for watching this list on the POS system only displays the charging order made in this workstation.

In MainPanel element (TButtonPanel) the Events-> OnSuitableObject the form "The bill was close."

procedure MainPanelOnSuitableObject(Sender: TBasePanel; Obj: TObject; var Suitable: boolean);
begin
if Sys.ObjectInheritsFrom(Obj, 'TCheckBtnLine') then
Suitable := TCheckBtnLine(Obj).CloseStation = ThisStation;
end;

Request from the restaurant chain NYDC Vietnam.

If the order is Combo will not permit the application of discount (discount) on the entire order. Reason: Combo itself was a form of discounting.

var i: integer;
it: TCheckItem;
//----
begin
if (AEditType = etInsert) and SYS.ObjectInheritsFrom(AObjectAft, 'TDiscountItem') then begin
if TDiscountItem(AObjectAft).Localization = chlDish then begin
// không cho phép áp dụng giảm giá trên combo
if SYS.ObjectInheritsFrom(TObject(RKCheck.CurrentCheckItem), 'TDish') then
if TDish(RKCheck.CurrentCheckItem).IsComboComp then begin
AAllow := False;
AMessage := 'It is impossible to add discount for combo component';
end else if TDish(RKCheck.CurrentCheckItem).IsCombo then begin
AAllow := False;
AMessage := 'It is impossible to add discount for combo dish';
end;
end else begin
// không cho phép áp dụng giảm giá trên order nếu có combo trong order đó
for i := 0 to RKCheck.CurrentOrder.Sessions.LinesCount - 1 do begin
it := RKCheck.CurrentOrder.Sessions.Lines[i];
if SYS.ObjectInheritsFrom(TObject(it), 'TDish') then begin
if TDish(it).IsCombo then begin
AAllow := False;
AMessage := 'It is impossible to add discount since there is combo in order';
Exit;
end;
end;
end;
end;
end;
end;

Our Location