#!/usr/bin/perl
# $Id: lunch,v 1.1 1994/10/27 12:16:01 cbbrowne Exp $ 
# lunch - shortened transaction assumed to come from "cash"
if (($#ARGV < 0) || ($#ARGV > 3)) {
    print "Incorrect arguments\n";
    print "lunch [date] [optional amount] [optional payee] [optional comment]\n";
    print "example: lunch -t # Assumes 4.27 paid to 'Lunch'\n";
    die -1;
}
($date, $amount, $payee, $comment) = @ARGV;
if ($payee eq "") { $payee = "Lunch"; }
if ($amount eq "") {$amount = 4.27;}
$txn = sprintf ("txn cash $date n/a '$payee' 'lunch' %.2f '$comment'",
		$amount);
system($txn);
