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

sub set_acct_pakete($$;$) {
	my($hash,$seq,$kn) = @_;
	my($id,$opack) = DoFn("select kunde,pakete from acct where `hash`=$hash and seq=$seq");

	my $pakete = line_in "Pakete: ";
	return undef unless $pakete =~ /^\d+$/;

	log_update("acct","hash",$hash,"seq",$seq,undef,"pakete",undef,$opack);
	Do("update acct set pakete=$pakete where `hash`=$hash and seq=$seq");

	if($id > 0) {
	    Do("update kunde set geaendert=UNIX_TIMESTAMP(NOW()) where id=$id");
	}
	($hash,$seq);
}
1;
