Commit d869f515 by Ramesh Babu Puvvadi

added new changes

parent 16841bab
...@@ -50,6 +50,7 @@ public class Constants{ ...@@ -50,6 +50,7 @@ public class Constants{
public static MediaType JSON = MediaType.parse("application/json; charset=utf-8"); public static MediaType JSON = MediaType.parse("application/json; charset=utf-8");
public static String Sec = "<font color=#3700B3><b>SECTION : </b></font>"; public static String Sec = "<font color=#3700B3><b>SECTION : </b></font>";
public static String div = "<font color=#3700B3><b>DIVISION : </b></font>"; public static String div = "<font color=#3700B3><b>DIVISION : </b></font>";
public static String Id = "<font color=#3700B3><b>RACK ID : </b></font>"; public static String Id = "<font color=#3700B3><b>RACK ID : </b></font>";
public static String Qty = "<font color=#3700B3><b>QTY : </b></font>"; public static String Qty = "<font color=#3700B3><b>QTY : </b></font>";
public static String User = "<font color=#3700B3><b>UserId : </b></font>"; public static String User = "<font color=#3700B3><b>UserId : </b></font>";
......
...@@ -187,9 +187,9 @@ import static w.soulofpluto.posstockauditrecieving.Constants.Logout; ...@@ -187,9 +187,9 @@ import static w.soulofpluto.posstockauditrecieving.Constants.Logout;
final Request request = new Request.Builder() final Request request = new Request.Builder()
.url(Url) .url(Url)
.get() .get()
.addHeader(Constants.Type, Constants.App_json) .addHeader(Constants.Type, Constants.App_json)
.addHeader(getResources().getString(R.string.accesstoken),preferenceManager.getCustToken()) .addHeader(getResources().getString(R.string.accesstoken), preferenceManager.getCustToken())
.addHeader(getResources().getString(R.string.storeidtoken),preferenceManager.getStoreId()) .addHeader(getResources().getString(R.string.storeidtoken), preferenceManager.getStoreId())
.build(); .build();
client.newCall(request).enqueue(new Callback(){ client.newCall(request).enqueue(new Callback(){
@Override @Override
......
...@@ -360,7 +360,7 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen ...@@ -360,7 +360,7 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen
try{ try{
Constants.ProgressDialogDismiss(); Constants.ProgressDialogDismiss();
final String Response = response.body().string(); final String Response = response.body().string();
Log.e("upload all Response ", Response); Log.e("Testing all Response =========================>", Response);
Handler handler = new Handler(Looper.getMainLooper()); Handler handler = new Handler(Looper.getMainLooper());
handler.post(() -> { handler.post(() -> {
try{ try{
...@@ -446,9 +446,9 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen ...@@ -446,9 +446,9 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen
if (response.code() == 200) { if (response.code() == 200) {
if(object1.has(getResources().getString(R.string.success))) { if(object1.has(getResources().getString(R.string.success))) {
if(object1.getInt(getResources().getString(R.string.success)) == 1){ if(object1.getInt(getResources().getString(R.string.success)) == 1){
//Log.e("Testing Data =================>" ,object1.toString()); Log.e("Testing Data =================>" ,object1.toString());
JSONObject jsonObject = object1.getJSONObject("barcode_attrs"); JSONObject jsonObject = object1.getJSONObject("barcode_attrs");
//Log.e("Testing Data1 =================>" ,jsonObject.toString()); Log.e("Testing Data1 =================>" ,jsonObject.toString());
barcode.requestFocus(); barcode.requestFocus();
Plans plans = new Plans(); Plans plans = new Plans();
plans.setQty(qty); plans.setQty(qty);
......
...@@ -66,7 +66,7 @@ import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset; ...@@ -66,7 +66,7 @@ import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset;
}else{ }else{
Constants.getToast(RackWiseQty.this,getResources().getString(R.string.connection)); Constants.getToast(RackWiseQty.this,getResources().getString(R.string.connection));
} }
rack_spinner.setOnItemSelectedListener(this); rack_spinner.setOnItemSelectedListener(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
} }
...@@ -85,10 +85,10 @@ import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset; ...@@ -85,10 +85,10 @@ import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset;
try{ try{
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
SimpleDateFormat currentDate = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat currentDate = new SimpleDateFormat("yyyy-MM-dd");
Date todayDate = new Date(); Date todayDate = new Date();
Date from = getDateWithOffset(-Constants.Value, new Date()); Date from = getDateWithOffset(-Constants.Value, new Date());
String fromDate = currentDate.format(from); String fromDate = currentDate.format(from);
String thisDate = currentDate.format(todayDate); String thisDate = currentDate.format(todayDate);
object.put(getResources().getString(R.string.auditstatus),"In Progress"); object.put(getResources().getString(R.string.auditstatus),"In Progress");
object.put(getResources().getString(R.string.fromdate), fromDate); object.put(getResources().getString(R.string.fromdate), fromDate);
object.put(getResources().getString(R.string.todate), thisDate); object.put(getResources().getString(R.string.todate), thisDate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment