InvoiceInquiry
InvoiceInquiry.asmx
This web service provides two methods to access Elliott Invoice History database:
· GetInvHdrByCusNo: Get a list of invoices for a certain customer number.
· GetOneInvoiceDetail: Get the details of one invoice by specifying the invoice number. This includes the invoice header, line items and more.
This method returns invoice headers by providing customer number by using a relational engine.
Usage:
GetInvHdrByCusNoResult = A.GetInvHdrByCusNo(UserName, UserPassword, customerNo, invoiceCutoffDate, orderBy)
Parameters UserName and UserPassword are not used at this moment.
Input Parameters
Parameter |
Type |
Detail |
customerNo |
String |
Required. ====== last stop here ==============???? |
invoiceCutoffDate |
Date |
If this value is provided, only invoices with invoice date greater than this value will be returned. |
orderBy |
String |
Can be empty or one of the fields in returned invoice header table CPINVHDR. |
GetInvHdrByCusNoResult Structure
Property Name |
Type |
Detail |
ReturnCode |
Integer |
0 = OK 10001 = Missing Customer No |
InvoiceHeaders |
DataSet |
This dataset has a data table “InvoiceHeaders.”. Please refer to the following section for its structure. |
Columns in “InvoiceHeaders” DataTable – see ????? for more details of these columns:
INV_NO
INV_DATE_ENTERED
INV_ORDER_DATE
INV_TYPE
INV_APPLY_TO_NO
INV_PURCHASE_ORD_NO
INV_CUSTOMER_NO
INV_NO_ALT
INV_CUST_BAL_METHOD
INV_BILL_TO_NAME
INV_BILL_TO_ADDR_1
INV_BILL_TO_ADDR_2
INV_BILL_TO_CITY
BILL_TO_FILLER1
INV_BILL_TO_ST
BILL_TO_FILLER2
INV_BILL_TO_ZIPCD
INV_BILL_TO_COUNTRY
INV_SHIP_TO_NO
INV_SHIP_TO_NAME
INV_SHIP_TO_ADDR_1
INV_SHIP_TO_ADDR_2
INV_SHIP_TO_CITY
SHIP_TO_FILLER1
INV_SHIP_TO_ST
SHIP_TO_FILLER2
INV_SHIP_TO_ZIPCD
INV_SHIP_TO_COUNTRY
INV_SHIPPING_DATE
INV_SHIP_VIA_CODE
INV_TERMS_CODE
INV_FRT_PAY_CODE
INV_SHIP_INSTRUCT1
INV_SHIP_INSTRUCT2
INV_SALESMAN_NO1
INV_SALESMAN_PCT_CO1
INV_SALESMAN_COM_AM1
INV_SALESMAN_NO2
INV_SALESMAN_PCT_CO2
INV_SALESMAN_COM_AM2
INV_SALESMAN_NO3
INV_SALESMAN_PCT_CO3
INV_SALESMAN_COM_AM3
INV_TAX_CODE_1
INV_TAX_PERCENT_1
INV_TAX_CODE_2
INV_TAX_PERCENT_2
INV_TAX_CODE_3
INV_TAX_PERCENT_3
INV_DISCOUNT_PERCENT
INV_JOB_NO
INV_MFG_LOCATION
INV_PROFIT_CENTER
INV_DEPARTMENT
INV_AR_REFERENCE
INV_TOT_SALE_AMT
INV_TOT_TAX_AMT
INV_TOT_COST
INV_TOT_WEIGHT
INV_MISC_CHG_AMT
INV_MISC_CHG_ACCT_NO
INV_FRT_AMT
INV_FRT_ACCT_NO
INV_SALES_TAX_AMT_1
INV_SALES_TAX_AMT_2
INV_SALES_TAX_AMT_3
INV_COMM_PERCENT
INV_COMM_AMOUNT
INV_COMMENT1
INV_COMMENT2
INV_COMMENT3
INV_PAYMENT_AMT
INV_PAYMENT_DISC_AMT
INV_CHECK_NO
INV_CHECK_DATE
INV_CASH_ACCT_NO
INV_DATE_PICKED
INV_DATE_BILLED
INV_ORDER_NO
INV_DATE
INV_SELECTION_CODE
INV_POSTED_DATE
INV_PART_POSTED_FLAG
INV_SHIP_TO_FR_FO_FG
INV_BILL_TO_FR_FO_FG
INV_COPY_TO_BM_FG
INV_EDI_FG
INV_EDI_PO_NO_CONT
INV_CLOSED_FG
INV_ACC_MISC_CHG_AMT
INV_ACC_FRT_AMT
INV_ACC_TOT_TAX_AMT
INV_ACC_SALE_TAX_AMT
INV_ACC_TOT_SALE_AMT
INV_STORE_NO
INV_BILL_TO_NO
INV_RMA_STATUS
INV_PHATM_INV_FLAG
INV_DEPT_NO
INV_BOL_PRINTED
INV_REF_DOC_NO
INV_PAYMENT_TP
INV_EDI_EXP_FLG
INV_BOL_NO
INV_FULL_PAY_DATE
INV_PO_REQ_GEN_FLG
INV_PICK_TIC_CUTOFF
INV_ORD_EDI_EXP_FLG
INV_FILLER_001
INV_SHIP_TO_XREF_NO
INV_FILLER_002
Code Example (VB)
The following sample code will return invoice headers for customer “000001” after 02/28/2010.
Dim Service As New webServicesInvoiceInquiry.InvoiceInquiry()
Dim Result As New webServicesInvoiceInquiry.GetInvHdrByCusNoResult
Dim customerNo As String = “000001”
Dim invoiceCutoffDate As Date = New Date(2010,2,28)
Dim orderBy As String = “INV_DATE_ENTERED”
Result = Service.GetInvHdrByCusNo(“”, “”,customerNo, invoiceCutoffDate, orderBy)
If Result.ReturnCode = 0 Then
If Result.InvoiceHeaders.Tables(0).Rows.Count > 0 Then
lblResult.Text = “First Invoice No. is” & _
Result.InvoiceHeaders.Tables(0).Rows(0).Item("INV_NO").ToString
Else
lblResult.Text = “No Matching Invoice.”
End If
Else
lblResult.Text = “Error While Quering Invoice.”
lblErrorCode.Text = Result.ToString
End If
This method returns one invoice’s details by providing invoice number.
Usage:
GetInvoiceDetailResult = A.GetInvoiceDetail(UserName, UserPassword, invoiceNo, orderBy)
Parameters UserName and UserPassword are not used at this moment.
Input Parameters
Parameter |
Type |
Detail |
invoiceNo |
String |
Required. |
orderBy |
String |
This field only affects the order of “InvoiceLineItem” data table. The value her can be empty or one of the fields in table CPINVLIN. |
GetInvoiceDetailResult Structure
Property Name |
Type |
Detail |
ReturnCode |
Integer |
0 = OK 10002 = Missing Invoice No |
InvoiceDetail |
DataSet |
This dataset has four data tables: “InvoiceHeader,” “InvoiceLineItem,” “Notes,” “InvoiceSerialNo” and “Payment.” Please refer to the following sections for their structures. |
Columns in “InvoiceHeader” DataTable
INV_NO
INV_DATE_ENTERED
INV_ORDER_DATE
INV_TYPE
INV_APPLY_TO_NO
INV_PURCHASE_ORD_NO
INV_CUSTOMER_NO
INV_NO_ALT
INV_CUST_BAL_METHOD
INV_BILL_TO_NAME
INV_BILL_TO_ADDR_1
INV_BILL_TO_ADDR_2
INV_BILL_TO_CITY
BILL_TO_FILLER1
INV_BILL_TO_ST
BILL_TO_FILLER2
INV_BILL_TO_ZIPCD
INV_BILL_TO_COUNTRY
INV_SHIP_TO_NO
INV_SHIP_TO_NAME
INV_SHIP_TO_ADDR_1
INV_SHIP_TO_ADDR_2
INV_SHIP_TO_CITY
SHIP_TO_FILLER1
INV_SHIP_TO_ST
SHIP_TO_FILLER2
INV_SHIP_TO_ZIPCD
INV_SHIP_TO_COUNTRY
INV_SHIPPING_DATE
INV_SHIP_VIA_CODE
INV_TERMS_CODE
INV_FRT_PAY_CODE
INV_SHIP_INSTRUCT1
INV_SHIP_INSTRUCT2
INV_SALESMAN_NO1
INV_SALESMAN_PCT_CO1
INV_SALESMAN_COM_AM1
INV_SALESMAN_NO2
INV_SALESMAN_PCT_CO2
INV_SALESMAN_COM_AM2
INV_SALESMAN_NO3
INV_SALESMAN_PCT_CO3
INV_SALESMAN_COM_AM3
INV_TAX_CODE_1
INV_TAX_PERCENT_1
INV_TAX_CODE_2
INV_TAX_PERCENT_2
INV_TAX_CODE_3
INV_TAX_PERCENT_3
INV_DISCOUNT_PERCENT
INV_JOB_NO
INV_MFG_LOCATION
INV_PROFIT_CENTER
INV_DEPARTMENT
INV_AR_REFERENCE
INV_TOT_SALE_AMT
INV_TOT_TAX_AMT
INV_TOT_COST
INV_TOT_WEIGHT
INV_MISC_CHG_AMT
INV_MISC_CHG_ACCT_NO
INV_FRT_AMT
INV_FRT_ACCT_NO
INV_SALES_TAX_AMT_1
INV_SALES_TAX_AMT_2
INV_SALES_TAX_AMT_3
INV_COMM_PERCENT
INV_COMM_AMOUNT
INV_COMMENT1
INV_COMMENT2
INV_COMMENT3
INV_PAYMENT_AMT
INV_PAYMENT_DISC_AMT
INV_CHECK_NO
INV_CHECK_DATE
INV_CASH_ACCT_NO
INV_DATE_PICKED
INV_DATE_BILLED
INV_ORDER_NO
INV_DATE
INV_SELECTION_CODE
INV_POSTED_DATE
INV_PART_POSTED_FLAG
INV_SHIP_TO_FR_FO_FG
INV_BILL_TO_FR_FO_FG
INV_COPY_TO_BM_FG
INV_EDI_FG
INV_CLOSED_FG
INV_ACC_MISC_CHG_AMT
INV_ACC_FRT_AMT
INV_ACC_TOT_TAX_AMT
INV_ACC_SALE_TAX_AMT
INV_ACC_TOT_SALE_AMT
INV_STORE_NO
INV_BILL_TO_NO
INV_RMA_STATUS
INV_PHATM_INV_FLAG
INV_DEPT_NO
INV_BOL_PRINTED
INV_REF_DOC_NO
INV_PAYMENT_TP
INV_EDI_EXP_FLG
INV_BOL_NO
INV_FULL_PAY_DATE
INV_PO_REQ_GEN_FLG
INV_PICK_TIC_CUTOFF
INV_ORD_EDI_EXP_FLG
INV_FILLER_001
INV_SHIP_TO_XREF_NO
INV_FILLER_002
Columns in “InvoiceLineItem” DataTable
INV_ITM_INV_NO
INV_ITM_SEQ_NO
INV_ITM_ITM_NO
INV_ITM_INV_DATE
INV_ITM_CUST_NO
INV_ITM_ITM_NO_ALT
INV_ITM_INV_DATE_ALT
INV_ITM_DESC_1
INV_ITM_DESC_2
INV_ITM_SER_LOT_NO
INV_ITM_SER_EFF_DATE
INV_ITM_S_L_EXP_CNTY
INV_ITM_S_L_EXP_YEAR
INV_ITM_S_L_EXP_MON
INV_ITM_S_L_EXP_DAY
INV_ITM_QTY_ORDER
INV_ITM_QTY_TO_SHIP
INV_ITM_UNIT_PRICE
INV_ITM_DISCOUNT_PCT
INV_ITM_REQUEST_DATE
INV_ITM_QTY_BACK_ORD
INV_ITM_QTY_RT_TO_ST
INV_ITM_BACK_FLAG
INV_ITM_UOM
INV_ITM_UNIT_COST
INV_ITM_UNIT_WEIGHT
INV_ITM_COMM_CALA_TP
INV_ITM_COMM_P_O_AMT
INV_ITM_PROMISE_DATE
INV_ITM_TAXABLE_FLAG
INV_ITM_STOCKED_FLAG
INV_ITM_CONTROL_FLAG
INV_ITM_SELECT_CODE
INV_ITM_TOT_QTY_ORD
INV_ITM_TOT_QTY_SHP
INV_ITM_TAX_FLAG_1
INV_ITM_TAX_FLAG_2
INV_ITM_TAX_FLAG_3
INV_ITM_PRICE_ORG
INV_ITM_CPY_TO_BM_FG
INV_ITM_EXPLODE_KIT
INV_ITM_BM_ORDER_NO
INV_ITM_MULT_FTR_FLG
INV_ITM_PRICE_FLAG
INV_ITM_NO_PACKAGE
INV_ITM_PO_XRF_SEQNO
INV_ITM_PROD_CATE
INV_ITM_REASON_CODE
INV_ITM_PRC_LVL_NO
INV_ITM_ORG_BK_ORDNO
INV_ITM_ORG_BK_SEQNO
INV_ITM_STY_TMP_FLAG
INV_ITM_VENDOR_NO
FILLER_001
Columns in “Notes” DataTable
NOTE_FILE_REF_NO
NOTE_FOLDER
NOTE_CREATE_DATE
NOTE_CREATE_TIME_HH
NOTE_CREATE_TIME_MM
NOTE_CREATE_TIME_SS
NOTE_TYPE
NOTE_CREATE_BY_USER
NOTE_TASK_STATUS
NOTE_FOLLOWUP_BY_NAM
NOTE_FOLLOWUP_DATE
NOTE_FOLLOWUP_TIME
NOTE_FILE_NAME_ALT
NOTE_FILE_REF_NO_ALT
NOTE_TOPIC
NOTE_CONTENT_1
NOTE_CONTENT_2
NOTE_CONTENT_3
NOTE_CONTENT_4
NOTE_CONTENT_5
NOTE_CONTENT_6
NOTE_CONTENT_7
NOTE_CONTENT_8
NOTE_CONTENT_9
NOTE_CONTENT_10
NOTE_MODIFY_DATE
NOTE_MODIFY_HH
NOTE_MODIFY_MM
NOTE_MODIFY_SS
NOTE_MODIFY_BY_USER
NOTE_READABLE_FLAG
NOTE_CHANGEABLE_FLAG
NOTE_DELETEABLE_FLAG
NOTE_ORIG_FOLL_UP_DT
NOTE_TIME_FOLL_DT_CH
FILLER_001
Columns in “InvoiceSerialNo” DataTable
INV_HIS_LS_KEY_55
INV_HIS_LS_ITEM_NO
INV_HIS_LS_S_L_ALT_1
INV_HIS_LS_INV_DATE
INV_HIS_LS_S_L_ALT_2
INV_HIS_LS_T_ITM_NO3
INV_HIS_LS_T_DATE_3
INV_HIS_LS_T_TIME_3
INV_HIS_LS_T_S_NO_3
INV_HIS_LS_TRX_LOT_3
INV_HIS_LS_LOCATION
INV_HIS_LS_QTY
INV_HIS_LS_VE_CUS_NO
INV_HIS_LS_RC_INV_NO
INV_HIS_LS_PO_NO
INV_HIS_LS_BIN_NO
INV_HIS_LS_VEN_CUS_F
FILLER_001
Columns in “Payment” DataTable
CPORDPMT_FILE_NAME
CPORDPMT_REF_NO
CPORDPMT_SEQ_NO
CPORDPMT_CUST_NO
CPORDPMT_DOC_DATE
CPORDPMT_DOC_NO
CPORDPMT_DOC_TYPE
CPORDPMT_APPLY_TO_NO
CPORDPMT_PAYMENT_AMT
CPORDPMT_COMMENT_1
CPORDPMT_COMMENT_2
CPORDPMT_CC_APROV_NO
CPORDPMT_CR_CARD_NO
CPORDPMT_CC_EXP_DT
CPORDPMT_CR_CARD_TYP
CPORDPMT_REFERENCE
CPORDPMT_CC_SWIPE_DA
CPORDPMT_PROC_COMPL
CPORDPMT_NAME
CPORDPMT_ADDRESS_1
CPORDPMT_ADDRESS_2
CPORDPMT_CITY
CPORDPMT_STATE
CPORDPMT_ZIP_CODE
CPORDPMT_COUNTRY
CPORDPMT_USER_ID
CPORDPMT_TRX_DATE
CPORDMPT_WORKSTATION
CPORDPMT_SESSION_ID
CPORDPMT_PAYMENT_TYP
CPORDPMT_TRX_TIME
CPORDPMT_SEQ_NO_ALT
CPORDPMT_PAYMENT_SRC
CPORDPMT_ACH_KEY
SYACHACT_FILE_NAME
SYACHACT_CUST_NO
SYACHACT_SHIP_TO_NO
SYACHACT_CREATE_DATE
SYACHACT_CREATE_TIME
SYACHACT_BANK_RTG_NO
SYACHACT_BANK_ACCTNO
SYACHACT_ACCT_NNAME
SYACHACT_MAIN_ACCT
SYACHACT_STATUS
SYACHACT_STS_REASON
SYACHACT_STS_DATE
SYACHACT_STS_TIME
SYACHACT_STS_BY_USER
SYACHACT_STS_BY_WRKS
SYACHACT_LST_TRX_DT
SYACHACT_LST_TRX_AMT
SYACHACT_TRX_SNC_CR
SYACHACT_AMT_SNC_CR
SYACHACT_NO_TRX_YTD
SYACHACT_AMT_YTD
SYACHACT_TRX_LSTYR
SYACHACT_AMT_LSTYR
SYACHACT_TRX_2_YR
SYACHACT_AMT_2_YR
Code Example (VB)
The following sample code will return invoice detail for invoice number “639422” and sort returned invoice line items by column INV_ITM_QTY_ORDER.
Dim Service As New webServicesInvoiceInquiry.InvoiceInquiry()
Dim Result As New webServicesInvoiceInquiry.GetOneInvoiceDetailResult
Dim invoiceNo As String = “639422”
Dim orderBy As String = “INV_ITM_QTY_ORDER”
Result = Service.GetoneInvoiceDetail(“”, “”,invoiceNo, orderBy)
If Result.ReturnCode = 0 Then
If Result.InvoiceDetail.Tables("InvoiceLineItem").Rows.Count > 0 Then
lblResult.Text = “First Line Item is” & _
Result.InvoiceDetail.Tables(“InvoiceLineItem”).Rows(0).Item( _
"INV_ITM_ITM_NO")
Else
lblResult.Text = “No Matching Invoice.”
End If
Else
lblResult.Text = “Error While Quering Invoice.”
lblErrorCode.Text = Result.ToString
End If
CLS