package BookPub::Import::Importer::INscribeDigital::Version5;

use strict;
use Data::Dumper;

use lib '/app/tools/common/lib';
use lib '/app/tools/bookpub/lib';

use base 'BookPub::Import::Importer::INscribeDigital::Version4';

sub _fieldMap {
    my $self = shift;

    if ( lc( $self->sheetname ) eq 'details' ) {
        return {
            dateBegin            => 'B',
            dateEnd              => 'B',
            rTitle               => 'G',
            isbn                 => 'F',
            rImprint             => 'C',
            countryCode          => 'E',
            rUnits               => 'L',
            listPrice            => 'K',
            rListPrice           => 'H',
            rDiscount            => 'N',
            rRevenue             => 'O',
            rChannel             => 'D',
            rTransactionCategory => 'P',
        };
    } else {
        return {};
    }
}

sub _dateFormat        { ['excel'] }
sub _dateNormalization { 'month' }

sub _isSaleRec { shift->countryCode }

sub listPrice { shift->_getByFieldName('listPrice') }

1;
