package BookPub::Import::Importer::InAudio::Version4;

use strict;

use lib '/app/tools/bookpub/lib';
use base 'BookPub::Import::Importer::InAudio';

sub _headerIdentifier { ( rRevenue => 'Royalty Earned' ) }

sub rListPriceCurrency { 'USD' }
sub rPurchaseType      { BookPub::DB::Item::Sale::kPurchaseTypeDownload }
sub productType        { BookPub::DB::Item::Sale::kProductTypeEBook }
sub formatType         { return }

# we need to call this here to override the same sub in the base class
sub rDiscount {
    my $self = shift;

    my $discount = $self->_getByFieldName('rDiscount');
    return 1 - $discount;
}

sub rServiceName {
    return BookPub::Tracker::Service::GetDefaultServiceName( service_id => shift->serviceID );
}

sub priceType {

    if ( Common::RSApp::GetClientID == 318 ) {    # MMUS
        return 'agency';
    }

    return 'rrp';
}

1;
