diff options
| author | Adam Soltys <[email protected]> | 2023-12-29 21:35:08 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-29 21:35:08 -0800 |
| commit | bf664a5397c24029e30a44cefe943b5f362d4956 (patch) | |
| tree | 53a9d7d27b5cb37c95dd533dc8cf2b05690552e6 /src | |
| parent | ca2a2e3cd9637e66e5b5f87106f5ef376fb063fa (diff) | |
| download | coinos-ui-bf664a5397c24029e30a44cefe943b5f362d4956.tar.gz coinos-ui-bf664a5397c24029e30a44cefe943b5f362d4956.zip | |
detect pending amounts for zero-amount invoices
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[id]/+layout.server.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/[username]/invoice/[id]/+layout.server.js b/src/routes/(app)/[username]/invoice/[id]/+layout.server.js index 9c5f9f77..6f9ae4a2 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+layout.server.js +++ b/src/routes/(app)/[username]/invoice/[id]/+layout.server.js @@ -23,7 +23,7 @@ export async function load({ depends, params, url, parent }) { amount = parseInt(amount); let paid = - (!amount && received) || + (!amount && (pending || received)) || (amount > 0 && (pending >= amount || received >= amount)); if (paid && !url.pathname.endsWith("paid")) { redirect( |
