coupon fix
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -25,7 +25,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -247,8 +247,8 @@ public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
|||||||
couponModel = response.body().getData();
|
couponModel = response.body().getData();
|
||||||
couponModel.setStoreName(SessionHelper.getSelectedStore().getStoreName());
|
couponModel.setStoreName(SessionHelper.getSelectedStore().getStoreName());
|
||||||
couponModel.checkNull();
|
couponModel.checkNull();
|
||||||
SessionHelper.saveSelectedCoupon(couponModel);
|
|
||||||
if(couponModel.isActive()){
|
if(couponModel.isActive()){
|
||||||
|
SessionHelper.saveSelectedCoupon(couponModel);
|
||||||
DialogHelper.showDialogWithPositiveButton(
|
DialogHelper.showDialogWithPositiveButton(
|
||||||
couponUsedDialogTitle,
|
couponUsedDialogTitle,
|
||||||
BaseActivity.currentActivity,
|
BaseActivity.currentActivity,
|
||||||
|
|||||||
@@ -148,15 +148,15 @@ public class CheckCouponModel {
|
|||||||
calendarEnd = Calendar.getInstance();
|
calendarEnd = Calendar.getInstance();
|
||||||
calendarEnd.setTime(dateEnd);
|
calendarEnd.setTime(dateEnd);
|
||||||
|
|
||||||
if(calendarNow.get(Calendar.YEAR) > calendarEnd.get(Calendar.YEAR)){
|
if(calendarEnd.get(Calendar.YEAR) > calendarNow.get(Calendar.YEAR)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(calendarNow.get(Calendar.MONTH) + 1 > calendarEnd.get(Calendar.MONTH) + 1){
|
if(calendarEnd.get(Calendar.MONTH) > calendarNow.get(Calendar.MONTH)){
|
||||||
return true;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user