Module: Stupidedi::Contrib::TwoThousandOne::TransactionSetDefs

Defined in:
lib/stupidedi/contrib/002001/transaction_set_defs.rb,
lib/stupidedi/contrib/002001/transaction_set_defs/FA997.rb,
lib/stupidedi/contrib/002001/transaction_set_defs/PO830.rb,
lib/stupidedi/contrib/002001/transaction_set_defs/SH856.rb

Constant Summary collapse

SegmentReqs =

SegmentReqs = Versions::FunctionalGroups::FortyTen::SegmentReqs SegmentDefs = Versions::FunctionalGroups::FortyTen::SegmentDefs

Versions::FunctionalGroups::TwoThousandOne::SegmentReqs
SegmentDefs =
Versions::FunctionalGroups::TwoThousandOne::SegmentDefs
FA997 =
d::TransactionSetDef.build("FA", "997", "Functional Acknowledgment",

          d::TableDef.header("Table 1 - Header",
s:: ST.use(10, r::Mandatory, d::RepeatCount.bounded(1)),
s::AK1.use(20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("AK2", d::RepeatCount.bounded(999999),
  s:: AK2.use( 30, r::Optional, d::RepeatCount.bounded(1)),

  d::LoopDef.build("AK3", d::RepeatCount.bounded(999999),
    s::AK3.use(40, r::Optional, d::RepeatCount.bounded(1)),
    s::AK4.use(50, r::Optional, d::RepeatCount.bounded(99))),

  s::AK5.use(60, r::Mandatory, d::RepeatCount.bounded(1))),

s::AK9.use(70, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(80, r::Mandatory, d::RepeatCount.bounded(1))))
PO830 =
d::TransactionSetDef.build("PO", "830", "Material Release for Manufacturing",

          d::TableDef.header("Table 1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BFR.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(1),
  s:: N1.use(  90, r::Optional, d::RepeatCount.bounded(2)),
  s::PER.use( 140, r::Optional, d::RepeatCount.bounded(3)))),

          d::TableDef.detail("Table 2 - Detail",
d::LoopDef.build("LIN", d::RepeatCount.bounded(10000),
  s::LIN.use( 300, r::Mandatory, d::RepeatCount.bounded(1)),
  s::UNT.use( 310, r::Mandatory, d::RepeatCount.bounded(1)),
  s::J2X.use( 330, r::Optional, d::RepeatCount.bounded(1)),
  s::PER.use( 450, r::Optional, d::RepeatCount.bounded(1)),

  d::LoopDef.build("N1", d::RepeatCount.bounded(1),
    s:: N1.use( 510, r::Optional, d::RepeatCount.bounded(1))),

  d::LoopDef.build("SDP", d::RepeatCount.bounded(104),
    s::SDP.use( 580, r::Mandatory, d::RepeatCount.bounded(1)),
    s::FST.use( 590, r::Mandatory, d::RepeatCount.bounded(104))),

  s::ATH.use( 610, r::Optional, d::RepeatCount.bounded(2)),
  s::TD5.use( 650, r::Optional, d::RepeatCount.bounded(1)),
  s::MAN.use( 680, r::Optional, d::RepeatCount.bounded(1)))),

          d::TableDef.summary("Table 3 - Summary",
s::CTT.use(690, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(700, r::Mandatory, d::RepeatCount.bounded(1))))
SH856 =
d::TransactionSetDef.build("SH", "856", "Ship Notice/Manifest",

          d::TableDef.header("Table 1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BSN.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::DTM.use( 40, r::Optional,  d::RepeatCount.bounded(10))),

          d::TableDef.detail("Table 2 - Detail",
d::LoopDef.build("HL", d::RepeatCount.bounded(1),
  s:: HL.use(  50, r::Mandatory, d::RepeatCount.bounded(1)),
  s::LIN.use(  60, r::Optional,  d::RepeatCount.bounded(1)),
  s::SN1.use(  80, r::Optional,  d::RepeatCount.bounded(1)),
  s::PO4.use( 110, r::Optional,  d::RepeatCount.bounded(1)),
  s::MEA.use( 130, r::Optional,  d::RepeatCount.bounded(1)),
  s::TD1.use( 160, r::Optional,  d::RepeatCount.bounded(1)),
  s::TD3.use( 180, r::Optional,  d::RepeatCount.bounded(1)),
  s::REF.use( 200, r::Optional,  d::RepeatCount.bounded(2)),

  d::LoopDef.build("N1", d::RepeatCount.bounded(200),
    s:: N1.use(270, r::Optional, d::RepeatCount.bounded(1))))),

          d::TableDef.summary("Table 3 - Summary",
s::CTT.use(380, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(390, r::Mandatory, d::RepeatCount.bounded(1))))