-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
189 lines (171 loc) · 6.69 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Show past currency exchange rates">
<meta name="author" content="Ioan Eugen Stan <[email protected]>">
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="shortcut icon" type="image/png" href="/favicon.png">
<title>Valutar</title>
<!-- Bootstrap core CSS -->
<link href="/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="/css/master.css" media="screen" title="no title" charset="utf-8">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="https://valutar.netdava.com/">Valutar</a>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">Aflați cursul valutar trecut</div>
<div class="panel-body">
<form class="form-inline">
<div class="form-group">
<label for="date">Data</label>
<input type="text" class="form-control" id="currency-date" placeholder="zz/ll/aaaa ">
</div>
</form>
</div>
<table class="table table-striped table-hover">
<thead>
<th> Valută </th>
<th> Curs </th>
</thead>
<tbody>
<tr>
<td> EUR </td>
<td>
<input id="EUR" type="text" readonly selected name="eur">
</td>
</tr>
<tr>
<td> USD </td>
<td>
<input id="USD" type="text" readonly selected name="usd">
</td>
</tr>
<tr>
<td> GBP </td>
<td>
<input id="GBP" type="text" readonly selected name="gbp">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Informații</h3>
</div>
<div class="panel-body">
<p>
Acest serviciu software este destinat contabililor pentru a-i ajuta la completarea declarațiilor fiscale ce necesită cunoașterea cursului valutar trecut.
</p>
<p>
Un exemplu de asemenead declarație este
<a href="https://static.anaf.ro/static/10/Anaf/Declaratii_R/390.html">
D390
</a>
</p>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Note</h3>
</div>
<div class="panel-body">
<p>
Puteți folosi separator liniuța (-), punctul (.), linie inclinata (/) sau nimic pentru a separa zilele de luna si an.
</p>
<p>
Valoare este selectată automat la click pentru a facilita copierea. Folosiți CTRL+C pentru a copia și CTRL+V pentru a lipi.
</p>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-xs-6">
<p class="text-muted">Un produs
<a href="https://netdava.com/">netdava.com</a>.
Toate drepturile rezervate.
</p>
</div>
<div class="col-xs-6">
<a href='https://openapi.ro'>
<img src='https://openapi.ro/oa-logo.png' width='82' height='38' alt='OpenAPI.ro - servicii web pentru România' />
</a>
</div>
</div>
</div>
</footer>
<script type="text/javascript" src="/bower_components/jquery/dist/jquery.min.js">
</script>
<script type="text/javascript" src="/bower_components/moment/min/moment-with-locales.min.js"></script>
<script type="text/javascript" src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js">
</script>
<script type="text/javascript">
function toFixed(value, precision) {
var precision = precision || 0,
power = Math.pow(10, precision),
absValue = Math.abs(Math.round(value * power)),
result = (value < 0 ? '-' : '') + String(Math.floor(absValue / power));
if (precision > 0) {
var fraction = String(absValue % power),
padding = new Array(Math.max(precision - fraction.length, 0) + 1).join('0');
result += '.' + padding + fraction;
}
return result;
}
$(document).ready(function() {
$("input[type='text']").on("click", function() {
$(this).select();
});
$('#currency-date').datepicker({
format: 'dd/mm/yyyy',
endDate: '0d',
autoclose: true
}).on('changeDate', function(e) {
var url = '/api/exchange/all.json?date=' + moment(e.date).format('YYYY-MM-DD');
$.getJSON(url, function(data) {
$("#EUR").val(toFixed(data.rate.EUR, 4));
$("#USD").val(toFixed(data.rate.USD, 4));
$("#GBP").val(toFixed(data.rate.GBP, 4));
});
})
})
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72326280-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>