TavernerPOS - Source Code
Clone:
git clone http://www.librarysmith.co.uk/tavernerPOS
viewgit/viewgit/inc/functions.php:49 Function create_function() is deprecated [8192]Add Receipt Ticket logo: config/receipt-logo.jpg (386x269px) and modify ticket-receipt.jrxml and .jasper to support it. Add sample logo. User can change this JPEG to add own logo.
Filename
config/printerlayouts/ticket-receipt.jasper
config/printerlayouts/ticket-receipt.jrxml
config/receipt-logo.jpg
diff --git a/config/printerlayouts/ticket-receipt.jasper b/config/printerlayouts/ticket-receipt.jasper
index 24b5d90..210cb09 100755
Binary files a/config/printerlayouts/ticket-receipt.jasper and b/config/printerlayouts/ticket-receipt.jasper differ
diff --git a/config/printerlayouts/ticket-receipt.jrxml b/config/printerlayouts/ticket-receipt.jrxml
index d618893..09d8f2c 100755
--- a/config/printerlayouts/ticket-receipt.jrxml
+++ b/config/printerlayouts/ticket-receipt.jrxml
@@ -2,7 +2,7 @@
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TicketReceiptReport" pageWidth="136" pageHeight="324" whenNoDataType="BlankPage" columnWidth="136" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="14" isFloatColumnFooter="true" isIgnorePagination="true">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
- <property name="ireport.zoom" value="2.1961500000000007"/>
+ <property name="ireport.zoom" value="1.8150000000000004"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<import value="net.sf.jasperreports.engine.*"/>
@@ -62,7 +62,7 @@
<band splitType="Stretch"/>
</background>
<title>
- <band height="165" splitType="Stretch">
+ <band height="280" splitType="Stretch">
<textField isBlankWhenNull="false">
<reportElement key="textField-2" x="-30" y="-227" width="595" height="25"/>
<box>
@@ -194,7 +194,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine5}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-12" x="0" y="0" width="136" height="18" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-12" x="0" y="110" width="136" height="18" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -207,7 +207,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-13" x="0" y="26" width="136" height="14" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-13" x="0" y="136" width="136" height="14" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -220,7 +220,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-14" x="0" y="40" width="136" height="14" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-14" x="0" y="150" width="136" height="14" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -233,7 +233,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine3}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-15" x="0" y="54" width="136" height="14" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-15" x="0" y="164" width="136" height="14" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -246,7 +246,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine4}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-16" x="0" y="68" width="136" height="14" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-16" x="0" y="178" width="136" height="14" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -259,7 +259,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLine5}]]></textFieldExpression>
</textField>
<line>
- <reportElement key="line-1" x="0" y="99" width="132" height="1" isRemoveLineWhenBlank="true">
+ <reportElement key="line-1" x="0" y="209" width="132" height="1" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[$P{showHeaderSeparator}!=null && $P{showHeaderSeparator}==true]]></printWhenExpression>
</reportElement>
<graphicElement>
@@ -267,27 +267,27 @@
</graphicElement>
</line>
<line>
- <reportElement key="line-1" positionType="Float" x="0" y="142" width="136" height="1"/>
+ <reportElement key="line-1" positionType="Float" x="0" y="252" width="136" height="1"/>
<graphicElement>
<pen lineWidth="1.0" lineStyle="Dashed"/>
</graphicElement>
</line>
<textField>
- <reportElement key="staticText-2" positionType="Float" x="0" y="145" width="72" height="15"/>
+ <reportElement key="staticText-2" positionType="Float" x="0" y="255" width="72" height="15"/>
<textElement verticalAlignment="Middle" markup="none">
<font fontName="Monospaced" size="9" isBold="false" isUnderline="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{itemText}]]></textFieldExpression>
</textField>
<textField>
- <reportElement key="staticText-1" positionType="Float" x="75" y="145" width="19" height="15"/>
+ <reportElement key="staticText-1" positionType="Float" x="75" y="255" width="19" height="15"/>
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
<font fontName="Monospaced" size="9" isBold="false" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{quantityText}]]></textFieldExpression>
</textField>
<textField>
- <reportElement key="staticText-4" positionType="Float" x="98" y="145" width="34" height="15">
+ <reportElement key="staticText-4" positionType="Float" x="98" y="255" width="38" height="15">
<printWhenExpression><![CDATA[$P{showSubtotal}==true]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
@@ -296,7 +296,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{subTotalText}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField-16" x="-4" y="82" width="140" height="14" isRemoveLineWhenBlank="true"/>
+ <reportElement key="textField-16" x="-4" y="192" width="140" height="14" isRemoveLineWhenBlank="true"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -309,36 +309,40 @@
<textFieldExpression class="java.lang.String"><![CDATA[$P{receiptType}]]></textFieldExpression>
</textField>
<line>
- <reportElement positionType="Float" x="0" y="162" width="60" height="1"/>
+ <reportElement positionType="Float" x="0" y="272" width="60" height="1"/>
<graphicElement>
<pen lineStyle="Dashed"/>
</graphicElement>
</line>
<line>
- <reportElement positionType="Float" x="76" y="162" width="19" height="1"/>
+ <reportElement positionType="Float" x="76" y="272" width="19" height="1"/>
<graphicElement>
<pen lineStyle="Dashed"/>
</graphicElement>
</line>
<line>
- <reportElement positionType="Float" x="100" y="162" width="36" height="1"/>
+ <reportElement positionType="Float" x="100" y="272" width="36" height="1"/>
<graphicElement>
<pen lineStyle="Dashed"/>
</graphicElement>
</line>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement stretchType="RelativeToBandHeight" x="0" y="103" width="136" height="12" isRemoveLineWhenBlank="true"/>
+ <reportElement stretchType="RelativeToBandHeight" x="0" y="213" width="136" height="12" isRemoveLineWhenBlank="true"/>
<textElement markup="html">
- <font fontName="Monospaced" size="9"/>
+ <font fontName="Monospaced" size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{ticketHeader}]]></textFieldExpression>
</textField>
<componentElement>
- <reportElement positionType="Float" x="1" y="115" width="135" height="20" isRemoveLineWhenBlank="true"/>
+ <reportElement positionType="Float" x="1" y="225" width="135" height="20" isRemoveLineWhenBlank="true"/>
<jr:barbecue xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" type="Code128" drawText="false" checksumRequired="false">
<jr:codeExpression><![CDATA[$P{barcode}]]></jr:codeExpression>
</jr:barbecue>
</componentElement>
+ <image>
+ <reportElement x="1" y="0" width="135" height="100"/>
+ <imageExpression class="java.lang.String"><![CDATA["receipt-logo.jpg"]]></imageExpression>
+ </image>
</band>
</title>
<pageHeader>
@@ -365,7 +369,7 @@
<textFieldExpression class="java.lang.String"><![CDATA[$F{itemName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement key="textField" x="98" y="0" width="34" height="12" isRemoveLineWhenBlank="true">
+ <reportElement key="textField" x="98" y="0" width="38" height="12" isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[$P{showSubtotal}==true]]></printWhenExpression>
</reportElement>
<box>
diff --git a/config/receipt-logo.jpg b/config/receipt-logo.jpg
new file mode 100755
index 0000000..68e3588
Binary files /dev/null and b/config/receipt-logo.jpg differ
- Details
- Last Updated: Monday, 04 April 2016 02:04
- Hits: 42703931