-
Notifications
You must be signed in to change notification settings - Fork 0
/
receipt-template.html
129 lines (123 loc) · 5.12 KB
/
receipt-template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<style>
.container{
paddig: 20px 80px,
}
</style>
</head>
<body>
<main className="font-josefin-sans">
<div className="px-5 lg:mx-40 py-20">
<div className="flex justify-center">
<div className="bg-concrete rounded-3xl px-7 py-8 flex justify-between">
<div className="basis-1/3 flex flex-col justify-between">
<div className="flex flex-col gap-2 flex-grow">
<h6 className="text-base font-semibold text-dark">
Receipt No
</h6>
<p className="text-dark-lighter">#0001</p>
</div>
<div className="flex flex-col gap-2 flex-grow">
<h6 className="text-base font-semibold text-dark">
Receipt Date
</h6>
<p className="text-dark-lighter">15.05.2023</p>
</div>
</div>
<div className="basis-1/3 flex flex-col justify-between">
<div className="flex flex-col gap-2 flex-grow">
<h6 className="text-base font-semibold text-dark">
Sold by
</h6>
<p className="text-dark-lighter">Autism Lifestyle</p>
</div>
<div className="flex flex-col gap-2 flex-grow">
<h6 className="text-base font-semibold text-dark">
Order No
</h6>
<p className="text-dark-lighter"># 0001</p>
</div>
<div className="flex flex-col gap-2 flex-grow">
<h6 className="text-base font-semibold text-dark">
Order Date
</h6>
<p className="text-dark-lighter">
{convertOrderDate(order.orderDate)}
</p>
</div>
</div>
<div className="basis-1/5">
<div className="flex flex-col gap-2">
<h6 className="text-base font-semibold text-dark">
Billing Address
</h6>
<div className="text-dark-lighter flex flex-col gap-1.5">
<p className="text-dark-lighter">
{order.billingAddress.firstName}{" "}
{order.billingAddress.lastName}
</p>
<p className="text-dark-lighter">
{order.billingAddress.addressLine1}
</p>
<p className="text-dark-lighter">
{order.billingAddress.email}
</p>
<p className="text-dark-lighter">
{order.billingAddress.phone}
</p>
</div>
</div>
</div>
</div>
<table className="w-full">
<thead className="uppercase">
<tr className="border-t-0.5 border-light text-black">
<th className="py-2 px-4 text-start">SL No.</th>
<th className="py-2 px-4 text-start">Package</th>
<th className="py-2 px-4 text-end">Price</th>
<th className="py-2 px-4">Quantity</th>
<th className="py-2 px-4 text-end">Sub total</th>
</tr>
</thead>
<tbody>
{order.orderItems.map((item, index) => (
<tr key={index} className="border-t-0.5 border-light">
<td className="py-5 px-4">{index + 1}</td>
<td className="py-5 px-4">{item.title}</td>
<td className="py-5 px-4 text-end">
KES. {item.price.toLocaleString("en-US")}
</td>
<td className="py-5 px-4 justify-center flex gap-x-3 items-center">
{item.quantity}
</td>
<td className="py-5 px-4 text-end">
KES. {item.subTotal.toLocaleString("en-US")}
</td>
</tr>
))}
<tr className="border-y-0.5 border-light font-bold">
<td className="text-start py-6 px-4">Items total:</td>
<td></td>
<td></td>
<td></td>
<td className="text-end py-6 px-4">
KES {calculateOrderTotal()}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
<script src="" async defer></script>
</body>
</html>