- fix order prod error when checking status
This commit is contained in:
		| @@ -310,15 +310,15 @@ export class TransactionService { | |||||||
|         'prepaid', |         'prepaid', | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
|     if (!productData.statusHistory.status.includes('ACTIVE')) { |     // if (!productData.statusHistory.status.includes('ACTIVE')) { | ||||||
|       throw new HttpException( |     //   throw new HttpException( | ||||||
|           { |     //       { | ||||||
|             statusCode: HttpStatus.INTERNAL_SERVER_ERROR, |     //         statusCode: HttpStatus.INTERNAL_SERVER_ERROR, | ||||||
|             error: `Transaction Failed because product is not active`, |     //         error: `Transaction Failed because product is not active`, | ||||||
|           }, |     //       }, | ||||||
|           HttpStatus.INTERNAL_SERVER_ERROR, |     //       HttpStatus.INTERNAL_SERVER_ERROR, | ||||||
|       ); |     //   ); | ||||||
|     } else { |     // } else { | ||||||
|  |  | ||||||
|       const trxId = Array(6) |       const trxId = Array(6) | ||||||
|           .fill(null) |           .fill(null) | ||||||
| @@ -454,7 +454,7 @@ export class TransactionService { | |||||||
|         amount: product_price.mark_up_price + product_price.price, |         amount: product_price.mark_up_price + product_price.price, | ||||||
|         status: statusTransaction[statusTransaction.SUCCESS], |         status: statusTransaction[statusTransaction.SUCCESS], | ||||||
|       }; |       }; | ||||||
|     } |     // } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   async orderTransactionProd( |   async orderTransactionProd( | ||||||
| @@ -467,15 +467,15 @@ export class TransactionService { | |||||||
|         'prepaid', |         'prepaid', | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
|     if (!productData.statusHistory.status.includes('ACTIVE')) { |     // if (!productData.statusHistory.status.includes('ACTIVE')) { | ||||||
|       throw new HttpException( |     //   throw new HttpException( | ||||||
|           { |     //       { | ||||||
|             statusCode: HttpStatus.INTERNAL_SERVER_ERROR, |     //         statusCode: HttpStatus.INTERNAL_SERVER_ERROR, | ||||||
|             error: `Transaction Failed because product is not active`, |     //         error: `Transaction Failed because product is not active`, | ||||||
|           }, |     //       }, | ||||||
|           HttpStatus.INTERNAL_SERVER_ERROR, |     //       HttpStatus.INTERNAL_SERVER_ERROR, | ||||||
|       ); |     //   ); | ||||||
|     } else { |     // } else { | ||||||
|     let status; |     let status; | ||||||
|     const amount = 0; |     const amount = 0; | ||||||
|     //GET USER DATA |     //GET USER DATA | ||||||
| @@ -692,7 +692,7 @@ export class TransactionService { | |||||||
|       amount: product_price.mark_up_price + product_price.price, |       amount: product_price.mark_up_price + product_price.price, | ||||||
|       status: status, |       status: status, | ||||||
|     }; |     }; | ||||||
|   } |   // } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   async orderTransactionBillProd( |   async orderTransactionBillProd( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user