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

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


use lib '/app/tools/rps/lib';
use RPS::Statement::UKMechanical::McpsStatementFull;
use RPS::Mechanical::UK::UKMechanicalRun;
use RPS::Payor::Payor;
use RPS::Product::TypeList;
use RPS::Region::RegionList;

use Common::FormObject;


use base 'Common::FormObject';

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

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

	my $stmtID = $args{statementID};
	
	if($stmtID)
    {
		$self->{McpsStatement} = RPS::Statement::UKMechanical::McpsStatementFull->new
        (
            mcpsStatementID => $stmtID,
        );

		my $royaltyRunID = $self->{McpsStatement}->UKMechanicalRunID();
		$self->{UKMechanicalRun} = RPS::Mechanical::UK::UKMechanicalRun->new(ukMechanicalRunID => $royaltyRunID, loadSubs => 0);
		my $payorID = $self->{UKMechanicalRun}->PayorID();
		$self->{Payor} = RPS::Payor::Payor->new(payorID => $payorID);		
    }


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

