package BookPub::Import::Importer::TheBookPeople::Version4;

use strict;

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

sub _fieldMap {
    {
        currencyCode           => 'F',
        countryCode            => 'D',
        dateBegin              => 'J',
        rProductType           => 'C',
        isbn                   => 'A',
        rTitle                 => 'B',
        rSales                 => 'L',
        rReturns               => 'M',
        rListPrice             => 'H',
        rListPriceCurrency     => 'F',
        rPurchasePrice         => 'G',
        rPurchasePriceCurrency => 'F',
        rRevenue               => 'I',
    };
}

sub rTaxUnitPrice {
    my $self = shift;

    return Common::RSMath::round( $self->rPurchasePrice, 2 ) - Common::RSMath::round( $self->rListPrice, 2 );
}

###
1;    # Play nicely.
###
