Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MICROS Suggested Tip

Status
Not open for further replies.

Moregelen

Programmer
Sep 10, 2012
1,222
US
We've been somewhat flooded with requests for suggested tip on receipts recently so I wrote the SIM below. Right now, I'm having a minor issue with it.. when you discount something on the check, it also affects the total tax. Does anyone know how MICROS is calculating the change? When we display the suggested tip we are backing out the discount, but it always comes out some cents off. Not a huge deal, but I would prefer to be able to back it out to the true amount. Any suggestions?

Code:
//Tip on subtotal rather than total due (ie: subtotal is $10, total with tax is $15, tip on $10 instead of $15)?
VAR IGNORE_TAX : A1 = "N" //set to Y to ignore tax

//Tip on total due before discounts were applied?
VAR IGNORE_DISCOUNTS : A1 = "Y" //set to N to tip AFTER discounts

//Tip before tenders have been applied? (ie: total is $20, pay $10, tip on $20 instead of $10 left?)
VAR IGNORE_TENDERS : A1 = "Y" //set to N to tip AFTER tenders

VAR SUGGESTED_PERCENT[3] : $6 //fill this array with suggested tip perccents you would like to use, in the order you want them to print.

SUGGESTED_PERCENT[1] = 00.15
SUGGESTED_PERCENT[2] = 00.18
SUGGESTED_PERCENT[3] = 00.20


EVENT PRINT_TRAILER : SUGTIP

	VAR SUBTOTAL : $12 = @TTLDUE
	
	IF IGNORE_TAX = "Y"
		CALL REVERSE_TAX( SUBTOTAL )
	ENDIF
	
	IF IGNORE_DISCOUNTS = "Y"
		SUBTOTAL = SUBTOTAL - @DSC
	ENDIF
	
	IF IGNORE_TENDERS = "Y"
		CALL REVERSE_TENDERS( SUBTOTAL )
	ENDIF
	
	CALL FORMAT_TRAILER( SUBTOTAL )

ENDEVENT

SUB REVERSE_TAX( REF SUBTOTAL )

	VAR I : N9
	FOR I = 1 TO 8
		SUBTOTAL = SUBTOTAL - @TAX[I]
	ENDFOR
	
ENDSUB

SUB REVERSE_TENDERS( REF SUBTOTAL )

	VAR I : N9
	FOR I = 1 TO @NUMDTLT
		IF @DTL_TYPE[I] = "T"
			SUBTOTAL = SUBTOTAL + @DTL_TTL[I]
		ENDIF
	ENDFOR

ENDSUB

SUB FORMAT_TRAILER( VAR SUBTOTAL : $12 )

	VAR CALCULATED_TIP : $12
	VAR CURRENT_LINE : A80
	VAR I : N9
	
	CALL PAD_LINE( CURRENT_LINE, "For your convenience we are")
	@TRAILER[ 1 ] = CURRENT_LINE
	
	CALL PAD_LINE( CURRENT_LINE, "providing the following")
	@TRAILER[ 2 ] = CURRENT_LINE
	
	CALL PAD_LINE( CURRENT_LINE, "gratuity calculations:")
	@TRAILER[ 3 ] = CURRENT_LINE
	
	VAR CURRENT_TRAILER : N2 = 4
	FOR I = 1 TO ARRAYSIZE(SUGGESTED_PERCENT)
	
		CALCULATED_TIP = SUBTOTAL * SUGGESTED_PERCENT[I]
		FORMAT CURRENT_LINE AS (SUGGESTED_PERCENT[I]*100), "% is $", CALCULATED_TIP
		
		CALL PAD_LINE( CURRENT_LINE, CURRENT_LINE )
		@TRAILER[ CURRENT_TRAILER ] = CURRENT_LINE
		
		CURRENT_TRAILER = CURRENT_TRAILER + 1
		
	ENDFOR

ENDSUB

SUB PAD_LINE( REF OUT, VAR LINE : A40)

	VAR PADDING : A40 = "                                        " //some padding so we can center the suggested tips
	FORMAT OUT AS MID(PADDING,1,(32-LEN(LINE))/2.0), LINE
	
ENDSUB
 
Don't know why the totals would be off, I'd have to mess with it a bit.

One thing you want to be careful with is multiple CC auths. Usually you'd want the suggested gratuity to print on a CC voucher, but if you have multiple CC's being used to pay for the same check the suggestions will be calculated on the entire check, not the amount authed on each card. Since an auth is not a payment the ignore_tenders option won't back anything out.
 
We are printing this on the itemized receipt right now rather than the credit card voucher (the itemized receipt being where the customers have so far been asking for it), but that is a good point; eventually a customer is going to want it on the CC voucher instead.

The totals are off because it reduces the tax when you apply a discount, but doesn't add the reduced amount into @DSC.

The reason for this is that a large number of restaurants we service are removing auto-gratuities; they want the suggested tip on the slip brought to the customer likely to cover cash payments as well. Still, it makes a whole lot of sense to put it on the credit card voucher, and to only have it apply to the one slip rather than the meal total. Most of our customers train their employees to split the ticket first, so that's probably why we haven't really run into any complaints yet.


As to the backing out the auth, I'm not sure it would need to. The subtotal doesn't change until they close the credit card.. I think. I'd have to check to be sure..
 
I was thinking about it, but unless you are doing filter or a split first, there is absolutely no way to tell what they are paying for when they swipe multiple credit cards on a check; so the suggested tip could only be calculated on the auth-ed amount anyway. There would be no point to try and back anything out. If you are filtering anyway, I believe the default behavior is to use unfiltered results.. so just throwing n a usefiltereddetail should account for that at least.
 
That's understandable. The tax laws change, I think in mid 2012, and a mandated gratuity like an autograt is now considered part of an employee's wages rather than a tip. This means that autogratuity amounts will have to be figured into overtime and vacation pay among other things. We got rid of our autogratuities in Oct 2012 because of this.
 
Nope, that's my point. If you have guests paying one check with multiple credit cards there's no way to get the auth amounts through a SIM anymore, so the suggested gratuity per cc voucher will always be grossly overstated.
 
Actually this is the email that went out to all of us right before the requests came in, heh:


The industry press is full of stories about the new IRS rules on auto-gratuities.

Here’s what you need to know:
• Beginning January 1, 2014, the IRS says all automatic gratuities must be recorded as “service charges”
• Auto-grats paid to servers must be classed as “non-tipped wages”
• Operators are required to pay state sales taxes on all auto-grats/service charges
• To comply with the new IRS rules, a restaurant likely must alter its POS system and payroll practices

It’s no wonder that large, national restaurant operators have decided to stop charging customers auto-grats. Instead, they are moving to “suggested or recommended” tip amounts printed on customer checks.

Operators face a tough choice: either risk alienating their servers (by recommending but not requiring tips from large parties) or change the way auto-grats are collected, taxed, recorded and paid out. Our recommendation? If possible, move from required to recommended tip amounts.





And I guess its a good thing that we aren't doing a per voucher suggested tip then... though it guess it does mean that their itemized receipt included wiht the voucher (which shows the whole check) will show the wrong suggested tip. Still, we train everyone to split or filter and most of our customers are pretty good about that. For one thing, it just makes life a lot easier on the servers when they need to correct a mistake they made. I quite like filtering...
 
who sent that letter out?
we've seen a number of differing opinions, especially on the tax. If a service charge is completely a gratuity, I think it wouldn't be taxed.
Surprised that Micros doesn't have Suggested Gratuity features built in, or are you a Micros programmer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top