tango-app-api-payment-subscription 3.0.27-dev → 3.0.29-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.27-dev",
3
+ "version": "3.0.29-dev",
4
4
  "description": "paymentSubscription",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "nodemon": "^3.1.0",
26
26
  "pdfmake": "^0.2.10",
27
27
  "swagger-ui-express": "^5.0.0",
28
- "tango-api-schema": "^2.0.78",
29
- "tango-app-api-middleware": "^1.0.49-dev",
28
+ "tango-api-schema": "^2.0.79",
29
+ "tango-app-api-middleware": "^1.0.54-dev",
30
30
  "winston": "^3.12.0",
31
31
  "winston-daily-rotate-file": "^5.0.0"
32
32
  },
@@ -1451,6 +1451,13 @@ export const invoiceList = async ( req, res ) => {
1451
1451
  }
1452
1452
  invoiceDetails[0].data.forEach( ( item ) => {
1453
1453
  item.billingDate = dayjs( item.billingDate ).format( 'DD MMM, YYYY' );
1454
+ if ( item.products?.length>0 ) {
1455
+ let newProducts = [];
1456
+ for ( let productIndex = 0; productIndex < item.products.length; productIndex++ ) {
1457
+ newProducts.push( item.products[productIndex]?.product?.product );
1458
+ }
1459
+ item.productList = newProducts;
1460
+ }
1454
1461
  } );
1455
1462
  if ( req.user.userType == 'client' ) {
1456
1463
  invoiceDetails[0].data.forEach( ( item ) => {