sub buchung_input
{
- my @fieldname = ('Datum','Year','Category','Description','Ein/Aus','Tax percent','Tax assigned','Price','Paid');
+ my @fieldname = ('Datum','PDF','Year','Category','Description','Ein/Aus','Tax percent','Tax assigned','Price','Paid');
my @input = ();
my $weiter = 'y';
my $i;
my $attribs = $term->Attribs;
- my $sth = $dbh->prepare ("INSERT INTO $table (nr,date,year,category,description,tax_percent,tax_assigned,price,paid) VALUES (?,?,?,?,?,?,?,?,?)");
+ my $sth = $dbh->prepare ("INSERT INTO $table (nr,date,pdf,year,category,description,tax_percent,tax_assigned,price,paid) VALUES (?,?,?,?,?,?,?,?,?,?)");
print "Buchungseingabe\n\n";
while ($weiter =~ /[JjYy1]/) {
$input[$i] = $ans;
$i++;
}
- } elsif ($fieldname[$i] eq "Paid") {
+ } elsif ($fieldname[$i] eq "Paid" || $fieldname[$i] eq "PDF") {
if ($ans =~ /[1jJyY]/) {
$input[$i] = 1;
} else {
$input[7] *= -1 if ($input[7] > 0);
}
- $sth->execute (get_next_nr(), date_to_string($input[0]), $input[1], $input[2], $input[3],
- $input[5], $input[6], $input[7], $input[8]);
+ $sth->execute (get_next_nr(), date_to_string($input[0]), $input[1], $input[2], $input[3], $input[4],
+ $input[6], $input[7], $input[8], $input[9]);
$weiter = read_input("Weiter",'j');
$input[6] = 0.0;
}