-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCompany.js
81 lines (78 loc) · 2.87 KB
/
Company.js
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
import {Button, Table} from "react-bootstrap";
export default function Company(props) {
const company = props.company;
const removeCompany = (id, name) => {
if (window.confirm(`Remove ${name} from the list?`)) {
props.removeCompany(id);
}
}
return <Table size="sm" style={{paddingTop: 5, borderTop: '#000 2px solid'}}>
<thead>
<tr>
<th>As (in {company.name})</th>
<th>Received Income (BDT.)</th>
<th>Max exempted Income (BDT.)</th>
<th>Net Taxable Amount (BDT.)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Basic</td>
<td>{company.basic.yearly}</td>
<td>{company.basic.exempted}</td>
<td>{company.basic.taxable}</td>
</tr>
<tr>
<td>House rent</td>
<td>{company.house.yearly}</td>
<td>{company.house.exempted}</td>
<td>{company.house.taxable}</td>
</tr>
<tr>
<td>Medical Allowance</td>
<td>{company.medical.yearly}</td>
<td>{company.medical.exempted}</td>
<td>{company.medical.taxable}</td>
</tr>
<tr>
<td>Conveyance Allowance</td>
<td>{company.conveyance.yearly}</td>
<td>{company.conveyance.exempted}</td>
<td>{company.conveyance.taxable}</td>
</tr>
<tr>
<td>Leave Fare Assistance</td>
<td>{company.lfa.yearly}</td>
<td>{company.lfa.exempted}</td>
<td>{company.lfa.taxable}</td>
</tr>
<tr>
<td>Festival Bonus</td>
<td>{company.festival.yearly}</td>
<td>{company.festival.exempted}</td>
<td>{company.festival.taxable}</td>
</tr>
<tr>
<td>Others</td>
<td>{company.others.yearly}</td>
<td>{company.others.exempted}</td>
<td>{company.others.taxable}</td>
</tr>
<tr>
<td><b>TOTAL</b></td>
<td><b>{company.gross}</b></td>
<td><b>{company.net_exempted}</b></td>
<td><b>{company.net_taxable}</b></td>
</tr>
<tr>
<td colSpan="4" className="text-right">
<Button onClick={() => removeCompany(company.id, company.name)} size="sm" variant="danger" block>
Remove [{company.name}'s earnings -
{` ${company.months}`} months -
{` ${company.festivals}`} festivals] from this list
</Button>
</td>
</tr>
</tbody>
</Table>;
}