Call the bank: ask for a loan from the Bank window

With a rating of A or better, five amount buttons in the Bank window make an
immediate offer. The terms follow from the rating alone (bank, APR, conditions
and limit in CALL_TERMS), so calling again gets nothing better and rolls no
dice. The limit is a multiple of monthly revenue less current debt. An offer
goes through the existing card and takeLoan, and a new call replaces an earlier
called offer.

Fixes #251
This commit is contained in:
Christopher Hawker 2026-11-04 23:40:46 +11:00
parent ac5ce7fa05
commit ae70e8e750
13 changed files with 194 additions and 2 deletions

View file

@ -39,6 +39,7 @@ const API_DOMAINS={
opsTplKey:{kind:'enum',values:()=>OPS_TPL.slice()},
// The specialist's offers: a seat on a consortium cable, the charter, a vendor demo.
seatPairs:{kind:'enum',values:()=>SEAT_N.slice()},
callAmount:{kind:'enum',values:()=>CALL_AMTS.slice()},
charterKey:{table:'CHARTERS',kind:'key'},
// The link metric editor: a factor or an exact weight (metricMode, metricSet).
metricKind:{kind:'enum',values:['f','w']},

View file

@ -240,6 +240,8 @@ const API_CMD={
/* ---------- money ---------- */
takeLoan:{args:[['id','entityId']],
doc:'Accept a loan offer. Terms vary wildly by bank; the crypto one pays out 55-135% of face value. Equity banks take a share of the company.'},
callBank:{args:[['amount','callAmount']],watch:['loanOffers'],
doc:'Call a bank for a loan offer of this size, with a credit rating of A or better. The terms follow from the rating, and the amount must fit the limit of a few months of revenue less current debt. Nothing is borrowed until you take the offer.'},
declineLoan:{args:[['id','entityId']],
doc:'Throw a loan offer away.'},
repayLoan:{args:[['id','entityId']],confirm:'double',