Class: ODDB::OdbaExporter::AcLine
- Inherits:
-
PackageLine
- Object
- Line
- PackageLine
- ODDB::OdbaExporter::AcLine
- Defined in:
- ext/export/src/oddbdat.rb
Constant Summary collapse
- LENGTH =
55
Instance Method Summary collapse
- #generic_code(registration) ⇒ Object
- #iks_date(registration) ⇒ Object
- #ikskey ⇒ Object
- #inscode ⇒ Object
- #limitation ⇒ Object
- #limitation_points ⇒ Object
- #structure ⇒ Object
Methods inherited from PackageLine
Methods inherited from Line
#content, #empty?, #initialize, #to_s
Constructor Details
This class inherits a constructor from ODDB::OdbaExporter::PackageLine
Instance Method Details
#generic_code(registration) ⇒ Object
324 325 326 327 328 |
# File 'ext/export/src/oddbdat.rb', line 324 def generic_code(registration) if registration.generic_type == :generic 'Y' end end |
#iks_date(registration) ⇒ Object
329 330 331 332 333 |
# File 'ext/export/src/oddbdat.rb', line 329 def iks_date(registration) if(date = registration.registration_date) date.strftime("%Y%m%d") end end |
#ikskey ⇒ Object
334 335 336 337 338 |
# File 'ext/export/src/oddbdat.rb', line 334 def ikskey ikskey = @package.iksnr.dup ikskey << @package.ikscd ikskey end |
#inscode ⇒ Object
339 340 341 342 343 |
# File 'ext/export/src/oddbdat.rb', line 339 def inscode if @package.sl_entry '1' end end |
#limitation ⇒ Object
344 345 346 347 348 |
# File 'ext/export/src/oddbdat.rb', line 344 def limitation if((sl = @package.sl_entry) && (sl.limitation)) 'Y' end end |
#limitation_points ⇒ Object
349 350 351 352 353 |
# File 'ext/export/src/oddbdat.rb', line 349 def limitation_points if(sl = @package.sl_entry) sl.limitation_points end end |
#structure ⇒ Object
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'ext/export/src/oddbdat.rb', line 303 def structure { 1 => '01', 2 => @date, 3 => '1', 4 => @package.oid, 5 => '4', 7 => ikskey, 14 => @package.ikscat, # @package hat immer eine registration, da # Registration::create_package die Verknüpfung erstellt 20 => generic_code(@package.registration), 22 => iks_date(@package.registration), 29 => (@package.sl_entry) ? '3' : nil, 32 => (@package.public?) ? nil : 'H', 39 => inscode, 40 => limitation, 41 => limitation_points, 47 => (@package.narcotics.empty?) ? nil : 'y', } end |