Merge pull request #60 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_Additional_PromoCompliance_Vlidationa
//Stock_FacingActivity Changes today
This commit is contained in:
@@ -974,13 +974,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<MSL_AvailabilityGetterSetter> getMSL_AvailabilitySKU_AfterSaveData(String category_id, String brand_id) {
|
||||
public ArrayList<MSL_AvailabilityGetterSetter> getMSL_AvailabilitySKU_AfterSaveData(String category_id, String brand_id, String store_id) {
|
||||
ArrayList<MSL_AvailabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Msl_Availability_Data " +
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "'", null);
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "' AND Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -1232,13 +1232,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
return list;
|
||||
}
|
||||
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKU_AfterSaveData(String category_id, String brand_id) {
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKU_AfterSaveData(String category_id, String brand_id, String store_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Facing_Child_Data " +
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "'", null);
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "' AND Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
|
||||
+3
-5
@@ -242,7 +242,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
//childDataList = new ArrayList<>();
|
||||
childDataList = db.getMSL_AvailabilitySKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
childDataList = db.getMSL_AvailabilitySKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
if (!(childDataList.size() > 0)) {
|
||||
childDataList = db.getMSL_AvailabilitySKUData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
}
|
||||
@@ -495,11 +495,9 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
|
||||
if (language.equalsIgnoreCase("English")) {
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
} else if (language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -54,11 +54,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
if (language.equalsIgnoreCase("English")) {
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
} else if (language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
@@ -218,12 +216,12 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
btn_add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
if (!cd.getSp_promo().equals("0")) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(PromoComplianceActivity.this);
|
||||
builder.setMessage("Are you sure you want to add")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.InsertAdditionalPromoData(cd, categoryId);
|
||||
AdditionalPromoListView();
|
||||
|
||||
@@ -243,6 +241,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
} else {
|
||||
Snackbar.make(v, "Select the promo value", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
//Child Data
|
||||
childDataList = db.getStockAndFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
childDataList = db.getStockAndFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
if (!(childDataList.size() > 0)) {
|
||||
childDataList = db.getStockAndFacingSKUData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user