Fix spelling
Reported by Noor
This commit is contained in:
parent
9c3e773e6f
commit
31a1aa5c45
2 changed files with 10 additions and 10 deletions
|
@ -21,7 +21,7 @@ use IPC::Open2 qw(open2);
|
||||||
use List::Util qw(sum);
|
use List::Util qw(sum);
|
||||||
|
|
||||||
my $iban = "NL99ABCD1234567890";
|
my $iban = "NL99ABCD1234567890";
|
||||||
my $benificiary = "Account Name";
|
my $beneficiary = "Account Name";
|
||||||
|
|
||||||
sub command { NEXT }
|
sub command { NEXT }
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ sub hook_checkout {
|
||||||
"\n",
|
"\n",
|
||||||
"BCD", "002", 1, "SCT",
|
"BCD", "002", 1, "SCT",
|
||||||
"",
|
"",
|
||||||
$benificiary,
|
$beneficiary,
|
||||||
$iban,
|
$iban,
|
||||||
"EUR" . $amount, # Amount
|
"EUR" . $amount, # Amount
|
||||||
"",
|
"",
|
||||||
|
|
16
plugins/give
16
plugins/give
|
@ -7,16 +7,16 @@ sub command :Tab(give) {
|
||||||
|
|
||||||
return NEXT if $command ne 'give';
|
return NEXT if $command ne 'give';
|
||||||
|
|
||||||
return "Benificiary", \&benificiary;
|
return "Beneficiary", \&beneficiary;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub benificiary :Tab(USERS) {
|
sub beneficiary :Tab(USERS) {
|
||||||
my ($self, $cart, $input) = @_;
|
my ($self, $cart, $input) = @_;
|
||||||
|
|
||||||
$self->{benificiary} = parse_user($input)
|
$self->{beneficiary} = parse_user($input)
|
||||||
or return REJECT, "$input: No such user.";
|
or return REJECT, "$input: No such user.";
|
||||||
|
|
||||||
return "Amount to give to $self->{benificiary}", \&amount;
|
return "Amount to give to $self->{beneficiary}", \&amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub amount {
|
sub amount {
|
||||||
|
@ -28,22 +28,22 @@ sub amount {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"Why are you giving %.2f to %s, or enter your username to end",
|
"Why are you giving %.2f to %s, or enter your username to end",
|
||||||
$self->{amount},
|
$self->{amount},
|
||||||
$self->{benificiary}
|
$self->{beneficiary}
|
||||||
), \&reason;
|
), \&reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub reason :Tab(whatevah) {
|
sub reason :Tab(whatevah) {
|
||||||
my ($self, $cart, $input) = @_;
|
my ($self, $cart, $input) = @_;
|
||||||
|
|
||||||
my $benificiary = $self->{benificiary};
|
my $beneficiary = $self->{beneficiary};
|
||||||
my $amount = $self->{amount};
|
my $amount = $self->{amount};
|
||||||
|
|
||||||
my $user = parse_user($input);
|
my $user = parse_user($input);
|
||||||
my $reason = $user ? "" : " ($input)";
|
my $reason = $user ? "" : " ($input)";
|
||||||
|
|
||||||
$cart
|
$cart
|
||||||
->add(-$amount, "Given to $benificiary" . $reason)
|
->add(-$amount, "Given to $beneficiary" . $reason)
|
||||||
->add_contra($benificiary, +$amount, "Received from \$you" . $reason);
|
->add_contra($beneficiary, +$amount, "Received from \$you" . $reason);
|
||||||
|
|
||||||
$cart->checkout($user) if $user;
|
$cart->checkout($user) if $user;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue