#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package RPS::Statement::Artist::StatementDisplay;

use strict;
use warnings;
use lib '/app/tools/common/lib';
use Common::Assert;
use Common::FormObject;

use lib '/app/tools/rps/lib';
use RPS::Statement::Artist::StatementFull;
use RPS::ArtistRoyalty::ArtistRoyaltyRun;

use RPS::Region::RegionList;
use RPS::ArtistContract::ChannelList;
use RPS::ArtistContract::IncomeSourceList;
use RPS::ArtistContract::LicenseIncomeTypeList;
use RPS::ArtistContract::ContractRateTypeList;
use RPS::Price::PriceLevelList;
use RPS::Product::TypeList;

use base 'Common::FormObject';

sub _init {
    my ( $self, %args ) = @_;

    $self->SUPER::_init(%args);

    my $stmtID = $args{artistStatementID};
    if ($stmtID) {
        $self->{ArtistStatement} = RPS::Statement::Artist::StatementFull->new( artistRoyaltyStatementID => $stmtID );

        my $royaltyRunID = $self->{ArtistStatement}->ArtistRoyaltyRunID();
        $self->{ArtistRoyaltyRun} = RPS::ArtistRoyalty::ArtistRoyaltyRun->new( artistRoyaltyRunID => $royaltyRunID, loadSubs => 0 );
    }

    $self->{ChannelList}           = RPS::ArtistContract::ChannelList->new();
    $self->{RegionList}            = RPS::Region::RegionList->new();
    $self->{IncomeSourceList}      = RPS::ArtistContract::IncomeSourceList->new();
    $self->{LicenseIncomeTypeList} = RPS::ArtistContract::LicenseIncomeTypeList->new();
    $self->{ContractRateTypeList}  = RPS::ArtistContract::ContractRateTypeList->new();
    $self->{PriceLevelList}        = RPS::Price::PriceLevelList->new();
    $self->{TypeList}              = RPS::Product::TypeList->new( includeTrackProducts => 1 );

    return $self;
}

sub _propertyIsEditable {
    my ( $self, $propertyName ) = @_;

    # Nothing on this form is editable.
    #
    return 0;
}

sub validate {
    my ($self) = @_;

    # Don't call this!
    #
    assert(0);
    return 0;
}

sub save {
    my ($self) = @_;

    # Don't call this!
    #
    assert(0);

}

###
1;    #
###

