docs: fix floating point truncation

This commit is contained in:
Prohurtz 2024-03-20 15:54:59 -07:00
parent e963ef4a64
commit a3801e216c

View File

@ -21,8 +21,8 @@
<span v-else>{{ component.choices[0].name }}</span> <span v-else>{{ component.choices[0].name }}</span>
</td> </td>
<td>{{ component.selectedChoice ? component.choices[component.selectedChoice].amount(tracker) : 0 }}</td> <td>{{ component.selectedChoice ? component.choices[component.selectedChoice].amount(tracker) : 0 }}</td>
<td>{{ component.selectedChoice ? '$' + component.choices[component.selectedChoice].cost : 0 }}</td> <td>{{ component.selectedChoice ? '$' + component.choices[component.selectedChoice].cost.toFixed(2) : 0 }}</td>
<td>{{ component.selectedChoice ? '~$' + (component.choices[component.selectedChoice].costAll(tracker) * 100) / 100 : 0 }}</td> <td>{{ component.selectedChoice ? '~$' + (component.choices[component.selectedChoice].costAll(tracker).toFixed(2)) : 0 }}</td>
<td v-html="component.selectedChoice ? component.choices[component.selectedChoice].links : ''"></td> <td v-html="component.selectedChoice ? component.choices[component.selectedChoice].links : ''"></td>
</tr> </tr>
</tbody> </tbody>