123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>세금계산서Excel입력</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <taxbilllist/>
- </list>
- <custlist/>
- </main>
- <send>
- <list>
- <taxbilllist/>
- </list>
- <condition>
- <instcd/>
- <entrregno/>
- </condition>
- </send>
- <hidden>
- <list>
- <taxbillchecklist/>
- </list>
- <condition>
- <instcd/>
- </condition>
- </hidden>
- <init>
- </init>
- <temp>
- </temp>
- </root>
- </instance>
- <submission id="TRZBC00101" method="urlencoded-post" replace="instance"/>
- <bind id="bind_totamt" ref="/root/hidden/totamt" calculate="(/root/main/orch_one/paytotamt) - (/root/main/orch_one/incmtax) -(/root/main/orch_one/resdntax)"/>
- <bind id="bind_amt" ref="/root/hidden/orchreturn/amt" calculate="sum(/root/main/list/orchlist/paytotamt)"/>
- <bind id="bind_incmtax" ref="/root/hidden/orchreturn/incmtax" calculate="sum(/root/main/list/orchlist/incmtax)"/>
- <bind id="bind_resdntax" ref="/root/hidden/orchreturn/resdntax" calculate="sum(/root/main/list/orchlist/resdntax)"/>
- <submission id="TXRAT00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list" resultref="/root/temp"/>
- <submission id="TRRAC00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/main/custlist"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- misfComboComCdList("Z0007", cmb_instcd, "N");
- model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
-
- model.removenode(grd_taxchecklist.nodeset);
- model.removenode(grd_taxlist.nodeset);
-
- model.refresh();
-
- model.setFocus("ipt_name");
- }
-
-
- function fSave()
- {
- var updtdata = getGridUpdateData(grd_taxlist);
-
- if (updtdata == "")
- {
- return false;
- }
-
- model.copyNode("/root/send/list", "/root/main/list");
-
- submit("TXRAT00102");
-
- grd_taxchecklist.clearStatus();
- grd_taxlist.clearStatus();
-
- }
-
- //========================================================================================
- // 거래처 존재여부 검사
- //========================================================================================
- function CheckExistCust()
- {
- model.removeNodeset(grd_taxchecklist.nodeset);
- model.removeNodeset(grd_taxlist.nodeset);
- grd_taxchecklist.refresh();
- grd_taxlist.refresh();
-
- fInputExcel(grd_taxchecklist);
-
- btn_save.disabled = true;
- btn_check.disabled = false;
-
- var instcd = getUserInfo("dutplceinstcd")
-
- bflag = true; // 모든 자료가 유효해야 true를 return 한다.
-
- model.setValue("/root/send/condition/instcd", cmb_instcd.value);
-
- for(var i = grd_taxchecklist.fixedRows ; i < grd_taxchecklist.rows ; i++)
- {
- //alert(i);
- sValidYN = grd_taxchecklist.valueMatrix(i, grd_taxchecklist.colRef("validyn"));
-
- if(sValidYN == "D") continue;
-
- if(sValidYN != "Y")
- {
- messageBox("유효구분은 모두 Y로 입력해야합니다.", "I000");
- return false;
- }
-
- sEntrregno = grd_taxchecklist.valueMatrix(i, grd_taxchecklist.colRef("entrregno"));
-
- model.setValue("/root/send/condition/entrregno", sEntrregno);
-
- submit("TRRAC00601");
-
- var vEntrregno = model.getValue("/root/main/custlist/entrregno");
- var vCustnm = model.getValue("/root/main/custlist/custnm");
- var vCustPrsd = model.getValue("/root/main/custlist/prsdnm");
- var vCustBizcont = model.getValue("/root/main/custlist/bizcont");
- var vCustItem = model.getValue("/root/main/custlist/item");
- var vCustAddr = model.getValue("/root/main/custlist/supaddr") + " " + model.getValue("/root/main/custlist/infaddr");
-
- if(vEntrregno == "")
- {
- grd_taxchecklist.cellStyle("background-color", i, grd_taxchecklist.colRef("entrregno")) = "#ff6600";
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/validyn", "E");
- bflag = false;
- }
- else
- {
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/custnm", vCustnm);
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/custaddr", vCustAddr);
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/custprsd", vCustPrsd);
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/custbizcond", vCustBizcont);
- model.setValue(grd_taxchecklist.nodeset + "[" + i + "]/custitem", vCustItem);
-
- for(var j = i+1 ; j < grd_taxchecklist.rows ; j++)
- {
- if(sEntrregno == grd_taxchecklist.valueMatrix(j, grd_taxchecklist.colRef("entrregno")))
- {
- grd_taxchecklist.valueMatrix(j, grd_taxchecklist.colRef("validyn")) = "D";
- grd_taxchecklist.rowStyle(j, "data", "background-color") = "#99ccff";
-
- model.setValue(grd_taxchecklist.nodeset + "[" + j + "]/custnm", vCustnm);
- model.setValue(grd_taxchecklist.nodeset + "[" + j + "]/custaddr", vCustAddr);
- model.setValue(grd_taxchecklist.nodeset + "[" + j + "]/custprsd", vCustPrsd);
- model.setValue(grd_taxchecklist.nodeset + "[" + j + "]/custbizcond", vCustBizcont);
- model.setValue(grd_taxchecklist.nodeset + "[" + j + "]/custitem", vCustItem);
- }
- }
-
-
- }
-
- }
- return bflag;
- }
-
- //========================================================================================
- //not null check
- //========================================================================================
- function fDataCheck()
- {
- if(grd_taxlist.fixedRows == grd_taxlist.rows)
- {
- return;
- }
- var bDataValidFlag = true;
- var bflag = true;
- for(var i = grd_taxlist.fixedRows ; i < grd_taxlist.rows ; i++)
- {
- bflag = true;
-
- sGenrdd = grd_taxlist.valueMatrix(i, grd_taxlist.colRef("genrdd"));
- if(!isValidDateTime(sGenrdd, "YYYYMMDD"))
- {
- grd_taxlist.cellStyle("background-color", i, grd_taxlist.colRef("genrdd")) = "#ff0000";
- bflag = false;
- }
- else
- {
- grd_taxlist.cellStyle("background-color", i, grd_taxlist.colRef("genrdd")) = "#ffff00";
- }
-
- if(bflag == false)
- {
- grd_taxlist.valueMatrix(i, grd_taxlist.colRef("validyn")) = "N";
- bDataValidFlag = false;
- }
- else
- {
- grd_taxlist.valueMatrix(i, grd_taxlist.colRef("validyn")) = "Y";
- }
- }
- if(bDataValidFlag == true)
- {
- btn_save.disabled = false;
- btn_check.disabled = true;
- for(var i = grd_taxlist.fixedRows ; i < grd_taxlist.rows ; i++)
- {
- grd_taxlist.rowStatus(i) = 1;
- }
- }
- }
-
- //엑셀 입력
- function fInputExcel(pGrid)
- {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != "")
- {
- pGrid.loadExcel(fileName, 1, true);
- pGrid.deleteRow(1);
-
- for(i = 1; i < pGrid.rows; i++)
- {
- pGrid.rowStatus(i) = 1;
- }
- pGrid.refresh();
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group1" style="left:0px; top:0px; width:1042px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">세금계산서 Excel 입력</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:12px; width:1195px; height:753px; ">
- <line id="line2" class="line_1" style="x1:0px; y1:9px; x2:1195px; y2:9px; "/>
- <datagrid id="grd_taxchecklist" nodeset="/root/hidden/list/taxbillchecklist" caption="계산서구분^구분코드^계산서종류^부가세신고년도^부가세신고기간^신고유형^사업자등록번호^거래처명^주소^대표자^업태^종목^작성일자^공급금액^부가가치세^합계금액^마감여부^고정자산매입구분^매입세액공제여부^비고^사업자발행유형^과세유형^세금계산서발행처^공제받지몫할세액항목^기타공제매입세액항목^내역(면세공급가액)^정산(면세사업확정비율)^정산(기불공제 매입세액)^재계산(경감률)^재계산(중감면세공급가액비율)^유효구분" colwidth="100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100" dataheight="25" ellipsis="true" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:35px; width:1195px; height:240px; ">
- <col ref="taxbillflag"/>
- <col ref="flagcd"/>
- <col ref="taxbillkind"/>
- <col ref="addtaxyy"/>
- <col ref="addtaxpnt"/>
- <col ref="reptkind"/>
- <col ref="entrregno"/>
- <col ref="custnm"/>
- <col ref="custaddr"/>
- <col ref="custprsd"/>
- <col ref="custbizcond"/>
- <col ref="custitem"/>
- <col ref="genrdd"/>
- <col ref="suplamt"/>
- <col ref="valaddtax"/>
- <col ref="amt"/>
- <col ref="closyn"/>
- <col ref="fixasetflag"/>
- <col ref="deduyn"/>
- <col ref="cmt"/>
- <col ref="isskind"/>
- <col ref="taxkind"/>
- <col ref="isscust"/>
- <col ref="nonrcpttax"/>
- <col ref="remintax"/>
- <col ref="exptsuplamt"/>
- <col ref="expttaxrate"/>
- <col ref="bfnontax"/>
- <col ref="lowrate"/>
- <col ref="elvtsubtrrate"/>
- <col ref="validyn"/>
- </datagrid>
- <button id="btn_check" class="btn2_letter2" navindex="-1" style="left:1070px; top:15px; width:42px; height:19px; ">
- <caption>검사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDataCheck();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter7" navindex="-1" style="left:965px; top:15px; width:97px; height:19px; ">
- <caption>Excel 불러오기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(CheckExistCust())
- {
- // alert(grd_taxchecklist.fixedRows);
- // alert(grd_taxchecklist.rows);
- // alert(grd_taxchecklist.valueMatrix(0, grd_taxchecklist.colRef("custnm")));
- for(var i = grd_taxchecklist.fixedRows ; i < grd_taxchecklist.rows ; i++)
- {
- model.makeNode(grd_taxlist.nodeset + "[" + i + "]");
- model.copyNode(grd_taxlist.nodeset + "[" + i + "]", grd_taxchecklist.nodeset + "[" + i + "]");
- model.makeValue(grd_taxlist.nodeset + "[" + i + "]/status", "i");
- model.makeValue(grd_taxlist.nodeset + "[" + i + "]/instcd", cmb_instcd.value);
- }
- }
-
- grd_taxlist.refresh();
-
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" disabled="true" navindex="-1" style="left:1135px; top:14px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fSave();
-
- ]]>
- </script>
- </button>
- <datagrid id="grd_taxlist" nodeset="/root/main/list/taxbilllist" caption="계산서구분^구분코드^계산서종류^부가세신고년도^부가세신고기간^신고유형^사업자등록번호^거래처명^주소^대표자^업태^종목^작성일자^공급금액^부가가치세^합계금액^마감여부^고정자산매입구분^매입세액공제여부^비고^사업자발행유형^과세유형^세금계산서발행처^공제받지몫할세액항목^기타공제매입세액항목^내역(면세공급가액)^정산(면세사업확정비율)^정산(기불공제 매입세액)^재계산(경감률)^재계산(중감면세공급가액비율)^유효구분^상태" colwidth="100,100,100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100" dataheight="25" ellipsis="true" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:281px; width:1195px; height:469px; ">
- <col ref="taxbillflag"/>
- <col ref="flagcd"/>
- <col ref="taxbillkind"/>
- <col ref="addtaxyy"/>
- <col ref="addtaxpnt"/>
- <col ref="reptkind"/>
- <col ref="entrregno"/>
- <col ref="custnm"/>
- <col ref="custaddr"/>
- <col ref="custprsd"/>
- <col ref="custbizcond"/>
- <col ref="custitem"/>
- <col ref="genrdd"/>
- <col ref="suplamt"/>
- <col ref="valaddtax"/>
- <col ref="amt"/>
- <col ref="closyn"/>
- <col ref="fixasetflag"/>
- <col ref="deduyn"/>
- <col ref="cmt"/>
- <col ref="isskind"/>
- <col ref="taxkind"/>
- <col ref="isscust"/>
- <col ref="nonrcpttax"/>
- <col ref="remintax"/>
- <col ref="exptsuplamt"/>
- <col ref="expttaxrate"/>
- <col ref="bfnontax"/>
- <col ref="lowrate"/>
- <col ref="elvtsubtrrate"/>
- <col ref="validyn"/>
- <col ref="status"/>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:276px; x2:1195px; y2:276px; "/>
- <button id="button2" class="btn2_letter9" navindex="-1" style="left:5px; top:15px; width:97px; height:19px; ">
- <caption>Excel 출력(오류분)</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_taxchecklist);
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter9" navindex="-1" style="left:127px; top:15px; width:119px; height:19px; ">
- <caption>Excel 출력(입력분)</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_taxlist);
- ]]>
- </script>
- </button>
- <select1 id="cmb_instcd" ref="/root/hidden/condition/instcd" class="combo_s_essential" disabled="true" navindex="1" appearance="minimal" style="left:340px; top:15px; width:175px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption7" class="search_name" style="left:251px; top:15px; width:86px; height:17px; ">기 관 :</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|