//Stock_FacingActivity Changes today
This commit is contained in:
+16
-16
@@ -218,9 +218,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
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")
|
||||
builder.setMessage(getResources().getString(R.string.want_add))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.InsertAdditionalPromoData(cd, categoryId);
|
||||
AdditionalPromoListView();
|
||||
@@ -230,11 +230,11 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
toggle_add_promoAnnouncer.setChecked(true);
|
||||
toggle_add_runningPos.setChecked(true);
|
||||
|
||||
Snackbar.make(v, "promo is added", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(v, getResources().getString(R.string.promo_add), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
//Toast.makeText(getApplicationContext(), "promo is add", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@@ -242,7 +242,7 @@ 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();
|
||||
Snackbar.make(v, getResources().getString(R.string.select_promo_value), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -252,24 +252,24 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onClick(final View view) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(PromoComplianceActivity.this);
|
||||
builder.setMessage("Are you sure you want to save")
|
||||
builder.setMessage(getResources().getString(R.string.want_add))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
if (db.checkPromoComplianceData(store_id, categoryId)) {
|
||||
db.updatePromoComplianceSKU(promoSkuListData, categoryId, store_id);
|
||||
Snackbar.make(view, "Data has been updated", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else {
|
||||
db.InsertPromoSkuData(promoSkuListData, categoryId);
|
||||
Snackbar.make(view, "Data has been saved", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@@ -421,23 +421,23 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
//In Stock
|
||||
if (data.getIn_stock().equals("1")) {
|
||||
txt_inStock.setText("Yes");
|
||||
txt_inStock.setText(getResources().getString(R.string.yes));
|
||||
} else {
|
||||
txt_inStock.setText("No");
|
||||
txt_inStock.setText(getResources().getString(R.string.no));
|
||||
}
|
||||
|
||||
//Promo Announcer
|
||||
if (data.getPromo_announcer().equals("1")) {
|
||||
txt_promoAnnouncer.setText("Yes");
|
||||
txt_promoAnnouncer.setText(getResources().getString(R.string.yes));
|
||||
} else {
|
||||
txt_promoAnnouncer.setText("No");
|
||||
txt_promoAnnouncer.setText(getResources().getString(R.string.no));
|
||||
}
|
||||
|
||||
//Running on POS
|
||||
if (data.getRunning_pos().equals("1")) {
|
||||
txt_runningPos.setText("Yes");
|
||||
txt_runningPos.setText(getResources().getString(R.string.yes));
|
||||
} else {
|
||||
txt_runningPos.setText("No");
|
||||
txt_runningPos.setText(getResources().getString(R.string.no));
|
||||
}
|
||||
|
||||
lin_addtional_promo.addView(view);
|
||||
|
||||
+10
-10
@@ -405,7 +405,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please fill all the data";
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -415,7 +415,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please fill all the data";
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -427,7 +427,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please fill all the data";
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1110,9 +1110,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Faceup can not be greater than stock value")
|
||||
builder.setMessage(getString(R.string.check_faceup))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
@@ -1129,9 +1129,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("First fill the stock value")
|
||||
builder.setMessage(getString(R.string.fill_stock_value))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
@@ -1157,14 +1157,14 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (holder.ed_stock.getText().toString().equals("")) {
|
||||
holder.ed_stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_stock.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_stock.setHint("Empty");
|
||||
holder.ed_stock.setHint(getString(R.string.empty));
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
if (holder.ed_facing.getText().toString().equals("")) {
|
||||
holder.ed_facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_facing.setHint("Empty");
|
||||
holder.ed_facing.setHint(getString(R.string.empty));
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
@@ -1177,7 +1177,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (holder.ed_facing.getText().toString().equals("")) {
|
||||
holder.ed_facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_facing.setHint("Empty");
|
||||
holder.ed_facing.setHint(getString(R.string.empty));
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,6 +195,16 @@
|
||||
<string name="error">Hata! paylaşılıyor</string>
|
||||
<string name="data_will_be_lost">Veri kaydedilmedi. İlerlemek</string>
|
||||
|
||||
<!--Gagan start code 3-->
|
||||
<string name="cancel">İptal etmek</string>
|
||||
<string name="empty">Boş</string>
|
||||
|
||||
<string name="check_faceup">Faceup, hisse değerinden daha büyük olamaz</string>
|
||||
<string name="fill_stock_value">Önce stok değerini doldurun</string>
|
||||
<string name="want_add">Eklemek istediğinizden emin misiniz</string>
|
||||
<string name="promo_add">Promo eklendi</string>
|
||||
<string name="select_promo_value">Promosyon değerini seçin</string>
|
||||
<!--Gagan end code 3-->
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -233,4 +233,14 @@
|
||||
|
||||
<string name="error">Error Uploading</string>
|
||||
|
||||
<!--Gagan start code 3-->
|
||||
<string name="empty">Empty</string>
|
||||
<string name="check_faceup">Faceup can not be greater than stock value</string>
|
||||
<string name="fill_stock_value">First fill the stock value</string>
|
||||
<string name="want_add">Are you sure you want to add</string>
|
||||
<string name="promo_add">promo is added</string>
|
||||
<string name="select_promo_value">Select the promo value</string>
|
||||
|
||||
<!--Gagan end code 3-->
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user