Class: ODDB::OdbaExporter::AcpricealgPublicLine

Inherits:
PackageLine show all
Defined in:
ext/export/src/oddbdat.rb

Constant Summary collapse

LENGTH =
9

Instance Method Summary collapse

Methods inherited from PackageLine

#initialize

Methods inherited from Line

#content, #empty?, #initialize, #to_s

Constructor Details

This class inherits a constructor from ODDB::OdbaExporter::PackageLine

Instance Method Details

#price_public_typeObject



478
479
480
481
482
483
484
# File 'ext/export/src/oddbdat.rb', line 478

def price_public_type
	if @package.sl_entry
		'PSL2'
	else
		'PPUB'
	end
end

#structureObject



466
467
468
469
470
471
472
473
474
475
476
477
# File 'ext/export/src/oddbdat.rb', line 466

def structure
	if(ppub = @package.price_public)
		{
			1		=>	'07',
			2		=>	@date,
			3		=>	@package.oid,
			4		=>	price_public_type,
			5		=>	'4',
			6		=>	sprintf('%2.2f', ppub.to_f),
		}
	end
end