use strict;

return sub
{
	my $dbh = shift;
	

	my $sth = $dbh->prepare("select distinct sale_id from jin_commission");
	$sth->execute;

	my $sth1 = $dbh->prepare("update jin_sale set has_comms=1 where id=?");

	while (my $row = $sth->fetchrow_hashref)
	{
		$sth1->execute($row->{sale_id});
	}
	
	return;
};
