getInvoiceContent static method
Implementation
static String getInvoiceContent() {
return """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta http-equiv="Content-type" name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width"> -->
<title>SALE INVOICE</title>
</head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Khmer&display=swap');
@page {
footer: page-footer;
margin: 1cm;
margin-top: 35pt;
margin-bottom: 50pt;
margin-footer: 18pt;
}
@page :first {
margin-top: 0;
}
*,
html {
padding: 0;
margin: 0;
font-family: 'KhmerOS', DejaVu Sans !important;
}
* {
-webkit-print-color-adjust: true;
-webkit-print-color-adjust: exact;
}
body,
p {
margin: 0px;
padding: 0px;
font-family: 'khmeros', serif;
}
body {
background: white;
}
p {
line-height: 22px;
}
.invoice {
margin: auto;
}
.container {
padding: 5px 15px;
}
hr {
border-top: 1px dashed silver;
}
.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: #3a3a3a;
}
.full-width {
width: 100%;
}
.width-100 {
width: 100px;
}
.width-200 {
width: 200px;
}
.width-300 {
width: 300px;
}
.width-400 {
width: 400px;
}
.inline-block {
display: inline-block;
}
.flex {
display: flex;
}
.half {
width: 50%;
}
.padding_left {
padding-left: 15px;
}
.padding_right {
padding-right: 15px;
}
td {
border: 1px solid silver;
padding: 8px;
border-collapse: collapse;
}
thead td {
background: #4BAF4F;
/* #1565c0; */
color: white;
}
table {
width: 100%;
}
thead td,
tfoot td {
font-weight: bold;
}
@page {
margin: 0;
size: A4;
}
header,
footer {
margin: auto;
}
.logo {
width: 55px;
height: 55px;
background-position: center;
/* Center the image */
background-repeat: no-repeat;
/* Do not repeat the image */
background-size: cover;
}
.logo img {
width: 100%;
}
header,
footer {
position: fixed;
transform: translate3d(0, 0, 0);
}
footer {
bottom: 0;
}
.page-break {
page-break-after: always;
}
.capitalize {
text-transform: capitalize;
}
</style>
<body>
<div class="invoice">
<div class="container">
<div class="full-width inline-block">
<div class="logo" style="float: left;position:absolute; background-image: url(data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAZABkAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW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DvHfjv4dWusXp1DUdD8L6ukGn3FwSC8gieJ9hbHzbCPQYFb2ufsieA/Evhz4paHqf9o3lj8RL8anqnmTJutrhURUe2IT5ChjRhu3cjnI4oA+Zv2mvhPpXww+NOu/EL4kfClPif8EpNHsNOtHsJR5ng2GBdkgjtNy5ickOXTBXHUdD99aPqVprGk2V/p8qz2F1Ak9vKgwrxsoZSPYgivAPG37FunfEPdaa/8UfiTf8Ah65tra11Hw+2txpZ6gsMaR/vVWEMDIIwZNhXcxY8E19BafYW+lWFtZWcKW9pbRLDDDGMLGigBVA9AABQBYooooAKKKKACqWtWk1/o99a20zW9xPBJHHMrlCjFSAwYcggnOR0q7RQB4FcfAj4iXUN2JPijeKZ9MWyCW/nxBJUjISVW81irF0hkY9T+9X7r8dL4o+E3ijWJ9Ml0zxvfaSLOzs7cwmWSRJXhd5JHchlLNI3kqW7ojqVIfA9YooA8p0P4S+ItL0HVYZvGF9c6rdWMdpFcyXVw6x7Z5pGbmTh2SSOIyJtb93uXbwBgP8AA3x1PDGsnxIvEcR+VI8UtyvmZg2B8edhWifDoFwHOfM3ZyPdaKAOO+F/hDWfB2h3FvrmuS67ezzLMZXeR1jIijRgpkZiAzo0mBhQZCAOMnsaKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9k=)">
</div>
<!-- header part -->
<div class="text-center">
<h1 class="capitalize" style="padding-left:-15px;">invoice</h1>
</div>
</br>
</div>
<hr>
<!-- end header part -->
<!-- information -->
<div class="full-width inline-block">
<div class="half left">
<div class="padding_right">
<p class="capitalize">store</p>
<p><b class="capitalize">name:</b> ONE CLICK(SR) </p>
<p><b class="capitalize">address:</b> Siemreap </p>
<p><b class="capitalize">phone:</b> 069777566 </p>
<p><b class="capitalize">email:</b> admin@theoneclicks.com </p>
<p><b class="capitalize">date:</b> 2021-01-23 12:11:40 </p>
<p><b class="capitalize">invoice:</b> S13-1000049 </p>
<p><b class="capitalize">reference:</b> ................................. </p>
</div>
</div>
<div class="half right">
<div class="padding_right">
<p class="capitalize">customer</p>
<p><b class="capitalize">name:</b> JBL PoiPet(Daro) </p>
<p><b class="capitalize">address:</b> .................................
</p>
<p><b class="capitalize">phone:</b> 089494793 </p>
<p><b class="capitalize">email:</b> ................................. </p>
<p><b class="capitalize">payment:</b> completed </p>
</div>
</div>
</div>
<p class="capitalize">note: </p>
<hr>
<!-- product part -->
<table align="center" cellpadding="0" cellspacing="0" role="presentation">
<thead>
<tr>
<td align="center" class="capitalize">No.</td>
<td align="center" class="capitalize">description</td>
<td align="center" class="capitalize">quantity</td>
<td align="center" class="capitalize">unit price</td>
<td align="center" class="capitalize">discount</td>
<td align="center" class="capitalize">total</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
BE-GNT-P9828V6
</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">175</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
A2-X20RJ-1080P
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">189</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
Memory Card 32G
</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
</tr>
<tr>
<td align="center">1</td>
<td align="left">
D2-R1080P
</td>
<td align="center" valign="top">1</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">21</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="5" align="right" class="capitalize">total price (US Dollar) </td>
<td rowspan="1" align="center">\$ 385.00</td>
</tr>
<tr>
<td colspan="5" align="right" class="capitalize">total price (KHMER Riel) </td>
<td rowspan="1" align="center">៛ 1559250.00</td>
</tr>
<tr>
<td colspan="5" align="right" class="capitalize">discount ( 0% )</td>
<td rowspan="1" align="center">\$ 0.00</td>
</tr>
<tr>
<td colspan="5" align="right" class="capitalize">vat ( 0% )</td>
<td rowspan="1" align="center">\$ 0.00</td>
</tr>
<tr>
<td colspan="5" align="right" class="capitalize">paid</td>
<td rowspan="1" align="center">\$ 385.00</td>
</tr>
<tr>
<td colspan="5" align="right" class="capitalize">due</td>
<td rowspan="1" align="center">\$ 0.00</td>
</tr>
</tbody>
</table>
</hr>
</br>
<div class="text-center">Thank you for shopping with us. Please come again</div>
</br>
</br>
<div class="text-center">Published by MYLEKHA on 2021-03-26 20:49:15. Current timezone is Asia/Phnom_Penh </div>
</div>
</div>
</body>
</html>
""";
}