Struggling to work this one out

OK, so been tweeking the hotel setup recently and now the No Sale button on POS screen has stopped working and cannot work out why.
The button on nav screen still works.

Nav screen button
image

Ticket screen button
image

Both similar exc the name being prefixed with Nav.

Both of these trigger the custom confirm admin pin rule based on the command name containing ‘ConfirmAdminPin’

Both buttons trigger this prompt.

This is the script;

function canConfirmAdminPin(inputPin){
	var userPinCheck = checkUserPin(inputPin);
	var tabletPinCheck = checkTabletPin(inputPin);
	if(userPinCheck != 0){	
		qry = 	"SELECT u.Name as UserName ,max(case when p.[Name] = 'CanConfirmAdminPin' then p.value end) as CanConfirmAdminPin	";
		qry +=	"FROM [Users] u JOIN [UserRoles] r on r.Id = u.UserRole_Id JOIN [Permissions] p on r.id = p.UserRoleId				";
		qry +=	"WHERE u.PinCode = '"+inputPin+"'";
		qry +=	"GROUP BY u.Name";
		var userQry = sql.Query(qry).Delimit('~').First;
	} else if (tabletPinCheck != 0) {
		var tabletPinSettingName = tabletPinUser(inputPin);
		var tabletPinUserName = tabletPinSettingName.slice(1+tabletPinSettingName.indexOf('_'));
		qry = 	"SELECT u.Name as UserName ,max(case when p.[Name] = 'CanConfirmAdminPin' then p.value end) as CanConfirmAdminPin	";
		qry +=	"FROM [Users] u JOIN [UserRoles] r on r.Id = u.UserRole_Id JOIN [Permissions] p on r.id = p.UserRoleId				";
		qry +=	"WHERE u.Name = '"+tabletPinUserName+"'";
		qry +=	"GROUP BY u.Name";
		var userQry = sql.Query(qry).Delimit('~').First;
	} else {
		return false
	}
	var userQryArray = userQry.split('~');
	var userName = userQryArray[0];
	var canConfirmAdminPin = userQryArray[1];
	if (canConfirmAdminPin==0){
		return userName
	} else {
		return false
	}
}

That rule also takes the command value and uses it to trigger the requested admin command rule. and via the script will return in the new command value of either the user name (if they can confirm admin pin) for False if they cannot or pin is not found.

Both buttons trigger the same no sale rule below;

Both buttons show the dlg ask question however the POS screen button doesnt actually open the drawer. The nav screen one does.
Bother buttons should be triggering the same print job with following mapping.

I am stumpped as to why one works but the other doesnt.

Where is the rule that executes the command No Sale - ConfirmAdminPin?

You have ConfirmAdminPin but I don’t see a rule for No Sale - ConfirmAdminPin

ConfirmAdminPin is contains so that the one rule picks up on voids, no sales, refunds and wastage, then passes to the original rule from when it was just using default confirm admin pin using the command value from the first into the command name…

The bit I cant work out is that both buttons show the glg.askquestion for reason. So that last rule which includes the open drawer print job must be getting triggered.

Are the mappings for both Automation Command buttons the same?

No since they are in different places but both trigger the rules and get prompted for manager pin and then asked for no sale reason. so the buttons are triggering and both rules being fired.