Skip to content
Snippets Groups Projects
Verified Commit 426ee1f7 authored by Julien Veyssier's avatar Julien Veyssier
Browse files

refs #117 use correct precision when displaying settlement plan

parent 90d9b8e5
No related branches found
No related tags found
No related merge requests found
......@@ -1247,13 +1247,13 @@ class ProjectService {
$transactions = [];
foreach ($balances as $memberId => $balance) {
if ($memberId !== $centeredOn) {
if ($balance >= 0.01) {
if ($balance > 0.0) {
array_push($transactions, [
'from' => $centeredOn,
'to' => $memberId,
'amount' => $balance
]);
} else if ($balance <= -0.01) {
} else if ($balance < 0.0) {
array_push($transactions, [
'from' => $memberId,
'to' => $centeredOn,
......
......@@ -57,7 +57,7 @@
</div>
{{ myGetSmartMemberName(project.id, value.to) }}
</td>
<td>{{ value.amount.toFixed(2) }}</td>
<td>{{ value.amount.toFixed(precision) }}</td>
</tr>
</tbody>
</v-table>
......@@ -103,6 +103,9 @@ export default {
editionAccess() {
return (this.project.myaccesslevel >= constants.ACCESS.PARTICIPANT)
},
precision() {
return this.project.precision || 2
},
},
watch: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment