revbank/plugins/withdraw
2019-11-05 00:57:39 +01:00

15 lines
309 B
Perl

#!perl
HELP "<amount>" => "Withdraw or enter price manually";
sub command {
my ($self, $cart, $command) = @_;
my $amount = parse_amount($command);
defined $amount or return NEXT;
$cart->add(-$amount, "Withdrawal or unlisted product",
{ is_withdrawal => 1 });
return ACCEPT;
}