forked from chihebnabil/vuejs-invoice-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
145 lines (144 loc) · 4.07 KB
/
index.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Invoice</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
/>
<style>
@import url(http://fonts.googleapis.com/css?family=Bree+Serif);
body,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Bree Serif", serif;
}
</style>
</head>
<body>
<div class="container" id="app">
<div class="row">
<div class="col-xs-6">
<h1>
<a href="#">
<img
src="http://container-solutions.com/content/uploads/2016/04/mesos-logo.png"
/>
</a>
</h1>
</div>
<div class="col-xs-6 text-right">
<h1>INVOICE</h1>
<h1>
<small>Invoice #{{ invoice.number }}</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-xs-5">
<div class="panel panel-default">
<div class="panel-heading">
<h4>From: {{ invoice.from.name }}</h4>
</div>
<div class="panel-body">
<p>
{{ invoice.from.address }} <br />
{{ invoice.from.details }} <br />
</p>
</div>
</div>
</div>
<div class="col-xs-5 col-xs-offset-2 text-right">
<div class="panel panel-default">
<div class="panel-heading">
<h4>To : {{ invoice.to.name }}</h4>
</div>
<div class="panel-body">
<p>
{{ invoice.to.address }} <br />
{{ invoice.to.details }} <br />
</p>
</div>
</div>
</div>
</div>
<!-- / end client details section -->
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th>
<h4>Service</h4>
</th>
<th>
<h4>Description</h4>
</th>
<th>
<h4>Hrs/Qty</h4>
</th>
<th>
<h4>Rate/Price</h4>
</th>
<th>
<h4>Sub Total</h4>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(p, index) in invoice.products" v-bind:key="index">
<td>
<button class="btn btn-danger" v-on:click="remove(index)">
-
</button>
</td>
<td>{{ p.title }}</td>
<td>{{ p.description }}</td>
<td class="text-right">{{ p.qty }}</td>
<td class="text-right">${{ p.price }}</td>
<td class="text-right">${{ p.qty * p.price }}</td>
</tr>
<tr>
<td><button v-on:click="add" class="btn btn-primary">+</button></td>
<td><input class="form-control" type="text" v-model="title" /></td>
<td><input class="form-control" v-model="description" /></td>
<td class="text-right">
<input class="form-control" v-model="qty" />
</td>
<td class="text-right">
<input class="form-control" v-model="price" />
</td>
<td class="text-right">{{ qty * price }}</td>
</tr>
</tbody>
</table>
<div class="row text-right">
<div class="col-xs-2 col-xs-offset-8">
<p>
<strong>
Sub Total : <br />
TAX : <br />
Total : <br />
</strong>
</p>
</div>
<div class="col-xs-2">
<strong>
${{ getSubTotal() }}<br />
{{ invoice.taxRate * 100 }}% <br />
${{ getSubTotal() + getSubTotal() * invoice.taxRate }} <br />
</strong>
</div>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"
type="text/javascript"
></script>
<script src="js/app.js" type="text/javascript"></script>
</body>
</html>