getReceiptContent static method
Implementation
static String getReceiptContent() {
return """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RECEIPT</title>
</head>
<style>
body,
p {
margin: 0px;
padding: 0px;
}
body {
background: #eee;
width: 302.36px;
}
.receipt {
max-width: 302.36px;
margin: auto;
background: white;
}
.container {
padding: 5px 15px;
}
hr {
border-top: 1px dashed black;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: left;
}
.text-justify {
text-align: justify;
}
.right {
float: right;
}
.left {
float: left;
}
.total {
font-size: 1.5em;
margin: 5px;
}
a {
color: #1976d2;
}
span {
color: grey;
}
.full-width {
width: 100%;
}
.inline-block {
display: inline-block;
}
</style>
<body>
<div class="receipt">
<div class="container">
<!-- header part -->
<div class="text-center">
<p>MYLEKHA STORE</p>
<hr>
<p class="total">320.00</p>
<span>Total</span>
</div>
<hr>
<!-- end header part -->
<p>Cashier: owner</p>
<p>POS: POS 1</p>
<hr>
<!-- product part -->
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<p class="full-width inline-block">
<b class="left">Item c1 p2</b>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p class="full-width inline-block">
<strong class="left">Item c1 p2</strong>
<b class="right">4.00</b>
</p>
<p><span>2 x 2.00</span></p>
<p><span>+egg (0.60)</span></p>
<p><span>+rice (3.00)</span></p>
<hr>
<!-- end product part -->
<!-- footer part -->
<p class="full-width inline-block">
<b class="left">Total</b>
<b class="right">4.00</b>
</p>
<p class="full-width inline-block">
<b class="left">Cash</b>
<b class="right">4.00</b>
</p>
</div>
<hr>
<!-- end footer part -->
<div class="container">
<p class="full-width inline-block">
<span class="left">01/09/2020 22:23</span>
<span class="right">No 3-10001</span>
</p>
</div>
</div>
<div class="container text-center">
<br>
<p>@2020 <a href="https://mylekha.app">MYLEKHA</a>. All right reserved.</p>
</div>
</html>
""";
}