-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from kelnadim/add_4010
Add 810 & 855 for v4010
- Loading branch information
Showing
17 changed files
with
585 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
162 changes: 162 additions & 0 deletions
162
lib/stupidedi/transaction_sets/004010/implementations/IN810.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
module Stupidedi | ||
module TransactionSets | ||
module FortyTen | ||
module Implementations | ||
b = Builder | ||
d = Schema | ||
r = SegmentReqs | ||
e = ElementReqs | ||
s = SegmentDefs | ||
IN810 = b.build("IN", "810", "Invoice", | ||
d::TableDef.header("Heading", | ||
b::Segment(10, s:: ST, "Transaction Set Header", r::Required, d::RepeatCount.bounded(1), | ||
b::Element(e::Required, "Transaction Set Identifier Code", b::Values("810")), | ||
b::Element(e::Required, "Transaction Set Control Number")), | ||
b::Segment(20, s::BIG, "Beginning Segment for Invoice", r::Required, d::RepeatCount.bounded(1), | ||
b::Element(e::Required, "Date"), | ||
b::Element(e::Required, "Invoice Number"), | ||
b::Element(e::Situational, "Date"), | ||
b::Element(e::Situational, "Purchase Order Number"), | ||
b::Element(e::Situational, "Release Number"), | ||
b::Element(e::Situational, "Change Order Sequence Number"), | ||
b::Element(e::Situational, "Transaction Type Code"), | ||
b::Element(e::Situational, "Transaction Set Purpose Code"), | ||
b::Element(e::Situational, "Action Code"), | ||
b::Element(e::Situational, "Invoice Number")), | ||
d::LoopDef.build("N1", d::RepeatCount.bounded(200), | ||
b::Segment(110, s:: N1, "Name", r::Situational, d::RepeatCount.bounded(1), | ||
b::Element(e::Required, "Entity Identifier Code"), | ||
b::Element(e::Situational, "Name"), | ||
b::Element(e::Situational, "Identification Code Qualifier"), | ||
b::Element(e::Situational, "Identification Code"), | ||
b::Element(e::Situational, "Code describing entity relationship"), | ||
b::Element(e::Situational, "Code identifying an organizational entity, a physical location, property or an individual")), | ||
b::Segment(120, s:: N2, "Address Information", r::Situational, d::RepeatCount.bounded(2), | ||
b::Element(e::Situational, "Name"), | ||
b::Element(e::Situational, "Name")), | ||
b::Segment(130, s:: N3, "Address Information", r::Situational, d::RepeatCount.bounded(2), | ||
b::Element(e::Situational, "Address Information"), | ||
b::Element(e::Situational, "Address Information")), | ||
b::Segment(140, s:: N4, "Geographic Location", r::Situational, d::RepeatCount.unbounded, | ||
b::Element(e::Situational, "City Name"), | ||
b::Element(e::Situational, "State or Province Code"), | ||
b::Element(e::Situational, "Postal Code"), | ||
b::Element(e::Situational, "Country Code"), | ||
b::Element(e::Situational, "Location Qualifier"), | ||
b::Element(e::Situational, "Location Identifier"))), #end LoopDef N1, Segment 140 | ||
b::Segment(200, s:: ITD, "Terms of Sale or Deferred Terms of Sale", r::Situational, d::RepeatCount.unbounded, | ||
b::Element(e::Situational, "Terms Type Code"), | ||
b::Element(e::Situational, "Terms Basis Date Code"), | ||
b::Element(e::Situational, "Terms Discount Percent"), | ||
b::Element(e::Situational, "Terms Discount Due Date"), | ||
b::Element(e::Situational, "Terms Discount Days Due"), | ||
b::Element(e::Situational, "Terms Net Due Date"), | ||
b::Element(e::Situational, "Terms Net Days"), | ||
b::Element(e::Situational, "Terms Discount Amount"), | ||
b::Element(e::Situational, "Terms Deferred Due Date"), | ||
b::Element(e::Situational, "Deferred Amount Due"), | ||
b::Element(e::Situational, "Percent of Invoice Payable"), | ||
b::Element(e::Situational, "Description"), | ||
b::Element(e::Situational, "Day of Month"), | ||
b::Element(e::Situational, "Payment Method Code"), | ||
b::Element(e::Situational, "Percent"))), #end TableDef HEADING, Segment 200 | ||
d::TableDef.header("Detail", | ||
d::LoopDef.build("IT1", d::RepeatCount.bounded(100000), | ||
b::Segment(10, s::IT1, "Baseline Item Data (Invoice)", r::Required, d::RepeatCount.bounded(1), | ||
b::Element(e::Situational, "Assigned Identification"), | ||
b::Element(e::Situational, "Quantity"), | ||
b::Element(e::Situational, "UOM"), | ||
b::Element(e::Situational, "Unit Price"), | ||
b::Element(e::Situational, "Basis of Unit Price Code"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID"), | ||
b::Element(e::Situational, "Product/Service ID Qualifier"), | ||
b::Element(e::Situational, "Product/Service ID")), #end Segment 10 | ||
b::Segment(20, s::TXI, "Tax Information", r::Situational, d::RepeatCount.bounded(10), | ||
b::Element(e::Situational, "Tax Type Code"), | ||
b::Element(e::Situational, "Monetary Amount"), | ||
b::Element(e::Situational, "Percent"), | ||
b::Element(e::Situational, "Tax Jurisdiction Code Qualifier"), | ||
b::Element(e::Situational, "Tax Jurisdiction Code"), | ||
b::Element(e::Situational, "Tax Exempt Code"), | ||
b::Element(e::Situational, "Relationship Code"), | ||
b::Element(e::Situational, "Dollar Basis For Percent"), | ||
b::Element(e::Situational, "Tax Identification Number"), | ||
b::Element(e::Situational, "Assigned Identification")), #end Segment 20 | ||
d::LoopDef.build("PID", d::RepeatCount.bounded(1000), | ||
b::Segment(30, s::PID, "Product/Item Description", r::Situational, d::RepeatCount.bounded(1), | ||
b::Element(e::Situational, "Item Description Type"), | ||
b::Element(e::Situational, "Process Characteristic Code"), | ||
b::Element(e::Situational, "Agency Qualifier Code"), | ||
b::Element(e::Situational, "Product Description Code"), | ||
b::Element(e::Situational, "Description"), | ||
b::Element(e::Situational, "Surface/Layer/Position Code"), | ||
b::Element(e::Situational, "Source Subqualifier"), | ||
b::Element(e::Situational, "Yes/No Condition or Response Code"), | ||
b::Element(e::Situational, "Language Code"))))), #end TableDef Detail, LoopDef IT1, LoopDef PID, Segment 30 | ||
d::TableDef.header("Summary", | ||
b::Segment(10, s::TDS, "Total Monetary Value Summary", r::Required, d::RepeatCount.bounded(1), | ||
b::Element(e::Situational, "Amount"), | ||
b::Element(e::Situational, "Amount"), | ||
b::Element(e::Situational, "Amount"), | ||
b::Element(e::Situational, "Amount")), #end Segment 10 | ||
b::Segment(20, s::TXI, "Tax Information", r::Situational, d::RepeatCount.bounded(10), | ||
b::Element(e::Situational, "Tax Type Code"), | ||
b::Element(e::Situational, "Monetary Amount"), | ||
b::Element(e::Situational, "Percent"), | ||
b::Element(e::Situational, "Tax Jurisdiction Code Qualifier"), | ||
b::Element(e::Situational, "Tax Jurisdiction Code"), | ||
b::Element(e::Situational, "Tax Exempt Code"), | ||
b::Element(e::Situational, "Relationship Code"), | ||
b::Element(e::Situational, "Dollar Basis For Percent"), | ||
b::Element(e::Situational, "Tax Identification Number"), | ||
b::Element(e::Situational, "Assigned Identification")), #end Segment 20 | ||
d::LoopDef.build("SAC", d::RepeatCount.bounded(25), | ||
b::Segment(30, s::SAC, "Service, Promotion, Allowance, or Charge Information", r::Situational, d::RepeatCount.bounded(1), | ||
b::Element(e::Situational, "Allowance or Charge Indicator"), | ||
b::Element(e::Situational, "Service, Promotion, Allowance, or Charge Code"), | ||
b::Element(e::Situational, "Agency Qualifier Code"), | ||
b::Element(e::Situational, "Agency Service, Promotion, Allowance, or Charge Code"), | ||
b::Element(e::Situational, "Amount"), | ||
b::Element(e::Situational, "Allowance/Charge Percent Qualifier"), | ||
b::Element(e::Situational, "Percent"), | ||
b::Element(e::Situational, "Rate"), | ||
b::Element(e::Situational, "Unit or Basis for Measurement Code"), | ||
b::Element(e::Situational, "Quantity"), | ||
b::Element(e::Situational, "Quantity"), | ||
b::Element(e::Situational, "Allowance or Charge Method of Handling Code"), | ||
b::Element(e::Situational, "Reference Identification"), | ||
b::Element(e::Situational, "Option Number"), | ||
b::Element(e::Situational, "Description"), | ||
b::Element(e::Situational, "Language Code"))), #end LoopDef SAC, Segment 30 | ||
b::Segment(40, s::CTT, "Transaction Totals", r::Situational, d::RepeatCount.bounded(10), | ||
b::Element(e::Situational, "Number of Line Items"), | ||
b::Element(e::Situational, "Hash Total"), | ||
b::Element(e::Situational, "Weight"), | ||
b::Element(e::Situational, "Unit or Basis for Measurement Code"), | ||
b::Element(e::Situational, "Volume"), | ||
b::Element(e::Situational, "Unit or Basis for Measurement Code"), | ||
b::Element(e::Situational, "Description")), #end Segment 40 | ||
b::Segment(50, s:: SE, "Transaction Set Trailer", r::Required, d::RepeatCount.bounded(1), | ||
b::Element(e::Required, "Number of Included Segments"), | ||
b::Element(e::Required, "Transaction Set Control Number")))) #end build IN, TableDef Summary, Segment 50 | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Stupidedi | ||
module TransactionSets | ||
module FortyTen | ||
module Standards | ||
b = Builder | ||
d = Schema | ||
r = SegmentReqs | ||
s = SegmentDefs | ||
|
||
IN810 = b.build("IN", "810", "Invoice", | ||
d::TableDef.header("1 - Header", | ||
s::ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)), | ||
s::BIG.use( 20, r::Mandatory, d::RepeatCount.bounded(1)), | ||
s::REF.use( 30, r::Optional, d::RepeatCount.bounded(1)), | ||
d::LoopDef.build("N1", d::RepeatCount.bounded(200), | ||
s:: N1.use( 110, r::Optional, d::RepeatCount.bounded(1)), | ||
s:: N2.use( 120, r::Optional, d::RepeatCount.bounded(2)), | ||
s:: N3.use( 130, r::Optional, d::RepeatCount.bounded(2)), | ||
s:: N4.use( 140, r::Optional, d::RepeatCount.unbounded)), #end LoopDef build N1 | ||
s::ITD.use( 200, r::Optional, d::RepeatCount.unbounded)), #end TableDef Header | ||
d::TableDef.detail("2 - Detail", | ||
d::LoopDef.build("IT1", d::RepeatCount.bounded(100000), | ||
s::IT1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)), | ||
s::TXI.use( 20, r::Optional, d::RepeatCount.bounded(10)), | ||
d::LoopDef.build("PID", d::RepeatCount.bounded(1000), | ||
s::PID.use( 30, r::Optional, d::RepeatCount.bounded(1))), #end LoopDef build PID | ||
s::REF.use( 40, r::Optional, d::RepeatCount.unbounded))), #end TableDef Detail, LoopDef build IT1 | ||
d::TableDef.summary("3 - Summary", | ||
s::TDS.use( 10, r::Mandatory, d::RepeatCount.bounded(1)), | ||
s::TXI.use( 20, r::Optional, d::RepeatCount.bounded(10)), | ||
d::LoopDef.build("SAC", d::RepeatCount.bounded(25), | ||
s:: SAC.use( 30, r::Optional, d::RepeatCount.bounded(1))), #end LoopDef build SAC | ||
s:: CTT.use( 40, r::Optional, d::RepeatCount.bounded(10)), | ||
s:: SE.use( 50, r::Mandatory, d::RepeatCount.bounded(1)))) #end build IN, TableDef Summary | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.