4 require './autoeconomy.pm';
6 my $dbh = autoeconomy::db_connect();
7 my $reference = $ARGV[0];
8 my $cssfile = $ARGV[1];
10 my $ref = $dbh->selectrow_hashref('SELECT * FROM transaction WHERE reference=?', undef,
13 die "Couldn't find row '$reference'";
17 "--account=" . $ref->{'account'},
18 "--usedate=" . $ref->{'use_date'},
19 "--reference=" . $ref->{'reference'},
20 "--type=" . $ref->{'trans_type'},
21 "--text=" . $ref->{'text'},
22 "--direction=" . (defined($ref->{'amount_in'}) ? 'in' : 'out'),
23 "--amount=" . ($ref->{'amount_in'} || $ref->{'amount_out'})
26 if (defined($cssfile)) {
27 system("crm", "learn.crm",
29 "--cssfile=" . $cssfile
32 system("crm", "classify.crm",
34 "--cssfiles=" . join(' ', <*.css>)