Merge pull request #82 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_Promo_Tick
//Stock_FacingActivity Changes today
This commit is contained in:
@@ -3306,4 +3306,59 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
return filled;
|
return filled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMappingAdditionalPromotionData() {
|
||||||
|
boolean filled = false;
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("SELECT * FROM MAPPING_ADDITIONAL_PROMOTION ", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
int icount = dbcursor.getInt(0);
|
||||||
|
dbcursor.close();
|
||||||
|
if (icount > 0) {
|
||||||
|
filled = true;
|
||||||
|
} else {
|
||||||
|
filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", " when fetching Records!!!!!!!!!!!!!!!!!!!!! " + e.toString());
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkAdditionalPromoComplianceData(String store_id, String category_id) {
|
||||||
|
Log.d("PromoCompliance ", "AdditionalPromoCompliance data--------------->Start<------------");
|
||||||
|
ArrayList<Promo_Compliance_DataGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from Additional_Promo_Compliance_Data " +
|
||||||
|
"where CATEGORY_ID='" + category_id + "' and STORE_ID='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
if (dbcursor.moveToFirst()) {
|
||||||
|
do {
|
||||||
|
Promo_Compliance_DataGetterSetter sb = new Promo_Compliance_DataGetterSetter();
|
||||||
|
|
||||||
|
sb.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
list.add(sb);
|
||||||
|
} while (dbcursor.moveToNext());
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
|
||||||
|
return list.size() > 0;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("Stock_Facing ", "midday---------------------->Stop<-----------");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,9 +268,9 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
// There was an error; don't attempt login and focus the first
|
// There was an error; don't attempt login and focus the first
|
||||||
// form field with an error.
|
// form field with an error.
|
||||||
focusView.requestFocus();
|
focusView.requestFocus();
|
||||||
} else if(isuseridValid(userid)){
|
} else if (!isuseridValid(userid)) {
|
||||||
Snackbar.make(museridView, getString(R.string.error_incorrect_username), Snackbar.LENGTH_SHORT).show();
|
Snackbar.make(museridView, getString(R.string.error_incorrect_username), Snackbar.LENGTH_SHORT).show();
|
||||||
}else if(isPasswordValid(password)){
|
} else if (!isPasswordValid(password)) {
|
||||||
Snackbar.make(museridView, getString(R.string.error_incorrect_password), Snackbar.LENGTH_SHORT).show();
|
Snackbar.make(museridView, getString(R.string.error_incorrect_password), Snackbar.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
String pw = preferences.getString(CommonString.KEY_PASSWORD, "");
|
String pw = preferences.getString(CommonString.KEY_PASSWORD, "");
|
||||||
|
|
||||||
if(!password.equals(pw)){
|
if (!pw.equals("") && !password.equals(pw)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -163,8 +163,9 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
//data.setCategory_name("Promo Compliance");
|
//data.setCategory_name("Promo Compliance");
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
||||||
|
|
||||||
if (db.isMappingPromotionData()) {
|
if (db.isMappingPromotionData() || db.isMappingAdditionalPromotionData()) {
|
||||||
if (db.checkPromoComplianceData(store_id, categoryId)) {
|
if (db.checkPromoComplianceData(store_id, categoryId) ||
|
||||||
|
db.checkAdditionalPromoComplianceData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.promo_compliance_done);
|
data.setCategory_img(R.mipmap.promo_compliance_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.promo_compliance);
|
data.setCategory_img(R.mipmap.promo_compliance);
|
||||||
@@ -259,7 +260,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
}
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
||||||
if (db.isMappingPromotionData()) {
|
if (db.isMappingPromotionData() || db.isMappingAdditionalPromotionData()) {
|
||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
} else {
|
} else {
|
||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
@@ -291,7 +292,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
||||||
|
|
||||||
if (db.isMappingPromotionData()) {
|
if (db.isMappingPromotionData() || db.isMappingAdditionalPromotionData()) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, PromoComplianceActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, PromoComplianceActivity.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
android:id="@+id/card_view"
|
android:id="@+id/card_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
card_view:cardCornerRadius="10dp">
|
card_view:cardCornerRadius="10dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
Reference in New Issue
Block a user