#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Statement::Label::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::Label::StatementFull;
use RPS::LabelRoyalty::LabelRoyaltyRun;

use base 'Common::FormObject';

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

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

    my $stmtID = $args{labelStatementID};
    if ($stmtID) {
        $self->{LabelStatement} = RPS::Statement::Label::StatementFull->new( labelRoyaltyStatementID => $stmtID );

        my $royaltyRunID = $self->{LabelStatement}->LabelRoyaltyRunID();
        $self->{LabelRoyaltyRun} = RPS::LabelRoyalty::LabelRoyaltyRun->new( labelRoyaltyRunID => $royaltyRunID, loadSubs => 0 );
    }

    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;    #
###

