tango-app-api-client 3.1.13 → 3.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-client",
3
- "version": "3.1.13",
3
+ "version": "3.1.14",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -382,9 +382,18 @@ export async function detailedAllClientCount( req, res ) {
382
382
  {
383
383
  $project: {
384
384
  activeClient: { $cond: [ { $eq: [ '$status', 'active' ] }, 1, 0 ] },
385
- paidClient: { $cond: [ { $in: [ '$planDetails.paymentStatus', [ 'paid', 'unbilled', 'due' ] ] }, 1, 0 ] },
386
- trialClient: { $cond: [ { $eq: [ '$planDetails.paymentStatus', 'trial' ] }, 1, 0 ] },
387
- freeClient: { $cond: [ { $eq: [ '$planDetails.paymentStatus', 'free' ] }, 1, 0 ] },
385
+ paidClient: { $cond: [ { $and: [
386
+ { $eq: [ '$status', 'active' ] },
387
+ { $in: [ '$planDetails.paymentStatus', [ 'paid', 'unbilled', 'due' ] ] },
388
+ ] }, 1, 0 ] },
389
+ trialClient: { $cond: [ { $and: [
390
+ { $eq: [ '$status', 'active' ] },
391
+ { $eq: [ '$planDetails.paymentStatus', 'trial' ] },
392
+ ] }, 1, 0 ] },
393
+
394
+ freeClient: { $cond: [ { $and: [
395
+ { $eq: [ '$status', 'active' ] }, { $eq: [ '$planDetails.paymentStatus', 'free' ] },
396
+ ] }, 1, 0 ] },
388
397
  holdClient: { $cond: [ { $eq: [ '$status', 'hold' ] }, 1, 0 ] },
389
398
  suspendClient: { $cond: [ { $eq: [ '$status', 'suspended' ] }, 1, 0 ] },
390
399
  deactiveClient: { $cond: [ { $eq: [ '$status', 'deactive' ] }, 1, 0 ] },