#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::DB::Item::MechanicalStatementTransaction;
use strict;
use warnings;
use lib '/app/tools/common/lib';
use Common::Assert;
use Common::DB::Item;
use base 'Common::DB::Item';

use constant kTable => 'mechanical_statement_transaction';
use constant kDB => Common::DB::Item::kClientDB();



sub GetByMechanicalStatementID
{
    my ($class, $stmtID) = @_;
    assert($stmtID);

    my $sql = "SELECT * FROM " . kTable
            . " WHERE mechanical_statement_id=$stmtID";
    return $class->GetAll($sql);
}



sub DeleteByMechanicalStatementID
{
    my ($class, $id) = @_;

	my $sql = "DELETE from " . kTable . " WHERE mechanical_statement_id=$id";
	my $dbo = Common::RSApp::GetClientDB();
    $dbo->DoCmd($sql);
}


1;
