HTML A4 Print Template Add fixed Footer

Hi, I have an issue with my A4 Print out footer.

I need to make the “–Disclaimer message” in my template below a static footer. meaning it doesnt get pushed down the page as more items get added.

The two solutions I have tried working with is Position:absolute and or set a static table size on my –Item Sold Table

Any help would be amazing

[LAYOUT]
<html>
<page size="A4">
<head>
<style>

</style>
</head>

-- Logo/Title
    <img src="C:\AV\logo.bmp" alt="">
 <body>

-- Invoice Address & Ticketing Information
<table style="font-size:13px; margin-top:20px; font-family: Calibri (body);">
    
        <tr>
            <th align="Center" colspan="100"> <font size="5" ><b>INVOICE </font></b></th>
           </tr>
    
    <tbody">
        <tr>
            <th colspan="50"><b>Invoice Address</b></th>
        </tr>
        <tr>
--left        <td colspan="50" ><b/>{ENTITY NAME:Customer} </td>
--Right     <td colspan="50" align="right">{TICKET DATE} </td>        
        </tr>
        <tr>
--left        <td colspan="50"><b/>[{ENTITY DATA:Customer:Phone} | {ENTITY DATA:Customer:Email}]</td>
--Right     <td colspan="50" align="right">Time: {TICKET TIME}</td>        
        </tr>
        <tr>
--left        <td colspan="50"><b/>{ENTITY DATA:Customer:Address_Line_1} </td>
--Right     <td colspan="50" align="right">Served By: {USER NAME}</td>        
            </tr>
            <tr>
--left          <td colspan="50"><b/>{ENTITY DATA:Customer:City} </td>
--Right         <td colspan="50" align="right">Customer REF: {NOTE} </td>        
            </tr>
            <tr>
--left            <td colspan="50"><b/>{ENTITY DATA:Customer:Postcode} </td>
--Right         <td  colspan="50"align="right">Invoice Number: {TICKET NO} </td>        
            </tr>
    </tbody>
</table>

-- Item Sold Table
<table style border-height-bottom>
            <tr>
            
                <td width=60><b>QTY</b></td>
                <td width=500><b>Description</b></td>
                <td align=right width=90><b>Unit Cost </b></td>
                <td align=right width=auto><b>Total </b></td>
            </tr>
</table>
{ORDERS}

-- Sub Total & VAT
<table style="font-size:13px;  margin-top:20px">
<tr>

        <td align=left><b>Delivery Address </b></th>
        
        <td align="right"><b>Net Cost: </b> £[=F((TN('{TICKET TOTAL}')-TN('{CALCULATION TOTAL:Discount }'))-TN('{TAX TOTAL}'))] </td>
    </tr>
    <tr>
    </tr>
    <tr>
--left  <td><b/>{ENTITY NAME:Customers Delivery}                   </td>   
--Right    <td align=right><b>[Discount:</b> {CALCULATION TOTAL:Discount}]  </td>
    </tr>
        <tr>
--left  <td></b>[{ENTITY DATA:Customers Delivery:Email} | {ENTITY DATA:Customers Delivery:Phone Number}] </td>        
--Right <td align="right"><b>Discounted Net Cost: </b> £[=F((TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))/TN('{EXCHANGE RATE:curr}'))]
    </tr>
--left  <td><b/>{ENTITY DATA:Customers Delivery:Address line 1}  </td>        
--Right <td align="right">  </tr>
        </tr>
        <tr>
--left  <td><b/>{ENTITY DATA:Customers Delivery:Town}</td>   
--Right    <td align=right> </td>
    </tr>
        </tr>
        <tr>
--left  <td><b/>{ENTITY DATA:Customers Delivery:PostCode}</td>        
--Right    <td align=right><b>VAT: </b> £{TAX TOTAL} </td>
    </tr>

</table>


-- Total Cost 

<table style="font-size:13px; margin-top:1px;">
    <tr>
        <td/>
        <td align="right"><b>Total Cost: </b> {TICKET TOTAL}</b></td>
    </tr>
    <tr>
        <td/>
        <td align="right"> </td>
    </tr>
</table>
-- Disclaimer Message
<div style="width:99%; margin:0px; align:center; margin-top:300px;">
<table>

  <tr>
   <td align=Center>SORT CODE ACCOUNT INFO</th>
  </tr>
  <tr>
     <td align=Center>Contact Information</td>
  </tr>
  <tr>
     <td align=Center>EMPTY</td>
  </tr>
       <tr>
         <td align=Center>ADDRESS</td>
      </tr>
        <tr>
         <td align=Center>Customer VAT No</td>
      </tr>
        <tr>
         <td align=Center>Customer Website</td>
      </tr>
     <tr> 
     <td align=Center>These bank details are correct as of today's date. if you are at all unsure, </td>
     </tr>
     <tr>
     <td align=Center>please contact us on 02392 268800 and we will confirm over the phone. We cannot be held responsible for any payments to incorrect accounts. </td>
     </tr>
</table>
</div>

[ORDERS]
-- Default format for orders
<table style="font-size:13px;">
    <tr>
        <td width=60>{QUANTITY}</td>
        <td width=500>{NAME}</td>
        <td align=right width=90> £[=F((TN('{PRICE}')-TN('{ENTITY DATA:CUSTOMERS:"Discount Value","Value":"5%"}')-TN('{ENTITY DATA:CUSTOMERS:"Discount Value","Value":"15%"}'))/TN('{EXCHANGE RATE:curr}'))]</b></td>        
        <td align=right width=auto>{VISIBLE TOTAL}</td>
    </tr>
</table>
{ORDER TAGS}



[DISCOUNTS]
<J00>{CALCULATION TOTAL}

[PAYMENTS]
<J00>{PAYMENT NAME}: | {TENDERED}

[ORDERS:Gift]
-- Format for gifted orders
<J00>{QUANTITY} {NAME}|**FREE**


[ORDERS:Void]
-- Nothing will print for void lines


[ENTITIES:Table]
-- Table entity format
<L00>Table: {ENTITY NAME}

[TAXES]
<J00>Tax Total:|{TAX TOTAL}

</page>

Thinking about it the alternative way to make this work is set the {ORDERS} table a set size so it doesnt get smaller or big than a set height.

Would anyone know how to do that with the supported HTML tags for SAMBA?

I am struggling as a lot of the tags arent supported by the POS itself and there arent any alternatives I can think of.

any help would be great.

thanks

Has anyone got any idea for this?

The reason I ask is I am trying to use the POS system as a builders merchant and not the usual resturant setup.

With builders merchants in the UK invoices are usually printed on a A4 sized paper and the disclaimer/ footer is located at the bottom of each a4 invoice printed.

It is uncommon for the footer to move, but I cannot seem to find code which will static this for SAMBAPOS. I know not all HTML code is supported, but if someone can point me in the right direction that would be great.

I can confirm min-height doesnt work nor does max-height which I have tried configuring on the ORDER table. One HTML tag that does work, but is very useless for my need is: margin-top:100px

thanks

This may help.

If something like this doesn’t work css - How to use HTML to print header and footer on every printed page of a document? - Stack Overflow

Then you’ll likely have to use a script and try to insert your disclaimer at specific intervals. Or atleast thats what I would try.

1 Like