coupon fix
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -25,7 +25,7 @@
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -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