use utf8;
use warnings; no warnings "redefine";
use strict;
use Dbase::Help qw(Do DoFn);
use Dbase::Globals qw(get_descr);
use Loader qw(select_descr log_update);

sub set_ticket_seq_typ($$;$) {
	my($tid,$seq,$kn) = @_;

	my $typ = select_descr("tickett",4,"","Typ","!hide");
	return undef unless defined $typ;
	$typ = "NULL" if $typ eq "-";

	log_update("ticketid","id",$tid,"seq",$seq,undef,"typ",undef,
		get_descr("tickett",DoFn("select typ from ticketid where ticket=$tid and seq=$seq"),1));
	Do("update ticketid set timestamp=timestamp, typ=$typ where ticket=$tid and seq=$seq");
}
1;
