Note the open question in step B5.4
This commit is contained in:
1 parent
f2798366e3
commit
9d306aca2a
1 file changed
+9
-5
+9
-5
@@ -298,11 +298,15 @@ transfer may not name the bank. `validation` learns the bank id as an optional p
|
||||
**Verify:** six payloads, clean and rejected, each with its Nynorsk message.
|
||||
|
||||
### B5.4 `ledger.py`
|
||||
Refuse any transaction that would overdraw an account's kroner, a `trade` buy included, with the
|
||||
same message as a transfer. The bank is covered by the same rule, so a cost without kroner on the
|
||||
bank is refused.
|
||||
**Verify:** the unit tests, plus a hand check of a buy that overdraws, a cost that overdraws the
|
||||
bank, and one that a deposit covers.
|
||||
Nothing changes here unless the owner answers the question below with "refuse everything". The
|
||||
rule stays as B4.4 wrote it: a `transfer_out` is refused when the kroner do not cover it, with the
|
||||
shortfall named in kroner, and a buy or a cost may overdraw and is shown as a negative balance.
|
||||
**Open:** the owner asked that no account may go negative, but an absolute rule makes the golden
|
||||
example of §6.4 (buys with no kroner income) and a fresh installation (an empty bank) impossible
|
||||
to enter. Refusing everything would also need an opening balance for the bank, which is a new
|
||||
concept.
|
||||
**Verify:** the unit tests, plus a hand check of a transfer that overdraws and one a deposit
|
||||
covers.
|
||||
|
||||
### B5.5 `app.py`
|
||||
Allow the bank as the `market_id` or the `to_market_id` of a kroner `transfer_out` (and keep it
|
||||
|
||||
Reference in new issue
Block a user