blob: f7733c9b8047e6e613423c79f6c55f5d986ea8b7 (
plain)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
<script setup lang="ts">
const props = defineProps(["invoice"])
</script>
<template>
<div class="print-preview-recipient-info">
<div class="recipient-info--row1">
<div class="recipient-info--col1">
</div>
<div class="recipient-info--col2">
<span class="invoice-label">
<span><strong>INVOICE</strong></span>
<span>Original for Recipient</span>
</span>
</div>
</div>
<div class="recipient-info--row2">
<div class="recipient-info--col1 recipient-contact">
<div class="label">
<span><strong>Bill To:</strong></span>
<span>{{ props.invoice.CustomerName }}</span>
</div>
<div class="label">
<span><strong>Address:</strong></span>
<span>
{{ props.invoice.BillingAddress.AddressText }}<br>
{{ props.invoice.BillingAddress.City }}
({{ props.invoice.BillingAddress.PostalCode }}),
{{ props.invoice.BillingAddress.State }},
{{ props.invoice.BillingAddress.Country }}
</span>
</div>
<div class="label">
<span><strong>Contact:</strong></span>
<span>{{ props.invoice.CustomerContactName }}</span>
</div>
<div class="label">
<span><strong>Phone:</strong></span>
<span>{{ props.invoice.CustomerPhone }}</span>
</div>
<div class="label">
<span><strong>Email:</strong></span>
<span>{{ props.invoice.CustomerEmail }}</span>
</div>
<div class="label">
<span><strong>Website:</strong></span>
<span>{{ props.invoice.CustomerWebsite }}</span>
</div>
<div class="label">
<span><strong>GSTIN:</strong></span>
<span>{{ props.invoice.CustomerGstin }}</span>
</div>
</div>
<div class="recipient-info--col2">
<div class="invoice-meta">
<div class="label">
<span><strong>Invoice Number: </strong></span>
<span>{{ props.invoice.InvoiceNumber }}</span>
</div>
<div class="label">
<span><strong>Invoice Date: </strong></span>
<span>{{ new Date(props.invoice.InvoiceDate).toLocaleDateString() }}</span>
</div>
</div>
<div class="shipping-address">
<div class="label">
<span><strong>Shipping Address:</strong></span>
<span>
{{ props.invoice.ShippingAddress.AddressText }}<br>
{{ props.invoice.ShippingAddress.City }}
({{ props.invoice.ShippingAddress.PostalCode }}),
{{ props.invoice.ShippingAddress.State }},
{{ props.invoice.ShippingAddress.Country }}
</span>
<span><strong>City:</strong></span>
<span>{{ props.invoice.ShippingAddress.City }}</span>
<span><strong>State:</strong></span>
<span>{{ props.invoice.ShippingAddress.State }}</span>
<span><strong>ZIP Code:</strong></span>
<span>{{ props.invoice.ShippingAddress.PostalCode }}</span>
<span><strong>Country:</strong></span>
<span>{{ props.invoice.ShippingAddress.Country }}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<style>
.print-preview-recipient-info {
border: 1px solid gray;
display: grid;
grid-template-rows: 2em auto;
width: 100%;
}
.recipient-info--row1,
.recipient-info--row2 {
display: grid;
grid-template-columns: 3fr 4fr;
}
.recipient-info--row1 {
border-bottom: 1px solid gray;
}
.recipient-info--col1 {
border-right: 1px solid gray;
}
.recipient-info--col1 {
padding: 0.1em 0.3em;
}
.invoice-label {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.3em;
}
.recipient-contact {
display: flex;
flex-direction: column;
}
.recipient-contact .label {
display: grid;
grid-template-columns: 5em auto;
}
.invoice-meta {
width: 100%;
border-bottom: 1px solid gray;
padding: 0.3em 0.3em;
display: grid;
grid-template-columns: 1fr 1fr;
}
.invoice-meta .label, .shipping-address .label {
display: grid;
grid-template-columns: 9em auto;
}
.shipping-address {
width: 100%;
padding: 0.1em 0.3em;
}
</style>
|