-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
54 lines (45 loc) · 2.3 KB
/
main.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
<!DOCTYPE html>
<html>
<head>
<title>eBay ve Payoneer Kar, Ücret ve Toplam Kesinti Hesaplayıcı</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-4">
<h2>eBay ve Payoneer Kar, Ücret ve Toplam Kesinti Hesaplayıcı</h2>
<div class="form-group">
<label for="purchasePrice">Alış Fiyatı ($):</label>
<input type="number" id="purchasePrice" name="purchasePrice" class="form-control" oninput="calculateProfitFeesAndTotalDeduction()">
</div>
<div class="form-group">
<label for="salePrice">Satış Fiyatı ($):</label>
<input type="number" id="salePrice" name="salePrice" class="form-control" oninput="calculateProfitFeesAndTotalDeduction()">
</div>
<div id="feesProfitAndDeduction" class="font-weight-bold"></div>
</div>
<!-- Bootstrap and jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script>
function calculateProfitFeesAndTotalDeduction() {
var purchasePrice = parseFloat(document.getElementById('purchasePrice').value);
var salePrice = parseFloat(document.getElementById('salePrice').value);
var ebayFeePercentage = 15;
var payoneerFeePercentage = 1;
var ebayFee = (ebayFeePercentage / 100) * salePrice;
var payoneerFee = (payoneerFeePercentage / 100) * salePrice;
var totalDeduction = ebayFee + payoneerFee;
var netProfit = salePrice - totalDeduction - purchasePrice;
document.getElementById('feesProfitAndDeduction').innerHTML =
'eBay Ücreti: $' + ebayFee.toFixed(2) + '<br>' +
'Payoneer Ücreti: $' + payoneerFee.toFixed(2) + '<br>' +
'Toplam Kesinti: $' + totalDeduction.toFixed(2) + '<br>' +
'Net Kar: $' + netProfit.toFixed(2);
}
// Initial calculation on page load
calculateProfitFeesAndTotalDeduction();
</script>
</body>
</html>