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
|
<?php $dir = "."; include_once($dir."/_common.php");
$sql = "select a.midx,a.ccode, ifnull(c.amount,0) as dealamount, b.* from sale_m a left join sale_d b on a.midx = b.midx left join receive c on a.midx = c.dealidx where a.midx = '{$midx}' "; //_pr($sql); $result = mysql_query($sql,$connect_e1000y); while($des_info=mysql_fetch_array($result)){ $list_array[] = $des_info; }
if($list_array[0]['ccode']!=''){ $sql = "select cur_arrear, cur_recvbl from customers where code = '{$list_array[0]['ccode']}' "; $result = mysql_query($sql,$connect_e1000y); $cus_info=mysql_fetch_array($result); }
?>
<div class="cust-list-area"> <table class="order-sheet2"> <caption class="screen_out">매출처 원장 조회<caption> <colgroup> <col style="width:180px;"><col style="width:100px;"><col style="width:50px;"> <col style="width:80px;"><col style="width:80px;"><col style="width:70px;"> <col style="width:100px;"><col style="width:110px;"> </colgroup>
<thead> <tr> <th scope="col">상품명</th><th scope="col">규격</th><th scope="col">수량</th> <th scope="col">단가</th><th scope="col">공급가액</th><th scope="col">부가세</th> <th scope="col">합계금액</th><th scope="col">비고</th> </tr> </thead> <tbody> <?php for($i=0;$i<count($list_array);$i++){ $info = $list_array[$i]; $d_sup += $info['sup_amt']; $d_vat += $info['vat']; $d_tot += $info['tot_amt']; ?> <tr> <td class="linetxt "><?php echo $info['pname'];?></td> <td class="linetxt "><?php echo $info['pnorm'];?></td> <td class="linetxt"><?php echo number_format($info['qty']);?></td> <td class="cost"><?php echo number_format($info['price']);?></td> <td class="cost"><?php echo number_format($info['sup_amt']);?></td> <td class="cost "><?php echo number_format($info['vat']);?></td> <td class="cost "><?php echo number_format($info['tot_amt']);?></td> <td class="cost "><?php echo number_format($info['remarks']);?></td> </tr> <?php } if(count($list_array)==0){ ?> <tr> <td class="tcenter" colspan=12> 해당되는 매출이 없습니다. </td> </tr> <?php } ?> </tbody> </table> </div> <input type='hidden' name='detail_amount' value='<?php echo $list_array[0]['dealamount'];?>'> <input type='hidden' name='detail_sup' value='<?php echo $d_sup;?>'> <input type='hidden' name='detail_vat' value='<?php echo $d_vat;?>'> <input type='hidden' name='detail_tot' value='<?php echo $d_tot;?>'> <input type='hidden' name='detail_mibul' value='<?php echo round($cus_info['cur_recvbl']);?>'>
|