Module: Stupidedi::Contrib::ThirtyTen::TransactionSetDefs

Defined in:
lib/stupidedi/contrib/003010/transaction_set_defs.rb,
lib/stupidedi/contrib/003010/transaction_set_defs/PC860.rb,
lib/stupidedi/contrib/003010/transaction_set_defs/PO850.rb,
lib/stupidedi/contrib/003010/transaction_set_defs/PS830.rb,
lib/stupidedi/contrib/003010/transaction_set_defs/RA820.rb

Constant Summary collapse

SegmentReqs =
Versions::FunctionalGroups::ThirtyTen::SegmentReqs
SegmentDefs =
Versions::FunctionalGroups::ThirtyTen::SegmentDefs
PC860 =
d::TransactionSetDef.build("PC", "860", "Purchase Order Change",
          d::TableDef.header("Table 1 - Header",
s:: ST.use(  10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BCH.use(  20, r::Mandatory, d::RepeatCount.bounded(1)),
s::CUR.use(  40, r::Optional,  d::RepeatCount.bounded(1)),
s::FOB.use(  80, r::Optional,  d::RepeatCount.bounded(1)),
s::ITD.use( 130, r::Optional,  d::RepeatCount.bounded(5)),
s::DTM.use( 150, r::Optional,  d::RepeatCount.bounded(10)),
s::TD5.use( 240, r::Optional,  d::RepeatCount.bounded(12)),

d::LoopDef.build("N9 - 4", d::RepeatCount.bounded(4),
  s:: N9.use( 283, r::Optional,  d::RepeatCount.bounded(1)),
  s::MSG.use( 290, r::Optional,  d::RepeatCount.bounded(1000))),

d::LoopDef.build("N1", d::RepeatCount.bounded(1),
  s:: N1.use( 300, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N2.use( 310, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N3.use( 320, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N4.use( 330, r::Optional,  d::RepeatCount.bounded(1)))),

          d::TableDef.detail("Table 2 - Detail",
d::LoopDef.build("POC", d::RepeatCount.bounded(10000),
  s::POC.use(  10, r::Optional,  d::RepeatCount.bounded(1)),

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

  d::LoopDef.build("N9 - 5", d::RepeatCount.bounded(1),
    s:: N9.use( 320, r::Optional,  d::RepeatCount.bounded(1)),
    s::MSG.use( 330, r::Optional,  d::RepeatCount.bounded(1000))))),

          d::TableDef.summary("Table 3 - Summary",
s::CTT.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use( 30, r::Mandatory, d::RepeatCount.bounded(1))))
PO850 =
d::TransactionSetDef.build("PO", "850", "Purchase Order",
          d::TableDef.header("Table 1 - Header",
s:: ST.use(  10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BEG.use(  20, r::Mandatory, d::RepeatCount.bounded(1)),
s::CUR.use(  40, r::Optional,  d::RepeatCount.bounded(1)),
s::FOB.use(  80, r::Optional,  d::RepeatCount.bounded(1)),
s::ITD.use( 130, r::Optional,  d::RepeatCount.bounded(5)),
s::DTM.use( 150, r::Optional,  d::RepeatCount.bounded(2)),
s::TD5.use( 240, r::Optional,  d::RepeatCount.bounded(1)),

d::LoopDef.build("N9", d::RepeatCount.bounded(4),
  s:: N9.use( 330, r::Optional,  d::RepeatCount.bounded(1)),
  s::MSG.use( 340, r::Optional,  d::RepeatCount.bounded(1000))),

d::LoopDef.build("N1", d::RepeatCount.bounded(200),
  s:: N1.use( 310, r::Optional,  d::RepeatCount.bounded(1)),
  s:: N2.use( 320, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N3.use( 330, r::Optional,  d::RepeatCount.bounded(2)),
  s:: N4.use( 340, r::Optional,  d::RepeatCount.bounded(1)))),

          d::TableDef.detail("Table 2 - Detail",
d::LoopDef.build("PO1", d::RepeatCount.bounded(10000),
  s::PO1.use(  10, r::Mandatory, d::RepeatCount.bounded(1)),

  d::LoopDef.build("PID", d::RepeatCount.unbounded,
    s::PID.use(  50, r::Optional,  d::RepeatCount.bounded(1))),

  d::LoopDef.build("N9", d::RepeatCount.bounded(1000),
    s:: N9.use( 330, r::Optional,  d::RepeatCount.bounded(1)),
    s::MSG.use( 340, r::Optional,  d::RepeatCount.bounded(1000))))),

          d::TableDef.summary("Table 3 - Summary",
s::CTT.use(  10, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(  30, r::Mandatory, d::RepeatCount.bounded(1))))
PS830 =
d::TransactionSetDef.build("PS", "830", "Planning Schedule with Release Capability",

          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)),

# s::NTE.use( 30, r::Optional, d::RepeatCount.bounded(100)),

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

          d::TableDef.detail("Table 2 - Detail",
d::LoopDef.build("LIN", d::RepeatCount.bounded(10000),
  s::LIN.use( 010, r::Mandatory, d::RepeatCount.bounded(1)),
  s::UIT.use( 020, r::Mandatory, d::RepeatCount.bounded(1)),
  s::PID.use(  80, r::Optional, d::RepeatCount.bounded(1000)),

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

  d::LoopDef.build("SDP", d::RepeatCount.bounded(100),
    s::SDP.use( 290, r::Optional, d::RepeatCount.bounded(1)),
    s::FST.use( 301, r::Optional, d::RepeatCount.bounded(1)),
    d::LoopDef.build("NTE", d::RepeatCount.bounded(100),
      s::NTE.use(  30, r::Optional, d::RepeatCount.bounded(100)),
      s::FST.use( 300, r::Optional, d::RepeatCount.bounded(260)))),

  # s::SDP.use( 291, r::Optional, d::RepeatCount.bounded(1)),
  # s::NTE.use(  31, r::Optional, d::RepeatCount.bounded(1)),

  d::LoopDef.build("SHP", d::RepeatCount.bounded(25),
    s::SHP.use( 330, r::Optional, d::RepeatCount.bounded(1))))),

          d::TableDef.summary("Table 3 - Summary",
s::CTT.use(010, r::Mandatory, d::RepeatCount.bounded(1)),
s:: SE.use(020, r::Mandatory, d::RepeatCount.bounded(1))))
RA820 =
d::TransactionSetDef.build("RA", "820", "Payment Order/Remittance Advice",

          d::TableDef.header("Table 1 - Header",
s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
s::BPS.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
s::REF.use( 50, r::Mandatory, d::RepeatCount.bounded(5)),
s::DTM.use( 60, r::Mandatory,  d::RepeatCount.bounded(1)),
d::LoopDef.build("N1", d::RepeatCount.bounded(1),
  s:: N1.use(  70, r::Optional, d::RepeatCount.bounded(1)))),

          d::TableDef.detail("Table 2 - Detail",
s:: LS.use(  10, r::Mandatory, d::RepeatCount.bounded(1)),

d::LoopDef.build("N1", d::RepeatCount.bounded(10000),
  s:: N1.use(  20, r::Mandatory, d::RepeatCount.bounded(1)),
  d::LoopDef.build("RMT", d::RepeatCount.unbounded,
    s::RMT.use(  30, r::Optional,  d::RepeatCount.bounded(1)),
    s::REF.use(  50, r::Optional,  d::RepeatCount.unbounded),
    s::DTM.use(  60, r::Optional,  d::RepeatCount.bounded(10)))),

s:: LE.use(  70, r::Mandatory, d::RepeatCount.bounded(1))),

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