… | |
… | |
53 | } |
53 | } |
54 | } |
54 | } |
55 | |
55 | |
56 | sub transaction { |
56 | sub transaction { |
57 | my ($who, $action, $amount, $currency) = @_; |
57 | my ($who, $action, $amount, $currency) = @_; |
58 | my $pay = $amount * %unit->{$currency}; |
58 | my $pay = $amount * $unit{$currency}; |
59 | |
59 | |
60 | # First check for possible overflow and user stupidity |
60 | # First check for possible overflow and user stupidity |
61 | if ($amount > 10000) { |
61 | if ($amount > 10000) { |
62 | return "Sorry, we do not handle more than 10000 units for one ".$action."."; |
62 | return "Sorry, we do not handle more than 10000 units for one ".$action."."; |
63 | } elsif ($amount == 0) { |
63 | } elsif ($amount == 0) { |