coupon fix
This commit is contained in:
@@ -247,8 +247,8 @@ public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
||||
couponModel = response.body().getData();
|
||||
couponModel.setStoreName(SessionHelper.getSelectedStore().getStoreName());
|
||||
couponModel.checkNull();
|
||||
SessionHelper.saveSelectedCoupon(couponModel);
|
||||
if(couponModel.isActive()){
|
||||
SessionHelper.saveSelectedCoupon(couponModel);
|
||||
DialogHelper.showDialogWithPositiveButton(
|
||||
couponUsedDialogTitle,
|
||||
BaseActivity.currentActivity,
|
||||
|
||||
@@ -148,15 +148,15 @@ public class CheckCouponModel {
|
||||
calendarEnd = Calendar.getInstance();
|
||||
calendarEnd.setTime(dateEnd);
|
||||
|
||||
if(calendarNow.get(Calendar.YEAR) > calendarEnd.get(Calendar.YEAR)){
|
||||
if(calendarEnd.get(Calendar.YEAR) > calendarNow.get(Calendar.YEAR)){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(calendarNow.get(Calendar.MONTH) + 1 > calendarEnd.get(Calendar.MONTH) + 1){
|
||||
if(calendarEnd.get(Calendar.MONTH) > calendarNow.get(Calendar.MONTH)){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(calendarNow.get(Calendar.DAY_OF_MONTH) >= calendarEnd.get(Calendar.DAY_OF_MONTH)){
|
||||
if(calendarEnd.get(Calendar.DAY_OF_MONTH) >= calendarNow.get(Calendar.DAY_OF_MONTH)){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user