diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt index c96a6471f6..47f9ca2407 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt @@ -522,6 +522,8 @@ constructor( ) && isBillSyncRequiredInBackground ) { refetchBillDetails() + } else { + notifyDuplicatePayment() } } } @@ -544,6 +546,8 @@ constructor( ) } _showBillDetailsUpdatedBottomSheet.emit(true) + } else { + notifyDuplicatePayment() } }, screenName = naviBbpsVmData.screen.screenName, diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/helper/NotifyDuplicatePaymentHandler.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/helper/NotifyDuplicatePaymentHandler.kt index 0a571fab37..291a4a0ad1 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/helper/NotifyDuplicatePaymentHandler.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/helper/NotifyDuplicatePaymentHandler.kt @@ -18,7 +18,13 @@ import com.navi.bbps.common.session.NaviBbpsSessionHelper import com.navi.bbps.common.usecase.FindLastOrderWithSuccessfulPaymentUseCase import com.navi.bbps.common.utils.getDisplayableAmount import com.navi.bbps.feature.customerinput.model.view.BillDetailsEntity -import com.navi.bbps.feature.customerinput.model.view.BillPeriod +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_BIMONTHLY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_DAILY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_HALFYEARLY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_MONTHLY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_QUARTERLY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_WEEKLY +import com.navi.bbps.feature.customerinput.model.view.BillPeriod.BILL_PERIOD_YEARLY import com.navi.bbps.feature.paybill.model.view.PayBillBottomSheetType import com.navi.common.di.CoroutineDispatcherProvider import com.navi.common.utils.safeLaunch @@ -75,16 +81,15 @@ constructor( ) val nextBillGenerationDate = - currentBillGenerationDate.apply { - when (billPeriod) { - BillPeriod.BILL_PERIOD_DAILY.name -> plusDays(1) - BillPeriod.BILL_PERIOD_WEEKLY.name -> plusWeeks(1) - BillPeriod.BILL_PERIOD_MONTHLY.name -> plusMonths(1) - BillPeriod.BILL_PERIOD_BIMONTHLY.name -> plusMonths(2) - BillPeriod.BILL_PERIOD_QUARTERLY.name -> plusMonths(3) - BillPeriod.BILL_PERIOD_HALFYEARLY.name -> plusMonths(6) - BillPeriod.BILL_PERIOD_YEARLY.name -> plusYears(1) - } + when (billPeriod) { + BILL_PERIOD_DAILY.name -> currentBillGenerationDate.plusDays(1) + BILL_PERIOD_WEEKLY.name -> currentBillGenerationDate.plusWeeks(1) + BILL_PERIOD_MONTHLY.name -> currentBillGenerationDate.plusMonths(1) + BILL_PERIOD_BIMONTHLY.name -> currentBillGenerationDate.plusMonths(2) + BILL_PERIOD_QUARTERLY.name -> currentBillGenerationDate.plusMonths(3) + BILL_PERIOD_HALFYEARLY.name -> currentBillGenerationDate.plusMonths(6) + BILL_PERIOD_YEARLY.name -> currentBillGenerationDate.plusYears(1) + else -> currentBillGenerationDate } val currentBillingCycle = currentBillGenerationDate..