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
|
<?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> /* Sub : 검색 */ .sub-order-area {margin-top:20px;position:relative; } .sub-order-area h3 {margin-bottom:10px; line-height:21px; font-size:21px} .sub-order-area h3 span {float:right; font-size:13px;} .sub-order-area h3 span em {font-weight:600}
.form-search .light-blue-btn {display:inline-block; margin-right:1px; width:50px; height:28px; line-height:28px; text-align:center; color:#FFF; background:#5994cc; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px} .form-search .search_date {margin:0 2px 0 5px; padding-left:5px; width:90px; height:28px; line-height:28px; border:1px solid #E1E1E1;} .form-search .calendar {display:inline-block; width:24px; height:28px; line-height:28px} .form-search .black-btn {display:inline-block; margin-left:5px; width:80px; height:28px; line-height:28px; text-align:center; color:#FFF; font-weight:600; background:#000; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px} .form-search .gray-btn {display:inline-block; margin-left:5px; width:80px; height:28px; line-height:28px; text-align:center; color:#FFF; font-weight:600; background:#777; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px}
.form-search {height:49px; border-top:2px solid #000; border-bottom:1px solid #E1E1E1;} .form-search dt {float:left; width:160px; text-align:center; line-height:49px; font-weight:600; background:#f7f7f7} .form-search dd {float:right; width:780px; line-height:49px}
/* Sub : 테이블 */ .order-sheet-area {margin-top:10px; width:100%; border-top:2px solid #000} .order-sheet {width:100%} .order-sheet th {height:30px; line-height:30px; text-align:center; font-weight:600; border-bottom:1px solid #E1E1E1; background:#f7f7f7} .order-sheet td {height:30px; line-height:30px; text-align:center; border-bottom:1px solid #E1E1E1} .order-sheet td input[type=text] {padding:0 5px; width:170px; height:24px; line-height:24px} .order-sheet td input.long-text {width:810px} .order-sheet .step span {font-weight:600} .order-sheet td.dark-border {border-bottom:1px solid #888} .order-sheet td.total-bgcolor {color:#333; font-weight:600; background:#9ac4eb} .order-sheet td.cost {padding-right:3px; text-align:right} .order-sheet td.linetxt {padding-right:3px; text-align:center} .order-sheet td.beginning-balance {color:#2f6ba9; font-size:14px; font-weight:600; background:#FFC} .order-sheet tfoot th, .order-sheet tfoot td {height:36px; line-height:36px; text-align:center; font-weight:600; border-bottom:1px solid #000; background:#E8E8E8} .order-sheet .class_td_tfoot {height:36px; line-height:36px; text-align:center; font-weight:600; border-bottom:1px solid #000; background:#E8E8E8} .order-sheet .class_td_tfoot td{border-bottom:1px solid #333 !important; } .order-sheet tfoot th {background:#E1E1E1} .order-sheet tfoot td {font-size:15px;} </style> <?php }?> <div class="class_skin_idx_<?php echo $sk_idx;?>"> <h2 class="relative mt10 txt14 align_l">매출원장</h2> <div id="sub-contents-area"> <div class="sub-order-area"> <h3 class="screen_out">매출처원장 검색</h3> <!-- 검색 --> <input type='hidden' readonly id='txtdate_t' name='txtdate_t' size='' value='<?php echo $txtdate;?>'> <input type='hidden' readonly id='txtdate_t2' name='txtdate_t2' size='' value='<?php echo $txtdate2;?>'> <form name='searchFrm' method='get'> <dl class="form-search"> <dt>검색기간</dt> <dd> <a class="light-blue-btn" onclick="setDay('-3 month','txtdate','txtdate2')">3개월</a><a class="light-blue-btn" onclick="setDay('-1 month','txtdate','txtdate2')">1개월</a><a class="light-blue-btn" onclick="setDay('-1 week','txtdate','txtdate2')">1주</a><a class="light-blue-btn" onclick="setDay('0 day','txtdate','txtdate2')">오늘</a><input type='text' readonly id='txtdate' name='txtdate' size='' value='<?php echo $txtdate;?>' class="search_date"> ~ <input type='text' readonly id='txtdate2' name='txtdate2' size='' value='<?php echo $txtdate2;?>' class="search_date" ><a href="#" class="black-btn" id='search_btn_press'>검색</a> <a href="#" class="gray-btn" id='print_btn_press'>인쇄</a><a href="#" class="gray-btn" id='xls_btn_press'>엑셀</a> </dd> </dl> <input type="hidden" name='' value=''> </form> <!-- //검색 --> <?php include($j3_shop_path."/buy_list_inc.php"); ?> </div> </div> </div> <script> $(function(){ $("#print_btn_press").click(function(){ var url = "<?php echo $j3_shop_url;?>/buyprint.php?txtdate="+$("input[name='txtdate_t']").val()+"&txtdate2="+$("input[name='txtdate_t2']").val(); window.open(url,"buyprint","width=960, height=800, scrollbars=yes"); });
$("#xls_btn_press").click(function(){ var url = "<?php echo $j3_shop_url;?>/buylistxls.php?txtdate="+$("input[name='txtdate_t']").val()+"&txtdate2="+$("input[name='txtdate_t2']").val(); location.href=url; });
$("#search_btn_press").click(function(){ $("form[name='searchFrm']").submit(); }); });
// 날짜 변경 함수 function setDay(day_val,rtn_val1,rtn_val2){ 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){
} }); } </script>
|