\n};
while ( $dow ) {
my $date = join('-', inverse_julian_day($jd));
print qq{
};
print qq{
\n};
$jd--;
$dow--;
}
print qq{
\n};
# Select A Date
print qq{
\n};
print qq{
\n\n};
print qq{\n};
print qq{\n};
exit;
} # end of getDate
#------------------
sub addTransactions {
#------------------
#foreach my $key ( sort keys %arr ) { print "K:$key V:$arr{$key} \n"; }
# passed: entry date;
my $date = $arr{date};
my $jd = julian_day( split('-', $date));
my $dow = day_of_week($jd);
my $fdate = formatDate($date);
print qq{
Transaction Date - $dowstd[$dow], $fdate
\n};
# Load Staff
my (@staff, %staffname, %position);
my $sth1 = $dbh->prepare("select field_value from staff_multi
where userid = ? and field_name = 'position'");
my $sth = $dbh->prepare("select lastname, firstname, userid from staff
order by lastname, firstname");
$sth->execute;
if ($DBI::errstr){ print $DBI::errstr; die "$DBI::errstr\n";}
while (my $ref = $sth->fetchrow_hashref ) {
my %r = %$ref;
push @staff, $r{userid};
$staffname{$r{userid}} = qq{$r{lastname}, $r{firstname}};
$sth1->execute( $r{userid} );
if ($DBI::errstr){ print $DBI::errstr; die "$DBI::errstr\n";}
my $position = $sth1->fetchrow;
$position{$r{userid}} = $position
}
# Start Form
print qq{\n};
print qq{