tango-app-api-payment-subscription 3.0.30-dev → 3.0.31-dev

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-payment-subscription",
3
- "version": "3.0.30-dev",
3
+ "version": "3.0.31-dev",
4
4
  "description": "paymentSubscription",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -62,7 +62,7 @@ export const clientBillingSubscriptionInfo = async ( req, res, next ) => {
62
62
  {
63
63
  $match: {
64
64
  clientId: req.params.clientId,
65
- status: 'active',
65
+ // status: 'active',
66
66
  },
67
67
  },
68
68
  {
@@ -493,7 +493,7 @@ export const trialProductList = async ( req, res ) => {
493
493
  {
494
494
  $match: {
495
495
  clientId: req.query.clientId,
496
- status: 'active',
496
+ // status: 'active',
497
497
  },
498
498
  },
499
499
  { $unwind: '$planDetails.product' },
@@ -717,7 +717,7 @@ export const notificationList = async ( req, res ) => {
717
717
  {
718
718
  $match: {
719
719
  clientId: req.query.clientId,
720
- status: 'active',
720
+ // status: 'active',
721
721
  },
722
722
  },
723
723
  { $unwind: '$planDetails.product' },
@@ -945,7 +945,8 @@ export const productSubscribe = async ( req, res ) => {
945
945
  // let findIndex = product.findIndex( ( product ) => product.productName );
946
946
  // product.splice( findIndex, 1 );
947
947
  // let requestDetails = await clientRequestService.findOne({});
948
- await storeService.addremoveElement( { clientId: clientInfo.clientId, status: 'active', product: { $in: item.name } }, { $pull: { product: item.name } } );
948
+ await storeService.addremoveElement( { clientId: clientInfo.clientId, product: { $in: item.name } }, { $pull: { product: item.name } } );
949
+ // status: 'active',
949
950
  }
950
951
  if ( !productList.includes( item.name ) && [ 'trial', 'subscription' ].includes( item.type ) ) {
951
952
  if ( item.type == 'trial' ) {
@@ -1081,7 +1082,7 @@ export const productViewList = async ( req, res ) => {
1081
1082
  {
1082
1083
  $match: {
1083
1084
  clientId: req.query.clientId,
1084
- status: 'active',
1085
+ // status: 'active',
1085
1086
  },
1086
1087
  },
1087
1088
  { $unwind: '$product' },
@@ -1155,7 +1156,7 @@ export const storeViewList = async ( req, res ) => {
1155
1156
  {
1156
1157
  $match: {
1157
1158
  clientId: req.body.clientId,
1158
- status: 'active',
1159
+ // status: 'active',
1159
1160
  },
1160
1161
  },
1161
1162
  ];
@@ -1516,7 +1517,7 @@ export const priceList = async ( req, res ) => {
1516
1517
  {
1517
1518
  $match: {
1518
1519
  clientId: req.body.clientId,
1519
- status: 'active',
1520
+ // status: 'active',
1520
1521
  },
1521
1522
  },
1522
1523
  { $unwind: '$product' },
@@ -1922,11 +1923,11 @@ export const getExpiredClients = async ( req, res ) => {
1922
1923
  end = new Date( end.getTime() - userTimezoneOffset );
1923
1924
  end.setUTCHours( 23, 59, 59, 59 );
1924
1925
  let query = [
1925
- {
1926
- $match: {
1927
- status: 'active',
1928
- },
1929
- },
1926
+ // {
1927
+ // $match: {
1928
+ // status: 'active',
1929
+ // },
1930
+ // },
1930
1931
  { $unwind: '$planDetails.product' },
1931
1932
  {
1932
1933
  $match: {
@@ -1987,6 +1988,7 @@ export const invoiceDownload = async ( req, res ) => {
1987
1988
  let invoiceDate= dayjs( invoiceInfo.createdAt ).format( 'DD MMM, YYYY' );
1988
1989
  let days = clientDetails?.paymentInvoice?.extendPaymentPeriodDays || 10;
1989
1990
  let dueDate = invoiceInfo?.dueDate ? dayjs( invoiceInfo?.dueDate ).format( 'DD MMM, YYYY' ) : dayjs().add( days, 'days' ).format( 'DD MMM, YYYY' );
1991
+
1990
1992
  invoiceDetails = {
1991
1993
  ...invoiceInfo._doc,
1992
1994
  clientName: clientDetails.clientName,