Show Sum of Food and Drink end of Bill

Hallo

@JTRTech i have seen your post here:

and your bill template result here;

and I have also read the following page
https://www.sambapos.org/en/content/grouping-ticket-printer-template

and seen the following template from emre;

That’s how my bill looks ;
image

and here is my print template;

[LAYOUT]
-- General layout
<div style="font-size:20px;text-align:Center;font-family:Calibri;font-weight:bold;">
<table>
	<tr><td>LA GRAPPA</td></tr>
	<tr><td>Ristorante Pizzeria</td></tr>
	
</table>
</div>

<div style="font-size:14px;text-align:Center;font-family:Calibri">
<table>
	<tr><td>Barbarastr. 8</td></tr>
	<tr><td>45964 Gladbeck</td></tr>
	<tr><td>Tel.: 02043 - 22 733</td></tr>

</table>
</div>
<br/>
<div style="font-size:12px;font-family:Calibri">
<table>
    <tr><td width=60 align=Left>Datum       :</td> <td align=Left width=80>{TICKET DATE}</td>       <td width=80 align=right>Zeit  :  </td><td width=80>{TICKET TIME}</td></tr>
    <tr><td width=60 align=Left>Tisch          :</td><td width=80>{ENTITY NAME:Tisch} - {DEPARTMENT} </td></tr>
    <tr><td width=60 align=Left>Beleg No   :</td><td width=180>{TICKET NO}</td></tr>
    
</table>
</div>

<div style="font-size:11px;font-family:Calibri">
<table>

{ENTITIES}

</table>
</div>
============================================

<div style="font-size:12px;font-family:Calibri">
<table>
	<tr><td width=180 align=Left>ANZ * NAME</td>
		<td width=40 align=Right>E-PREIS</td>
		<td width=40 align=Right>SUM</td>
    </tr>
</table>

</div>    


<div style="font-size:14px;font-family:Calibri">
<table>

{ORDERS}

</table>
</div>

--------------------------------------------

<div style="font-size:14px;font-family:Calibri">

<table>
<tr>
	[='{PLAIN TOTAL}' != '' ? '<td width="160" align=left>Zwischensumme</td><td width="100" align=right> {PLAIN TOTAL} €': '<td width="160" align=left>Zwischensumme</td><td width="100" align=right> {TICKET TOTAL} €</td>']
     
</tr>

{DISCOUNTS}	

</table>

</div>

--------------------------------------------

<div style="font-size:14px;font-family:Calibri">
<table>

	{TAXES}
	
</table>
</div>
--------------------------------------------
<div style="font-size:14px;font-family:Calibri">
<table>

		{SERVICES}
		
</table>
</div>
--------------------------------------------
<div style="font-size:20px;font-family:Calibri;font-weight:bold;">
<table>

{PAYMENTS}

</table>
</div>

============================================
<BAR>{TICKET NO}
============================================
<div style="font-size:14px;font-family:Calibri;text-align:Center">
<table>
	<tr> <td width=280 align=center>Bewirtungsaufwand-Angaben</td> </tr>
	<tr> <td width=280 align=center>(Par. 4 Abs.5 Ziff.2 EstG)</td> </tr>
</table>
</div>
============================================
<div style="font-size:14px;font-family:Calibri;text-align:Center">
<table>
	<tr> <td width=260 align=left>Bewirtete Person(en):</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>Anlass der Bewertung:</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>Höhe der Aufwendung:</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>(Bei Bewirtung im Restaurant)</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>(in anderen Fällen)</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>Ort                                Datum</td> </tr>		
	<tr> <td width=260 align=left>.........................................................................</td> </tr>
	<tr> <td width=260 align=left>Unterschrift</td> </tr>
								
</table>
</div>

============================================

<div style="font-size:14px;font-family:Calibri;text-align:Center">
<table>
	<tr> <td width=280 align=center>Danke für Ihren Besuch !</td> </tr>
	<tr> <td width=280 align=center></td> </tr>
	<tr> <td width=280 align=center>UmSt. Nr: 359/5071/5404 </td> </tr>
</table>
</div>
===========================================



[DISCOUNTS]

[
<tr>
	<td width=183 align=Left>{CALCULATION NAME} {CALCULATION AMOUNT} %</td>
	<td width=80 align=Right>{CALCULATION TOTAL} €</td>
</tr>
<tr>
	<td width=183 align=Left><div style=font-size:18px;>Rechnungssumme</div></td>
	<td width=80 align=Right><div style=font-size:18px;>[=F(TN('{PLAIN TOTAL}') + TN('{CALCULATION TOTAL}') )] €</div></td>
</tr>
]


[SERVICES]

[
<tr>
	<td width=183 align=Left>[='{CALCULATION NAME}' == 'Trinkgeld' ? '{CALCULATION NAME} 0,00 %':'{CALCULATION NAME} {CALCULATION AMOUNT} %']</td>
	<td width=80 align=Right>{CALCULATION TOTAL} €</td>
</tr>
 ]
 
 
[TAXES]

  	<tr><td width=170 align=Left>Netto</td><td  width=90 align=Right>{TAXABLE AMOUNT} €</td></tr>
    <tr><td width=170 align=Left>{TAX NAME}%</td><td  width=90 align=Right>{TAX AMOUNT} €</td></tr>
    <tr><td width=170 align=Left>Brutto Summe</td><td  width=90 align=Right>{TOTAL TAXABLE AMOUNT} €</td></tr>


  
[PAYMENTS]

	<tr>
		<td width=170 align=Left> <div style=font-size:16px;>Summe MwSt</div></td>
    	<td width=90 align=Right><div style=font-size:16px;>{TAX TOTAL} €</div></td>
	</tr>
	<tr>
		<td width=170 align=Left> <div style=font-size:16px;>Summe Netto</div></td>
    	<td width=90 align=Right><div style=font-size:16px;>[=F(TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))] €</div></td>
	</tr>
		<tr><td width=160 align=Left>TOTAL Brutto</td><td width=100 align=Right>{TICKET TOTAL} €</td></tr>

    <tr><td width=170 align=Left>{PAYMENT NAME}</td><td  width=90 align=Right>{PAYMENT AMOUNT} €</td></tr

    <tr>
    	<td width=160 align=Left> <div style=font-size:14px;>Gegeben </div></td>
    	<td width=60 align=Right><div style=font-size:14px;>{TENDERED} €</div></td>
    </tr>
	<tr>
    	<td width=160 align=Left> <div style=font-size:14px;>Rückgeld </div></td>
    	<td width=60 align=Right><div style=font-size:14px;>[=F(TN('{TENDERED}') - TN('{PAYMENT AMOUNT}'))] €</div></td>
    </tr>	







[ORDERS]

[
    <tr>
        <td width=180 align=Left>{QUANTITY}x {NAME}</td>
		<td width=40 align=Right>{PRICE}</td>
		<td width=40 align=Right>{TOTAL PRICE} €</td>
    </tr>
 
{ORDER TAGS}

]

[ORDERS GROUP|PRODUCT TAG:MainGroup]
<tr>
	<td width=260 align=Center>--{GROUP KEY}--</td>
</tr>


[ORDERS FOOTER]
<tr>
	<td width=180 align=right><div style="font-size:16px;text-align:right;font-family:Calibri;font-weight:bold;">Total:</div> </td>
	<td width=85 align=right><div style="font-size:16px;text-align:right;font-family:Calibri;font-weight:bold;"> {GROUP SUM} € </div></td>
</tr>


[ORDERS:Einladung]

<tr><td width=200>{QUANTITY} {NAME} </td><td width=30>{PRICE} €</td><td width=30> *EL* </td></tr>

 
[ORDERS:Storno]

 
[ORDER TAGS]

<tr>
	<td width=30 align=Left>  *{ORDER TAG QUANTITY}x </td> 
    <td width=150 align=Left> {ORDER TAG NAME}</td> 
    <td width=40 align=Right>{ORDER TAG PRICE}</td>
    <td width=40 align=Right>[={ORDER TAG TOTAL PRICE} €]</td>
</tr>

     
[ENTITIES:Tisch]
   

[ENTITIES:Kunde]

<tr><td width=60>Kunde:{ENTITY DATA:Name} <td width=180>{ENTITY NAME}</td></tr>
<tr><td width=60>Phone:</td> <td width=180>{ENTITY DATA:Phone}</td></tr>
<tr><td width=60>Adress:</td> <td width=180>{ENTITY DATA:Address}</td></tr>
<tr><td width=60>Tarif:</td> <td width=180>{ENTITY DATA:Tarif}</td></tr>

But i want show the sums of food and drink end of Bill like your bill look. How can I do it? Can you please share your this print template?

Thanks
E. Kaplan

How are you splitting on eat and drink?
I use a custom product tag and a {report ticket orders total exp } report with constraints for each category.

MainGroup

and so;

<J00>Drinks:|£[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (OS.NewBook GLA=2101)}','0.00')]
<J00>Food:|£[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (OS.NewBook GLA=3101)}','0.00')]

Actually i used states as my tags get applied as states on order adding as part of my PMS integration but principle is the same just use menu item tag in report rather than order state constraint.

1 Like

Thanks @JTRTech

i get it

image

with following print template

 	<tr>
		<td width=170 align=Left>Getränke:</td>
    	<td width=90 align=Right>[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Drink) }','0.00')] €</td>
	</tr>
	<tr>
		<td width=170 align=Left>Eat:</td>
    	<td width=90 align=Right>[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Eat) }','0.00')] €</td>
	</tr>
	<tr>
		<td width=260 align=Left><br/></td>
	</tr>

a small addition as percent

image

 	<tr>
		<td width=90 align=right>Getränke Sum</td>
		<td width=80 align=right>[=F(TN('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Drink)}')*100 / TN('{TICKET ORDER TOTAL EXP:(ODI=True)}')  ) ] %</td>
    	<td width=90 align=Right>[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Drink) }','0.00')] €</td>
	</tr>
 	<tr>
		<td width=90 align=right>Essen Sum</td>
		<td width=80 align=right>[=F(TN('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Eat)}')*100 / TN('{TICKET ORDER TOTAL EXP:(ODI=True)}')  ) ] % </td>
    	<td width=90 align=Right>[=FF('{TICKET ORDER TOTAL EXP:(ODI=True) AND (MT.MainGroup=Eat) }','0.00')] € <br/></td>
	</tr>

Personally I would go for whole percent rather than two decimals but nice