From 834184e07b8d7bcfa9a4c69dbb0313dfe155159c Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Wed, 14 Sep 2011 13:42:21 +0000 Subject: [PATCH] Support PDF receipts --- src/InfoCon/buch/infocon | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/InfoCon/buch/infocon b/src/InfoCon/buch/infocon index ff7a043..d4224da 100755 --- a/src/InfoCon/buch/infocon +++ b/src/InfoCon/buch/infocon @@ -276,7 +276,7 @@ sub get_next_nr 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; @@ -296,7 +296,7 @@ sub buchung_input 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]/) { @@ -336,7 +336,7 @@ sub buchung_input $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 { @@ -362,8 +362,8 @@ sub buchung_input $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; } -- 2.20.1