Whylode
All changes

Rule change

EDI 810 tax detail requirement

fixtures/notices/edi-810-notice.pdfOpened Sep 26Status: Approved

Clause 1

“The TXI segment in every EDI 810 invoice must include TXI03 (Percent) populated with the tax rate actually applied to the invoice, expressed as a percentage with up to four decimal places (e.g. 7.5 for 7.50%). Previously only TXI01 (tax type) and TXI02 (monetary amount) were required.”

EDIOUT.rpgleScroll sideways for full lines
16 *
17D InvNo S 8P 0
18D InvDate D
19D CustNo S 7P 0
20D InvAmt S 11P 2
21D TaxAmt S 11P 2
22D EDILine S 256A
23D DateStr S 8A
24D SeqNo S 9P 0
25 *
26 * Format invoice date as YYYYMMDD for EDI 810 BIG segment
27C EVAL DateStr = %CHAR(InvDate:*ISO0)
28 *
29 * ISA segment - interchange control header
30C EVAL EDILine =
31C 'ISA*00* *00* ' +
32C '*ZZ*SENDER *ZZ*RECEIVER ' +
33C '*' + %SUBST(DateStr:3:6) +
34C '*' + %SUBST(DateStr:9:4) +
35C '*^*00501*' +
36C %EDITC(SeqNo:'Z') +
37C '*0*P*>'
38C WRITE EDIREC
39 *
40 * GS segment - functional group header
41C EVAL EDILine =
42C 'GS*IN*SENDER*RECEIVER*' +
43C DateStr + '*' +
44C %SUBST(DateStr:9:4) +
45C '*1*X*005010'
46C WRITE EDIREC
47 *
48 * BIG segment - beginning segment for invoice
49 * Date in YYYYMMDD format per current EDI 810 spec
50C EVAL EDILine =
51C 'BIG*' + DateStr +
52C '*' + %EDITC(InvNo:'Z') +
53C '**'
54C WRITE EDIREC
55 *
56 * ITD - terms of sale / deferred terms
57C EVAL EDILine =
58C 'ITD*01*3***' +
59C '***30*'
60C WRITE EDIREC
61 *
62 * TDS - total monetary value summary
63C EVAL EDILine =
64C 'TDS*' +
65C %EDITC(InvAmt * 100:'Z')
66C WRITE EDIREC
67 *
68 * TXI - tax information
69C EVAL EDILine =
70C 'TXI*ST*' +
71C %EDITC(TaxAmt:'1') +
72C '****ST'
73C WRITE EDIREC
74 *
  • Line 17AnsweredBob's confidence 0.50
  • Line 21AnsweredBob's confidence 0.70
  • Lines 68 to 73Traced by BobBob's confidence 1.00

Clause 2

“TXI03 must hold the rate used to calculate TXI02. If a customer is taxed at a rate other than the standard state rate, TXI03 must show that other rate. Invoices where TXI03 does not match TXI02 divided by the taxable amount will be rejected with a 997 error code.”

INVCALC.rpgleScroll sideways for full lines
18 *
19D TaxRate S 7P 4
20D CalcBase S 11P 2
21 *
22C *ENTRY PLIST
23C PARM CustNo
24C PARM CustType
25C PARM OrderAmt
26C PARM TaxAmt
27C PARM ErrFlag
28 *
29 * Set rate
30C EVAL TaxRate = 0.0725
31 *
32 * Check override
33C CustType CHAIN TAXTBL
34C IF %FOUND
35C EVAL TaxRate = TBTAXRT
36C ENDIF
37 *
38 *
39C IF CustType = 'C2'
40C SETON 42
41C ENDIF
42 *
43C IF *IN42 = *ON
44C EVAL TaxRate = 0.0525
45C ENDIF
46 *
47 * Calc tax
48C EVAL CalcBase = OrderAmt
49C EVAL TaxAmt = CalcBase * TaxRate
50 *
  • Line 19AnsweredBob's confidence 1.00
  • Line 26AnsweredBob's confidence 0.80
  • Lines 30, 33 to 34, 36, 39, 41, 43, 45, 49Traced by BobBob's confidence 1.00
  • Lines 35, 40, 44Already knownBob's confidence 1.00
EDIOUT.rpgleScroll sideways for full lines
20D InvAmt S 11P 2
21D TaxAmt S 11P 2
22D EDILine S 256A
  • Line 21AnsweredBob's confidence 0.60
ORDENT.rpgleScroll sideways for full lines
46 * Pass to invoice calculation
47C CALL 'INVCALC'
48C PARM CustNo
49C PARM CustType
50C PARM OrderAmt
51C PARM TaxAmt
52C PARM ErrFlag
  • Lines 47, 51Traced by BobBob's confidence 0.80