diff options
| author | Adam Soltys <[email protected]> | 2024-01-13 08:55:39 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-01-13 08:55:39 +0000 |
| commit | 40978210da17b7c437df924e2999114439b0f287 (patch) | |
| tree | d32db4219df6e01ff4d5187d6a90839b1bf5a64b | |
| parent | 6f36b0a9c1b47ed624f59ca769d41ca868aef054 (diff) | |
| download | coinos-server-40978210da17b7c437df924e2999114439b0f287.tar.gz coinos-server-40978210da17b7c437df924e2999114439b0f287.zip | |
include tip in total calculation
| -rw-r--r-- | routes/users.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js index a0a0dcf9..2d9c4a1b 100644 --- a/routes/users.js +++ b/routes/users.js @@ -71,7 +71,8 @@ export default { let p = await g(`payment:${pid}`); if (!p) continue; total += p.amount; - if (p.amount < 0) total -= (p.fee || 0) + (p.ourfee || 0); + if (p.amount < 0) total -= (p.fee || 0) + (p.ourfee || 0) + (p.tip || 0); + else total += (p.tip || 0) } user.expected = total; |
