Fixing loan repayment max input value.

logins
Thomas Hintz 5 years ago
parent a13e26b24c
commit b3c0de6592

@ -538,7 +538,7 @@ class Loans extends React.Component {
} else {
takeOut = value * 1000;
}
this.setState({ repay: Math.max(0, Math.ceil(
this.setState({ repay: Math.max(0, Math.floor(
Math.min(repay, this.props.player.debt + 900, this.props.player.cash) / 1000)),
takeOut: Math.max(0, Math.floor(
Math.min(takeOut, this.state.maxLoan) / 1000)) });
@ -583,7 +583,7 @@ class Loans extends React.Component {
$:
<input onChange={this.handleInput} name='repay' type='number'
value={this.state.repay === 0 ? '' : this.state.repay}/>
{'\u00A0'}K / ${this.props.player.debt / 1000}K
{'\u00A0'}K / ${Math.floor(this.props.player.debt / 1000)}K
</div>
</Col>
<Col width='4'>

Loading…
Cancel
Save