#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Catalog::AlbumContractWithArtistContract;

use Carp;

use lib '/app/tools/common/lib';
use Common::FormObject;

use lib '/app/tools/rps/lib';
use RPS::ArtistContract::ArtistContract;
use RPS::Catalog::AlbumContract;

use base 'RPS::Catalog::AlbumContract';

sub _initProperties {
    my ( $self, $props ) = @_;

    $self->SUPER::_initProperties($props);
    $self->{Contract} = RPS::ArtistContract::ArtistContract->new(
        artistContractID => $props->{artist_contract_id},
        loadSubs => 0,
        readOnly => 1
    );

    $self->{CanDelete} = Common::FormObject::Scalar::Boolean->new(
        value    => $self->_canDelete(),
        readOnly => 1,
    );

    $self->{HasPendingExpenses} = Common::FormObject::Scalar::Boolean->new(
        value    => $self->_hasPendingExpenses(),    # initially assigned when called by _canDelete
        readOnly => 1,
    );
}


1;