Originally written as a proof of concept demo. Reportedly it's broken
and cumbersome to use anyway, because of the external config file.
I don't think anyone is actually using this right now.
One more character so values >= 100.00 don't mess up the columns, at
least up to 999.99. I hope nobody's actually parsing the logs with fixed
character offsets.
It stored the old content, so effectively not changing the file.
I don't really understand why *this* was the version I committed,
because I was sure I tested it and it worked :)
Next input would not be split.
> withdraw 1
Pending:
1.00 Withdrawal
Enter username to deduct 1.00 from your account; type 'abort' to abort.
> undo
Undo is not available mid-transaction. Enter 'abort' to abort.
> undo 123
undo 123: No such product, user, or command.
Of course, "undo 123" as top-level input should have been split on
whitespace.
Top-level input is handled by the 'command' method, so that should be a
reliable way to detect that the prompt is a top-level prompt, rather
than a follow-up prompt. Keeping an additional global boolean was a dumb
approach anyway.
Now implemented via a hidden user called '-cash'.
This also introduces the concept of hidden accounts, that begin with '+' or
'-', for result accounts and balance accounts. Future versions can further
use this for more detailed bookkeeping. The idea behind the sign is that
'-' accounts should be inverted to get the intuitive value. So if the account
'-cash' has -13.37, that means there should be +13.37 in the cash box (or,
well, once the rest of this is implemented and the initial values are then set
correctly.)
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.)