Introduce 'withdraw', remove "withdrawal or unlisted" feature.
This should have been done much earlier, but wasn't done for nostalgic reasons. To new users, it didn't make sense that you could just enter an amount, and revbank would just accept that as "withdrawal or unlisted product". It existed for backwards compatibility with the very first revbank version, which didn't have a product list, and which was not yet used with a barcode scanner. You would simply enter the amount and your name, and there were no further statistics. Nowadays, there are statistics that are messed up if you don't use the product codes. And some people were looking for a withdrawal command, and try 'take' as that seems closest to it, but which instead transfers money to another account. Additionally, some texts were changed for improved clarity. ("Enter username to pay", when withdrawing, was confusing: one expects money back, not to pay more.)
This commit is contained in:
parent
e71df9b092
commit
a7a5f14e0c
5 changed files with 38 additions and 10 deletions
|
@ -33,9 +33,10 @@ sub hook_cart_changed($class, $cart, @) {
|
|||
|
||||
if (not $cart->entries('refuse_checkout')) {
|
||||
my $sum = $cart->sum;
|
||||
my $what = $sum->cents > 0 ? "add" : "pay";
|
||||
my $what = $sum->cents > 0 ? "add" : $cart->entries('is_withdrawal') ? "deduct" : "pay";
|
||||
my $dir = $sum->cents > 0 ? "to" : "from";
|
||||
my $abs = $sum->abs;
|
||||
say "Enter username to $what $abs; type 'abort' to abort.";
|
||||
say "Enter username to $what $abs $dir your account; type 'abort' to abort.";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue