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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
|
<?php Global $cinfo, $configshop;
$cuscode = $id_ccode; $sacode = $configshop["office_code"]; if($txtdate==''){ $txtdate = date("Y-m-01",time()); } if($txtdate2==''){ $txtdate2 = date("Y-m-d",time()); }
$optionqry = "SELECT optname, optvalue FROM options"; $optresult = mysql_query($optionqry, $connect_j3); $amountpoint = 0; $unitpoint = 0; $pricepoint = 0; while( $optrow = mysql_fetch_array($optresult)){
//$optrow = array_utf8($optrow);
if($optrow['optname'] == "ON라인신규고객등록") $optnew = $optrow['optvalue']; if($optrow['optname'] == "ON주문시금액숨김") $optmhide = $optrow['optvalue']; if($optrow['optname'] == "주문한도숨김") $optlimit = $optrow['optvalue']; if($optrow['optname'] == "선수금주문방식") $optsmoney = $optrow['optvalue']; if($optrow['optname'] == "ON주문시박스관리") $optbox = $optrow['optvalue']; if($optrow['optname'] == "ON지정상품분류") $optcate = $optrow['optvalue']; if($optrow['optname'] == "ON지정상품") $optpro = $optrow['optvalue']; if($optrow['optname'] == "ON특별단가적용") $optspe = $optrow['optvalue']; if($optrow['optname'] == "다중단가계산기준") $optdac = $optrow['optvalue']; //0 매입단가 1매출단가 2기준단가 if($optrow['optname'] == "온주원장입금비고") $optreceivebigo = $optrow['optvalue'];
if($optrow['optname'] == "수량소수점수") $amountpoint = $optrow['optvalue']; if($optrow['optname'] == "단가소수점수") $unitpoint = $optrow['optvalue']; if($optrow['optname'] == "금액소수점수") $pricepoint = $optrow['optvalue']; }
$optreceivebigo = '1';
if($skin_css!=''){ echo $skin_css; } else { ?> <!-- 상단 카테고리 내 위치 --> <style> select {width:100%;padding:0 3px;height:27px;border:1px solid #afafaf;font-size:14px;color:#444;line-height:1.62em;vertical-align:middle;-webkit-appearance:none;border-radius:3px;background-size:25px 730px,100% 100%} input.it{width:100% !important;min-width:14px;height:27px;padding:0 0 0 3px;color:#444;border:1px solid #afafaf;border-radius:3px;-webkit-appearance:none;box-sizing:border-box;box-shadow:0 1px 0 #f2f2f2 inset;-webkit-box-shadow:0 1px 0 #f2f2f2 inset;-moz-box-shadow:0 1px 0 #f2f2f2 inset}
.product_section {clear:both;display:block;margin:0 3px;} .sum {margin:10px 0;padding:10px;border:1px solid #c3cedc;border-top:2px solid #6288bf;background:#f3f9fb } .sum h3 {display:inline-block;float:left;width:30%;line-height:27px;color:#2e5694;font-weight:600;letter-spacing:-1px;} .sum p {width:70%;line-height:27px;overflow:hidden;} .search {margin:10px 0;padding:10px;border:1px solid #c3cedc;border-top:2px solid #000;background:#FFF} .search .buy {display:block;width:100%;margin-top:3px;line-height:27px;}/*2열*/ .search .buy select {width:32%;margin-right:2%;} .search .buy select:last-child {margin-right:0px;} .search .buy input[type=text] {width:45% !important;} .search .buy span {display:inline-block;width:10%;text-align:center} .search .buy dd{margin-bottom:3px;} .search .buy h3 {display:block;float:left;width:15%;font-weight:600;} .search .order {display:block;float:left;width:48.7%;margin-top:3px;}/*4열*/ .search .odd {margin-right:2%;} .search .order_w {display:inline-block;width:100%;margin-top:3px;}/*2열*/ .search .order h3, .search .order_w h3 {display:inline-block;float:left;line-height:27px;font-weight:600;letter-spacing:-1px;} .search .order h3 {width:40%;} .search .order_w h3 {width:19%;} .search .order p {width:58%;padding-left:2%;letter-spacing:-1px;line-height:27px;overflow:hidden} .search .order p span {line-height:1.25em;} .search .order_w p {width:78.9%;padding-left:1.6%;line-height:27px;overflow:hidden;} .search .order input[type=text] {width:90%;}
.search .notice {margin:0 0 10px;padding:5px;text-align:center;border:1px solid #afafaf;border-radius:3px;} .cust_info {border-top:2px solid #6288bf;} .cust_info th, .cust_info td {border-bottom:1px solid #8db3e2;} .cust_info th {padding:5px 0;font-weight:600;letter-spacing:-1px;background:#c6d9f0;} .cust_info td {padding-left:5px;} .cust_info .addr {padding:5px;}
.search .pwd {display:inline-block;width:100%;margin-top:3px;}/*2열*/ .search .pwd h3 {display:inline-block;float:left;width:30%;line-height:27px;font-weight:600;letter-spacing:-1px;} .search .pwd p {width:68%;padding-left:2%;letter-spacing:-1px;line-height:27px;overflow:hidden} .search div > input[type=button] {line-height:27px;} .search .item {margin-top:5px;} .search .item input[type=text], .search .item select {width:32% !important;margin-right:2%;} .search .item input[type=text]:last-child, .search .item select:last-child {margin-right:0%;} .search .item .check {display:inline-block;margin-top:2px;} .search .item label {margin-right:10px;letter-spacing:-1px;font-weight:600;} .search .item input[type=text].long {width:50% !important;} .search .item .b_blue {float:right;width:23%;}
/*조회버튼*/ .ls_v2, .search .ls_v3 {display:block;width:100%;height:27px;margin-top:7px;} /*하단형*/ .ls_v3 p {display:inline-block;float:left;width:48.3%;margin-right:2%;}/*더블형*/ .ls_v3 p:last-child {margin:0;}
b_blue a, .b_blue input, .b_blue span {display:block;width:100%;line-height:25px;text-align:center;font-size:1em;font-weight:600;}
/*조회내역 : 우선*/ .list {clear:both;margin:10px 0;display:inline-block;width:100%;overflow:hidden;} .list h3 {margin:0 0 10px;font-size:1em;font-weight:600;text-align:center;} .list .chb_all{display:block;margin:10px 0 0;padding:10px;min-height:20px;border:1px solid #c3cedc;border-top:2px solid #000;background:#FFF;} .list .chb_all div{float:right;margin-top:-3px;}
.p_line {border-top:2px solid #6288bf;} .product {width:100%;border-left:1px solid #c3cedc;border-right:1px solid #c3cedc;background:#FFF;} .product .odd, .product .daily {background:#f3f9fb;} .product .deposit{background:#fefee9;} .product .deposit_b {border-top:2px solid #6288bf;} .product thead td {font-weight:600;} .product th{padding:2px 0;font-size:0.95em;font-weight:600;letter-spacing:-1px;border-bottom:1px solid #c3cedc;background:#accaf2;} .product th a {font-size:1em;font-weight:600;} .product td{padding:2px;height:27px;font-size:0.85em;text-align:center;white-space:normal;border-bottom:1px solid #c3cedc;} .product input[type=checkbox] {width:21px;height:21px;} .product td p{display:block;margin:0 auto;width:15px;height:15px;border:1px solid #afafaf;} .product td strong {font-size:1em;} .product .lineR {border-right:1px solid #c3cedc;} .product td .b_blue, .product td .b_defn {float:right;width:25%;}
.pw1{width:12%;} .pw2{width:14%;} .pw3{width:13%;} .pw4{width:12%;} .pw5{width:8%;} .pw8{width:11%;} .lw1 {width:23%;height:35px;} .lw2 {width:20%;font-weight:600;} .lw3 {width:17%;} .lw4 {width:25%;} .lw5 {width:15%;}
.pcw1{width:36px;} .pcw2{width:10%;} .pcw3{width:30%;} .pcw4{width:20%;} .bw1 {width:15%;} .bw2 {width:20%;}
/*매출처원장*/ .blueBox {margin:10px;border:1px solid #90b3e6;background:#accaf2;} .blueBox table {margin:5px 10px 7px;background:#FFF} .blueBox table caption {font-size:0.95em;} .blueBox table th {padding:1px 0;color:#666;font-size:0.9em;font-weight:600;border-bottom:1px solid #accaf2;background:#c7dffc;} .blueBox table td {text-align:center;padding:0 1%;border-bottom:1px solid #accaf2;} .grayBox {margin:10px 0;border:1px solid #DDD;background:#E8E8E8;} .grayBox table {margin:5px 10px 7px;background:#FFF} .grayBox table caption {color:#444;text-align:right;font-size:0.95em;} .grayBox table th {padding:1px 0;color:#777;font-size:0.9em;font-weight:600;border-bottom:1px solid #E8E8E8;background:#f8f8f8;} .grayBox table td {text-align:center;padding:0 1%;border-bottom:1px solid #E8E8E8;}
.dotLine {margin:15px 10px;height:1px;border-bottom:1px dashed #999} </style> <?php }?>
<div class="product_section"> <div class="search"> <h2>거래원장 조회</h2> <form name='searchFrm' method='get'> <div class="buy"> <select title="기간" name='set_date' id='set_date'> <option value="">기간선택</option> <option value="0 day" <?php if($set_date=='0 day'){?>selected<?php }?>>오늘</option> <option value="-3 day" <?php if($set_date=='-3 day'){?>selected<?php }?>>최근 3일</option> <option value="-5 day" <?php if($set_date=='-5 day'){?>selected<?php }?>>최근 5일</option> <option value="-7 day" <?php if($set_date=='-7 day'){?>selected<?php }?>>최근 7일</option> <option value="-1 month" <?php if($set_date=='-1 month'){?>selected<?php }?>>최근 1개월</option> <option value="-3 month" <?php if($set_date=='-3 month'){?>selected<?php }?>>최근 3개월</option> <option value="-6 month" <?php if($set_date=='-6 month'){?>selected<?php }?>>최근 6개월</option> <option value="-1 year" <?php if($set_date=='-1 year'){?>selected<?php }?>>최근 1년</option> </select> </div> <div class='buy'> <input type='text' name='txtdate' id='txtdate' value='<?php echo $txtdate;?>' class='it' placeholder='시작일(YYYY-MM-DD)'><span>~</span><input type='text' name='txtdate2' id='txtdate2' value='<?php echo $txtdate2;?>' class='it' placeholder='시작일(YYYY-MM-DD)'> </div> <div class="ls_v3 b_blue"> <input type="button" title="조회" value="조회" onclick="Search();" > </div> </form> </div><!-- class="search" --> <?php
$old_sql = "select 4, 'prev_sale' AS code, '' AS dealdate, '' AS pname, '' AS pnorm, 0 AS price, 0 AS qnt, 0 AS amount, 0 AS tax, SUM(sd.dc) AS dc, SUM(sd.tot_amt) AS total, 0 AS mamount from sale_m as sm left join sale_d as sd on sm.midx = sd.midx where sm.dealdate < '$txtdate' AND ocode = '$sacode' AND ccode = '$cuscode' union select 5, 'prev_rece' AS CODE, '' AS dealdate, '' AS pname, '' AS pnorm, 0 AS price, 0 AS qnt, 0 AS amount, 0 AS tax, SUM(s.dc) AS dc, 0 AS total, SUM(s.amount+s.usepoint) AS mamount from receive as s where s.dealdate < '$txtdate' AND ocode = '$sacode' AND ccode = '$cuscode' ";
$total_sql = " SELECT 0, sm.dealnum as code, sm.dealdate, sd.pname, sd.pnorm, sd.price, sd.qty as qnt, sd.sup_amt as amount, sd.vat as tax, sd.dc, sd.tot_amt as total, 0 AS mamount , sd.midx, sd.seq FROM sale_m AS sm left join sale_d as sd on sm.midx = sd.midx WHERE sm.dealdate BETWEEN '$txtdate' AND '$txtdate2' AND ocode = '$sacode' AND ccode = '$cuscode' UNION ALL SELECT 2, 'sumday' AS code, sm.dealdate, '' AS pname, '' AS pnorm, sum(sd.price), sum(sd.qty) as qnt, sum(sd.sup_amt) as amount, sum(sd.vat) as tax, sum(sd.dc), sum(sd.tot_amt) as total, '0' AS mamount , sd.midx, sd.seq FROM sale_m AS sm left join sale_d as sd on sm.midx = sd.midx WHERE sm.dealdate BETWEEN '$txtdate' AND '$txtdate2' AND ocode = '$sacode' AND ccode = '$cuscode' group by dealdate UNION ALL SELECT 1, s.nidx as code, s.dealdate, '' AS pname, '' AS pnorm, '' AS price, '' AS qnt, '' AS amount, '' AS tax, s.dc, '' AS total, (s.amount+s.usepoint) AS mamount, '' as midx, '' as seq FROM receive AS s WHERE s.dealdate BETWEEN '$txtdate' AND '$txtdate2' AND ocode = '$sacode' AND ccode = '$cuscode' union all select 2, 'sumday' as code, ss.dealdate, '' AS pname, '' AS pnorm, '' AS price, '' AS qnt, '' AS amount, '' AS tax, ss.dc, '' AS total, sum(ss.amount+ss.usepoint) AS mamount, '' as midx, '' as seq FROM receive AS ss WHERE ss.dealdate BETWEEN '$txtdate' AND '$txtdate2' AND ocode = '$sacode' AND ccode = '$cuscode' ORDER BY dealdate, 1, midx, seq ";
//_pr($total_sql);
$oldresult = mysql_query($old_sql,$connect_j3) or die (mysql_error());
if( mysql_num_rows($oldresult) > 0 ){ while ($oldRow = mysql_fetch_array($oldresult)){ //$oldRow = array_utf8($oldRow); //_pr($oldRow);
if($oldRow['code']=="prev_sale"){ $oldtotal = $oldRow['total']; } if($oldRow['code']=="prev_rece"){ $oldmamount = $oldRow['mamount']; $oldmamountdc = $oldRow['dc']; }
}
//$basesql = "SELECT cust_base_sale FROM customer WHERE code = '$cuscode'"; $basesql = "SELECT begin_recvbl FROM customer_begin_balance WHERE ccode = '$cuscode' order by yyyymm desc"; //_pr($basesql); $baseresult = mysql_query($basesql,$connect_j3); $baserow = mysql_fetch_array($baseresult);
$oldsum = $oldtotal - $oldmamount - $oldmamountdc + $baserow['begin_recvbl'];
if($optmhide == "1"){ /* 주문서에 단가/금액표시 안함일때 */ } else { ?> <div class="sum"> <h3>전기이월</h3> <p class="cost blue"><?php echo number_format($oldsum,$pricepoint); ?></p> </div> <!--//전기이월--> <?php } }
?>
</div><!--//product_section-->
<div class="product_section"> <div class="list"> <!--<h3>거래원장을 확인하세요.</h3> --> <table class="product p_line"> <caption class="screen_out">주문하기</caption> <colgroup> <col class="bw2"> <col class="bw2"> <col class="bw1"> <col class="bw1"> <col class="bw1"> <col class="bw1"> <col class="bw1"> </colgroup> <thead> <tr> <th>일자</th> <th colspan=2>상품명</th> <th>규격</th> <th>수량</th> <th>단가</th> </tr> <tr> <th>공급가액</th> <th>부가세</th> <th>할인</th> <th>합계액</th> <th>입금액</th> <th>잔액</th> </tr> </thead> <tbody> <?php //내역 $result = mysql_query($total_sql,$connect_j3) or die (mysql_error()); $nTotalCount = mysql_num_rows($result); $nPage = ceil($nTotalCount / $cm_nCount); if ($pg == "") $pg = 1; $nFrom = ($pg - 1) * $cm_nCount;
// $sql = $total_sql . " limit $nFrom, $cm_nCount "; $sql = $total_sql . " "; $result = mysql_query($sql,$connect_j3) or die (mysql_error());
if( mysql_num_rows($result) > 0 ){
$dTotalMoney = $oldsum;
$oldcode = ""; while ($Row = mysql_fetch_array($result)){ //$Row = array_utf8($Row);
//_pr($Row); $proResult = $Row['pname'];
//입금 문자 처리 & 배경색 $receive_bigo = ""; $td_attr = ""; $td_hidden = ""; if(! $Row['mamount'] == "" && $Row['code']!='sumday') { $proResult = "<font color='#ff0000'>[입금]"; $bg = "#ffffff"; $tdclass = "red"; $lite = "#efefef";
if($optreceivebigo=='1'){ // 입금 비고시 해당 비고값 가져와서 처리 $sql = "select * from receive where nidx = '{$Row['code']}' "; $res = mysql_query($sql,$connect_j3) or die (mysql_error()); $receive_info = mysql_fetch_array($res); if($receive_info['bigo']!=''){ $receive_bigo = " 비고:".$receive_info['bigo']; $td_attr = "colspan=3 style='text-align:left;'"; $td_hidden = "style='display:none;'"; } } $class = "deposit";
} else if($Row['code'] == "sumday") { $proResult = "<font color='#000000'><b>[일계]</b>"; $class = "daily"; $bg = "#c6ddf0"; $tdclass = "total-bgcolor"; $lite = "#000000"; } else { $class = ""; $bg = "#ffffff"; $tdclass = ""; $lite = "#efefef"; }
//잔액 소계 if( $Row['code'] == "sumday"){ } else { //잔액 = 전기이월 + 합계액 - 입금액 $dTotalMoney = $dTotalMoney + $Row['total'] - $Row['mamount'] ; if (! $Row[0] == "0"){ $dTotalMoney = $dTotalMoney - $Row['dc']; } $i++; } //입금액 if($Row['code']!='sumday'){ $dPrice = $dPrice + $Row['mamount']; }
//세일금액 변수 if ($Row[0] == "1"){ $buyday = $Row['dealdate']; $buyprice = $buyprice + $Row['dc']; $i++; }
if ($Row[0] == "2"){ $sumbuyday = $Row['dealdate']; $sumbuyprice = $Row['dc']; }
if( $Row['code'] == "sumday"){ $totalday = $Row['dealte']; $totalprice = $totalprice+$Row['dc']; $i++; }
if ( $Row[0] == "2"){ $dcdate = $Row['dealdate']; } if ( $Row[0] == "1" and $dcdate = $Row['dealdate']){ $sumdc = $sumdc + $Row['dc']; $sumdate = $Row['dealdate']; $i++; } if($oldcode=='sumday' && $Row['code']=='sumday'){ continue; }
if($oldcode!=$Row['code']){ $oldcode = $Row['code']; } ?> <tr class='<?php echo $class;?>'> <td><?php echo $Row['dealdate'];?></td> <td colspan=2><?php echo $proResult;?></td> <td><?php echo $Row['pnorm'];?><?php echo $receive_bigo; // 입금비고 표시?> </td> <td><?php if (!$Row['qnt'] =="0"){ echo number_format($Row['qnt'],$amountpoint);} ?></td> <td class="black cost"> <?php if($optmhide != "1"){ ?> <?php if ( ($Row['code'] == "sumday") or (! $Row['mamount'] == "")){ } else {echo number_format($Row['price'],$unitpoint);} ?> <?php } ?> </td> </tr> <tr class='<?php echo $class;?>'> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php if (!$Row['amount'] =="0"){ echo number_format($Row['amount'],$pricepoint);} ?> <?php } ?> </td> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php if (!$Row['tax'] =="0"){ echo number_format($Row['tax'],$pricepoint);}?> <?php } ?> </td> <td class="blue cost"> <?php if($optmhide != "1"){ ?> <?php if ( $Row[0] == "0" or $Row[0] == "1") { echo number_format($Row['dc'],$pricepoint); } elseif ($Row[0] == "2") { if ( $Row['dealdate'] == $dcdate and $Row[0] == "2"){ $totaldc = $sumdc +$Row['dc']; echo number_format($totaldc,$pricepoint); $sumdc = 0 ; } } ?> <?php } ?> </td> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php if (!$Row['qnt'] =="0"){ echo number_format($Row['total'],$pricepoint);} ?> <?php } ?> </td> <td class="red cost"> <?php if ($Row['code'] == "sumday") { echo number_format($dPrice,$pricepoint); $dPrice = "0"; } if (!$Row['mamount'] =="0" && $Row['code'] != "sumday") { echo number_format($Row['mamount'],$pricepoint); } ?> </td> <td class="blue cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($dTotalMoney,$pricepoint); ?> <?php } ?> </td> </tr> <?php } } ?> </tbody> <?php
$sum_sql = "select 0, sum(sd.price) as price, sum(sd.qty) as qnt, sum(sd.sup_amt) as amount, sum(sd.vat) as tax, sum(sd.dc), sum(sd.tot_amt) as total, '' AS mamount from sale_m as sm left join sale_d as sd on sm.midx = sd.midx where sm.dealdate BETWEEN '{$txtdate}' AND '{$txtdate2}' AND ocode = '{$sacode}' AND ccode = '{$cuscode}' UNION ALL SELECT 1, '' AS price, '' AS qnt, '' AS amount, '' AS tax, sum(dc), '' AS total, sum(amount+usepoint) AS mamount FROM receive AS s WHERE s.dealdate BETWEEN '{$txtdate}' AND '{$txtdate2}' AND ocode = '{$sacode}' AND ccode = '{$cuscode}' "; //_pr($sum_sql); $sumsql = $sum_sql . " "; $resultsum = mysql_query($sumsql,$connect_j3) or die (mysql_error()); if( mysql_num_rows($resultsum) > 0 ){ while ($Rowsum = mysql_fetch_array($resultsum)){ $Tsum = $Tsum+$Rowsum['qnt']; $Tprice = $Tprice+$Rowsum['price']; $Tamount = $Tamount+$Rowsum['amount']; $Ttax = $Ttax+$Rowsum['tax']; $Tdc = $Tdc+$Rowsum['dc']; $Ttotal = $Ttotal+$Rowsum['total']; $T2amount = $T2amount + $Rowsum['mamount'];
$i++; } }
?> <tfoot> <tr class="deposit_b"> <td colspan="4"><strong>[검색기간합계]</strong></td> <td><?php echo number_format($Tsum,$amountpoint);?></td> <td></td> </tr> <tr> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($Tamount,$unitpoint);?> <?php } ?> </td> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($Ttax,$pricepoint);?> <?php } ?> </td> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($Tdc,$pricepoint);?> <?php } ?> </td> <td class="cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($Ttotal,$pricepoint);?> <?php } ?> </td> <td class="red cost"> <?php echo number_format($T2amount,$pricepoint);?> </td> <td class="blue cost"> <?php if($optmhide != "1"){ ?> <?php echo number_format($dTotalMoney,$pricepoint); ?> <?php } ?> </td> </tr> </tfoot> </table> </div><!--//list--> </div><!--//product_section--> <script> $(function(){ $( "#txtdate" ).datepicker({ dateFormat: "yy-mm-dd", changeMonth: true, changeYear: true, monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], dayNames: ['일','월','화','수','목','금','토'], dayNamesShort: ['일','월','화','수','목','금','토'], dayNamesMin: ['일','월','화','수','목','금','토'], showMonthAfterYear: true, yearSuffix: '년' });
$( "#txtdate2" ).datepicker({ dateFormat: "yy-mm-dd", changeMonth: true, changeYear: true, monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], dayNames: ['일','월','화','수','목','금','토'], dayNamesShort: ['일','월','화','수','목','금','토'], dayNamesMin: ['일','월','화','수','목','금','토'], showMonthAfterYear: true, yearSuffix: '년' });
$("#set_date").change(function(){ day_val = $(this).val(); rtn_val1 = "txtdate"; rtn_val2 = "txtdate2"; form_data = "val1="+day_val+"&rtn1="+rtn_val1+"&rtn2="+rtn_val2; $.ajax({type:"post", url:"<?php echo $j3_url;?>/shop/ajax_datediff.php?",data:form_data, dataType : "xml", success:function(xml){ $("#"+$(xml).find('rtn1').text()).val($(xml).find('vdate1').text()); $("#"+$(xml).find('rtn2').text()).val($(xml).find('vdate2').text()); }, error:function(rtn,status,error){
} }); }); });
function Search(){ $("form[name='searchFrm']").submit(); } </script>
|