Skip to content

EliaptrxService

EliaptrxService.asmx

This web service provides methods related to A/P transaction processing, including:

·        CreateTrxHeader

·        CreateTrxDist

·        PostTrx

CreateTrxHeader

This method creates one A/P transaction header. You can also use this method to create A/P distribution and post at the same time.

Usage:

CreateTrxHeaderResult = A.CreateTrxHeader(UserName, UserPassword, CreateTrxHeaderInput)

Parameters UserName and UserPassword are not used at this moment.

 

CreateTrxHeaderInput Structure

Property

Length

Type

Upper

Detail

VoucherNo

6

Prior to V8.5: Integer

V8.5 and Above: String

 

If this field is zero, system will sequentially assign a voucher number automatically.

VendorNo

6

String

Y

Required. Either specify an existing vendor number, or enter “*” as vendor number for system to create misc. vendor. This property is required for “CreateTrxHeader” method. If VoucherNo is not zero, this property cannot be set to “*”.

InvoiceNo

8

String

Y

If this field is blank, this method will use VoucherNo as InvoiceNo.

VoucherDate

 

DateTime

 

Default to system date. Voucher date is used for G/L Distribution purposes.  Sometimes, user may specify a different voucher date to make the trx distribute to different period.

TrxType

1

String

Y

Valid values are:

“V” (default): Voucher

“C”: Vendor Credit Memo

“P”: Prepaid

“X”: Cancel

“A”: Adjust

PONo

10

String

Y

PO number provided here must exist in Elliott PO file, and not be   closed.  If you do not wish to validate PO, you can leave it blank.

InvoiceDate

 

DateTime

 

Default to system date. Invoice data is used for aging purposes to determine when the invoice will become due and whether we can take advantage of early discount.

ApplyToNo

8

String

Y

This property is only valid for Credit Memo. If this is not a credit memo, this property will be ignored.

InvoiceAmount

7.2

Decimal

 

Enter the invoice amount here. Most of the time, you will put the entire invoice amount, including freight, misc. charges and sales tax in this property.  You can choose to put sales amount in this property as well. If you leave it blank it means the invoice amount = 0.

NonDiscAmount

7.2

Decimal

 

Enter the amount that’s not subject to early payment discount.  If that exists, that will be most likely the amount of freights or taxes.  Default value is zero. The NonDiscAmount must <= InvoiceAmount.

MiscAmount

7.2

Decimal

 

Most likely, you will put the Misc. amount as part of the invoice amount and enter zero here.  You can also enter the Misc. amount here and let system distribute the Misc. amount based on A/P setup.  Since most people distribute the Misc. amount with the Invoice amount to the same account, it is rare that the user will enter an amount here.  By default, leave it blank = 0.

TaxAmount

7.2

Decimal

 

Same as MiscAmount.

FreightAmount

7.2

Decimal

 

Same as MiscAmount.

DiscMiscFlag

1

String

Y

“Y,” “N” or blank. If this is blank, it will get default from Elliott A/P Setup, “14. Misc Charges Discountable.”

This flag is only valid if the vendor terms allow early payment discount.

DiscTaxFlag

1

String

Y

“Y," “N” or blank. If this is blank, it will get default from Elliott A/P Setup, “15. Sales Tax Discountable.”

This flag is only valid if the vendor terms allow early payment discount.

DiscFreightFlag

1

String

Y

“Y,” “N” or blank. If this is blank, it will get default from Elliott A/P Setup, “16. Freight Discountable.”

This flag is only valid if the vendor terms allow early payment discount.

DueDays

3

Integer

 

Enter specific due days (like 30 or 60) or leave it blank means default from vendor file.

DiscDays

3

Integer

 

Enter specific discount days (like 10 or 30) or leave it blank means default from vendor file.

DiscPct

4.3

Double

 

Enter a specific discount percent or leave it blank to default from vendor. IF a DiscPct is specifically entered, then the DiscAmount will be ignored if entered. System will calculate and return the DiscAmount based on DiscPct Provided.

DiscAmount

7.2

Double

 

If you specify the DiscPct, you should not enter an amount here. If you enter a DiscAmount and DiscPct is not provided (even though there may be a vendor default disc%), system calculates and returns the DiscPct.  On the other hand, if DiscPct is specifically entered, then the DiscAmount user provided here will be ignored.

VoucherReference

30

String

Y

Voucher reference can be used as a comment to clarify the invoice and is viewable on the Vendor Account Inquiry.  Voucher reference can be optionally printed on the check stub.

APAccountNo

24

String

Y

In most cases, user will leave it blank for system to use the Elliott default AP Account. You can also specify a valid AP account here.  Keep in mind the internal Elliott AP Account is 24 digits with 3 segments of 8 digits in each segment.  Therefore, if the AP account is 2010-1234-5678 it   will need to entered here as 000020100000123400005678.

If A/P Setup indicates “N” for allowing multiple A/P Accounts, then system will ignore any value provided here, and always uses the default A/P Account in A/P Setup.

CheckNo

6

Prior to V8.5: Integer

V8.5 and Above: String

 

This field is only valid if voucher type = “P.” In that case, you must enter a check number here.  Leaving this property blank for “P” trx will result in error.

CheckDate

 

DateTime

 

This field is only valid if voucher type = “P.” In that case, if you leave this field blank, system will use system date for check date.

CashAccountNo

24

String

Y

The field is only valid for “P” type voucher. Leave it blank means use default cash account in A/P Setup. If APCTLFIL does not allow multiple cash accounts, then any value entered here will be ignored.

GSTAmount

7.2

Decimal

 

Only valid for Canadian users. If this property is not entered for Canadian users, the default GSTAmount = 0.

DISCGSTFlag

1

String

Y

Only valid for Canadian users.  If this property is not entered for Canadian users, system assume “N.”

RemitTo

6

String

    Y

Only use if remit to feature is turned on in Global Setup and the value is set to “R.” If remit to is used in New A/P Trx, this property must be a valid vendor number.

BatchID

10

String

Y

If BatchID feature is turned on in Global Setup, then system will accept the BatchID user enters here. Otherwise, system will ignore value entered here.

DistAccountNo

24

String

Y

If you try to use CreateTrxDist method or if you set AutoDistFlag value to “L,” then this is a required field.  In that case, user must provide a valid account.  Keep in mind Elliott account numbers are 24 digits with 3 segments of 8 digits each.  Therefore, Account Number 1234-123-12345 would have an internal value of 000012340000012300012345.

VendorName

30

String

 

Use to Create Misc. Vendor when vendor number = “*”

VendorAddress1

30

String

 

Use to Create Misc. Vendor

VendorAddress2

30

String

 

Use to Create Misc. Vendor

VendorCity

15

String

 

Use to Create Misc. Vendor

VendorState

2

String

 

Use to Create Misc. Vendor

VendorZipCode

10

String

 

Use to Create Misc. Vendor

VendorCountry

15

String

 

Use to Create Misc. Vendor

VendorPhoneNumber

12

String

Y

Use to Create Misc. Vendor

VendorContact

20

String

 

Use to Create Misc. Vendor

VendorFedIDNo

9

Integer

 

Use to Create Misc. Vendor

VendorFedIdType

1

String

Y

Use to Create Misc. Vendor

Vendor1099Category

1

String

Y

Use to Create Misc. Vendor

VendorType

3

String

Y

Use to Create Misc. Vendor

VendorTerms

15

String

Y

Use to Create Misc. Vendor

VendorDueDays

3

Integer

 

Use to Create Misc. Vendor

VendorDiscDays

3

Integer

 

Use to Create Misc. Vendor

VendorDiscPct

3.2

Decimal

 

Use to Create Misc. Vendor

AutoDistFlag

1

String

Y

“Y”: Create distribution by vendor auto distribution. This assumes user does not intend to match PO.  The distribution will be based on the Vendor Auto Distribution information.

 

“N” (default): Do not perform auto distribution. You can use “CreateTrxDist” method to create distribution later.

 

“P”: Create Distribution by PO Receiving Accrual Reconcile file.  If using this value, system assumes the PO has been received already and the Receiving Accrual feature is turned on in Elliott.  User must provide PO number in this case.  System will try to match the Invoice Amount with PO receiving amount.  If there is a match, then system will use the match entry and create distribution automatically based on PO Receiving Accrual Information.  If no match amount is found, system will return error.

 

“L”: User provides the necessary information for Distribution.  If using this value, system assumes there will be only one distribution account and user must specify proper distribution information when creating the header.

AutoPosting

1

String

Y

“Y”: Automatically post this A/P transaction. If AutoDistFlag is “N” or blank, you cannot set this flag to “Y” because there is no A/P distribution.

“N” (default): Do not automatically post this A/P transaction

CreateVariance

1

String

Y

“Y” (default): Create PPV account.

“N”: Do not create PPV account.

 

CreateTrxHeaderResult Structure

Property

Type

Detail

ReturnCode

Integer

Contains return code. Zero means OK; for other return codes, please see “EliaptrxService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

VoucherNo

Prior to V8.5: Integer

V8.5 and Above: String

If user chooses not to specify VoucherNo with CreateTrxHeader method, the sequentially assigned voucher number will be returned.

VendorNo

String

If user chooses to create vendor by making the vendor number “*”, then the newly created misc. vendor number will be returned back here.  The misc. vendor has the format of “*99999” where 99999 is the last 5 digits of the voucher number.

InvoiceNo

String

If you choose not to specify invoice number, system will use the voucher number as invoice number and returned the value here.

VoucherDate

DateTime

If you choose not to specify voucher date, the default voucher date system assigned will be returned here.

TrxType

String

If you choose not to specify the Trx Type, the default Trx Type “V” will be returned here.

PONo

String

Echo the PONo user entry.

InvoiceDate

DateTime

If choose not to specify invoice date, then system date will be returned here.

ApplyToNo

String

Echo the ApplyToNo user entry.

DueDays

Integer

If you do not specify DueDays, the Due Days from vendor file will be returned here.

DueDate

DateTime

The date calculated by using Due Days will be returned here.

DiscDate

DateTime

The date calculated by using Disc Days will be returned here.

DiscPct

Double

If you do not specify DiscPct, the Disc Pct from vendor file will be returned here.

DiscAmount

Double

If you do not specify DiscAmount, system will calculate the Disc Amount based on DiscPct and return the value here.

VoucherReference

String

Echo the VoucherReference user entry.

APAccountNo

String

Default A/P Account in A/P Setup.

CheckNo

Prior to V8.5: Integer

V8.5 and Above: String

Echo the CheckNO user entry.

CheckDate

DateTime

If check date is not entered, the system date will be returned for “P” trx-type.

CashAccountNo

String

If user chooses not to specify CashAccountNo for “P” trx type, the default Cash Account in A/P Setup will be returned here.

RemitTo

String

Default Remit To in Vendor File Setup.

BatchID

String

Echo back the BatchID user entry.

DistSeqNo

Integer

Automatically determined by system.

DistAccountNo

String

 

DistAmount

Double

 

DistPONo

String

 

DistPOLineNo

Integer

 

DistItemNumber

String

 

DistQuantity

Double

 

DistUOM

String

 

DistJobNo

String

 

DistVarFlag

String

 

DistAstacctNo

String

 

RemainingAmount

Double

 

 

Code Example

The following sample code will create an A/P transaction header with auto assign voucher number, auto distribute, and auto posting.

 

Dim Service As New webServicesAptrx.EliaptrxService

Dim Result As New webServicesAptrx.CreateTrxHeaderResult

Dim Input As New webServicesAptrx.CreateTrxHeaderInput

Input.AutoDistFlag = “Y”

Input.AutoPosting = “Y”

Input.VendorNo = “000123”

Input.InvoiceAmount = 185.2

Result = Service.CreateTrxHeader("", "", Input)

If Result.ReturnCode = 0 Then

    lblResult.Text = “AP Trx Header Created and posted”

Else

    lblResult.Text = "Error! Error code: " + Result.ReturnCode.ToString

End If


CreateTrxDist

This method creates A/P distribution.

This method will be used if users do not choose to specify “AutoDistFlag” in “CreateTrxHeader” method.  Upon using this method call, the method will return the remaining amount to distribute with RemainingAmount property. Users should check if the RemainingAmount = 0 before completion.

Usage:

CreateTrxDistResult = A.CreateTrxHeader(UserName, UserPassword, CreateTrxDistInput)

Parameters UserName and UserPassword are not used at this moment.

 

CreateTrxDistInput Structure

Property

Length

Type

Upper

Detail

VoucherNo

6

Prior to V8.5: Integer

V8.5 and Above: String

 

Required. See “CreateTrxHeaderInput Structure.”

DistAccountNo

24

String

Y

Required. See “CreateTrxHeaderInput Structure.”

DistAmount

7.2

Double

 

Required. Distribution amount.

DistPONo

10

String

 

Even if you provide a PO number at header, you still need to specifically provide the PO number here. Otherwise, we’ll assume the PO number is blank and will not validate the PO with CreateTrxDist method.

DistPOLineNo

3

Integer

Y

Required if DistPONo is specified. System will validate to ensure the PO and Line Item exists in Elliott PO module.

DistItemNumber

15

String

Y

Default blank.  However, if you provide an item here, then it will be used to match when the DistPONo and DistPOLineNO is validated.

DistQuantity

9.3

Double

 

Required if DistPONo is specified. This value will be used to calculate the unit cost and match the PO line item unit cost to determine if there will be a variance.  If CreateVarinace property is set to “Y,” then variance will be created automatically.

DistUOM

2

String

Y

Default blank.  However, if you provide a UOM here, then it will be used to match when the DistPONo and DistPOLIneNo is validated.

DistJobNo

6

String

Y

Default blank.  However, if you provide a JobNo here, then it will be used to match when the DistPONO and DistPOLineNO is validated.

CreateVariance

1

String

Y

See “CreateTrxHeaderInput Structure.”

APAccountNo

24

String

Y

Required. See “CreateTrxHeaderInput Structure.”

 

CreateTrxDistResult Structure

Property

Type

Detail

ReturnCode

Integer

Contains return code. Zero means OK; for other return codes, please see “EliaptrxService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

VoucherNo

Prior to V8.5: Integer

V8.5 and Above: String

See “CreateTrxHeaderResult Structure.”

VendorNo

String

See “CreateTrxHeaderResult Structure.”

InvoiceNo

String

See “CreateTrxHeaderResult Structure.”

VoucherDate

DateTime

See “CreateTrxHeaderResult Structure.”

TrxType

String

See “CreateTrxHeaderResult Structure.”

PONo

String

See “CreateTrxHeaderResult Structure.”

InvoiceDate

DateTime

See “CreateTrxHeaderResult Structure.”

ApplyToNo

String

See “CreateTrxHeaderResult Structure.”

DueDays

Integer

See “CreateTrxHeaderResult Structure.”

DueDate

DateTime

See “CreateTrxHeaderResult Structure.”

DiscDate

DateTime

See “CreateTrxHeaderResult Structure.”

DiscPct

Double

See “CreateTrxHeaderResult Structure.”

DiscAmount

Double

See “CreateTrxHeaderResult Structure.”

VoucherReference

String

See “CreateTrxHeaderResult Structure.”

APAccountNo

String

See “CreateTrxHeaderResult Structure.”

CheckNo

Prior to V8.5: Integer

V8.5 and Above: String

See “CreateTrxHeaderResult Structure.”

CheckDate

DateTime

See “CreateTrxHeaderResult Structure.”

CashAccountNo

String

See “CreateTrxHeaderResult Structure.”

RemitTo

String

See “CreateTrxHeaderResult Structure.”

BatchID

String

See “CreateTrxHeaderResult Structure.”

DistSeqNo

Integer

See “CreateTrxHeaderResult Structure.”

DistAccountNo

String

See “CreateTrxHeaderResult Structure.”

DistAmount

Double

See “CreateTrxHeaderResult Structure.”

DistPONo

String

See “CreateTrxHeaderResult Structure.”

DistPOLineNo

Integer

See “CreateTrxHeaderResult Structure.”

DistItemNumber

String

See “CreateTrxHeaderResult Structure.”

DistQuantity

Double

See “CreateTrxHeaderResult Structure.”

DistUOM

String

See “CreateTrxHeaderResult Structure.”

DistJobNo

String

See “CreateTrxHeaderResult Structure.”

DistVarFlag

String

See “CreateTrxHeaderResult Structure.”

DistAstacctNo

String

See “CreateTrxHeaderResult Structure.”

RemainingAmount

Double

See “CreateTrxHeaderResult Structure.”

 

Code Example

The following sample codes will create one A/P distribution record for voucher number 123456.

 

Dim Service As New webServicesAptrx.EliaptrxService

Dim Result As New webServicesAptrx.CreateTrxDistResult

Dim Input As New webServicesAptrx.CreateTrxDistInput

Input.VoucherNo = 123456

Input.DistAccountNo = “123456781234567812345678”

Input.DistAmount = 45.08

Result = Service.CreateTrxHeader("", "", Input)

If Result.ReturnCode = 0 Then

    lblResult.Text = “AP Trx Dist Created”

Else

    lblResult.Text = "Error! Error code: " + Result.ReturnCode.ToString

End If

 

PostTrx

This method will post an A/P transaction.

Usage:

PostTrxResult = A.PostTrx(UserName, UserPassword, VoucherNo)

Parameters UserName and UserPassword are not used at this moment.

 

Input Parameter

Parameter

Length

Type

Upper

Detail

VoucherNo

6

Prior to V8.5: Integer

V8.5 and Above: String

 

Required.

 

PostTrxResult Structure

Property

Type

Detail

ReturnCode

Integer

Contains return code. Zero means OK; for other return codes, please see “EliaptrxService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

VoucherNo

Prior to V8.5: Integer

V8.5 and Above: String

See “CreateTrxHeaderResult Structure.”

VendorNo

String

See “CreateTrxHeaderResult Structure.”

InvoiceNo

String

See “CreateTrxHeaderResult Structure.”

VoucherDate

DateTime

See “CreateTrxHeaderResult Structure.”

TrxType

String

See “CreateTrxHeaderResult Structure.”

PONo

String

See “CreateTrxHeaderResult Structure.”

InvoiceDate

DateTime

See “CreateTrxHeaderResult Structure.”

ApplyToNo

String

See “CreateTrxHeaderResult Structure.”

DueDays

Integer

See “CreateTrxHeaderResult Structure.”

DueDate

DateTime

See “CreateTrxHeaderResult Structure.”

DiscDate

DateTime

See “CreateTrxHeaderResult Structure.”

DiscPct

Double

See “CreateTrxHeaderResult Structure.”

DiscAmount

Double

See “CreateTrxHeaderResult Structure.”

VoucherReference

String

See “CreateTrxHeaderResult Structure.”

APAccountNo

String

See “CreateTrxHeaderResult Structure.”

CheckNo

Prior to V8.5: Integer

V8.5 and Above: String

See “CreateTrxHeaderResult Structure.”

CheckDate

DateTime

See “CreateTrxHeaderResult Structure.”

CashAccountNo

String

See “CreateTrxHeaderResult Structure.”

RemitTo

String

See “CreateTrxHeaderResult Structure.”

BatchID

String

See “CreateTrxHeaderResult Structure.”

DistSeqNo

Integer

See “CreateTrxHeaderResult Structure.”

DistAccountNo

String

See “CreateTrxHeaderResult Structure.”

DistAmount

Double

See “CreateTrxHeaderResult Structure.”

DistPONo

String

See “CreateTrxHeaderResult Structure.”

DistPOLineNo

Integer

See “CreateTrxHeaderResult Structure.”

DistItemNumber

String

See “CreateTrxHeaderResult Structure.”

DistQuantity

Double

See “CreateTrxHeaderResult Structure.”

DistUOM

String

See “CreateTrxHeaderResult Structure.”

DistJobNo

String

See “CreateTrxHeaderResult Structure.”

DistVarFlag

String

See “CreateTrxHeaderResult Structure.”

DistAstacctNo

String

See “CreateTrxHeaderResult Structure.”

RemainingAmount

Double

See “CreateTrxHeaderResult Structure.”

 

Code Example

The following sample code will post voucher# 123456.

 

Dim Service As New webServicesAptrx.EliaptrxService

Dim Result As New webServicesAptrx.PostTrxResult

Result = Service.PostTrx("", "", 123456)

If Result.ReturnCode = 0 Then

    lblResult.Text = “AP Trx Posted”

Else

    lblResult.Text = "Error! Error code: " + Result.ReturnCode.ToString

End If

 

EliaptrxService Return Code

 0 = OK

 1 = File Error

 2 = Voucher Exist on APTRXFIL (CreateTrxHeader)

 3 = Vendor Number Missing (CreateTrxHeader)

 4 = Vendor# *99999 Must Be On File In Order To Have Misc Vendor

 5 = Cannot Add Misc Vendor For Voucher No Provided Already

 6 = Vendor Number = 0

 7 = Vendor Not On File

 8 = Misc Vendor No '*99999' Not Allowed To Be Used

 9 = Payments Are Not To Be Made To This Vendor (Status = "H")

10 = Voucher Number Already Used For This Vendor

11 = Remit Vendor Number = 0

12 = Remit Vendor Number Same Vendor Number

13 = Remit Vendor Number Not On File

14 = Invoice Already On File For This Vendor

15 = Invoice Already Fully Paid

16 = Invoice Not Found

17 = Invoice Already On Trx File For This Vendor

18 = Date Of Credit Memo Must Not Be Before Date of Invoice

19 = Purchase Order Not On File

20 = Purchase Order Is Not For This Vendor

21 = Purchase Order Closed

22 = Blanket Order Not Allowed

23 = Drop Shipment Order Is Unreleased

24 = Normal Order Is Unreleased

25 = Blanket Order Not Allowed

26 = Purchase Order Cancelled

27 = Purchase Order Not Printed

28 = Auto Create Distribution Invalid Value ("Y","N","P","L")

29 = PO Reconciliation Record Not Found

30 = This PO Is Fully Invoiced

31 = Auto Create Dist = "P", But No Match Found in PORCNFIL

32 = Auto Create Dist = "P", But More Than 1 Match Found in PORC

33 = Invoice Amount And Non-Disc Amount Must Have Same Sign

34 = Non-Disc Amount Cannot Be Greater Than Invoice Amount

35 = Invalid Value for Disc Misc Flag ("Y" or "N")

36 = Invalid Value for Disc Freight Flag ("Y" or "N")

37 = Invalid Value for Disc Tax Flag ("Y" or "N")

38 = Invalid Value for Dist Gst (Canada) Flag ("Y" or "N")

39 = Invalid Value for Trx Type ("V", "C", "P", "X", "A")

40 = Discount Date Cannot Be Later Than Due Date

41 = A/P Account Not On File

42 = Check Number Cannot Be Zeroes For "P" trx

43 = Check Date Cannot Be Zeroes For "P" trx

44 = Cash Account Not On File For "P" trx

45 = No Vendor Dist Record Found For Auto-Dist = "V"

46 = Vendor Dist Record Less Then 100%

47 = No Voucher Provided (CreateTrxDist)

48 = Voucher Not On File (CreateTrxDist)

49 = Vendor Auto Dist = "N", Not Allowed To Auto Dist By Vendor

50 = Dist Account Number Cannot Be Blank

51 = Dist Account Number Not On File

52 = Remaining Amount = 0 & Dist Amount = 0, Not Allowed

53 = Distribution Amount Cannot Be 0

54 = PO#, Line#, Item#, & UOM Should Be Blank or 0 (CreateTrxDis

55 = Purchase Order Not On File (Dist PO No)

56 = Purchase Order Not For This Vendor

57 = Purchase Order Closed

58 = PO# & Line3 Must Provided (CreateTrxDist)

59 = PO Line Not Found

60 = No PO Reconcile File Record Found

61 = No Record Find Match For PO Reconcile File

62 = Job File Not Open

63 = Job Not On File

64 = Batch ID not on the file

65 = Quantity Cannot Be Zero

66 = Invalid Var Flag ("Y" or "N")

67 = Invalid Value of Auto Post ("Y" or "N")

68 = No Record Posting

69 = Out of Balance, Posting Fail

70 = Voucher Not Posting

71 = Vendor Number Not On File (Post Trx)

72 = Invalid Value for Create PPV ("Y" or "N")

73 = Create Auto Post Not Allowed (Auto Create Dist Must = "Y",

74 = NSI Control File Not Found (Add)

75 = Miscellaneous Vendor Already On File

76 = Invalid Voucher Format

CLS

Feedback and Knowledge Base