package RPS::Import::ProperUK::v12;

use strict;
use warnings;

use lib '/app/tools/rps/lib';

use base 'RPS::Import::ProperUK::v10';

sub _fieldMap {
    return {
        dateBegin => 'B3',
        labelName        => 'A',
        countryCode      => 'K',
        productType      => 'B',
        artistName       => 'F',
        clientProductID  => 'D',
        upc              => 'E',
        albumName        => 'G',
        currencyCode     => 'Z',
        wholesalePrice   => 'H',
        sales            => 'L',
        salesRevenue     => 'O',
        returns          => 'P',
        returnsRevenue   => 'S',
        units            => 'T',
        totalRevenue     => 'X',
    }
}

sub _headerIdentifier { 'upc' => 'Barcode' }

sub channel    { RPS::File::Sale::CHANNEL_RETAIL }
sub priceLevel { RPS::File::Sale::PLEVEL_FULL }

sub currencyCode {
    my $self  = shift;

    my $ccode = $self->_getByFieldName('currencyCode');

    return $ccode if ($ccode =~ /^\w{3}$/);

    $self->SUPER::currencyCode();
}

1;
