Keep track of cash
First attempt at keeping track of where cash goes using the new hidden '-cash' account.
This commit is contained in:
parent
f84a69372a
commit
e3a04a0e36
1 changed files with 3 additions and 2 deletions
|
@ -18,8 +18,9 @@ sub amount($self, $cart, $arg, @) {
|
||||||
my $amount = parse_amount($arg);
|
my $amount = parse_amount($arg);
|
||||||
defined $amount or return REJECT, "Invalid amount";
|
defined $amount or return REJECT, "Invalid amount";
|
||||||
|
|
||||||
$cart->add(-$amount, "Withdrawal",
|
$cart
|
||||||
{ is_withdrawal => 1 });
|
->add(-$amount, "Withdrawal", { is_withdrawal => 1 })
|
||||||
|
->add_contra("-cash", +$amount, "Withdrawn by \$you");
|
||||||
|
|
||||||
return ACCEPT;
|
return ACCEPT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue