package RPS::Import::Boundee::v1;

use strict;

use lib '/app/tools/common/lib';
use Common::Date;
use Common::Log;

use lib '/app/tools/rps/lib';
use base 'RPS::Import::Boundee::Digital';

use Data::Dumper;

sub _headerIdentifier { ( type => 'Type' ) }

sub _fieldMap {
    {
        # Data
        dateBegin        => 'C',
        dateEnd          => 'C',
        type             => 'G',
        artistName       => 'O',
        albumName        => 'D',
        isrc             => 'N',
        trackName        => 'P',
        units            => 'L',
        sales            => 'R',
    }
}

sub _unverifiedFieldMap {
    {
        commission       => 'T',
    }
}

sub _dateFormat { 'numerical_year_first' }


sub price {
    my $self = shift;

    my $sales = $self->_getByFieldName('sales');
    my $commission = $self->_getByFieldName('commission');
    my $price = $sales - $commission;

    return $price;

}



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