/home/mjc1/public_html/html/millennium/newetaxPrint_pw.php


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
<?php include_once("./_common2.php"); ?>
<?
    
include "../../manage/category/etaxcommon_pw.php";

    if(
$Code !== "" ){

        
$Qry      =  "select * from tn_eaaa WHERE EMAIL_LINK = '$Code' ";
        
$Result   =   mysql_query($Qry);

    if( 
mysql_num_rows($Result) > 0){
        
$billpublishRow    =   mysql_fetch_array($Result);

    
// ÀüÀÚ¼¼±Ý°è»ê¼­ ÀÎÁõ¹øÈ£
    
$appvno $billpublishRow[ETAXBIL_APPV_NO];
    }


                                            
$queryTax 
            
                    
" SELECT s.ETAXBIL_APPV_NO, s.BUSN_KND_CD, decode(s.BUSNID,'12345678') AS BUSNID, s.SUB_BD_NO, s.MAIN_TX_OFFCR_NM, s.MAIN_TX_OFFCR_TELNO, s.MAIN_TX_OFFCR_EMAIL_ADDR, s.BUSNSECT_NM, s.DETAIL_NM, decode(s.CHIEF_NM,'12345678') AS CHIEF_NM, decode(s.TRADE_NM,'12345678') AS TRADE_NM, s.ADDR, 
                    d.ETAXBIL_APPV_NO, decode(d.SUP_AMT_SM,'12345678') AS SUP_AMT_SM, decode(d.TX_SM,'12345678') AS TX_SM, decode(d.TOT_AMT,'12345678') AS TOT_AMT, d.ETAXBIL_NOTE, d.RCPT_RQEST_TP_CD, d.WRITE_DT, d.EMAIL_CHECK, d.SND_STATUS_CD, d.ETAXBIL_CL_CD,d.ETAXBIL_KND_CD,
                    f.ETAXBIL_APPV_NO, f.THNG_SEQNO, f.THNG_PURCHS_DT,  f.THNG_NM, f.THNG_STNDRD_NM, f.THNG_QTY, f.THNG_UNTPC, decode(f.THNG_SUP_AMT,'12345678') AS THNG_SUP_AMT, decode(f.THNG_TX,'12345678') AS THNG_TX, f.THNG_NOTE
                    FROM
                    ((tn_eaab AS s LEFT JOIN tn_eaaa AS d ON s.ETAXBIL_APPV_NO = d.ETAXBIL_APPV_NO) LEFT JOIN 
                    tn_eaac AS f ON d.ETAXBIL_APPV_NO = f.ETAXBIL_APPV_NO)
                    WHERE s.ETAXBIL_APPV_NO = '
$appvno'";

                                            
$resultTax mysql_query($queryTax);
                                            if( 
mysql_num_rows($resultTax) > ){

                                                while (
$rowTax mysql_fetch_array($resultTax)){
        
$useStamp  1;

        
$idx $rowTax[ETAXBIL_APPV_NO];



                                                
$Volume         $rowTax[ETAXBIL_APPV_NO];    //½ÂÀιøÈ£
                                                
$SerialNum      ;    //ÀϷùøÈ£
                                                
$taxtype        $rowTax[ETAXBIL_CL_CD];    //

                                                
if($rowTax[BUSN_KND_CD] == "01"){
                                                    if(
strlen($rowTax[BUSNID]) == 10){
                                                        
$sCompanyNum    substr($rowTax[BUSNID], 03)."-".substr($rowTax[BUSNID], 32)."-".substr($rowTax[BUSNID], 55);            //»ç¾÷ÀÚ¹øÈ£
                                                    
} else {
                                                        
$sCompanyNum    $rowTax[BUSNID];            //»ç¾÷ÀÚ¹øÈ£
                                                    
}
                                                
$sCompanySubNum $rowTax[SUB_BD_NO];        //Á¾»ç¾÷Àå¹øÈ£
                                                
$sCompanyNumimg1 $rowTax[BUSNID]; //µµÀå À̹ÌÁö 142-02-31214.gif
                                                //»ç¾÷ÀÚ¹øÈ£ º¯È¯
                                                
$sCompanyNumimg2=substr($sCompanyNumimg1 03) ."-"substr($sCompanyNumimg1 32) ."-"substr($sCompanyNumimg1 55);
                                                
$sCompanyNumimg=$sCompanyNumimg2.".gif";
                                                
$sCompanyNname  $rowTax[TRADE_NM];    //»óÈ£
                                                
$sChiefName     $rowTax[CHIEF_NM];        //¼º¸í
                                                
$sCompanyAddr   $rowTax[ADDR];    //ÁÖ¼Ò
                                                
$sUptae         $rowTax[BUSNSECT_NM];            //¾÷ÅÂ
                                                
$sJongmok       $rowTax[DETAIL_NM];        //Á¾¸ñ
                                                
}

                                                if(
$rowTax[BUSN_KND_CD] == "02"){
                                                    if(
strlen($rowTax[BUSNID]) == 10){
                                                        
$rCompanyNum    substr($rowTax[BUSNID], 03)."-".substr($rowTax[BUSNID], 32)."-".substr($rowTax[BUSNID], 55);            //»ç¾÷ÀÚ¹øÈ£
                                                    
} else {
                                                        
$rCompanyNum    $rowTax[BUSNID];            //»ç¾÷ÀÚ¹øÈ£
                                                    
}
                                                
$rCompanySubNum $rowTax[SUB_BD_NO];        //Á¾»ç¾÷Àå¹øÈ£
                                                
$rCompanyNname  $rowTax[TRADE_NM];    //»óÈ£
                                                
$rChiefName     $rowTax[CHIEF_NM];        //¼º¸í
                                                
$rCompanyAddr   $rowTax[ADDR];    //ÁÖ¼Ò
                                                
$rUptae         $rowTax[BUSNSECT_NM];            //¾÷ÅÂ
                                                
$rJongmok       $rowTax[DETAIL_NM];        //Á¾¸ñ
                                                
}

                                                
$blankNum       11 strlen($rowTax[SUP_AMT_SM]);                //°ø¶õ¼ö

                                                
$sumNum       strlen($rowTax[SUP_AMT_SM]);            //°ø±Þ°¡¾×ÀÚ¸®¼ö

                                                
if($sumNum "0"){
                                                
$offerPrice1    substr($rowTax[SUP_AMT_SM],-1,1);}
                                                if(
$sumNum "1"){
                                                
$offerPrice2    substr($rowTax[SUP_AMT_SM],-2,1);}
                                                if(
$sumNum "2"){
                                                
$offerPrice3    substr($rowTax[SUP_AMT_SM],-3,1);}
                                                if(
$sumNum "3"){
                                                
$offerPrice4    substr($rowTax[SUP_AMT_SM],-4,1);}
                                                if(
$sumNum "4"){
                                                
$offerPrice5    substr($rowTax[SUP_AMT_SM],-5,1);}
                                                if(
$sumNum "5"){
                                                
$offerPrice6    substr($rowTax[SUP_AMT_SM],-6,1);}
                                                if(
$sumNum "6"){
                                                
$offerPrice7    substr($rowTax[SUP_AMT_SM],-7,1);}
                                                if(
$sumNum "7"){
                                                
$offerPrice8    substr($rowTax[SUP_AMT_SM],-8,1);}
                                                if(
$sumNum "8"){
                                                
$offerPrice9    substr($rowTax[SUP_AMT_SM],-9,1);}
                                                if(
$sumNum "9"){
                                                
$offerPrice10    substr($rowTax[SUP_AMT_SM],-10,1);}
                                                if(
$sumNum "10"){
                                                
$offerPrice11    substr($rowTax[SUP_AMT_SM],-11,1);}


                                                
$billnum      strlen($rowTax[TX_SM]);                //¼¼¾×ÀÚ¸®¼ö

                                                
if($billnum "0"){
                                                
$billprice1        substr($rowTax[TX_SM],-1,1);}
                                                if(
$billnum "1"){
                                                
$billprice2        substr($rowTax[TX_SM],-2,1);}
                                                if(
$billnum "2"){
                                                
$billprice3        substr($rowTax[TX_SM],-3,1);}
                                                if(
$billnum "3"){
                                                
$billprice4        substr($rowTax[TX_SM],-4,1);}
                                                if(
$billnum "4"){
                                                
$billprice5        substr($rowTax[TX_SM],-5,1);}
                                                if(
$billnum "5"){
                                                
$billprice6        substr($rowTax[TX_SM],-6,1);}
                                                if(
$billnum "6"){
                                                
$billprice7        substr($rowTax[TX_SM],-7,1);}
                                                if(
$billnum "7"){
                                                
$billprice8        substr($rowTax[TX_SM],-8,1);}
                                                if(
$billnum "8"){
                                                
$billprice9        substr($rowTax[TX_SM],-9,1);}
                                                if(
$billnum "9"){
                                                
$billprice0        substr($rowTax[TX_SM],-10,1);}

                                                
$bigo            $rowTax[ETAXBIL_NOTE];    //ÃÑ ºñ°í


                                                
$year           substr($rowTax[WRITE_DT],0,4);    //³â
                                                
$month          substr($rowTax[WRITE_DT],4,2);    //¿ù
                                                
$day            substr($rowTax[WRITE_DT],6,2);    //ÀÏ
                                                


                                                
if($rowTax[THNG_SEQNO] == 1){

                                                
$month_1        substr($rowTax[THNG_PURCHS_DT],4,2);
                                                
$day_1          substr($rowTax[THNG_PURCHS_DT],6,2);
                                                
$item_1         $rowTax[THNG_NM];
                                                
$standard_1     $rowTax[THNG_STNDRD_NM];
                                                
$cnt_1          number_format($rowTax[THNG_QTY]);
                                                
$unitPrice_1    number_format($rowTax[THNG_UNTPC]);
                                                
$offerPrice_1   number_format($rowTax[THNG_SUP_AMT]);
                                                
$billPrice_1    number_format($rowTax[THNG_TX]);
                                                
$note_1            number_format($rowTax[THNG_NOTE]);
                                                }


                            

                                                if(
$rowTax[THNG_SEQNO] == 2)
                                                {
                                                    
$month_2        substr($rowTax[THNG_PURCHS_DT],4,2);
                                                    
$day_2          substr($rowTax[THNG_PURCHS_DT],6,2);
                                                    
$item_2         $rowTax[THNG_NM];
                                                    
$standard_2     $rowTax[THNG_STNDRD_NM];
                                                    
$cnt_2          number_format($rowTax[THNG_QTY]);
                                                    
$unitPrice_2    number_format($rowTax[THNG_UNTPC]);
                                                    
$offerPrice_2   number_format($rowTax[THNG_SUP_AMT]);
                                                    
$billPrice_2    number_format($rowTax[THNG_TX]);
                                                    
$note_2            number_format($rowTax[THNG_NOTE]);
                                                }

                                                if(
$rowTax[THNG_SEQNO] == 3)
                                                {
                                                    
$month_3        substr($rowTax[THNG_PURCHS_DT],4,2);
                                                    
$day_3          substr($rowTax[THNG_PURCHS_DT],6,2);
                                                    
$item_3         $rowTax[THNG_NM];
                                                    
$standard_3     $rowTax[THNG_STNDRD_NM];
                                                    
$cnt_3          number_format($rowTax[THNG_QTY]);
                                                    
$unitPrice_3    number_format($rowTax[THNG_UNTPC]);
                                                    
$offerPrice_3   number_format($rowTax[THNG_SUP_AMT]);
                                                    
$billPrice_3    number_format($rowTax[THNG_TX]);
                                                    
$note_3            number_format($rowTax[THNG_NOTE]);
                                                }
                                                    
                                                    
                                                if(
$rowTax[THNG_SEQNO] == 4)
                                                {
                                                    
$month_4        substr($rowTax[THNG_PURCHS_DT],4,2);
                                                    
$day_4          substr($rowTax[THNG_PURCHS_DT],6,2);
                                                    
$item_4         $rowTax[THNG_NM];
                                                    
$standard_4     $rowTax[THNG_STNDRD_NM];
                                                    
$cnt_4          number_format($rowTax[THNG_QTY]);
                                                    
$unitPrice_4    number_format($rowTax[THNG_UNTPC]);
                                                    
$offerPrice_4   number_format($rowTax[THNG_SUP_AMT]);
                                                    
$billPrice_4    number_format($rowTax[THNG_TX]);
                                                    
$note_4            number_format($rowTax[THNG_NOTE]);
                                                }




                                                


                                                
$totalPrice     number_format($rowTax[TOT_AMT]);    //ÇÕ°è±Ý¾×
                                                
$cash           number_format($rowTax[cash]);            //Çö±Ý
                                                
$checkPrice     number_format($rowTax[checkPrice]);    //¼öÇ¥
                                                
$bill           number_format($rowTax[bill]);            //¾îÀ½
                                                
$onCredit       number_format($rowTax[onCredit]);        //¿Ü»ó¹Ì¼ö±Ý

                        

                                                
if ($rowTax[RCPT_RQEST_TP_CD] == "01") {
                                                    
$irecved "¿µ¼ö";
                                                } else if (
$rowTax[RCPT_RQEST_TP_CD] == "02"){
                                                    
$irecved "û±¸";
                                                }



                                                }}

?>
<html>
<?        //01:ÀϹÝ, 02:¼öÁ¤ÀϹݠ03:¸é¼¼¹ßÇà, 04:¼öÁ¤¸é¼¼)

    
if($taxtype == "01"){
?>
<title>[ÀüÀÚ°è»ê¼­]</title>
<?
    
} else if($taxtype == "03"){
?>
<title>[¸é¼¼°è»ê¼­]</title>
<?
    
}
?>
<META http-equiv=Content-Type content="text/html; charset=euc-kr">
<style>
.title { font-family:µ¸¿ò,Verdana; color:#000000; font-size:9pt; text-decoration:none; line-height:17px;}
.tit01 { font-family:µ¸¿ò,Verdana; color:#333333; font-size:12pt; text-decoration:none; line-height:17px;}
.txt02{ font-family:±¼¸²,Verdana; color:#333333; font-size:9pt; text-decoration:none; line-height:17px; font-weight:bold;letter-spacing:3px;}
.txt04 { font-family:±¼¸²,Verdana; color:#333333; font-size:9pt; text-decoration:none; line-height:17px; padding-left:20px;}
.log { BORDER-RIGHT: #CECFCE 1px solid; BORDER-TOP: #CECFCE 1px solid; PADDING-LEFT: 3px; FONT-SIZE: 12px; BORDER-LEFT: #CECFCE 1px solid; COLOR: #444a45; PADDING-TOP: 3px; BORDER-BOTTOM: #CECFCE 1px solid; FONT-FAMILY: ""; LETTER-SPACING: 0px; BACKGROUND-COLOR: #ffffff }
.noline {border-style:none; PADDING-top: 2px;}
</style>
<script>
function billPrint(){
    
    output.innerHTML = "";
    window.print();
    /*
    with (factory.printing) {
    header = '';
    footer = '';
    portrait = true; // true ¼¼·ÎÃâ·Â , false °¡·ÎÃâ·Â
    leftMargin = 0;
    rightMargin = 0;
    topMargin = 0;
    bottomMargin = 0;
    //Print(true, window) // Ã¹¹øÂ° ÀÎÀÚ : ´ëÈ­»óÀÚÇ¥½Ã¿©ºÎ , µÎ¹øÂ°ÀÎÀÚ : Ãâ·ÂµÉ ÇÁ·¹ÀÓ
    Preview();
    }*/

}
</script>
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<!--Object id='factory' viewastext style='display:none' classid='clsid:1663ed61-23eb-11d2-b92f-008048fdd814' codebase='http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,1,432,1'>
</Object-->
<div align="center">
<? //include "../html/inc.tax.php"; ?>
                                    <?        //01:ÀϹÝ, 02:¼öÁ¤ÀϹݠ03:¸é¼¼¹ßÇà, 04:¼öÁ¤¸é¼¼)

                                        
if($taxtype == "01"){
                                            include(
"new.tax.php");
                                        } else if(
$taxtype == "03"){
                                            include(
"new.03tax.php");
                                        }
                                        
                                    
?>
</div>

<table align='center' valign="top" width="600" border="0" cellpadding="0" cellspacing="0" class="title">
    <tr align="center" bgcolor="#FFFFFF">
      <td align=left>&nbsp;&nbsp;¿¥Á¦À̼ÒÇÁÆ®</td>
        <td align=right>ÀüÀÚ°è»ê¼­ µµÀÔ¹®ÀÇ : 1566-8680&nbsp;&nbsp;</td>
    </tr>
</table>
<table align='center' width="600" border="0" cellpadding="2" cellspacing="1" bgcolor="#D2D2D2" class="title">
    <tr align="center" bgcolor="#FFFFFF">
        <td align=center>º» ¼¼±Ý°è»ê¼­´Â ºÎ°¡¼¼¹ý¿¡ ÀǰÅ, ÀüÀÚÀÎÁõ ¼­¸íÀ¸·Î ¹ßÇàµÇ¾î Àΰ¨ÀÌ ¾ø¾îµµ ¹ýÀû È¿·ÂÀ» °®½À´Ï´Ù.</td>
    </tr>
</table>
<br>
<!--<div id="Layer2" style="position:absolute; left:50px; top:15px; z-index:1"><img src="../manage/billprint.gif"></div>-->
<div id='output'>
<table width='600' border='0' cellpadding='15' align=center cellspacing='5' bgcolor='f3f3f3' class="title">
    <tr>
        <td align="center" valign="top" bgcolor="FFFFFF" class="title">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="title">
                <tr>
                    <td height="25">
                        <img src="./img/product/p_dot.jpg" width="3" height="3" hspace="10" align="absmiddle"><strong>
                        <font color=red>¼¼±Ý°è»ê¼­ Ãâ·Â½Ã Ç¥(¼±)°¡ ÀμâµÇÁö ¾ÊÀ» °æ¿ì ¾Æ·¡¿Í °°ÀÌ ¼³Á¤Çϼ¼¿ä.</font>
                        </strong>
                    </td>
                </tr>
                <tr>
                    <td height="25">
                        <img src="./img/product/p_dot.jpg" width="3" height="3" hspace="10" align="absmiddle">
                        <FONT COLOR="#0066FF">µµ±¸ ¡æ ÀÎÅͳݿɼǠ¡æ °í±Þ ¡æ ¹è°æ»ö ¹× À̹ÌÁöÀμâ(üũ)</FONT>
                    </td>
                </tr>
                <tr>
                    <tr>
                    <td height="25">
                            <img src="./img/product/p_dot.jpg" width="3" height="3" hspace="10" align="absmiddle"> ¼¼±Ý°è»ê¼­°ü·Ã
                            ºÒÆí½Å°í : TEL 1566-8680
                        </td>
                    </tr>
                </table>
                <table align="center">
                    <tr>
                        <td align="center" height="30" class="txt03"><a href='javascript:billPrint();'><font color="#000000">ÀμâÇϱâ</a></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
</body>
</html>
<script>
//var g_objpos = document.getElementById("dv_pos");
function getX(obj) {
    x = 0;
    while(obj.offsetParent) {
        alert( "OffsetParent of " + obj.tagName + " is " + obj.offsetParent.tagName );
        
        
        // distance from left of obj to the left of parent
        alert( "Distance form left of " + obj.tagName + " to " + obj.offsetParent.tagName + "'s right side of left border is " + obj.offsetLeft );
        x += obj.offsetLeft;
        
        
        alert( "Border thick of " + obj.tagName + "'s parent - " + obj.offsetParent.tagName + " is " + obj.offsetParent.clientLeft );
        x += obj.offsetParent.clientLeft;
        
        
        alert( "x=" + x );
        obj = obj.offsetParent;
    }
    alert( "x=" + x );
    
    return x;
}
function move_box(an, box) {
    //¸µÅ©µÈ À§Ä¡¿¡¼­ ºÎÅÍÀÇ ¼³Á¤°ª ÁöÁ¤
    var cleft = -8;  //¿ÞÂʸ¶Áø
    //var cleft = 20;  //¿ÞÂʸ¶Áø
    var ctop = -60;  //»ó´Ü¸¶Áø
    //var ctop = -10;  //»ó´Ü¸¶Áø
    var obj = an;
    while (obj.offsetParent) {
        cleft += obj.offsetLeft;
        ctop += obj.offsetTop;
        obj = obj.offsetParent;
    }
    box.style.left = cleft + 'px';
    ctop += an.offsetHeight;
    //ctop += an.offsetHeight + 8;
    if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
        ctop += parseInt(
        document.body.currentStyle['marginTop']);
    }
    box.style.top = ctop + 'px';
}
</script>
<?
    
}
?>
<!---------Å×ÀÌºí ³¡------------>