689 lines
28 KiB
Plaintext
689 lines
28 KiB
Plaintext
<%
|
|
'================================================================================================
|
|
'바로빌 전자세금계산서 연동서비스
|
|
'version : 3.8 (2015-10)
|
|
'
|
|
'바로빌 연동개발지원 사이트
|
|
'http://dev.barobill.co.kr/
|
|
'================================================================================================
|
|
Class BaroService_TI
|
|
|
|
Private BAROSERVICE_URL
|
|
|
|
'------------------------------------------------------------------------------------------------
|
|
' 생성자
|
|
'------------------------------------------------------------------------------------------------
|
|
Private Sub Class_Initialize()
|
|
|
|
'------------------------------------------------------------------------------------------------
|
|
'바로빌 연동서비스 웹서비스 참조(WebService Reference) URL
|
|
'BAROSERVICE_URL = "http://testws.baroservice.com/TI.asmx?WSDL" '테스트베드용
|
|
BAROSERVICE_URL = "http://ws.baroservice.com/TI.asmx?WSDL" '실서비스용
|
|
|
|
End Sub
|
|
|
|
'------------------------------------------------------------------------------------------------
|
|
' 소멸자
|
|
'------------------------------------------------------------------------------------------------
|
|
Private Sub Class_Terminate()
|
|
BAROSERVICE_URL = ""
|
|
End Sub
|
|
|
|
'------------------------------------------------------------------------------------------------
|
|
' 통신
|
|
'------------------------------------------------------------------------------------------------
|
|
|
|
'SOAP 통신 실행
|
|
Private Function BaroService_SOAPCALL(ByVal FunctionName, ByVal SOAPBODY)
|
|
|
|
Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
|
|
xmlHTTP.open "POST", BAROSERVICE_URL, False
|
|
xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
|
|
xmlHTTP.setRequestHeader "SOAPAction", "http://ws.baroservice.com/" & FunctionName
|
|
xmlHTTP.send _
|
|
"<?xml version=""1.0"" encoding=""utf-8""?>" & _
|
|
"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
|
|
" <soap:Body>" & _
|
|
SOAPBODY & _
|
|
" </soap:Body>" & _
|
|
"</soap:Envelope>"
|
|
|
|
If xmlHTTP.status <> 200 Then
|
|
BaroService_SOAPCALL = ""
|
|
Exit Function
|
|
End If
|
|
|
|
BaroService_SOAPCALL = xmlHTTP.responsetext
|
|
|
|
End Function
|
|
|
|
'특수문자 치환
|
|
Private Function ReplaceSpecialString(ByVal Str)
|
|
|
|
If IsNull(Str) Then
|
|
ReplaceSpecialString = ""
|
|
Exit Function
|
|
End If
|
|
Output = Replace(Str,"&","&")
|
|
Output = Replace(Output,"<","<")
|
|
Output = Replace(Output,">",">")
|
|
|
|
ReplaceSpecialString = Output
|
|
|
|
End Function
|
|
|
|
'노드 값 반환
|
|
Private Function GetNodeText(ByVal Node, ByVal Path)
|
|
If Node is nothing Then
|
|
GetNodeText = ""
|
|
Else
|
|
Set CheckNode = Node.selectsinglenode(Path)
|
|
If Not CheckNode Is Nothing Then
|
|
GetNodeText = CheckNode.text
|
|
Else
|
|
GetNodeText = ""
|
|
End If
|
|
End If
|
|
End Function
|
|
|
|
'오류코드 내용 반환
|
|
Public Function GetErrString(ByVal CERTKEY, ByVal ErrCode)
|
|
|
|
If ErrCode = "-9999" Then
|
|
GetErrString = "SOAP통신 오류<br><br>1. 연동서비스 참조URL을 확인하십시오.<br>2. 호출하는 연동함수의 파라메터를 확인하십시오."
|
|
Else
|
|
SOAPBODY = _
|
|
" <GetErrString xmlns=""http://ws.baroservice.com/"">" & _
|
|
" <CERTKEY>" & CERTKEY & "</CERTKEY>" & _
|
|
" <ErrCode>" & ErrCode & "</ErrCode>" & _
|
|
" </GetErrString>"
|
|
Result = BaroService_SOAPCALL("GetErrString",SOAPBODY)
|
|
|
|
If Result <> "" Then
|
|
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
|
|
xmlDoc.Loadxml(Result)
|
|
|
|
GetErrString = xmldoc.selectsinglenode("//GetErrStringResult").text
|
|
Else
|
|
GetErrString = "SOAP통신 오류<br><br>1. 연동서비스 참조URL을 확인하십시오.<br>2. 호출하는 연동함수의 파라메터를 확인하십시오."
|
|
End If
|
|
End If
|
|
|
|
End Function
|
|
|
|
'Ping
|
|
Public Function Ping()
|
|
|
|
SOAPBODY = _
|
|
" <Ping xmlns=""http://ws.baroservice.com/""/>"
|
|
Result = BaroService_SOAPCALL("Ping",SOAPBODY)
|
|
|
|
If Result <> "" Then
|
|
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
|
|
xmlDoc.Loadxml(Result)
|
|
|
|
Ping = Result
|
|
Else
|
|
Ping = "-9999"
|
|
End If
|
|
|
|
End Function
|
|
|
|
'------------------------------------------------------------------------------------------------
|
|
' 전자세금계산서 관련 API
|
|
'------------------------------------------------------------------------------------------------
|
|
'문서정보NK
|
|
Public Function GetTaxInvoiceNK(ByVal CERTKEY, ByVal CorpNum, ByVal NTSConfirmNum)
|
|
|
|
SOAPBODY = _
|
|
" <GetTaxInvoiceNK xmlns=""http://ws.baroservice.com/"">" & _
|
|
" <CERTKEY>" & CERTKEY & "</CERTKEY>" & _
|
|
" <CorpNum>" & ReplaceSpecialString(CorpNum) & "</CorpNum>" & _
|
|
" <NTSConfirmNum>" & ReplaceSpecialString(NTSConfirmNum) & "</NTSConfirmNum>" & _
|
|
" </GetTaxInvoiceNK>"
|
|
Result = BaroService_SOAPCALL("GetTaxInvoiceNK",SOAPBODY)
|
|
|
|
Dim clsTI
|
|
Set clsTI = New TaxInvoice
|
|
|
|
If Result <> "" Then
|
|
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
|
|
xmlDoc.Loadxml(Result)
|
|
|
|
Set NodeList = xmlDoc.selectNodes("//GetTaxInvoiceNKResult")
|
|
If NodeList.length > 0 Then
|
|
|
|
clsTI.InvoiceKey = GetNodeText(NodeList(0),"./InvoiceKey")
|
|
clsTI.InvoiceeASPEmail = GetNodeText(NodeList(0),"./InvoiceeASPEmail")
|
|
clsTI.IssueDirection = GetNodeText(NodeList(0),"./IssueDirection")
|
|
clsTI.TaxInvoiceType = GetNodeText(NodeList(0),"./TaxInvoiceType")
|
|
clsTI.TaxType = GetNodeText(NodeList(0),"./TaxType")
|
|
clsTI.TaxCalcType = GetNodeText(NodeList(0),"./TaxCalcType")
|
|
clsTI.PurposeType = GetNodeText(NodeList(0),"./PurposeType")
|
|
clsTI.ModifyCode = GetNodeText(NodeList(0),"./ModifyCode")
|
|
clsTI.Kwon = GetNodeText(NodeList(0),"./Kwon")
|
|
clsTI.Ho = GetNodeText(NodeList(0),"./Ho")
|
|
clsTI.SerialNum = GetNodeText(NodeList(0),"./SerialNum")
|
|
clsTI.Cash = GetNodeText(NodeList(0),"./Cash")
|
|
clsTI.ChkBill = GetNodeText(NodeList(0),"./ChkBill")
|
|
clsTI.Note = GetNodeText(NodeList(0),"./Note")
|
|
clsTI.Credit = GetNodeText(NodeList(0),"./Credit")
|
|
clsTI.WriteDate = GetNodeText(NodeList(0),"./WriteDate")
|
|
clsTI.AmountTotal = GetNodeText(NodeList(0),"./AmountTotal")
|
|
clsTI.TaxTotal = GetNodeText(NodeList(0),"./TaxTotal")
|
|
clsTI.TotalAmount = GetNodeText(NodeList(0),"./TotalAmount")
|
|
clsTI.Remark1 = GetNodeText(NodeList(0),"./Remark1")
|
|
clsTI.Remark2 = GetNodeText(NodeList(0),"./Remark2")
|
|
clsTI.Remark3 = GetNodeText(NodeList(0),"./Remark3")
|
|
|
|
Set clsTI.InvoicerParty = New InvoiceParty
|
|
Set NodeInvoicerList = xmlDoc.selectNodes("//InvoicerParty")
|
|
clsTI.InvoicerParty.MgtNum = GetNodeText(NodeInvoicerList(0),"./MgtNum")
|
|
clsTI.InvoicerParty.CorpNum = GetNodeText(NodeInvoicerList(0),"./CorpNum")
|
|
clsTI.InvoicerParty.TaxRegID = GetNodeText(NodeInvoicerList(0),"./TaxRegID")
|
|
clsTI.InvoicerParty.CorpName = GetNodeText(NodeInvoicerList(0),"./CorpName")
|
|
clsTI.InvoicerParty.CEOName = GetNodeText(NodeInvoicerList(0),"./CEOName")
|
|
clsTI.InvoicerParty.Addr = GetNodeText(NodeInvoicerList(0),"./Addr")
|
|
clsTI.InvoicerParty.BizClass = GetNodeText(NodeInvoicerList(0),"./BizClass")
|
|
clsTI.InvoicerParty.BizType = GetNodeText(NodeInvoicerList(0),"./BizType")
|
|
clsTI.InvoicerParty.ContactID = GetNodeText(NodeInvoicerList(0),"./ContactID")
|
|
clsTI.InvoicerParty.ContactName = GetNodeText(NodeInvoicerList(0),"./ContactName")
|
|
clsTI.InvoicerParty.TEL = GetNodeText(NodeInvoicerList(0),"./TEL")
|
|
clsTI.InvoicerParty.HP = GetNodeText(NodeInvoicerList(0),"./HP")
|
|
clsTI.InvoicerParty.Email = GetNodeText(NodeInvoicerList(0),"./Email")
|
|
|
|
Set clsTI.InvoiceeParty = New InvoiceParty
|
|
Set NodeInvoiceeList = xmlDoc.selectNodes("//InvoiceeParty")
|
|
clsTI.InvoiceeParty.MgtNum = GetNodeText(NodeInvoiceeList(0),"./MgtNum")
|
|
clsTI.InvoiceeParty.CorpNum = GetNodeText(NodeInvoiceeList(0),"./CorpNum")
|
|
clsTI.InvoiceeParty.TaxRegID = GetNodeText(NodeInvoiceeList(0),"./TaxRegID")
|
|
clsTI.InvoiceeParty.CorpName = GetNodeText(NodeInvoiceeList(0),"./CorpName")
|
|
clsTI.InvoiceeParty.CEOName = GetNodeText(NodeInvoiceeList(0),"./CEOName")
|
|
clsTI.InvoiceeParty.Addr = GetNodeText(NodeInvoiceeList(0),"./Addr")
|
|
clsTI.InvoiceeParty.BizClass = GetNodeText(NodeInvoiceeList(0),"./BizClass")
|
|
clsTI.InvoiceeParty.BizType = GetNodeText(NodeInvoiceeList(0),"./BizType")
|
|
clsTI.InvoiceeParty.ContactID = GetNodeText(NodeInvoiceeList(0),"./ContactID")
|
|
clsTI.InvoiceeParty.ContactName = GetNodeText(NodeInvoiceeList(0),"./ContactName")
|
|
clsTI.InvoiceeParty.TEL = GetNodeText(NodeInvoiceeList(0),"./TEL")
|
|
clsTI.InvoiceeParty.HP = GetNodeText(NodeInvoiceeList(0),"./HP")
|
|
clsTI.InvoiceeParty.Email = GetNodeText(NodeInvoiceeList(0),"./Email")
|
|
|
|
Set clsTI.BrokerParty = New InvoiceParty
|
|
Set NodeBrokerList = xmlDoc.selectNodes("//BrokerParty")
|
|
clsTI.BrokerParty.MgtNum = GetNodeText(NodeBrokerList(0),"./MgtNum")
|
|
clsTI.BrokerParty.CorpNum = GetNodeText(NodeBrokerList(0),"./CorpNum")
|
|
clsTI.BrokerParty.TaxRegID = GetNodeText(NodeBrokerList(0),"./TaxRegID")
|
|
clsTI.BrokerParty.CorpName = GetNodeText(NodeBrokerList(0),"./CorpName")
|
|
clsTI.BrokerParty.CEOName = GetNodeText(NodeBrokerList(0),"./CEOName")
|
|
clsTI.BrokerParty.Addr = GetNodeText(NodeBrokerList(0),"./Addr")
|
|
clsTI.BrokerParty.BizClass = GetNodeText(NodeBrokerList(0),"./BizClass")
|
|
clsTI.BrokerParty.BizType = GetNodeText(NodeBrokerList(0),"./BizType")
|
|
clsTI.BrokerParty.ContactID = GetNodeText(NodeBrokerList(0),"./ContactID")
|
|
clsTI.BrokerParty.ContactName = GetNodeText(NodeBrokerList(0),"./ContactName")
|
|
clsTI.BrokerParty.TEL = GetNodeText(NodeBrokerList(0),"./TEL")
|
|
clsTI.BrokerParty.HP = GetNodeText(NodeBrokerList(0),"./HP")
|
|
clsTI.BrokerParty.Email = GetNodeText(NodeBrokerList(0),"./Email")
|
|
|
|
Set NodeItemList = xmldoc.selectNodes("//TaxInvoiceTradeLineItem")
|
|
If NodeItemList.length > 0 Then
|
|
Dim ItemList(), clsItem
|
|
ReDim ItemList(NodeItemList.length - 1)
|
|
|
|
For i = 0 To NodeItemList.length - 1
|
|
Set clsItem = New TaxInvoiceTradeLineItem
|
|
clsItem.PurchaseExpiry = GetNodeText(NodeItemList(i), "./PurchaseExpiry")
|
|
clsItem.Name = GetNodeText(NodeItemList(i), "./Name")
|
|
clsItem.Information = GetNodeText(NodeItemList(i), "./Information")
|
|
clsItem.ChargeableUnit = GetNodeText(NodeItemList(i), "./ChargeableUnit")
|
|
clsItem.UnitPrice = GetNodeText(NodeItemList(i), "./UnitPrice")
|
|
clsItem.Amount = GetNodeText(NodeItemList(i), "./Amount")
|
|
clsItem.Tax = GetNodeText(NodeItemList(i), "./Tax")
|
|
clsItem.Description = GetNodeText(NodeItemList(i), "./Description")
|
|
|
|
Set ItemList(i) = clsItem
|
|
Next
|
|
clsTI.TaxInvoiceTradeLineItems = ItemList
|
|
Else
|
|
clsTI.TaxInvoiceTradeLineItems = Null
|
|
End If
|
|
|
|
End If
|
|
|
|
Set GetTaxInvoiceNK = clsTI
|
|
Else
|
|
Set GetTaxInvoiceNK = clsTI
|
|
End If
|
|
|
|
End Function
|
|
|
|
'문서 내용보기 팝업 URL (국세청승인번호)
|
|
Public Function GetTaxInvoicePopUpURLNK(ByVal CERTKEY, ByVal CorpNum, ByVal NTSConfirmNum, ByVal UserID, ByVal PWD)
|
|
|
|
SOAPBODY = _
|
|
" <GetTaxInvoicePopUpURLNK xmlns=""http://ws.baroservice.com/"">" & _
|
|
" <CERTKEY>" & CERTKEY & "</CERTKEY>" & _
|
|
" <CorpNum>" & ReplaceSpecialString(CorpNum) & "</CorpNum>" & _
|
|
" <NTSConfirmNum>" & ReplaceSpecialString(NTSConfirmNum) & "</NTSConfirmNum>" & _
|
|
" <ID>" & ReplaceSpecialString(UserID) & "</ID>" & _
|
|
" <PWD>" & ReplaceSpecialString(PWD) & "</PWD>" & _
|
|
" </GetTaxInvoicePopUpURLNK>"
|
|
Result = BaroService_SOAPCALL("GetTaxInvoicePopUpURLNK",SOAPBODY)
|
|
|
|
If Result <> "" Then
|
|
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
|
|
xmlDoc.Loadxml(Result)
|
|
|
|
GetTaxInvoicePopUpURLNK = xmldoc.selectsinglenode("//GetTaxInvoicePopUpURLNKResult").text
|
|
Else
|
|
GetTaxInvoicePopUpURLNK = "-9999"
|
|
End If
|
|
|
|
End Function
|
|
|
|
'월별 국세청 세금계산서 매입 내역 (대표품목 포함)
|
|
Public Function GetMonthlyTaxInvoicePurchaseList(ByVal CERTKEY, ByVal CorpNum, ByVal UserID, ByVal TaxType, ByVal DateType, ByVal BaseMonth, ByVal CountPerPage, ByVal CurrentPage, ByVal OrderDirection)
|
|
|
|
SOAPBODY = _
|
|
" <GetMonthlyTaxInvoicePurchaseList xmlns=""http://ws.baroservice.com/"">" & _
|
|
" <CERTKEY>" & CERTKEY & "</CERTKEY>" & _
|
|
" <CorpNum>" & ReplaceSpecialString(CorpNum) & "</CorpNum>" & _
|
|
" <UserID>" & ReplaceSpecialString(UserID) & "</UserID>" & _
|
|
" <TaxType>" & ReplaceSpecialString(TaxType) & "</TaxType>" & _
|
|
" <DateType>" & ReplaceSpecialString(DateType) & "</DateType>" & _
|
|
" <BaseMonth>" & ReplaceSpecialString(BaseMonth) & "</BaseMonth>" & _
|
|
" <CountPerPage>" & ReplaceSpecialString(CountPerPage) & "</CountPerPage>" & _
|
|
" <CurrentPage>" & ReplaceSpecialString(CurrentPage) & "</CurrentPage>" & _
|
|
" <OrderDirection>" & ReplaceSpecialString(OrderDirection) & "</OrderDirection>" & _
|
|
" </GetMonthlyTaxInvoicePurchaseList>"
|
|
Result = BaroService_SOAPCALL("GetMonthlyTaxInvoicePurchaseList", SOAPBODY)
|
|
|
|
|
|
If (Result <> "") Then
|
|
Set xmlDoc = CreateObject("MSXML2.DOMDocument")
|
|
|
|
xmlDoc.Loadxml (Result)
|
|
|
|
Set SimpleTaxInvoiceExs = xmlDoc.selectNodes("//SimpleTaxInvoiceEx")
|
|
|
|
Dim newPagedTaxInvoiceEx
|
|
|
|
Set newPagedTaxInvoiceEx = New PagedTaxInvoiceEx
|
|
|
|
Set NodeList = xmlDoc.selectsinglenode("//GetMonthlyTaxInvoicePurchaseListResult")
|
|
|
|
newPagedTaxInvoiceEx.CurrentPage = NodeList.selectsinglenode("./CurrentPage").Text
|
|
newPagedTaxInvoiceEx.MaxIndex = NodeList.selectsinglenode("./MaxIndex").Text
|
|
newPagedTaxInvoiceEx.CountPerPage = NodeList.selectsinglenode("./CountPerPage").Text
|
|
newPagedTaxInvoiceEx.MaxPageNum = NodeList.selectsinglenode("./MaxPageNum").Text
|
|
|
|
|
|
Dim SimpleTaxInvoiceExList()
|
|
|
|
If SimpleTaxInvoiceExs.Length > 0 Then
|
|
ReDim SimpleTaxInvoiceExList(SimpleTaxInvoiceExs.Length - 1)
|
|
|
|
Dim newSimpleTaxInvoiceEx
|
|
|
|
For i = 0 To SimpleTaxInvoiceExs.Length - 1
|
|
|
|
Set newSimpleTaxInvoiceEx = New SimpleTaxInvoiceEx
|
|
|
|
newSimpleTaxInvoiceEx.NTSSendKey = SimpleTaxInvoiceExs(i).selectsinglenode("./NTSSendKey").Text
|
|
newSimpleTaxInvoiceEx.NTSSendDT = SimpleTaxInvoiceExs(i).selectsinglenode("./NTSSendDT").Text
|
|
newSimpleTaxInvoiceEx.IssueDT = SimpleTaxInvoiceExs(i).selectsinglenode("./IssueDT").Text
|
|
newSimpleTaxInvoiceEx.WriteDate = SimpleTaxInvoiceExs(i).selectsinglenode("./WriteDate").Text
|
|
newSimpleTaxInvoiceEx.ModifyCode = SimpleTaxInvoiceExs(i).selectsinglenode("./ModifyCode").Text
|
|
newSimpleTaxInvoiceEx.TaxType = SimpleTaxInvoiceExs(i).selectsinglenode("./TaxType").Text
|
|
newSimpleTaxInvoiceEx.PurposeType = SimpleTaxInvoiceExs(i).selectsinglenode("./PurposeType").Text
|
|
|
|
newSimpleTaxInvoiceEx.InvoicerCorpNum = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerCorpNum").Text
|
|
newSimpleTaxInvoiceEx.InvoicerTaxRegID = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerTaxRegID").Text
|
|
newSimpleTaxInvoiceEx.InvoicerCorpName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerCorpName").Text
|
|
newSimpleTaxInvoiceEx.InvoicerCEOName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerCEOName").Text
|
|
newSimpleTaxInvoiceEx.InvoicerAddr = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerAddr").Text
|
|
newSimpleTaxInvoiceEx.InvoicerBizType = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerBizType").Text
|
|
newSimpleTaxInvoiceEx.InvoicerBizClass = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerBizClass").Text
|
|
newSimpleTaxInvoiceEx.InvoicerContactName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerContactName").Text
|
|
newSimpleTaxInvoiceEx.InvoicerEmail = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoicerEmail").Text
|
|
|
|
newSimpleTaxInvoiceEx.InvoiceeCorpNum = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeCorpNum").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeTaxRegID = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeTaxRegID").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeCorpName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeCorpName").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeCEOName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeCEOName").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeAddr = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeAddr").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeBizType = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeBizType").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeBizClass = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeBizClass").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeContactName = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeContactName").Text
|
|
newSimpleTaxInvoiceEx.InvoiceeEmail = SimpleTaxInvoiceExs(i).selectsinglenode("./InvoiceeEmail").Text
|
|
|
|
newSimpleTaxInvoiceEx.BrokerCorpNum = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerCorpNum").Text
|
|
newSimpleTaxInvoiceEx.BrokerTaxRegID = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerTaxRegID").Text
|
|
newSimpleTaxInvoiceEx.BrokerCorpName = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerCorpName").Text
|
|
newSimpleTaxInvoiceEx.BrokerCEOName = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerCEOName").Text
|
|
newSimpleTaxInvoiceEx.BrokerAddr = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerAddr").Text
|
|
newSimpleTaxInvoiceEx.BrokerBizType = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerBizType").Text
|
|
newSimpleTaxInvoiceEx.BrokerBizClass = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerBizClass").Text
|
|
newSimpleTaxInvoiceEx.BrokerContactName = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerContactName").Text
|
|
newSimpleTaxInvoiceEx.BrokerEmail = SimpleTaxInvoiceExs(i).selectsinglenode("./BrokerEmail").Text
|
|
|
|
newSimpleTaxInvoiceEx.AmountTotal = SimpleTaxInvoiceExs(i).selectsinglenode("./AmountTotal").Text
|
|
newSimpleTaxInvoiceEx.TaxTotal = SimpleTaxInvoiceExs(i).selectsinglenode("./TaxTotal").Text
|
|
newSimpleTaxInvoiceEx.TotalAmount = SimpleTaxInvoiceExs(i).selectsinglenode("./TotalAmount").Text
|
|
newSimpleTaxInvoiceEx.Cash = SimpleTaxInvoiceExs(i).selectsinglenode("./Cash").Text
|
|
newSimpleTaxInvoiceEx.ChkBill = SimpleTaxInvoiceExs(i).selectsinglenode("./ChkBill").Text
|
|
newSimpleTaxInvoiceEx.Note = SimpleTaxInvoiceExs(i).selectsinglenode("./Note").Text
|
|
newSimpleTaxInvoiceEx.Credit = SimpleTaxInvoiceExs(i).selectsinglenode("./Credit").Text
|
|
newSimpleTaxInvoiceEx.Remark1 = SimpleTaxInvoiceExs(i).selectsinglenode("./Remark1").Text
|
|
newSimpleTaxInvoiceEx.Remark2 = SimpleTaxInvoiceExs(i).selectsinglenode("./Remark2").Text
|
|
newSimpleTaxInvoiceEx.Remark3 = SimpleTaxInvoiceExs(i).selectsinglenode("./Remark3").Text
|
|
newSimpleTaxInvoiceEx.ItemName = SimpleTaxInvoiceExs(i).selectsinglenode("./ItemName").Text
|
|
|
|
newSimpleTaxInvoiceEx.CorpNum = SimpleTaxInvoiceExs(i).selectsinglenode("./CorpNum").Text
|
|
newSimpleTaxInvoiceEx.TaxRegID = SimpleTaxInvoiceExs(i).selectsinglenode("./TaxRegID").Text
|
|
newSimpleTaxInvoiceEx.CorpName = SimpleTaxInvoiceExs(i).selectsinglenode("./CorpName").Text
|
|
newSimpleTaxInvoiceEx.CEOName = SimpleTaxInvoiceExs(i).selectsinglenode("./CEOName").Text
|
|
|
|
Set SimpleTaxInvoiceExList(i) = newSimpleTaxInvoiceEx
|
|
|
|
Next
|
|
|
|
newPagedTaxInvoiceEx.SimpleTaxInvoiceExList = SimpleTaxInvoiceExList
|
|
Else
|
|
newPagedTaxInvoiceEx.SimpleTaxInvoiceExList = Null
|
|
End If
|
|
|
|
Set GetMonthlyTaxInvoicePurchaseList = newPagedTaxInvoiceEx
|
|
Else
|
|
Set GetMonthlyTaxInvoicePurchaseList = newPagedTaxInvoiceEx
|
|
End If
|
|
|
|
End Function
|
|
|
|
End Class
|
|
|
|
'바로빌 전자세금계산서 클래스
|
|
Class TaxInvoice
|
|
|
|
Public InvoiceKey
|
|
Public InvoicerParty
|
|
Public InvoiceeParty
|
|
Public BrokerParty
|
|
Public InvoiceeASPEmail
|
|
Public IssueDirection
|
|
Public TaxInvoiceType
|
|
Public TaxType
|
|
Public TaxCalcType
|
|
Public PurposeType
|
|
Public ModifyCode
|
|
Public Kwon
|
|
Public Ho
|
|
Public SerialNum
|
|
Public Cash
|
|
Public ChkBill
|
|
Public Note
|
|
Public Credit
|
|
Public WriteDate
|
|
Public AmountTotal
|
|
Public TaxTotal
|
|
Public TotalAmount
|
|
Public Remark1
|
|
Public Remark2
|
|
Public Remark3
|
|
Public TaxInvoiceTradeLineItems
|
|
|
|
Public Function toJson()
|
|
tmpStr = "{"
|
|
tmpStr = tmpStr & """InvoiceKey"":"""& InvoiceKey &""","
|
|
tmpStr = tmpStr & """InvoicerParty"":"& InvoicerParty.toJson() &","
|
|
tmpStr = tmpStr & """InvoiceeParty"":"& InvoiceeParty.toJson() &","
|
|
tmpStr = tmpStr & """BrokerParty"":"& BrokerParty.toJson() &","
|
|
tmpStr = tmpStr & """InvoiceeASPEmail"":"""& InvoiceeASPEmail &""","
|
|
tmpStr = tmpStr & """IssueDirection"":"""& IssueDirection &""","
|
|
tmpStr = tmpStr & """TaxInvoiceType"":"""& TaxInvoiceType &""","
|
|
tmpStr = tmpStr & """TaxType"":"""& TaxType &""","
|
|
tmpStr = tmpStr & """TaxCalcType"":"""& TaxCalcType &""","
|
|
tmpStr = tmpStr & """PurposeType"":"""& PurposeType &""","
|
|
tmpStr = tmpStr & """ModifyCode"":"""& ModifyCode &""","
|
|
tmpStr = tmpStr & """Kwon"":"""& Kwon &""","
|
|
tmpStr = tmpStr & """Ho"":"""& Ho &""","
|
|
tmpStr = tmpStr & """SerialNum"":"""& SerialNum &""","
|
|
tmpStr = tmpStr & """Cash"":"""& Cash &""","
|
|
tmpStr = tmpStr & """ChkBill"":"""& ChkBill &""","
|
|
tmpStr = tmpStr & """Note"":"""& Note &""","
|
|
tmpStr = tmpStr & """Credit"":"""& Credit &""","
|
|
tmpStr = tmpStr & """WriteDate"":"""& WriteDate &""","
|
|
tmpStr = tmpStr & """AmountTotal"":"""& AmountTotal &""","
|
|
tmpStr = tmpStr & """TaxTotal"":"""& TaxTotal &""","
|
|
tmpStr = tmpStr & """TotalAmount"":"""& TotalAmount &""","
|
|
tmpStr = tmpStr & """Remark1"":"""& Remark1 &""","
|
|
tmpStr = tmpStr & """Remark2"":"""& Remark2 &""","
|
|
tmpStr = tmpStr & """Remark3"":"""& Remark3 &""","
|
|
tmpStr = tmpStr & """TaxInvoiceTradeLineItems"":"& arrJson(TaxInvoiceTradeLineItems) &","
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "}"
|
|
toJson = tmpStr
|
|
End Function
|
|
|
|
End Class
|
|
|
|
'바로빌 전자세금계산서 Party 클래스
|
|
Class InvoiceParty
|
|
|
|
Public ContactID
|
|
Public CorpNum
|
|
Public MgtNum
|
|
Public CorpName
|
|
Public TaxRegID
|
|
Public CEOName
|
|
Public Addr
|
|
Public BizClass
|
|
Public BizType
|
|
Public ContactName
|
|
Public TEL
|
|
Public HP
|
|
Public Email
|
|
|
|
Public Function toJson()
|
|
tmpStr = "{"
|
|
tmpStr = tmpStr & """ContactID"":"""& ContactID &""","
|
|
tmpStr = tmpStr & """CorpNum"":"""& CorpNum &""","
|
|
tmpStr = tmpStr & """MgtNum"":"""& MgtNum &""","
|
|
tmpStr = tmpStr & """CorpName"":"""& CorpName &""","
|
|
tmpStr = tmpStr & """TaxRegID"":"""& TaxRegID &""","
|
|
tmpStr = tmpStr & """CEOName"":"""& CEOName &""","
|
|
tmpStr = tmpStr & """Addr"":"""& Addr &""","
|
|
tmpStr = tmpStr & """BizClass"":"""& BizClass &""","
|
|
tmpStr = tmpStr & """BizType"":"""& BizType &""","
|
|
tmpStr = tmpStr & """ContactName"":"""& ContactName &""","
|
|
tmpStr = tmpStr & """TEL"":"""& TEL &""","
|
|
tmpStr = tmpStr & """HP"":"""& HP &""","
|
|
tmpStr = tmpStr & """Email"":"""& Email &""","
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "}"
|
|
toJson = tmpStr
|
|
End Function
|
|
|
|
End Class
|
|
|
|
'바로빌 전자세금계산서 품목 클래스
|
|
Class TaxInvoiceTradeLineItem
|
|
|
|
Public PurchaseExpiry
|
|
Public Name
|
|
Public Information
|
|
Public ChargeableUnit
|
|
Public UnitPrice
|
|
Public Amount
|
|
Public Tax
|
|
Public Description
|
|
|
|
Public Function toJson()
|
|
tmpStr = "{"
|
|
tmpStr = tmpStr & """PurchaseExpiry"":"""& PurchaseExpiry &""","
|
|
tmpStr = tmpStr & """Name"":"""& Name &""","
|
|
tmpStr = tmpStr & """Information"":"""& Information &""","
|
|
tmpStr = tmpStr & """ChargeableUnit"":"""& ChargeableUnit &""","
|
|
tmpStr = tmpStr & """UnitPrice"":"""& UnitPrice &""","
|
|
tmpStr = tmpStr & """Amount"":"""& Amount &""","
|
|
tmpStr = tmpStr & """Tax"":"""& Tax &""","
|
|
tmpStr = tmpStr & """Description"":"""& Description &""","
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "}"
|
|
toJson = tmpStr
|
|
End Function
|
|
|
|
End Class
|
|
|
|
'바로빌 국세청 매출,매입 내역 (대표품목 추가)
|
|
Class PagedTaxInvoiceEx
|
|
|
|
Public CurrentPage
|
|
Public MaxIndex
|
|
Public CountPerPage
|
|
Public MaxPageNum
|
|
Public SimpleTaxInvoiceExList
|
|
|
|
Public Function toJson()
|
|
tmpStr = "{"
|
|
tmpStr = tmpStr & """CurrentPage"":"""& CurrentPage &""","
|
|
tmpStr = tmpStr & """MaxIndex"":"""& MaxIndex &""","
|
|
tmpStr = tmpStr & """CountPerPage"":"""& CountPerPage &""","
|
|
tmpStr = tmpStr & """MaxPageNum"":"""& MaxPageNum &""","
|
|
tmpStr = tmpStr & """SimpleTaxInvoiceExList"":"& arrJson(SimpleTaxInvoiceExList) &","
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "}"
|
|
toJson = tmpStr
|
|
End Function
|
|
|
|
End Class
|
|
|
|
'바로빌 국세청 매출,매입 내역 - 심플 (대표품목 추가)
|
|
Class SimpleTaxInvoiceEx
|
|
|
|
Public NTSSendKey
|
|
Public NTSSendDT
|
|
Public IssueDT
|
|
Public WriteDate
|
|
Public ModifyCode
|
|
Public TaxType
|
|
Public PurposeType
|
|
Public InvoicerCorpNum
|
|
Public InvoicerTaxRegID
|
|
Public InvoicerCorpName
|
|
Public InvoicerCEOName
|
|
Public InvoicerAddr
|
|
Public InvoicerBizType
|
|
Public InvoicerBizClass
|
|
Public InvoicerContactName
|
|
Public InvoicerEmail
|
|
Public InvoiceeCorpNum
|
|
Public InvoiceeTaxRegID
|
|
Public InvoiceeCorpName
|
|
Public InvoiceeCEOName
|
|
Public InvoiceeAddr
|
|
Public InvoiceeBizType
|
|
Public InvoiceeBizClass
|
|
Public InvoiceeContactName
|
|
Public InvoiceeEmail
|
|
Public BrokerCorpNum
|
|
Public BrokerTaxRegID
|
|
Public BrokerCorpName
|
|
Public BrokerCEOName
|
|
Public BrokerAddr
|
|
Public BrokerBizType
|
|
Public BrokerBizClass
|
|
Public BrokerContactName
|
|
Public BrokerEmail
|
|
Public AmountTotal
|
|
Public TaxTotal
|
|
Public TotalAmount
|
|
Public Cash
|
|
Public ChkBill
|
|
Public Note
|
|
Public Credit
|
|
Public Remark1
|
|
Public Remark2
|
|
Public Remark3
|
|
Public ItemName
|
|
Public CorpNum
|
|
Public TaxRegID
|
|
Public CorpName
|
|
Public CEOName
|
|
|
|
Public Function toJson()
|
|
tmpStr = "{"
|
|
tmpStr = tmpStr & """NTSSendKey"":"""& NTSSendKey &""","
|
|
tmpStr = tmpStr & """NTSSendDT"":"""& NTSSendDT &""","
|
|
tmpStr = tmpStr & """IssueDT"":"""& IssueDT &""","
|
|
tmpStr = tmpStr & """WriteDate"":"""& WriteDate &""","
|
|
tmpStr = tmpStr & """ModifyCode"":"""& ModifyCode &""","
|
|
tmpStr = tmpStr & """TaxType"":"""& TaxType &""","
|
|
tmpStr = tmpStr & """PurposeType"":"""& PurposeType &""","
|
|
tmpStr = tmpStr & """InvoicerCorpNum"":"""& InvoicerCorpNum &""","
|
|
tmpStr = tmpStr & """InvoicerTaxRegID"":"""& InvoicerTaxRegID &""","
|
|
tmpStr = tmpStr & """InvoicerCorpName"":"""& InvoicerCorpName &""","
|
|
tmpStr = tmpStr & """InvoicerCEOName"":"""& InvoicerCEOName &""","
|
|
tmpStr = tmpStr & """InvoicerAddr"":"""& InvoicerAddr &""","
|
|
tmpStr = tmpStr & """InvoicerBizType"":"""& InvoicerBizType &""","
|
|
tmpStr = tmpStr & """InvoicerBizClass"":"""& InvoicerBizClass &""","
|
|
tmpStr = tmpStr & """InvoicerContactName"":"""& InvoicerContactName &""","
|
|
tmpStr = tmpStr & """InvoicerEmail"":"""& InvoicerEmail &""","
|
|
tmpStr = tmpStr & """InvoiceeCorpNum"":"""& InvoiceeCorpNum &""","
|
|
tmpStr = tmpStr & """InvoiceeTaxRegID"":"""& InvoiceeTaxRegID &""","
|
|
tmpStr = tmpStr & """InvoiceeCorpName"":"""& InvoiceeCorpName &""","
|
|
tmpStr = tmpStr & """InvoiceeCEOName"":"""& InvoiceeCEOName &""","
|
|
tmpStr = tmpStr & """InvoiceeAddr"":"""& InvoiceeAddr &""","
|
|
tmpStr = tmpStr & """InvoiceeBizType"":"""& InvoiceeBizType &""","
|
|
tmpStr = tmpStr & """InvoiceeBizClass"":"""& InvoiceeBizClass &""","
|
|
tmpStr = tmpStr & """InvoiceeContactName"":"""& InvoiceeContactName &""","
|
|
tmpStr = tmpStr & """InvoiceeEmail"":"""& InvoiceeEmail &""","
|
|
tmpStr = tmpStr & """BrokerCorpNum"":"""& BrokerCorpNum &""","
|
|
tmpStr = tmpStr & """BrokerTaxRegID"":"""& BrokerTaxRegID &""","
|
|
tmpStr = tmpStr & """BrokerCorpName"":"""& BrokerCorpName &""","
|
|
tmpStr = tmpStr & """BrokerCEOName"":"""& BrokerCEOName &""","
|
|
tmpStr = tmpStr & """BrokerAddr"":"""& BrokerAddr &""","
|
|
tmpStr = tmpStr & """BrokerBizType"":"""& BrokerBizType &""","
|
|
tmpStr = tmpStr & """BrokerBizClass"":"""& BrokerBizClass &""","
|
|
tmpStr = tmpStr & """BrokerContactName"":"""& BrokerContactName &""","
|
|
tmpStr = tmpStr & """BrokerEmail"":"""& BrokerEmail &""","
|
|
tmpStr = tmpStr & """AmountTotal"":"""& AmountTotal &""","
|
|
tmpStr = tmpStr & """TaxTotal"":"""& TaxTotal &""","
|
|
tmpStr = tmpStr & """TotalAmount"":"""& TotalAmount &""","
|
|
tmpStr = tmpStr & """Cash"":"""& Cash &""","
|
|
tmpStr = tmpStr & """ChkBill"":"""& ChkBill &""","
|
|
tmpStr = tmpStr & """Note"":"""& Note &""","
|
|
tmpStr = tmpStr & """Credit"":"""& Credit &""","
|
|
tmpStr = tmpStr & """Remark1"":"""& Remark1 &""","
|
|
tmpStr = tmpStr & """Remark2"":"""& Remark2 &""","
|
|
tmpStr = tmpStr & """Remark3"":"""& Remark3 &""","
|
|
tmpStr = tmpStr & """ItemName"":"""& ItemName &""","
|
|
tmpStr = tmpStr & """CorpNum"":"""& CorpNum &""","
|
|
tmpStr = tmpStr & """TaxRegID"":"""& TaxRegID &""","
|
|
tmpStr = tmpStr & """CorpName"":"""& CorpName &""","
|
|
tmpStr = tmpStr & """CEOName"":"""& CEOName &""","
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "}"
|
|
toJson = tmpStr
|
|
End Function
|
|
|
|
End Class
|
|
|
|
Function arrJson(ByVal arr)
|
|
If isArray(arr) = True Then
|
|
tmpStr = "["
|
|
For i=0 To UBound(arr)
|
|
If VarType(arr(i)) = 9 Then
|
|
tmpStr = tmpStr & arr(i).toJson() & ","
|
|
Else
|
|
tmpStr = tmpStr & arr(i) & ","
|
|
End If
|
|
Next
|
|
tmpStr = mid(tmpStr, 1, len(tmpStr)-1)
|
|
tmpStr = tmpStr & "]"
|
|
arrJson = tmpStr
|
|
Else
|
|
arrJson = "[]"
|
|
End If
|
|
End Function
|
|
|
|
%> |