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

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



sub GetByContract
{
	my ($class, $contractID) = @_;

	my $sql = "SELECT * FROM ".kTable." LEFT JOIN license_income_type USING ( license_income_type_id ) WHERE ".kTable.".artist_contract_id=$contractID ORDER BY license_income_type.name";

    return $class->GetAll($sql);
}


1;
