"price"
Bootstrap 3.0.0 Snippet by arkiz

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
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-price-format/2.1/jquery.priceformat.js"></script>
<body id="main_body" >
<img id="top" src="top.png" alt="">
<div id="form_container">
<form>
<div class="form_description">
<h2>POS Report Generator</h2>
</div>
<ul class="tables">
<li>
<table width="350px">
<tr>
<th rowspan="2">DEPOSIT</th>
<th>(CIBC)</th>
<th><input id="deposit_cibc" name="deposit_cibc" class="currency" size="6" value="" type="text" tabindex="10" /></th>
</tr>
<tr>
<th>(SHINHAN)</th>
<th><input id="deposit_shinhan" name="deposit_shinhan" class="currency" size="6" value="" type="text" tabindex="10" /></th>
</tr>
<tr>
<th>POS</th>
<th>#1</th>
<th>#2</th>
</tr>
<tr>
<td>NET TTL</td>
<td><lable>$ </lable><input id="pos1_net_ttl" name="pos1_net_ttl" class="currency" size="6" value="" type="text" tabindex="10" /></td>
<td><lable>$ </lable><input id="pos2_net_ttl" name="pos2_net_ttl" class="currency" size="6" value="" type="text" tabindex="20" /></td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
table {
border-collapse: collapse;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
th {
background-color: #4CAF50;
color: white;
}
.tables li {
display: inline-block;
vertical-align: text-top;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
/*
$(document).on('keypress', '.currency', function () {
console.log($(this).context.value);
alert($(this).value);
});
*/
$(document).ready(function(){
$(".currency").on("input", function(evt) {
$(this).priceFormat({
prefix: '',
thousandsSeparator: ','
});
});
$(".cash").on("input", function(evt) {
var unit = $(this).context.value;
var unitprice = 0;
switch($(this).attr('id')) {
case 'cad_cash_dime':
case 'usd_cash_dime':
unitprice = 0.1;
break;
case 'cad_cash_quarter':
case 'usd_cash_quarter':
unitprice = 0.25;
break;
case 'cad_cash_loonie':
case 'usd_cash_loonie':
unitprice = 1;
break;
case 'cad_cash_toonie':
case 'usd_cash_toonie':
unitprice = 2;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: