calculate.php
4.2 KB
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
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBill.php"; ?>
<?
$obj = new ApiBill($_REQUEST);
$result = $obj->getCalculateData() ;
$data = $result["data"] ;
$useingList = $result["list"] ;
// echo json_encode($data) ;
// echo json_encode($useingList) ;
?>
<script>
$(document).ready(function() {
}) ;
</script>
<!-- 건물명/년도 -->
<div class="year">
<ul>
<li><a><?= $data["buildingName"] ?> <?= $data["roomName"] ?></a></li>
<li><a></a></li>
</ul>
<div style="clear:both"></div>
</div>
<!-- 건물명/년도 -->
<? if($data == null) { ?>
<? } else { ?>
<!-- 납부기한/금액 -->
<div class="contant con1 bill">
<dl>
<dt><?= $data["buildingName"] ?> <?= $data["roomName"] ?> <?= $data["contractor_name"] ?> 귀하
<? if($data["is_paid"] == "0") { ?>
<div class="status green" style="width:35px; height:20px; line-height:23px; text-align:center; color:#fff; float:right; margin-right:4%;"><a>미납</a></div>
<? } else if($data["is_paid"] == "1") { ?>
<div class="status red" style="width:35px; height:20px; line-height:23px; text-align:center; color:#fff; float:right; margin-right:4%;"><a>납입</a></div>
<? } else if($data["is_paid"] == "2") { ?>
<div class="status red" style="width:45px; height:20px; line-height:22px; text-align:center; color:#fff; float:right; margin-right:4%;"><a>청구중</a></div>
<? } ?>
</dt>
<dd style="clear:both;">정산날짜 : <span><?= $data["leaving_due_date"] ?></span></dd>
<dd>잔액은 <span style="font-size:15px; color:#ff0000; font-weight:bold";><?= number_format($data["balance"]) ?></span> 원 입니다.</dd>
</dl>
</div>
<!-- 납부기한/금액 -->
<!-- 리스트 -->
<div class="contant con2">
<ul>
<li>
<a><img src="/web/inc/images/circle_bg.png" width="100%"/></a>
<a>예치금 총액</a><!-- 이름 -->
<a><span><?= number_format($data["roomBalance"]) ?></span> 원</a><!-- 금액 -->
</li>
<div style="clear:both;"></div>
<li>
<a><img src="/web/inc/images/circle_bg.png" width="100%"/></a>
<a>차감액</a><!-- 이름 -->
<a><span><?= number_format($data["subtraction_total"]) ?></span> 원</a><!-- 금액 -->
</li>
<li class="used">
<a class="jPopup" page="popupCalculate.php">차감액</a>
<a>잔액 <span><?= number_format($data["balance"]) ?></span> 원</a><!-- 금액 -->
</li>
<div style="clear:both;"></div>
</ul>
</div>
<div class="contant con2 bill2">
<ul>
<li>
<a></a>
<a></a>
<a>전월지침</a>
<a>당월지침</a>
<a>사용량</a>
</li>
<div style="clear:both;"></div>
<li>
<a><img src="/web/inc/images/circle_bg.png" width="100%"/></a>
<a>전기요금</a><!-- 이름 -->
<a><span><?= number_format($useingList["electricity_usage_lm"]) ?></span>원</a><!-- 금액 -->
<a><span><?= number_format($useingList["electricity_usage"]) ?></span>원</a>
<a><span><?= number_format($useingList["electricity_usage"] - $useingList["electricity_usage_lm"]) ?></span>원</a>
</li>
<div style="clear:both;"></div>
<li>
<a><img src="/web/inc/images/circle_bg.png" width="100%"/></a>
<a>가스요금</a><!-- 이름 -->
<a><span><?= number_format($useingList["gas_usage_lm"]) ?></span>원</a><!-- 금액 -->
<a><span><?= number_format($useingList["gas_usage"]) ?></span>원</a>
<a><span><?= number_format($useingList["gas_usage"] - $useingList["gas_usage_lm"]) ?></span>원</a>
</li>
<div style="clear:both;"></div>
<li>
<a><img src="/web/inc/images/circle_bg.png" width="100%"/></a>
<a>수도요금</a><!-- 이름 -->
<a><span><?= number_format($useingList["water_usage_lm"]) ?></span>원</a><!-- 금액 -->
<a><span><?= number_format($useingList["water_usage"]) ?></span>원</a>
<a><span><?= number_format($useingList["water_usage"] - $useingList["water_usage_lm"]) ?></span>원</a>
</li>
<div style="clear:both;"></div>
</ul>
</div>
<!-- 리스트 -->
<!-- 계좌 -->
<div class="bank">
<div>
<ul class="text1">
<li>입금은행</li>
<li>계좌번호</li>
</ul>
<ul class="text2">
<li><?= $data["contractor_account_bank"] ?></li><!-- 은행 -->
<li><?= $data["contractor_account_no"] ?> (<?= $data["contractor_account_owner"] ?>)</li><!-- 계좌번호 -->
</ul>
</div>
</div>
<!-- 계좌 -->
<? } ?>