Initial_Commit
This commit is contained in:
@@ -12,6 +12,7 @@ android {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
||||
configurations {
|
||||
// all*.exclude module: 'okio'
|
||||
//all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||
@@ -137,6 +138,9 @@ dependencies {
|
||||
implementation 'androidx.activity:activity:1.10.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:4.11.0'
|
||||
testImplementation 'org.mockito:mockito-android:4.11.0'
|
||||
testImplementation 'org.robolectric:robolectric:4.10.3'
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:2.9.0"
|
||||
androidTestImplementation "androidx.test:core:1.6.1"
|
||||
androidTestImplementation "androidx.test:espresso:espresso-core:3.5.1"
|
||||
@@ -166,7 +170,10 @@ dependencies {
|
||||
// implementation("com.github.pratham-PDots:camera_lib:1.5.4.5")
|
||||
//latest
|
||||
implementation("com.github.pratham-PDots:camera_lib:1.5.4.9")
|
||||
implementation 'com.github.miteshpithadiya:SearchableSpinner:master'
|
||||
implementation "androidx.core:core-splashscreen:1.0.1"
|
||||
implementation "androidx.media3:media3-exoplayer:1.3.1"
|
||||
implementation "androidx.media3:media3-ui:1.3.1"
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
Binary file not shown.
@@ -51,23 +51,24 @@
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
|
||||
tools:replace="android:supportsRtl">
|
||||
|
||||
<activity
|
||||
android:name=".dailyentry.PD_Realtime_Report_Detail"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
|
||||
tools:ignore="DiscouragedApi,LockedOrientationActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".dailyentry.PD_Realtime_Report"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
|
||||
tools:ignore="DiscouragedApi,LockedOrientationActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".dailyentry.WebViewActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
package cpm.com.gskmtorange.GetterSetter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class NoticeboardItem implements Serializable {
|
||||
String NoticeBoardId;
|
||||
String NoticThumnail_Path;
|
||||
String NoticeLink_Thumbnail;
|
||||
String NoticeLink_FullPage;
|
||||
String FullPageTarget;
|
||||
|
||||
public String getNoticeBoardId() {
|
||||
return NoticeBoardId;
|
||||
}
|
||||
|
||||
public void setNoticeBoardId(String noticeBoardId) {
|
||||
this.NoticeBoardId = noticeBoardId;
|
||||
}
|
||||
|
||||
public String getNoticThumnail_Path() {
|
||||
return NoticThumnail_Path;
|
||||
}
|
||||
|
||||
public void setNoticThumnail_Path(String noticThumnail_Path) {
|
||||
this.NoticThumnail_Path = noticThumnail_Path;
|
||||
}
|
||||
|
||||
public String getNoticeLink_Thumbnail() {
|
||||
return NoticeLink_Thumbnail;
|
||||
}
|
||||
|
||||
public void setNoticeLink_Thumbnail(String noticeLink_Thumbnail) {
|
||||
this.NoticeLink_Thumbnail = noticeLink_Thumbnail;
|
||||
}
|
||||
|
||||
public String getNoticeLink_FullPage() {
|
||||
return NoticeLink_FullPage;
|
||||
}
|
||||
|
||||
public void setNoticeLink_FullPage(String noticeLink_FullPage) {
|
||||
this.NoticeLink_FullPage = noticeLink_FullPage;
|
||||
}
|
||||
|
||||
public String getFullPageTarget() {
|
||||
return FullPageTarget;
|
||||
}
|
||||
|
||||
public void setFullPageTarget(String fullPageTarget) {
|
||||
this.FullPageTarget = fullPageTarget;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
|
||||
public class StoreBean implements Serializable{
|
||||
|
||||
String STORE_ID;
|
||||
String EMP_ID;
|
||||
String KEYACCOUNT;
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@@ -13,6 +14,7 @@ import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.os.AsyncTask;
|
||||
@@ -25,10 +27,12 @@ import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -60,6 +64,7 @@ import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
@@ -71,9 +76,11 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.StringReader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@@ -81,18 +88,20 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.PD_CONFIGURATION;
|
||||
import cpm.com.gskmtorange.autoupdate.AutoUpdateActivity;
|
||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.password.MPinActivity;
|
||||
import cpm.com.gskmtorange.utils.OkHttpTransportSE;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeItem;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeboardGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
|
||||
//import io.fabric.sdk.android.Fabric;
|
||||
|
||||
import static android.Manifest.permission.READ_CONTACTS;
|
||||
import static com.google.android.gms.location.LocationRequest.Builder.IMPLICIT_MIN_UPDATE_INTERVAL;
|
||||
import static cpm.com.gskmtorange.constant.CommonFunctions.isInternetAvailable;
|
||||
|
||||
@@ -102,6 +111,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
private static final int MY_PERMISSIONS_REQUEST_LOCATION = 11;
|
||||
private static final int MY_PERMISSIONS_REQUEST_STORAGE_READ = 12;
|
||||
private static final int MY_PERMISSIONS_REQUEST_STORAGE_WRITE = 14;
|
||||
int eventType;
|
||||
private FirebaseAnalytics mFirebaseAnalytics;
|
||||
|
||||
private static final int PERMISSION_ALL = 99;
|
||||
@@ -133,7 +143,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
private View mLoginFormView;
|
||||
private String userid, password;
|
||||
private int versionCode;
|
||||
int eventType;
|
||||
CardView museridSignInButton;
|
||||
|
||||
GoogleApiClient mGoogleApiClient;
|
||||
@@ -145,12 +154,22 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
private Location mLastLocation;
|
||||
private LocationRequest mLocationRequest;
|
||||
private Context context;
|
||||
GSKOrangeDB db;
|
||||
private Dialog dialog;
|
||||
boolean ResultFlag = true;
|
||||
NoticeboardGetterSetter noticeboardGetterSetter;
|
||||
String str;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
context = this;
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
|
||||
TextView tv_version = (TextView) findViewById(R.id.tv_version_code);
|
||||
try {
|
||||
@@ -161,7 +180,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
tv_version.setText("Version/Versiyon - " + app_ver + "-T2");
|
||||
tv_version.setText("Version/Versiyon - " + app_ver + "-T3");
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
editor = preferences.edit();
|
||||
// Set up the login form.
|
||||
@@ -461,10 +480,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
}
|
||||
|
||||
private boolean isuseridValid(String userid) {
|
||||
//TODO: Replace this with your own logic
|
||||
|
||||
boolean flag = true;
|
||||
|
||||
String u_id = preferences.getString(CommonString.KEY_USERNAME, "");
|
||||
|
||||
if (!u_id.equals("") && !userid.equalsIgnoreCase(u_id)) {
|
||||
@@ -474,21 +490,15 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
}
|
||||
|
||||
private boolean isPasswordValid(String password) {
|
||||
//TODO: Replace this with your own logic
|
||||
boolean flag = true;
|
||||
|
||||
String pw = preferences.getString(CommonString.KEY_PASSWORD, "");
|
||||
|
||||
if (!pw.equals("") && !password.equals(pw)) {
|
||||
flag = false;
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the progress UI and hides the login form.
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
|
||||
private void showProgress(final boolean show) {
|
||||
// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
|
||||
@@ -556,7 +566,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
+ "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context)
|
||||
+ "[/IN_TIME]" + "[LATITUDE]" + lat
|
||||
+ "[/LATITUDE]" + "[LONGITUDE]" + lon
|
||||
+ "[/LONGITUDE]" + "[APP_VERSION]" + app_ver + "-T2"
|
||||
+ "[/LONGITUDE]" + "[APP_VERSION]" + app_ver + "-T3"
|
||||
+ "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]"
|
||||
+ "[NETWORK_STATUS]" + "LoginStatus"
|
||||
+ "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
|
||||
@@ -639,6 +649,64 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
} else {
|
||||
return CommonString.KEY_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
//Mer_NoticeBoard
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userid);
|
||||
request.addProperty("Type", "Mer_NoticeBoard");
|
||||
request.addProperty("cultureid", "1");
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = envelope.getResponse();
|
||||
|
||||
factory = XmlPullParserFactory.newInstance();
|
||||
factory.setNamespaceAware(false);
|
||||
|
||||
Log.e("Noticeboard_Result", result.toString());
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
NoticeboardGetterSetter noticeboardGetterSetter1 = XMLHandlers.Noticeboard_XMLHandler(xpp,eventType);
|
||||
Log.e("noticeboardGetterSetter1", noticeboardGetterSetter1.toString());
|
||||
// PUT IN PREFERENCES
|
||||
if (noticeboardGetterSetter1.getNoticeBoardId() != null && !noticeboardGetterSetter1.getNoticeBoardId().isEmpty()) {
|
||||
List<NoticeItem> list = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < noticeboardGetterSetter1.getNoticeBoardId().size(); i++) {
|
||||
|
||||
NoticeItem item = new NoticeItem(
|
||||
safe(noticeboardGetterSetter1.getNoticeBoardId(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticThumnail_Path(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticeLink_Thumbnail(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticeLink_FullPage(), i),
|
||||
safe(noticeboardGetterSetter1.getFullPageTarget(), i)
|
||||
);
|
||||
|
||||
list.add(item);
|
||||
}
|
||||
|
||||
NoticeResponse response = new NoticeResponse(list);
|
||||
|
||||
Gson gson = new GsonBuilder()
|
||||
.disableHtmlEscaping()
|
||||
.setPrettyPrinting()
|
||||
.create();
|
||||
|
||||
String noticeJson = gson.toJson(response);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
||||
editor.apply();
|
||||
|
||||
} else {
|
||||
return CommonString.KEY_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
editor.putString(CommonString.KEY_USERNAME, userid);
|
||||
editor.putString(CommonString.KEY_PASSWORD, password);
|
||||
editor.putString(CommonString.KEY_VERSION, lgs.getAPP_VERSION());
|
||||
@@ -658,9 +726,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
return CommonString.KEY_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
FirebaseCrashlytics.getInstance().recordException(e);
|
||||
runOnUiThread(new Runnable() {
|
||||
@@ -701,10 +767,13 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
super.onPostExecute(result);
|
||||
if (result.equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
// manually set true for South Africa
|
||||
|
||||
// new UploadTask(LoginActivity.this).execute();
|
||||
boolean forSA = false;
|
||||
if (forSA) {
|
||||
//For SA Only
|
||||
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
||||
// new NoticeboardTask().execute();
|
||||
Intent intent = new Intent(getBaseContext(), SelectLanguageActivity.class);
|
||||
intent.putExtra(CommonString.KEY_LOGIN_DATA, lgs);
|
||||
startActivity(intent);
|
||||
@@ -746,6 +815,13 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
}
|
||||
}
|
||||
|
||||
private String safe(ArrayList<String> list, int index) {
|
||||
if (list == null || list.size() <= index || list.get(index) == null) {
|
||||
return "";
|
||||
}
|
||||
return list.get(index).trim();
|
||||
}
|
||||
|
||||
public void showAlert(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
|
||||
@@ -985,7 +1061,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
}
|
||||
|
||||
protected void startLocationUpdates() {
|
||||
|
||||
if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
|
||||
|| ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
|
||||
if (mGoogleApiClient != null) {
|
||||
@@ -993,7 +1068,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
// Toast.makeText(getApplicationContext(), "startLocation - Lat" + lat + "Long" + lon, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static int distFrom(double lat1, double lng1, double lat2, double lng2) {
|
||||
@@ -1116,5 +1190,6 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
||||
}
|
||||
//return ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
@@ -26,28 +25,22 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
//import com.crashlytics.android.Crashlytics;
|
||||
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -68,11 +61,10 @@ import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.WebViewActivity;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
import cpm.com.gskmtorange.password.ChangePasswordActivity;
|
||||
import cpm.com.gskmtorange.pharma_stores.PharmaActivity;
|
||||
import cpm.com.gskmtorange.pharma_stores.PharmaActivityFragment;
|
||||
import cpm.com.gskmtorange.upload.PreviousDataUploadActivity;
|
||||
import cpm.com.gskmtorange.upload.UploadActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ConfigurationMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeItem;
|
||||
|
||||
public class MainActivity extends AppCompatActivity
|
||||
implements NavigationView.OnNavigationItemSelectedListener {
|
||||
@@ -83,6 +75,7 @@ public class MainActivity extends AppCompatActivity
|
||||
private Handler sliderHandler = new Handler();
|
||||
private Runnable sliderRunnable;
|
||||
private List<ImageView> dots = new ArrayList<>();
|
||||
List<NoticeItem>bannerlist = null;
|
||||
String date;
|
||||
String app_ver;
|
||||
private SharedPreferences preferences = null;
|
||||
@@ -111,25 +104,31 @@ public class MainActivity extends AppCompatActivity
|
||||
imageView = (ImageView) findViewById(R.id.img_main);
|
||||
dotsLayout = findViewById(R.id.dotsLayout);
|
||||
webView = (WebView) findViewById(R.id.webview);
|
||||
// String url = preferences.getString(CommonString.KEY_NOTICE_BOARD_LINK, "");
|
||||
String url = "https://dle.parinaam.in/OneApp/Dabur/brand-spiels/dabur-brand-spiels.html";
|
||||
String url = preferences.getString(CommonString.KEY_NOTICE_BOARD_LINK, "");
|
||||
// String url = "https://dle.parinaam.in/OneApp/Dabur/brand-spiels/dabur-brand-spiels.html";
|
||||
user_name = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, null);
|
||||
db = new GSKOrangeDB(MainActivity.this);
|
||||
db.open();
|
||||
webView.setWebViewClient(new MyWebViewClient());
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
|
||||
String json = loadJSONFromAsset();
|
||||
String json = preferences.getString("NOTICEBOARD_DATA", null);
|
||||
Log.d("noticejsondata",json);
|
||||
if (json != null) {
|
||||
Gson gson = new Gson();
|
||||
NoticeResponse response =
|
||||
gson.fromJson(json, NoticeResponse.class);
|
||||
bannerlist = response.Mer_NoticeBoard;
|
||||
Log.d("SIZE", String.valueOf(bannerlist.size()));
|
||||
}
|
||||
|
||||
Gson gson = new Gson();
|
||||
NoticeResponse response = gson.fromJson(json, NoticeResponse.class);
|
||||
List<NoticeItem> list = response.getMer_NoticeBoard();
|
||||
Log.d("listdata", String.valueOf(list.size()));
|
||||
setupDots(list.size());
|
||||
|
||||
viewPager.setAdapter(new NoticeAdapter(list, item -> handleClick(item)));
|
||||
if(bannerlist!=null && bannerlist.size()>0){
|
||||
setupDots(bannerlist.size());
|
||||
viewPager.setAdapter(new NoticeAdapter(bannerlist, this::handleClick));
|
||||
}
|
||||
viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
@@ -241,14 +240,16 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
private void handleClick(NoticeItem item) {
|
||||
|
||||
String url = item.getNoticeLink_FullPage();
|
||||
String type = item.getFullPageTarget();
|
||||
String url = String.valueOf(item.getNoticeLink_FullPage());
|
||||
String type = String.valueOf(item.getFullPageTarget());
|
||||
Log.d("clickdata",url + ","+type);
|
||||
|
||||
if (type == null) return;
|
||||
|
||||
switch (type.toLowerCase()) {
|
||||
|
||||
case "html-webview":
|
||||
Log.d("itemdata", String.valueOf(item.getFullPageTarget()));
|
||||
Intent webIntent = new Intent(this, WebViewActivity.class);
|
||||
webIntent.putExtra("url", url);
|
||||
webIntent.putExtra("type", item.getFullPageTarget());
|
||||
@@ -378,7 +379,7 @@ public class MainActivity extends AppCompatActivity
|
||||
nav_route_plan14.setTitle(getResources().getString(R.string.menu_services));
|
||||
|
||||
MenuItem nav_route_plan15 = menu.findItem(R.id.nav_version);
|
||||
nav_route_plan15.setTitle("Version/Versiyon - " + app_ver + "-T2");
|
||||
nav_route_plan15.setTitle("Version/Versiyon - " + app_ver + "-T3");
|
||||
//Enable disable According to Configuration
|
||||
ArrayList<ConfigurationMasterGetterSetter> configurationData = db.getConfigurationMasterData(country_id);
|
||||
if (!configurationData.isEmpty()) {
|
||||
@@ -454,6 +455,7 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
if (drawer.isDrawerOpen(GravityCompat.START)) {
|
||||
drawer.closeDrawer(GravityCompat.START);
|
||||
@@ -766,8 +768,10 @@ public class MainActivity extends AppCompatActivity
|
||||
public void onBindViewHolder(NoticeAdapter.ViewHolder holder, int position) {
|
||||
NoticeItem item = list.get(position);
|
||||
|
||||
String url = String.valueOf(item.getNoticeLink_Thumbnail());
|
||||
Glide.with(holder.itemView.getContext())
|
||||
.load(item.getNoticeLink_Thumbnail())
|
||||
.load(url)
|
||||
.transform(new RoundedCorners(30))
|
||||
.into(holder.image);
|
||||
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
package cpm.com.gskmtorange;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class NoticeResponse {
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeItem;
|
||||
|
||||
public class NoticeResponse implements Serializable {
|
||||
List<NoticeItem> Mer_NoticeBoard;
|
||||
|
||||
public NoticeResponse(List<NoticeItem> list) {
|
||||
this.Mer_NoticeBoard = list;
|
||||
}
|
||||
public List<NoticeItem> getMer_NoticeBoard() {
|
||||
return Mer_NoticeBoard;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class NoticeItem {
|
||||
int NoticeBoardId;
|
||||
String NoticeLink_Thumbnail;
|
||||
String NoticeLink_FullPage;
|
||||
String FullPageTarget;
|
||||
|
||||
public String getNoticeLink_Thumbnail() { return NoticeLink_Thumbnail; }
|
||||
public String getNoticeLink_FullPage() { return NoticeLink_FullPage; }
|
||||
public String getFullPageTarget() { return FullPageTarget; }
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ public class CommonString {
|
||||
public static final String KEY_NON_T2P_REASON_ID = "TREASON_ID";
|
||||
|
||||
public static final String KEY_JOURNEY_PLAN = "JOURNEY_PLAN";
|
||||
public static final String KEY_NOTICE_BOARD = "Mer_NoticeBoard";
|
||||
public static final String KEY_ADHOC_JOURNEY_PLAN = "ADHOC_JOURNEYPLAN";
|
||||
public static final String KEY_JOURNEY_PLAN_ADDITIONAL = "JOURNEY_PLAN_ADDITIONAL";
|
||||
public static final String KEY_JOURNEY_PLAN_PHARMA = "JOURNEY_PLAN_PHARMA";
|
||||
@@ -1454,7 +1455,6 @@ public class CommonString {
|
||||
public static final String CREATE_TABLE_INSERT_ORDER_TAKING_DATA = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_ORDER_TAKING_DATA
|
||||
+ " ("
|
||||
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
@@ -1485,9 +1485,18 @@ public class CommonString {
|
||||
+ "SKU_ID"
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "SUBCAT_ID"
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "SKU"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "BRAND"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SUBCAT"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_SEQUENCE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
|
||||
@@ -172,9 +172,6 @@ public class CompetitionPromoActivity extends AppCompatActivity implements Adapt
|
||||
sp_promotion_typ.setAdapter(comp_adapter);
|
||||
sp_promotion_typ.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
|
||||
|
||||
//Product List
|
||||
exists_data = db.getCompetitionPromoExistsAfterData(store_id, categoryId);
|
||||
|
||||
@@ -249,9 +246,7 @@ public class CompetitionPromoActivity extends AppCompatActivity implements Adapt
|
||||
}
|
||||
|
||||
} else if (id == R.id.fab_add) {
|
||||
|
||||
skuName = et_sku_name.getText().toString().replaceAll("[&^<>{}'$]", "").replaceFirst("^0+(?!$)", "");
|
||||
|
||||
if (promotion.equals("")) {
|
||||
Snackbar.make(rec_added_counterfeit_product, R.string.pls_select_promo_type, Snackbar.LENGTH_SHORT).show();
|
||||
} else if (subcategory.equals("")) {
|
||||
@@ -270,9 +265,7 @@ public class CompetitionPromoActivity extends AppCompatActivity implements Adapt
|
||||
product.setImgStr(img_str);
|
||||
product.setImgStr1(img_str1);
|
||||
product.setImgStr2(img_str2);
|
||||
|
||||
addedCounterfeitProducts.add(product);
|
||||
|
||||
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
||||
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
||||
rec_added_counterfeit_product.setAdapter(productAdapter);
|
||||
|
||||
+503
-72
@@ -1,25 +1,22 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
@@ -34,59 +31,58 @@ import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ExpandableListAdapter;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import com.toptoche.searchablespinnerlibrary.SearchableSpinner;
|
||||
import java.io.File;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.MSL_Availability_StockFacingActivity;
|
||||
import cpm.com.gskmtorange.interfaces.DialogCallbackListener;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.PharmaMSLInsertedGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||
|
||||
public class OrderTakingActivity extends AppCompatActivity implements DialogCallbackListener {
|
||||
public class OrderTakingActivity extends AppCompatActivity implements DialogCallbackListener, AdapterView.OnItemSelectedListener {
|
||||
ExpandableListView expandableListView;
|
||||
private Context context;
|
||||
String sys_po_number="";
|
||||
EditText editText_QTY;
|
||||
RecyclerView rec_added_counterfeit_product;
|
||||
int brand_id = 0;
|
||||
FloatingActionButton fab_add;
|
||||
int skuid = 0;
|
||||
String skuname = "";
|
||||
int subcategoryId = 0;
|
||||
TextView txt_mslAvailabilityName;
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> childDataList;
|
||||
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
||||
|
||||
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
||||
String _pathforcheck1, _pathforcheck2, _pathforcheck3, _path, str, msg;
|
||||
boolean editFlag = false, isdata_added = false;
|
||||
|
||||
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData;
|
||||
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||
@@ -95,14 +91,23 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
ImageView camera1, camera2, camera3, camera4;
|
||||
LinearLayout lin_camera1, lin_camera2, lin_camera3, lin_camera4;
|
||||
GSKOrangeDB db;
|
||||
|
||||
String brand = "",subcategory="";
|
||||
String categoryName, categoryId, storeId, Error_Message = "";
|
||||
String store_id, store_flag_hide, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
||||
boolean isDialogOpen = true;
|
||||
private SharedPreferences preferences;
|
||||
int scrollPosition = 0;
|
||||
Spinner spinner_brand_list,sp_subcategory;
|
||||
|
||||
SearchableSpinner sp_promotion_typ;
|
||||
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> subcategory_list = new ArrayList<>();
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> brand_list = new ArrayList<>();
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> addedCounterfeitProducts = new ArrayList<>();
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> skuListdata = new ArrayList<>();
|
||||
|
||||
String str_planogram = "", _pathforcheck = "";
|
||||
EditText storepoET,podateET;
|
||||
@@ -110,15 +115,15 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> planogramShelfHeaderDataList = new ArrayList<>();
|
||||
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> planogramSkuChildDataList;
|
||||
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, ArrayList<StockFacing_PlanogramTrackerDataGetterSetter>> planogramHashMapListChildData = new HashMap<>();
|
||||
boolean editFlag = false;
|
||||
String Order_qty = "";
|
||||
//temp
|
||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/";
|
||||
ProductAdapter productAdapter;
|
||||
//ImageView bmImage;
|
||||
RelativeLayout view;
|
||||
RadioButton radio_yes,radio_no;
|
||||
RadioGroup radio_group;
|
||||
String isExist="";
|
||||
String sys_po_number="";
|
||||
TextView sys_gen_poTV;
|
||||
LinearLayout poLL,pocamLL;
|
||||
String storepo ="";
|
||||
@@ -133,14 +138,18 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
txt_mslAvailabilityName = (TextView) findViewById(R.id.txt_mslAvailabilityName);
|
||||
editText_QTY = findViewById(R.id.editText_QTY);
|
||||
rec_added_counterfeit_product =findViewById(R.id.rec_added_counterfeit_product);
|
||||
spinner_brand_list = (Spinner) findViewById(R.id.sp_brand);
|
||||
sp_promotion_typ = findViewById(R.id.sp_promotion_typ);
|
||||
camera1 = (ImageView) findViewById(R.id.img_camera1);
|
||||
camera2 = (ImageView) findViewById(R.id.img_camera2);
|
||||
camera3 = (ImageView) findViewById(R.id.img_camera3);
|
||||
camera4 = (ImageView) findViewById(R.id.img_camera4);
|
||||
fab_add = findViewById(R.id.fab_add);
|
||||
poIV = (ImageView) findViewById(R.id.poIV);
|
||||
pocamLL = findViewById(R.id.pocamLL);
|
||||
poLL = findViewById(R.id.poLL);
|
||||
|
||||
radio_group =findViewById(R.id.radio_group);
|
||||
radio_yes = findViewById(R.id.radio_yes);
|
||||
radio_no = findViewById(R.id.radio_no);
|
||||
@@ -148,6 +157,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
storepoET = findViewById(R.id.storepoET);
|
||||
podateET = findViewById(R.id.podateET);
|
||||
sp_subcategory = findViewById(R.id.sp_subcategory);
|
||||
|
||||
lin_camera1 = (LinearLayout) findViewById(R.id.lin_camera1);
|
||||
lin_camera2 = (LinearLayout) findViewById(R.id.lin_camera2);
|
||||
@@ -180,9 +190,17 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
//Intent data
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
setNewData();
|
||||
//subcategory_list.clear();
|
||||
//txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
||||
addedCounterfeitProducts = db.getOrderTakingNewAfterData(store_id, categoryId);
|
||||
if(addedCounterfeitProducts.size()>0){
|
||||
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
||||
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
||||
rec_added_counterfeit_product.setAdapter(productAdapter);
|
||||
}
|
||||
|
||||
|
||||
//txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
||||
toolbar.setTitle(getResources().getString(R.string.order_taking));
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
@@ -190,7 +208,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
String str1 = str[0];
|
||||
String str2 = str[1];
|
||||
String str3 = str[2];
|
||||
sys_po_number = store_id + "-" +str3+str1+str2;
|
||||
sys_po_number = store_id + "-" + categoryId +"-" +str3+str1+str2;
|
||||
sys_gen_poTV.setText(sys_po_number);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
@@ -199,10 +217,63 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
podateET.setText(visit_date);
|
||||
prepareList();
|
||||
|
||||
fab_add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Order_qty = editText_QTY.getText().toString();
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter>finddetailbysku= new ArrayList<>();
|
||||
finddetailbysku = db.getSkuDetails(String.valueOf(skuid));
|
||||
|
||||
//Camera
|
||||
// prepareDefaultList();
|
||||
// cameraMethod();
|
||||
for(int i =0;i<addedCounterfeitProducts.size();i++){
|
||||
if (String.valueOf(skuid)
|
||||
.equalsIgnoreCase(addedCounterfeitProducts.get(i).getSku_id())) {
|
||||
Snackbar.make(rec_added_counterfeit_product, R.string.add_different_sku,
|
||||
Snackbar.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
if (skuname.isEmpty()) {
|
||||
Snackbar.make(rec_added_counterfeit_product, R.string.pls_select_sku, Snackbar.LENGTH_SHORT).show();
|
||||
} else if (Order_qty.isEmpty()) {
|
||||
Snackbar.make(rec_added_counterfeit_product, R.string.please_enter_order_qty, Snackbar.LENGTH_SHORT).show();
|
||||
} else {
|
||||
MSL_AvailabilityStockFacingGetterSetter product = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
product.setBrand(brand.isEmpty() ? finddetailbysku.get(0).getBrand() : brand);
|
||||
product.setSub_category(subcategory.isEmpty() ? finddetailbysku.get(0).getSub_category() : subcategory);
|
||||
product.setSub_category_id(subcategoryId==0? finddetailbysku.get(0).getSub_category_id() : String.valueOf(subcategoryId));
|
||||
product.setBrand_id(brand_id==0 ? finddetailbysku.get(0).getBrand_id() : String.valueOf(brand_id));
|
||||
product.setSku(skuname);
|
||||
product.setSku_id(String.valueOf(skuid));
|
||||
product.setOrder_qty(Order_qty);
|
||||
addedCounterfeitProducts.add(product);
|
||||
|
||||
rec_added_counterfeit_product.setLayoutManager(new LinearLayoutManager(context));
|
||||
productAdapter = new ProductAdapter(addedCounterfeitProducts);
|
||||
rec_added_counterfeit_product.setAdapter(productAdapter);
|
||||
|
||||
subcategory = "";
|
||||
brand = "";
|
||||
subcategory = "";
|
||||
subcategoryId = 0;
|
||||
brand_id = 0;
|
||||
skuid = 0;
|
||||
skuname = "";
|
||||
editText_QTY.setText("");
|
||||
sp_subcategory.setSelection(0);
|
||||
spinner_brand_list.setSelection(0);
|
||||
sp_promotion_typ.setSelection(0);
|
||||
brand_list.clear();
|
||||
subcategory_list.clear();
|
||||
skuListdata.clear();
|
||||
setNewData();
|
||||
isdata_added = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
|
||||
@@ -248,23 +319,34 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View view) {
|
||||
expandableListView.clearFocus();
|
||||
adapter.notifyDataSetChanged();
|
||||
storepo = storepoET.getText().toString();
|
||||
if (addedCounterfeitProducts.size() == 0) {
|
||||
Snackbar.make(rec_added_counterfeit_product, R.string.title_activity_Want_add, Snackbar.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Log.d("sysponumber",sys_po_number);
|
||||
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id,date,sys_po_number);
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
|
||||
//Log.e("storepo",storepo);
|
||||
if(isExist.equalsIgnoreCase("no")){
|
||||
/* if(isExist.equalsIgnoreCase("no")){
|
||||
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
||||
db.updateOrder_taking_data(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
db.updateOrder_taking_data(addedCounterfeitProducts, categoryId, store_id);
|
||||
Toast.makeText(context,getResources().getString(R.string.update_message),Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
db.InsertOrderTakingData(img_str,isExist,storepo,sys_po_number,date,store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
db.InsertOrderTakingData(addedCounterfeitProducts, categoryId, store_id);
|
||||
Toast.makeText(context,getResources().getString(R.string.save_message),Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
/*String pharma_msl_xml = "";
|
||||
*//*String pharma_msl_xml = "";
|
||||
String onXML = "";
|
||||
String _onxml = "";
|
||||
String categoryxml = "";
|
||||
@@ -305,7 +387,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
final String sos_xml = "[DATA]" + data_xml + "[/DATA]";
|
||||
Log.e("order_xml",sos_xml);
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
@@ -376,7 +458,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
});
|
||||
@@ -457,9 +539,70 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
}
|
||||
}
|
||||
|
||||
private boolean validation() {
|
||||
private void setNewData() {
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
subcategory_list = db.getOrderTaking_SubcategoryData(country_id,categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
subcategory_list = db.getOrderTaking_SubcategoryData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide);
|
||||
} else {
|
||||
// subcategory_list =db.getSubcategoryData(keyAccount_id, storeType_id,class_id,categoryId);
|
||||
subcategory_list = db.getOrderTaking_SubcategoryData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
}
|
||||
|
||||
MSL_AvailabilityStockFacingGetterSetter subcategory_select = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
String subcat_select = getResources().getString(R.string.select);
|
||||
subcategory_select.setSub_category(subcat_select);
|
||||
subcategory_select.setSub_category_id("0");
|
||||
subcategory_list.add(0, subcategory_select);
|
||||
CustomSubcategoryAdapter subcat_adapter = new CustomSubcategoryAdapter(OrderTakingActivity.this, R.layout.custom_spinner_item, subcategory_list);
|
||||
sp_subcategory.setAdapter(subcat_adapter);
|
||||
sp_subcategory.setOnItemSelectedListener(this);
|
||||
|
||||
brand_list.clear();
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
brand_list = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide,0);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
brand_list = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide,0);
|
||||
} else {
|
||||
brand_list = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide,0);
|
||||
}
|
||||
|
||||
MSL_AvailabilityStockFacingGetterSetter brand_select = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
String select = getResources().getString(R.string.select);
|
||||
brand_select.setBrand(select);
|
||||
brand_select.setBrand_id("0");
|
||||
brand_list.add(0, brand_select);
|
||||
CustomBrandAdapter brandAdapter = new CustomBrandAdapter(OrderTakingActivity.this, R.layout.custom_spinner_item, brand_list);
|
||||
spinner_brand_list.setAdapter(brandAdapter);
|
||||
spinner_brand_list.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData("0", categoryId, "0", null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, store_flag_hide);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData("0", categoryId, "0", keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, store_flag_hide);
|
||||
} else {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData("0", categoryId, "0", keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, store_flag_hide);
|
||||
}
|
||||
|
||||
MSL_AvailabilityStockFacingGetterSetter sku_select = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
String selectnew = getResources().getString(R.string.select);
|
||||
sku_select.setSku(selectnew);
|
||||
sku_select.setSku_id("0");
|
||||
// skuListdata.add(0, sku_select);
|
||||
if (!skuListdata.isEmpty()) {
|
||||
skuListdata.add(0, sku_select);
|
||||
}
|
||||
CustomSkuAdapter skuAdapter = new CustomSkuAdapter(OrderTakingActivity.this, R.layout.custom_spinner_item, skuListdata);
|
||||
sp_promotion_typ.setAdapter(skuAdapter);
|
||||
sp_promotion_typ.setTitle("Search SKU");
|
||||
sp_promotion_typ.setPositiveButton("Close");
|
||||
sp_promotion_typ.setOnItemSelectedListener(this);
|
||||
}
|
||||
|
||||
boolean validation() {
|
||||
boolean flag = true;
|
||||
if(img_str.equals("") && country_id.equals("17")){
|
||||
if(img_str.isEmpty() && country_id.equals("17")){
|
||||
flag = false;
|
||||
Toast.makeText(context, context.getString(R.string.pls_capture_img), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -515,7 +658,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
if (flag == false) {
|
||||
listDataHeaderTemp.add(listDataHeader.get(i));
|
||||
// listDataChildTemp.put(listDataHeader.get(i), listTemp);
|
||||
// listDataChildTemp.put(listDataHeader.get(i), listTemp);
|
||||
} else {
|
||||
childCount = childCount + listDataChild.get(listDataHeader.get(i)).size();
|
||||
}
|
||||
@@ -575,20 +718,17 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
hashMapListChildData = new HashMap<>();
|
||||
//Header
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide, subcategoryId);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide);
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide, subcategoryId);
|
||||
} else {
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
headerDataList = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide, subcategoryId);
|
||||
}
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
//childDataList = new ArrayList<>();
|
||||
childDataList = db.getOrder_TAKING_SKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
//Log.e("childlistsize", String.valueOf(childDataList.size()));
|
||||
// childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
if (!(childDataList.size() > 0)) {
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
childDataList = db.getORDERTAKING_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, store_flag_hide);
|
||||
@@ -600,7 +740,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
}
|
||||
else{
|
||||
//if(childDataList.get(0).getPO_Date())
|
||||
// podateET.setText(childDataList.get(0).getPO_Date());
|
||||
// podateET.setText(childDataList.get(0).getPO_Date());
|
||||
sys_gen_poTV.setText(childDataList.get(0).getSys_PO_No());
|
||||
storepoET.setText(childDataList.get(0).getStore_PO_No());
|
||||
Log.d("childlistdata",childDataList.get(0).getPO_Img());
|
||||
@@ -666,6 +806,81 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long _po) {
|
||||
int id = parent.getId();
|
||||
if (id == R.id.sp_subcategory) {
|
||||
if (position != 0) {
|
||||
subcategory = subcategory_list.get(position).getSub_category();
|
||||
subcategoryId = Integer.parseInt(subcategory_list.get(position).getSub_category_id());
|
||||
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
brand_list = db.getOrderTaking_Branddata(country_id,categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide,subcategoryId);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
brand_list = db.getOrderTaking_Branddata(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide,subcategoryId);
|
||||
} else {
|
||||
brand_list = db.getOrderTaking_StockFacingHeaderData(country_id,categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide,subcategoryId);
|
||||
}
|
||||
|
||||
// brand_list = db.getCompetionData(keyAccount_id, storeType_id, class_id, categoryId, subcategoryId);
|
||||
// Prepare brand data with default "Select" option
|
||||
MSL_AvailabilityStockFacingGetterSetter brand_select = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
String select = getResources().getString(R.string.select);
|
||||
brand_select.setBrand(select);
|
||||
brand_select.setBrand_id("0");
|
||||
brand_list.add(0, brand_select);
|
||||
CustomBrandAdapter adapter = new CustomBrandAdapter(OrderTakingActivity.this, R.layout.custom_spinner_item, brand_list);
|
||||
spinner_brand_list.setAdapter(adapter);
|
||||
spinner_brand_list.setOnItemSelectedListener(this);
|
||||
} else {
|
||||
subcategory = "";
|
||||
subcategoryId = 0;
|
||||
//lay_competitor_name.setVisibility(View.GONE);
|
||||
}
|
||||
} else if (id == R.id.sp_brand) {
|
||||
if (position != 0) {
|
||||
brand = brand_list.get(position).getBrand();
|
||||
brand_id = Integer.parseInt(brand_list.get(position).getBrand_id());
|
||||
// skuListdata.clear();
|
||||
if (country_id.equals("7") || country_id.equals("8") || country_id.equals("17")) {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData(String.valueOf(subcategoryId), categoryId, String.valueOf(brand_id), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, store_flag_hide);
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData(String.valueOf(subcategoryId), categoryId, String.valueOf(brand_id), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, store_flag_hide);
|
||||
} else {
|
||||
skuListdata = db.getORDERTAKING_StockFacingSKUData(String.valueOf(subcategoryId), categoryId, String.valueOf(brand_id), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, store_flag_hide);
|
||||
}
|
||||
MSL_AvailabilityStockFacingGetterSetter sku_select = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
String select = getResources().getString(R.string.select);
|
||||
sku_select.setSku(select);
|
||||
sku_select.setSku_id("0");
|
||||
skuListdata.add(0, sku_select);
|
||||
CustomSkuAdapter skuAdapter = new CustomSkuAdapter(OrderTakingActivity.this, R.layout.custom_spinner_item, skuListdata);
|
||||
sp_promotion_typ.setAdapter(skuAdapter);
|
||||
sp_promotion_typ.setTitle("Search SKU");
|
||||
sp_promotion_typ.setPositiveButton("Close");
|
||||
sp_promotion_typ.setOnItemSelectedListener(this);
|
||||
} else {
|
||||
brand = "";
|
||||
brand_id = 0;
|
||||
}
|
||||
}
|
||||
else if (id == R.id.sp_promotion_typ) {
|
||||
if (position != 0) {
|
||||
skuname = skuListdata.get(position).getSku();
|
||||
skuid = Integer.parseInt(skuListdata.get(position).getSku_id());
|
||||
} else {
|
||||
skuname = "";
|
||||
skuid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
|
||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
private Context _context;
|
||||
private List<MSL_AvailabilityStockFacingGetterSetter> _listDataHeader;
|
||||
@@ -871,7 +1086,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
|
||||
|
||||
// holder.ed_pricing.setText(childData.getPricingStock());
|
||||
// holder.ed_pricing.setText(childData.getPricingStock());
|
||||
|
||||
|
||||
final ViewHolder finalHolder1 = holder;
|
||||
@@ -903,40 +1118,40 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
//Toggle is no selected
|
||||
|
||||
if (country_id.equals("6")) {
|
||||
if (!childData.getStock().equals("")) {
|
||||
if (country_id.equals("6")) {
|
||||
if (!childData.getStock().equals("")) {
|
||||
|
||||
String faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
||||
String faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
||||
|
||||
if (edFaceup != null && !edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
if (Double.parseDouble(faceup) <= Integer.parseInt(childData.getStock())) {
|
||||
if (edFaceup != null && !edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
if (Double.parseDouble(faceup) <= Integer.parseInt(childData.getStock())) {
|
||||
|
||||
isFill = true;
|
||||
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(OrderTakingActivity.this);
|
||||
builder.setMessage(getString(R.string.check_faceup))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finalHolder1.facing.setText("");
|
||||
dialog.dismiss();
|
||||
finalHolder2.facing.setText("");
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
} else {
|
||||
isFill = true;
|
||||
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(OrderTakingActivity.this);
|
||||
builder.setMessage(getString(R.string.check_faceup))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finalHolder1.facing.setText("");
|
||||
dialog.dismiss();
|
||||
finalHolder2.facing.setText("");
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
isFill = true;
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
isFill = true;
|
||||
}
|
||||
} else {
|
||||
isFill = true;
|
||||
}
|
||||
|
||||
if (isFill) {
|
||||
if (!edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
@@ -1070,7 +1285,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
Log.d("imagepath", str + _pathforcheck);
|
||||
Log.d("imagepath", str + _pathforcheck);
|
||||
poIV.setImageResource(R.mipmap.camera_green);
|
||||
img_str = _pathforcheck;
|
||||
_pathforcheck = "";
|
||||
@@ -1100,6 +1315,7 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
super.onBackPressed();
|
||||
if (editFlag) {
|
||||
CommonFunctions.showAlertDialog(OrderTakingActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||
} else {
|
||||
@@ -1157,10 +1373,225 @@ public class OrderTakingActivity extends AppCompatActivity implements DialogCall
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(gallery_package);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomSubcategoryAdapter extends ArrayAdapter<String> {
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
|
||||
public CustomSubcategoryAdapter(
|
||||
OrderTakingActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getSub_category());
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomBrandAdapter extends ArrayAdapter<String> {
|
||||
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
|
||||
/*************
|
||||
* CustomBrandAdapter Constructor
|
||||
*****************/
|
||||
public CustomBrandAdapter(
|
||||
OrderTakingActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
// label.setText(tempValues.getBrand() + "-"+ tempValues.getSub_category());
|
||||
if (position == 0) {
|
||||
// Default selected Spinner item
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getBrand() + "-"+ tempValues.getSub_category());
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CustomSkuAdapter extends ArrayAdapter<String> {
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
|
||||
/*************
|
||||
* CustomBrandAdapter Constructor
|
||||
*****************/
|
||||
public CustomSkuAdapter(
|
||||
OrderTakingActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
if (position == 0) {
|
||||
// Default selected Spinner item
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getSku());
|
||||
}
|
||||
// label.setText(tempValues.getSku());
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
public class ProductAdapter extends RecyclerView.Adapter<ProductAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<MSL_AvailabilityStockFacingGetterSetter> list;
|
||||
|
||||
public ProductAdapter(ArrayList<MSL_AvailabilityStockFacingGetterSetter> promoList) {
|
||||
list = promoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.item_order_taking_new, parent, false);
|
||||
return new ProductAdapter.ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ProductAdapter.ViewHolder holder, int position) {
|
||||
final MSL_AvailabilityStockFacingGetterSetter mItem = list.get(position);
|
||||
holder.tv_brand.setText(mItem.getSub_category());
|
||||
holder.tv_competitor.setText(mItem.getBrand());
|
||||
holder.tv_sku_name.setText(mItem.getSku());
|
||||
holder.tv_order_qty.setText(mItem.getOrder_qty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
public final TextView tv_brand, tv_competitor,tv_sku_name,tv_order_qty;
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||
tv_order_qty = (TextView) mView.findViewById(R.id.tv_order_qty);
|
||||
tv_sku_name = (TextView) mView.findViewById(R.id.tv_sku_name);
|
||||
tv_competitor = (TextView) mView.findViewById(R.id.tv_competitor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -326,6 +326,7 @@ class PDimageActivity : AppCompatActivity() {
|
||||
uploadParams.put("user_id", username)
|
||||
uploadParams.put("category_id", subCat_code)
|
||||
uploadParams.put("project_id", preferences?.getString(CommonString.KEY_PD_PROJECT_Id, ""))*/
|
||||
|
||||
Log.d("uploadParams", uploadParams.toString())
|
||||
if(!lang.equals("ENGLISH",ignoreCase = true)){
|
||||
CameraSDK.startCamera(
|
||||
|
||||
@@ -1896,7 +1896,6 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
||||
db.createTable(mapping_sos_target_masterGetterSetter.getTable_MAPPING_SOS_TARGET());
|
||||
db.createTable(noCameraLastVisitGetterSetter.getTable_NO_CAMERA_LAST_VISIT_DATA());
|
||||
db.createTable(store_performance_masterGetterSetter.getTable_STORE_PERFORMANCE());
|
||||
|
||||
db.InsertAdhocFilled(storeId, visit_date);
|
||||
db.InsertMAPPING_T2P(mappingt2PGetterSetter, CommonString.TABLE_MAPPING_T2P_ADHOC);
|
||||
db.InsertMappingStock(mappingStockGetterSetter, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||
|
||||
@@ -19,6 +19,8 @@ import android.webkit.WebViewClient
|
||||
import android.widget.ImageView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.media3.common.MediaItem
|
||||
import androidx.media3.exoplayer.ExoPlayer
|
||||
import com.bumptech.glide.request.target.ViewTarget
|
||||
import cpm.com.gskmtorange.databinding.ActivityWebviewBinding
|
||||
import org.json.JSONObject
|
||||
@@ -27,7 +29,10 @@ class WebViewActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivityWebviewBinding
|
||||
var toolbar: Toolbar? = null
|
||||
|
||||
private lateinit var type : String
|
||||
private var player: ExoPlayer? = null
|
||||
// private var player : ExoPlayer? = null
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@@ -88,15 +93,12 @@ class WebViewActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun handleContent(type: String, url: String) {
|
||||
|
||||
when (type) {
|
||||
|
||||
"html-webview" -> {
|
||||
binding.webView.visibility = View.VISIBLE
|
||||
binding.imageView.visibility = View.GONE
|
||||
binding.videoView.visibility = View.GONE
|
||||
setupWebView(url)
|
||||
|
||||
}
|
||||
|
||||
"image" -> {
|
||||
@@ -113,7 +115,6 @@ class WebViewActivity : AppCompatActivity() {
|
||||
binding.webView.visibility = View.GONE
|
||||
binding.imageView.visibility = View.GONE
|
||||
binding.videoView.visibility = View.VISIBLE
|
||||
|
||||
playVideo(url)
|
||||
}
|
||||
|
||||
@@ -130,15 +131,19 @@ class WebViewActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun playVideo(url: String) {
|
||||
player = ExoPlayer.Builder(this).build()
|
||||
binding.videoView.post {
|
||||
val width = binding.videoView.width
|
||||
val height = (width * 9) / 16
|
||||
binding.videoView.layoutParams.height = height
|
||||
}
|
||||
|
||||
val uri = Uri.parse(url)
|
||||
binding.videoView.setVideoURI(uri)
|
||||
binding.videoView.player = player
|
||||
|
||||
val controller = android.widget.MediaController(this)
|
||||
controller.setAnchorView(binding.videoView)
|
||||
|
||||
binding.videoView.setMediaController(controller)
|
||||
binding.videoView.start()
|
||||
val mediaItem = MediaItem.fromUri(url)
|
||||
player?.setMediaItem(mediaItem)
|
||||
player?.prepare()
|
||||
player?.play()
|
||||
}
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
@@ -150,8 +155,14 @@ class WebViewActivity : AppCompatActivity() {
|
||||
javaScriptCanOpenWindowsAutomatically = true
|
||||
setSupportMultipleWindows(true)
|
||||
loadWithOverviewMode = true
|
||||
|
||||
setSupportZoom(true)
|
||||
builtInZoomControls = true
|
||||
displayZoomControls = false
|
||||
useWideViewPort = true
|
||||
mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
|
||||
|
||||
|
||||
}
|
||||
|
||||
binding.webView.addJavascriptInterface(WebAppInterface(), "Android")
|
||||
@@ -184,6 +195,19 @@ class WebViewActivity : AppCompatActivity() {
|
||||
(function() {
|
||||
|
||||
console.log("🔥 JS INJECTED");
|
||||
|
||||
var meta = document.querySelector('meta[name=viewport]');
|
||||
if (meta) {
|
||||
meta.setAttribute(
|
||||
'content',
|
||||
'width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes'
|
||||
);
|
||||
} else {
|
||||
var newMeta = document.createElement('meta');
|
||||
newMeta.name = "viewport";
|
||||
newMeta.content = "width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes";
|
||||
document.head.appendChild(newMeta);
|
||||
}
|
||||
|
||||
// ✅ imageToBase64 FIX
|
||||
window.imageToBase64 = function(img) {
|
||||
@@ -304,7 +328,6 @@ class WebViewActivity : AppCompatActivity() {
|
||||
shareImageTextSmart(image, "$message\n$url")
|
||||
}
|
||||
}
|
||||
|
||||
else -> shareText(message)
|
||||
}
|
||||
}
|
||||
@@ -395,9 +418,7 @@ class WebViewActivity : AppCompatActivity() {
|
||||
|
||||
// ✅ MULTIPLE IMAGES
|
||||
private fun shareMultipleImages(list: List<String>) {
|
||||
|
||||
val uris = ArrayList<Uri>()
|
||||
|
||||
for (base64 in list) {
|
||||
val pure = base64.substringAfter(",")
|
||||
val bytes = Base64.decode(pure, Base64.DEFAULT)
|
||||
@@ -406,11 +427,9 @@ class WebViewActivity : AppCompatActivity() {
|
||||
val path = MediaStore.Images.Media.insertImage(contentResolver, bitmap, "Image", null)
|
||||
uris.add(Uri.parse(path))
|
||||
}
|
||||
|
||||
val intent = Intent(Intent.ACTION_SEND_MULTIPLE)
|
||||
intent.type = "image/*"
|
||||
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris)
|
||||
|
||||
startActivity(Intent.createChooser(intent, "Share Images"))
|
||||
}
|
||||
override fun onSupportNavigateUp(): Boolean {
|
||||
@@ -425,4 +444,14 @@ class WebViewActivity : AppCompatActivity() {
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
player?.pause()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
player?.release()
|
||||
player = null
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingSubReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeboardGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Order_Received_Status_GetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.PROMOTION_TYPE_MASTERGetterSetter;
|
||||
@@ -143,6 +144,9 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
Order_Received_Status_GetterSetter order_received_status_getterSetter;
|
||||
Visit_Type_Master_GetterSetter visit_type_master_getterSetter;
|
||||
Master_Storelist_PDA_GetterSetter masterStorelistPdaGetterSetter;
|
||||
NoticeboardGetterSetter noticeboardGetterSetter;
|
||||
|
||||
|
||||
|
||||
private Dialog dialog;
|
||||
private ProgressBar pb;
|
||||
@@ -179,35 +183,6 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
private void checkTLSVersion() {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
String host = "gskme2.parinaam.in";
|
||||
int port = 443;
|
||||
|
||||
// Create SSL context with default settings
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
sslContext.init(null, null, null);
|
||||
|
||||
SSLSocketFactory factory = sslContext.getSocketFactory();
|
||||
|
||||
try (SSLSocket sslSocket = (SSLSocket) factory.createSocket(host, port)) {
|
||||
sslSocket.startHandshake(); // do handshake
|
||||
|
||||
SSLSession session = sslSocket.getSession();
|
||||
Log.d("TLS_CHECK", "Protocol: " + session.getProtocol());
|
||||
runOnUiThread(() ->
|
||||
Toast.makeText(this, "protocol: " + session.getProtocol(), Toast.LENGTH_SHORT).show()
|
||||
);
|
||||
Log.d("TLS_CHECK", "CipherSuite: " + session.getCipherSuite());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e("TLS_CHECK", "Error checking TLS", e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
class Data {
|
||||
int value;
|
||||
String name;
|
||||
@@ -1923,7 +1898,6 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (order_received_status_getterSetter.getSTORE_ID().size() > 0) {
|
||||
// if (masterStorelistPdaGetterSetter.getStoreId().size() > 0) {
|
||||
Log.d("mastetpdadata","download");
|
||||
data.value = 99;
|
||||
data.name = "Master_StoreList_PDA" + getResources().getString(R.string.download_data);
|
||||
@@ -1934,6 +1908,47 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
//Mer_Noticeboard
|
||||
/* request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "Mer_NoticeBoard");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new OkHttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
Log.d("resultdata", result.toString());
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
|
||||
noticeboardGetterSetter = XMLHandlers.Noticeboard_XMLHandler(xpp, eventType);
|
||||
String stocktable = noticeboardGetterSetter.getTable_mer_noticeboard_detailer();
|
||||
if (stocktable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setNoticeboardData(stocktable);
|
||||
}
|
||||
|
||||
if (noticeboardGetterSetter.getNoticeBoardId().size() > 0) {
|
||||
Log.d("mer_noticeboard","download");
|
||||
data.value = 99;
|
||||
data.name = "Mer_NoticeBoard" + getResources().getString(R.string.download_data);
|
||||
} else {
|
||||
// return "MAPPING_PHARMA_MSL";
|
||||
}
|
||||
}
|
||||
|
||||
publishProgress(data);*/
|
||||
|
||||
|
||||
//Images DownLoads
|
||||
|
||||
//MAPPING_PLANOGRAM Image save into folder
|
||||
@@ -2055,12 +2070,9 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//MAPPING_PLANOGRAM_STORE_WISE Image save into folder
|
||||
if (mappingPlanogramStorewiseGetterSetter != null) {
|
||||
|
||||
@@ -2170,6 +2182,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db.InsertCATEGORYWISE_SOS_TARGET(store_category_wiseGetterSetter);
|
||||
db.InsertMAPPING_SKU_PRICING_ENABLE(mapping_sku_pricing_enableGetterSetter);
|
||||
db.InsertMaster_Storelist_Pda(masterStorelistPdaGetterSetter);
|
||||
// db.InsertNoticeBoardData(noticeboardGetterSetter);
|
||||
} catch (MalformedURLException e) {
|
||||
ResultFlag = false;
|
||||
str = CommonString.MESSAGE_EXCEPTION;
|
||||
|
||||
+10
-8
@@ -467,6 +467,12 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (db.getCounterfeitProductExistsAfterData(store_id, category_id).isEmpty()) {
|
||||
flag_filled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
//usk
|
||||
if (country_id.equals("6") && category_id.equals("2")) {
|
||||
if (db.getCompetitionPromoExistsAfterData(store_id, category_id).isEmpty()) {
|
||||
@@ -474,12 +480,12 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (country_id.equals("15")) {
|
||||
/*if (country_id.equals("6")) {
|
||||
if (!db.checkOrder_taking_Data(store_id, category_id)) {
|
||||
flag_filled = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//// IR PD images handling by jp
|
||||
ArrayList<CategoryPictureGetterSetter> irList = isPdIRMapping(category_id);
|
||||
@@ -629,14 +635,10 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Order Taking for country 15
|
||||
if (country_id.equals("15") && !db.checkOrder_taking_Data(store_id, category_id)) {
|
||||
/* if (country_id.equals("6") && !db.checkOrder_taking_Data(store_id, category_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
// IR-PD Image Check
|
||||
ArrayList<CategoryPictureGetterSetter> irList = isPdIRMapping(category_id);
|
||||
|
||||
+24
-23
@@ -351,34 +351,27 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
|
||||
//Order Taking
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
// ArrayList<AuditDataGetterSetter> question_list;
|
||||
data.setCategory_img(R.mipmap.msl_availability);
|
||||
if (country_id.equals("15") || (country_id.equals("17") && categoryId.equals("2"))) {
|
||||
if (isMappingStockData()) {
|
||||
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.msl_availability);
|
||||
}
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||
}
|
||||
data.setCategory_name(getString(R.string.order_taking));
|
||||
categoryList.add(data);
|
||||
}
|
||||
|
||||
//Order Confirm
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
// ArrayList<AuditDataGetterSetter> question_list;
|
||||
if (country_id.equals("15")) {
|
||||
if (db.checkOrder_Received_Data(store_id, categoryId)) {
|
||||
if (isMappingStockData()) {
|
||||
if (db.checkOrder_taking_Data(store_id, categoryId)) {
|
||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.msl_availability);
|
||||
}
|
||||
data.setCategory_name(getString(R.string.order_confirm));
|
||||
categoryList.add(data);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||
}
|
||||
data.setCategory_name(getString(R.string.order_taking));
|
||||
categoryList.add(data);
|
||||
|
||||
//Order Status
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
if (db.checkOrder_Received_Data(store_id, categoryId)) {
|
||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.msl_availability);
|
||||
}
|
||||
data.setCategory_name(getString(R.string.order_confirm));
|
||||
categoryList.add(data);
|
||||
|
||||
//Audit
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
@@ -711,6 +704,14 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
} else {
|
||||
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.grey_background));
|
||||
}
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.order_taking))) {
|
||||
if (isMappingStockData()) {
|
||||
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||
} else {
|
||||
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.grey_background));
|
||||
}
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.order_confirm))) {
|
||||
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.audit))) {
|
||||
if (!getAuditQnsRemoved().isEmpty()) {
|
||||
holder.categoryName.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||
|
||||
-5
@@ -215,11 +215,8 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
||||
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||
|
||||
expandableListView.invalidate();
|
||||
|
||||
int lastItem = firstVisibleItem + visibleItemCount;
|
||||
|
||||
if (firstVisibleItem == 0) {
|
||||
fab.show();//.setVisibility(View.VISIBLE);
|
||||
} else if (lastItem == totalItemCount) {
|
||||
@@ -269,9 +266,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
||||
} catch (Resources.NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.planogram, menu);
|
||||
|
||||
+9
-30
@@ -63,7 +63,7 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
//toolbar.setTitle("Order Status" + "-"+"PO List");
|
||||
toolbar.setTitle(context.getString(R.string.order_status_polist));
|
||||
toolbar.setTitle(context.getString(R.string.order_history));
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
declaration();
|
||||
@@ -73,11 +73,9 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
recyclerview = (RecyclerView) findViewById(R.id.recyclerview);
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
//Intent data
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
storeid = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
setDataToListView();
|
||||
}
|
||||
@@ -86,7 +84,7 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
try {
|
||||
db.open();
|
||||
inserteslistData=db.getOrderstatusData(storeid,categoryId);
|
||||
if(inserteslistData.size()>0){
|
||||
if(!inserteslistData.isEmpty()){
|
||||
adapter = new Recycler_view_adapter(context, inserteslistData);
|
||||
recyclerview.setAdapter(adapter);
|
||||
recyclerview.setLayoutManager(new LinearLayoutManager(context));
|
||||
@@ -114,26 +112,10 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final Recycler_view_adapter.Viewholder viewholder, final int pos) {
|
||||
final OrderReceivedStatus current = orderReceivedStatuses.get(pos);
|
||||
viewholder.sys_gen_poTV.setText(current.getSys_gen_po());
|
||||
viewholder.podateTV.setText(current.getPodate());
|
||||
viewholder.storepoTV.setText(current.getStorepo());
|
||||
|
||||
viewholder.lineItemTV.setText( ""+current.getORDERQTY());
|
||||
if(current.getStatus().equalsIgnoreCase("CONFIRMED")){
|
||||
viewholder.statusTV.setText(context.getString(R.string.confirmed));
|
||||
}
|
||||
else if(current.getStatus().equalsIgnoreCase("CONFIRM")){
|
||||
viewholder.statusTV.setText(context.getString(R.string.confirmed));
|
||||
}
|
||||
else if(current.getStatus().equalsIgnoreCase("NOT CONFIRMED")){
|
||||
viewholder.statusTV.setText(context.getString(R.string.not_confirmed));
|
||||
}
|
||||
else if(current.getStatus().equalsIgnoreCase("PENDING")){
|
||||
viewholder.statusTV.setText(context.getString(R.string.pending));
|
||||
}
|
||||
else{
|
||||
viewholder.statusTV.setText(current.getStatus());
|
||||
}
|
||||
//viewholder.podateTV.setText(current.getPodate());
|
||||
viewholder.podateTV.setText(current.getPodate() != null ? current.getPodate() : "");
|
||||
viewholder.lineItemTV.setText(""+current.getORDERQTY());
|
||||
viewholder.sys_gen_poTV.setText(current.getSys_gen_po() != null ? current.getSys_gen_po() : "");
|
||||
|
||||
viewholder.cardview.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -155,18 +137,15 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public class Viewholder extends RecyclerView.ViewHolder {
|
||||
TextView sys_gen_poTV,storepoTV,podateTV,lineItemTV,statusTV;
|
||||
TextView podateTV,lineItemTV,sys_gen_poTV;
|
||||
CardView cardview;
|
||||
LinearLayout storepoLL;
|
||||
public Viewholder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
cardview= (CardView) itemView.findViewById(R.id.cardview);
|
||||
storepoLL= itemView.findViewById(R.id.storepoLL);
|
||||
sys_gen_poTV= itemView.findViewById(R.id.sys_gen_poTV);
|
||||
storepoTV= itemView.findViewById(R.id.storepoTV);
|
||||
podateTV= itemView.findViewById(R.id.podateTV);
|
||||
sys_gen_poTV= itemView.findViewById(R.id.sys_gen_poTV);
|
||||
lineItemTV= itemView.findViewById(R.id.lineItemTV);
|
||||
statusTV= itemView.findViewById(R.id.statusTV);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,7 +163,7 @@ public class OrderConfirmActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// super.onBackPressed();
|
||||
super.onBackPressed();
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
|
||||
+119
-90
@@ -89,7 +89,7 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
RadioGroup radio_group;
|
||||
String isExist="";
|
||||
String sys_po_number="";
|
||||
TextView sys_gen_poTV,lineitemTV;
|
||||
//TextView sys_gen_poTV,lineitemTV;
|
||||
LinearLayout poLL;
|
||||
String storepo ="";
|
||||
TextView storepoTV,podateTV;
|
||||
@@ -108,13 +108,11 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
camera2 = (ImageView) findViewById(R.id.img_camera2);
|
||||
camera3 = (ImageView) findViewById(R.id.img_camera3);
|
||||
camera4 = (ImageView) findViewById(R.id.img_camera4);
|
||||
storepoTV = findViewById(R.id.storepoTV);
|
||||
lineitemTV = findViewById(R.id.lineitemTV);
|
||||
podateTV = findViewById(R.id.podateTV);
|
||||
poLL = findViewById(R.id.poLL);
|
||||
|
||||
sys_gen_poTV = findViewById(R.id.sys_gen_poTV);
|
||||
podateTV = findViewById(R.id.podateTV);
|
||||
//sys_gen_poTV = findViewById(R.id.sys_gen_poTV);
|
||||
// podateTV = findViewById(R.id.podateTV);
|
||||
|
||||
lin_camera1 = (LinearLayout) findViewById(R.id.lin_camera1);
|
||||
lin_camera2 = (LinearLayout) findViewById(R.id.lin_camera2);
|
||||
@@ -154,13 +152,11 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
// Log.e("podetai",SYS_PO_NUM + ","+PO_NUM + ","+PO_DATE + ","+LINE);
|
||||
|
||||
// toolbar.setTitle("Order Status" + "-"+"Entry");
|
||||
toolbar.setTitle(context.getString(R.string.order_status_entry));
|
||||
// toolbar.setTitle(context.getString(R.string.order_status_entry));
|
||||
toolbar.setTitle(context.getString(R.string.order_history_detail));
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
sys_gen_poTV.setText(SYS_PO_NUM);
|
||||
storepoTV.setText(PO_NUM);
|
||||
podateTV.setText(PO_DATE);
|
||||
lineitemTV.setText(LINE);
|
||||
// podateTV.setText(PO_DATE);
|
||||
//lineitemTV.setText(LINE);
|
||||
|
||||
// Log.e("sys_po_num",sys_po_number +","+timeMilli);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
@@ -175,8 +171,9 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
// cameraMethod();
|
||||
|
||||
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
/*fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View view) {
|
||||
expandableListView.clearFocus();
|
||||
@@ -184,17 +181,17 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
|
||||
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
||||
db.open();
|
||||
if (db.checkOrder_Received_Data(store_id, categoryId)) {
|
||||
*//* if (db.checkOrder_Received_Data(store_id, categoryId)) {
|
||||
db.updateOrder_Received_data(storepoTV.getText().toString(), sys_gen_poTV.getText().toString(), podateTV.getText().toString(), store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Toast.makeText(context, getResources().getString(R.string.update_message), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
db.InsertOrderReceivedStatusData(POID, storepoTV.getText().toString(), sys_gen_poTV.getText().toString(), podateTV.getText().toString(), store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Toast.makeText(context, getResources().getString(R.string.save_message), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}*//*
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
/* String order_received_xml = "";
|
||||
*//* String order_received_xml = "";
|
||||
String onXML = "";
|
||||
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> orderreceiveddata = db.getOrder_RECEIVED_UploadServerData(store_id);
|
||||
@@ -218,7 +215,7 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
final String sos_xml = "[DATA]" + order_received_xml + "[/DATA]";
|
||||
Log.e("order_xml", sos_xml);
|
||||
|
||||
} */
|
||||
} *//*
|
||||
|
||||
}
|
||||
else{
|
||||
@@ -227,7 +224,7 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||
@Override
|
||||
@@ -237,13 +234,13 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
|
||||
int lastItem = firstVisibleItem + visibleItemCount;
|
||||
|
||||
if (firstVisibleItem == 0) {
|
||||
/* if (firstVisibleItem == 0) {
|
||||
fab.show();//.setVisibility(View.VISIBLE);
|
||||
} else if (lastItem == totalItemCount) {
|
||||
fab.hide();//setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
fab.show();//setVisibility(View.VISIBLE);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -342,11 +339,9 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!child_flag)
|
||||
listTemp.add(data);
|
||||
}
|
||||
|
||||
}
|
||||
if (flag == false) {
|
||||
listDataHeaderTemp.add(listDataHeader.get(i));
|
||||
// listDataChildTemp.put(listDataHeader.get(i), listTemp);
|
||||
@@ -381,15 +376,18 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide);
|
||||
} else {
|
||||
//Log.e("categorydata",categoryId + ","+keyAccount_id + ","+storeType_id+","+class_id+","+store_id);
|
||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
// headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
headerDataList = db.getMSL_Availability_StockFacingHeaderNewData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||
// Log.e("childlistsize", String.valueOf(headerDataList.size()));
|
||||
}
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
/*if (headerDataList.size() > 0) {
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
//childDataList = new ArrayList<>();
|
||||
childDataList = db.getOrder_RECEIVED_SKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> filteredChildList =
|
||||
new ArrayList<>();
|
||||
childDataList = new ArrayList<>();
|
||||
//childDataList = db.getOrder_RECEIVED_SKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||
if (!(childDataList.size() > 0)) {
|
||||
if (country_id.equals("7") || country_id.equals("8")) {
|
||||
childDataList = db.getOrderReceivedSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, store_flag_hide);
|
||||
@@ -403,7 +401,96 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
else{
|
||||
|
||||
}
|
||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
for (MSL_AvailabilityStockFacingGetterSetter item : childDataList) {
|
||||
|
||||
String qty = item.getFacing();
|
||||
|
||||
if (qty != null &&
|
||||
!qty.isEmpty() &&
|
||||
!qty.equals("0") &&
|
||||
!qty.equals("0.0")) {
|
||||
filteredChildList.add(item);
|
||||
}
|
||||
}
|
||||
if (!filteredChildList.isEmpty()) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
hashMapListChildData.put(
|
||||
headerDataList.get(i),
|
||||
filteredChildList
|
||||
);
|
||||
}
|
||||
// hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
}
|
||||
}*/
|
||||
if (headerDataList.size() > 0) {
|
||||
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> filteredChildList =
|
||||
new ArrayList<>();
|
||||
|
||||
childDataList = new ArrayList<>();
|
||||
|
||||
if (country_id.equals("7") || country_id.equals("8")) {
|
||||
|
||||
childDataList = db.getOrderReceivedSKUData(
|
||||
headerDataList.get(i).getSub_category_id(),
|
||||
categoryId,
|
||||
headerDataList.get(i).getBrand_id(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
store_id,
|
||||
CommonString.TABLE_MAPPING_STOCK_STOREWISE,
|
||||
store_flag_hide
|
||||
);
|
||||
|
||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||
|
||||
childDataList = db.getOrderReceivedSKUData(
|
||||
headerDataList.get(i).getSub_category_id(),
|
||||
categoryId,
|
||||
headerDataList.get(i).getBrand_id(),
|
||||
keyAccount_id,
|
||||
storeType_id,
|
||||
class_id,
|
||||
store_id,
|
||||
CommonString.TABLE_MAPPING_STOCK_ADHOC,
|
||||
store_flag_hide
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
childDataList = db.getOrderReceivedSKUData(
|
||||
headerDataList.get(i).getSub_category_id(),
|
||||
categoryId,
|
||||
headerDataList.get(i).getBrand_id(),
|
||||
keyAccount_id,
|
||||
storeType_id,
|
||||
class_id,
|
||||
store_id,
|
||||
CommonString.TABLE_MAPPING_STOCK,
|
||||
store_flag_hide
|
||||
);
|
||||
}
|
||||
|
||||
for (MSL_AvailabilityStockFacingGetterSetter item : childDataList) {
|
||||
String qty = item.getFacing();
|
||||
if (qty != null &&
|
||||
!qty.isEmpty() &&
|
||||
!qty.equals("0") &&
|
||||
!qty.equals("0.0")) {
|
||||
|
||||
filteredChildList.add(item);
|
||||
}
|
||||
}
|
||||
if (!filteredChildList.isEmpty()) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
hashMapListChildData.put(
|
||||
headerDataList.get(i),
|
||||
filteredChildList
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,7 +556,6 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
}
|
||||
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||
|
||||
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
@@ -533,12 +619,12 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||
holder.poqtyTV = (TextView) convertView.findViewById(R.id.poqtyTV);
|
||||
holder.txt_mbq = (TextView) convertView.findViewById(R.id.txt_mbq);
|
||||
holder.orderqtyTV = (TextView) convertView.findViewById(R.id.orderqtyTV);
|
||||
holder.toggle_available = (ToggleButton) convertView.findViewById(R.id.toggle_available);
|
||||
holder.facing = (EditText) convertView.findViewById(R.id.ed_facing);
|
||||
holder.facing.setFilters(new InputFilter[]{new OrderStatusDetailActivity.DecimalDigitsInputFilter(3, 1)});
|
||||
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
||||
holder.ed_pricing = (EditText) convertView.findViewById(R.id.ed_pricing);
|
||||
|
||||
holder.facing_view = convertView.findViewById(R.id.facing_view);
|
||||
holder.stock_view = convertView.findViewById(R.id.stock_view);
|
||||
holder.pricing_view = convertView.findViewById(R.id.pricing_view);
|
||||
@@ -548,61 +634,8 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
}
|
||||
|
||||
holder.poqtyTV.setText(context.getString(R.string.po_qty) + ":"+childData.getOrderqty());
|
||||
// holder.poqtyTV.setText("PO QTY" + ":"+childData.getOrderqty());
|
||||
// uae facing hide
|
||||
/*if (store_flag_hide.equals("1")) {
|
||||
holder.facing.setVisibility(View.GONE);
|
||||
holder.facing_view.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.facing.setVisibility(View.VISIBLE);
|
||||
holder.facing_view.setVisibility(View.VISIBLE);
|
||||
}*/
|
||||
//usk
|
||||
/* if (childData.getPricing().equals("0")) {
|
||||
holder.ed_pricing.setVisibility(View.GONE);
|
||||
holder.pricing_view.setVisibility(View.GONE);
|
||||
holder.ed_pricing.setId(childPosition);
|
||||
holder.pricing_view.setId(childPosition);
|
||||
} else {
|
||||
holder.ed_pricing.setVisibility(View.VISIBLE);
|
||||
holder.pricing_view.setVisibility(View.VISIBLE);
|
||||
holder.ed_pricing.setId(childPosition);
|
||||
holder.pricing_view.setId(childPosition);
|
||||
}*/
|
||||
|
||||
holder.orderqtyTV.setText(context.getString(R.string.order_qty) + ":"+childData.getOrderqty());
|
||||
holder.txt_skuName.setText(childData.getSku());
|
||||
// holder.txt_mbq.setText(childData.getMbq());
|
||||
|
||||
/* if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
|
||||
//holder.txt_mbq.setVisibility(View.VISIBLE);
|
||||
holder.toggle_available.setVisibility(View.VISIBLE);
|
||||
// holder.facing.setVisibility(View.VISIBLE);
|
||||
if (country_id.equals("6")) {
|
||||
holder.stock.setVisibility(View.VISIBLE);
|
||||
holder.stock_view.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (childData.getToggleValue().equals("1")) {
|
||||
holder.stock.setVisibility(View.GONE);
|
||||
holder.stock_view.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.stock.setVisibility(View.VISIBLE);
|
||||
holder.stock_view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
// holder.txt_mbq.setVisibility(View.GONE);
|
||||
holder.toggle_available.setVisibility(View.GONE);
|
||||
// holder.facing.setVisibility(View.VISIBLE);
|
||||
holder.stock.setVisibility(View.GONE);
|
||||
holder.stock_view.setVisibility(View.GONE);
|
||||
}*/
|
||||
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||
} else {
|
||||
@@ -626,12 +659,8 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
} else {
|
||||
finalHolder.stock.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
/*childData.setStock("");
|
||||
childData.setFacing("");*/
|
||||
} else {
|
||||
/* childData.setStock("");
|
||||
childData.setFacing("");*/
|
||||
}
|
||||
else {
|
||||
childData.setToggleValue("0");
|
||||
finalHolder.stock.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -991,7 +1020,7 @@ public class OrderStatusDetailActivity extends AppCompatActivity{
|
||||
}
|
||||
public class ViewHolder {
|
||||
CardView cardView;
|
||||
TextView txt_skuName, txt_mbq,poqtyTV;
|
||||
TextView txt_skuName, txt_mbq,poqtyTV,orderqtyTV;
|
||||
ToggleButton toggle_available;
|
||||
LinearLayout lin_category;
|
||||
EditText facing, stock, ed_pricing;
|
||||
|
||||
@@ -58,6 +58,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
@@ -80,6 +81,8 @@ import java.util.Map;
|
||||
import cpm.com.gskmtorange.GetterSetter.PD_CONFIGURATION;
|
||||
import cpm.com.gskmtorange.LoginActivity;
|
||||
import cpm.com.gskmtorange.MainActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeItem;
|
||||
import cpm.com.gskmtorange.NoticeResponse;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.autoupdate.AutoUpdateActivity;
|
||||
import cpm.com.gskmtorange.blurlockview.BlurLockView;
|
||||
@@ -87,10 +90,10 @@ import cpm.com.gskmtorange.blurlockview.Password;
|
||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.constant.CommonUtils;
|
||||
import cpm.com.gskmtorange.dailyentry.CheckoutActivity;
|
||||
import cpm.com.gskmtorange.utils.OkHttpTransportSE;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeboardGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
|
||||
|
||||
public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPasswordInputListener, BlurLockView.OnLeftButtonClickListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener {
|
||||
@@ -483,7 +486,7 @@ public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPa
|
||||
protected String doInBackground(Void... params) {
|
||||
try {
|
||||
versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
|
||||
String userauth_xml = "[DATA]" + "[USER_DATA][USER_ID]" + userId + "[/USER_ID]" + "[PASSWORD]" + password + "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context) + "[/IN_TIME]" + "[LATITUDE]" + lat + "[/LATITUDE]" + "[LONGITUDE]" + lon + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver+"-T2" + "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]" + "[NETWORK_STATUS]" + "LoginStatus" + "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
|
||||
String userauth_xml = "[DATA]" + "[USER_DATA][USER_ID]" + userId + "[/USER_ID]" + "[PASSWORD]" + password + "[/PASSWORD]" + "[IN_TIME]" + CommonFunctions.getCurrentTimeWithLanguage(context) + "[/IN_TIME]" + "[LATITUDE]" + lat + "[/LATITUDE]" + "[LONGITUDE]" + lon + "[/LONGITUDE]" + "[APP_VERSION]" + app_ver+"-T3" + "[/APP_VERSION]" + "[ATT_MODE]OnLine[/ATT_MODE]" + "[NETWORK_STATUS]" + "LoginStatus" + "[/NETWORK_STATUS]" + "[/USER_DATA][/DATA]";
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_LOGIN);
|
||||
request.addProperty("onXML", userauth_xml);
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
@@ -544,6 +547,61 @@ public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPa
|
||||
return CommonString.KEY_FAILURE;
|
||||
}
|
||||
|
||||
//Mer_NoticeBoard
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "Mer_NoticeBoard");
|
||||
request.addProperty("cultureid", "1");
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
androidHttpTransport = new OkHttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = envelope.getResponse();
|
||||
|
||||
factory = XmlPullParserFactory.newInstance();
|
||||
factory.setNamespaceAware(false);
|
||||
|
||||
Log.e("Noticeboard_Result", result.toString());
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
NoticeboardGetterSetter noticeboardGetterSetter1 = XMLHandlers.Noticeboard_XMLHandler(xpp,eventType);
|
||||
Log.e("noticeboardGetterSetter1", noticeboardGetterSetter1.toString());
|
||||
// PUT IN PREFERENCES
|
||||
if (noticeboardGetterSetter1.getNoticeBoardId() != null && !noticeboardGetterSetter1.getNoticeBoardId().isEmpty()) {
|
||||
List<NoticeItem> list = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < noticeboardGetterSetter1.getNoticeBoardId().size(); i++) {
|
||||
|
||||
NoticeItem item = new NoticeItem(
|
||||
safe(noticeboardGetterSetter1.getNoticeBoardId(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticThumnail_Path(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticeLink_Thumbnail(), i),
|
||||
safe(noticeboardGetterSetter1.getNoticeLink_FullPage(), i),
|
||||
safe(noticeboardGetterSetter1.getFullPageTarget(), i)
|
||||
);
|
||||
|
||||
list.add(item);
|
||||
}
|
||||
|
||||
NoticeResponse response = new NoticeResponse(list);
|
||||
|
||||
Gson gson = new GsonBuilder()
|
||||
.disableHtmlEscaping()
|
||||
.setPrettyPrinting()
|
||||
.create();
|
||||
|
||||
String noticeJson = gson.toJson(response);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString("NOTICEBOARD_DATA", noticeJson);
|
||||
editor.apply();
|
||||
|
||||
} else {
|
||||
return CommonString.KEY_FAILURE;
|
||||
}
|
||||
|
||||
} catch (XmlPullParserException | IOException e) {
|
||||
e.fillInStackTrace();
|
||||
}
|
||||
@@ -856,4 +914,11 @@ public class MPinActivity extends AppCompatActivity implements BlurLockView.OnPa
|
||||
private void initializePDSDK(Context context, String projectId, String _userId) {
|
||||
CommonUtils.INSTANCE.initializePDSDK(context, projectId, _userId);
|
||||
}
|
||||
|
||||
private String safe(ArrayList<String> list, int index) {
|
||||
if (list == null || list.size() <= index || list.get(index) == null) {
|
||||
return "";
|
||||
}
|
||||
return list.get(index).trim();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1472,7 +1472,6 @@ public class UploadActivity extends AppCompatActivity {
|
||||
if (orderreceiveddata.size() > 0) {
|
||||
for (int j = 0; j < orderreceiveddata.size(); j++) {
|
||||
onXML = "[ORDER_CONFIRM]" + "[MID]" + mid + "[/MID]" + "[USERID]" + userId + "[/USERID]" + "[CATEGORY_ID]" + orderreceiveddata.get(j).getCategory_id() + "[/CATEGORY_ID]" + "[PO_DATE]" + orderreceiveddata.get(j).getPO_Date() + "[/PO_DATE]" + "[POID]" + orderreceiveddata.get(j).getPOID() + "[/POID]" + "[SKU_ID]" + orderreceiveddata.get(j).getSku_id() + "[/SKU_ID]" + "[PO_QTY]" + orderreceiveddata.get(j).getOrderqty() + "[/PO_QTY]" + "[ACTUAL_QTY]" + orderreceiveddata.get(j).getFacing() + "[/ACTUAL_QTY]" + "[/ORDER_CONFIRM]";
|
||||
|
||||
order_received_xml = order_received_xml + onXML;
|
||||
}
|
||||
|
||||
@@ -1504,7 +1503,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
////IRPD-Upload Data
|
||||
String irPD_xmlData = "";
|
||||
/* String irPD_xmlData = "";
|
||||
onXML = "";
|
||||
ArrayList<CategoryPictureGetterSetter> irdata = db.getIrPDforUpload(coverageList.get(i).getStoreId(), coverageList.get(i).getVisitDate());
|
||||
if (irdata != null && !irdata.isEmpty()) {
|
||||
@@ -1528,11 +1527,39 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
data.value = 71;
|
||||
data.name = getString(R.string.ir_data_upload);
|
||||
publishProgress(data);*/
|
||||
|
||||
String irPD_xmlData = "";
|
||||
onXML = "";
|
||||
ArrayList<CategoryPictureGetterSetter> irdata = db.getIrPDforUpload(coverageList.get(i).getStoreId(), coverageList.get(i).getVisitDate());
|
||||
if (irdata != null && !irdata.isEmpty()) {
|
||||
for (int j = 0; j < irdata.size(); j++) {
|
||||
onXML = "[IR_DATA]" + "[MID]" + mid + "[/MID]" + "[USERID]" + userId + "[/USERID]" + "[CATEGORY_ID]" + irdata.get(j).getCategoryId() + "[/CATEGORY_ID]" + "[SUB_CATEGORY_ID]" + irdata.get(j).getSUB_CATEGORY_ID() + "[/SUB_CATEGORY_ID]" + "[SUB_CATEGORY_CODE]" + irdata.get(j).getSubCatCode() + "[/SUB_CATEGORY_CODE]" + "[IR_IMAGES]" + irdata.get(j).getSubCategoryCamera2() + "[/IR_IMAGES]" + "[/IR_DATA]";
|
||||
irPD_xmlData = irPD_xmlData + onXML;
|
||||
}
|
||||
final String irpd_xml = "[DATA]" + irPD_xmlData + "[/DATA]";
|
||||
Log.e("irp_xml_data", irpd_xml);
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", irpd_xml);
|
||||
request.addProperty("KEYS", "IR_DATA_XML");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
androidHttpTransport = new OkHttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||
result = envelope.getResponse();
|
||||
}
|
||||
data.value = 71;
|
||||
data.name = getString(R.string.ir_data_upload);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
|
||||
////IRPDVisibility-Upload Data
|
||||
String irPD_visi_xmlData = "";
|
||||
/* String irPD_visi_xmlData = "";
|
||||
onXML = "";
|
||||
ArrayList<CategoryPictureGetterSetter> ir_visi_data = db.getIrPDVisibilityforUpload(coverageList.get(i).getStoreId(), coverageList.get(i).getVisitDate());
|
||||
if (ir_visi_data != null && !ir_visi_data.isEmpty()) {
|
||||
@@ -1556,6 +1583,32 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
data.value = 72;
|
||||
data.name = getString(R.string.ir_visibility_data_upload);
|
||||
publishProgress(data);*/
|
||||
|
||||
String irPD_visi_xmlData = "";
|
||||
onXML = "";
|
||||
ArrayList<CategoryPictureGetterSetter> ir_visi_data = db.getIrPDVisibilityforUpload(coverageList.get(i).getStoreId(), coverageList.get(i).getVisitDate());
|
||||
if (ir_visi_data != null && !ir_visi_data.isEmpty()) {
|
||||
for (int j = 0; j < ir_visi_data.size(); j++) {
|
||||
onXML = "[IR_VISIBILITY_DATA]" + "[MID]" + mid + "[/MID]" + "[USERID]" + userId + "[/USERID]" + "[CATEGORY_ID]" + ir_visi_data.get(j).getCategoryId() + "[/CATEGORY_ID]" + "[SUB_CATEGORY_ID]" + ir_visi_data.get(j).getSUB_CATEGORY_ID() + "[/SUB_CATEGORY_ID]" + "[SUB_CATEGORY_CODE]" + ir_visi_data.get(j).getSubCatCode() + "[/SUB_CATEGORY_CODE]" + "[IR_VISIBILITY_IMAGES]" + ir_visi_data.get(j).getSubCategoryCamera2() + "[/IR_VISIBILITY_IMAGES]" + "[/IR_VISIBILITY_DATA]";
|
||||
irPD_visi_xmlData = irPD_visi_xmlData + onXML;
|
||||
}
|
||||
final String irpd_xml = "[DATA]" + irPD_visi_xmlData + "[/DATA]";
|
||||
Log.e("irpd_visi_xml_data", irPD_visi_xmlData);
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", irpd_xml);
|
||||
request.addProperty("KEYS", "IRPD_VISIBILITY_DATA_XML");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
androidHttpTransport = new OkHttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||
result = envelope.getResponse();
|
||||
}
|
||||
data.value = 72;
|
||||
data.name = getString(R.string.ir_visibility_data_upload);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
+15
@@ -25,6 +25,16 @@ public class MSL_AvailabilityStockFacingGetterSetter implements Serializable{
|
||||
String company_id;
|
||||
String must_have;
|
||||
|
||||
public String getOrder_qty() {
|
||||
return order_qty;
|
||||
}
|
||||
|
||||
public void setOrder_qty(String order_qty) {
|
||||
this.order_qty = order_qty;
|
||||
}
|
||||
|
||||
String order_qty ="";
|
||||
|
||||
public String getPOID() {
|
||||
return POID;
|
||||
}
|
||||
@@ -268,4 +278,9 @@ public class MSL_AvailabilityStockFacingGetterSetter implements Serializable{
|
||||
this.warehouseStock = warehouseStock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getSku();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
public class NoticeItem {
|
||||
String NoticeBoardId;
|
||||
String NoticThumnail_Path;
|
||||
String NoticeLink_Thumbnail;
|
||||
|
||||
String NoticeLink_FullPage;
|
||||
String FullPageTarget;
|
||||
|
||||
public NoticeItem(String id, String path, String thumb, String full, String target) {
|
||||
this.NoticeBoardId = id;
|
||||
this.NoticThumnail_Path = path;
|
||||
this.NoticeLink_Thumbnail = thumb;
|
||||
this.NoticeLink_FullPage = full;
|
||||
this.FullPageTarget = target;
|
||||
}
|
||||
|
||||
public String getNoticeBoardId() {
|
||||
return NoticeBoardId;
|
||||
}
|
||||
|
||||
public void setNoticeBoardId(String noticeBoardId) {
|
||||
NoticeBoardId = noticeBoardId;
|
||||
}
|
||||
|
||||
public String getNoticThumnail_Path() {
|
||||
return NoticThumnail_Path;
|
||||
}
|
||||
|
||||
public void setNoticThumnail_Path(String noticThumnail_Path) {
|
||||
NoticThumnail_Path = noticThumnail_Path;
|
||||
}
|
||||
|
||||
public String getNoticeLink_Thumbnail() {
|
||||
return NoticeLink_Thumbnail;
|
||||
}
|
||||
|
||||
public void setNoticeLink_Thumbnail(String noticeLink_Thumbnail) {
|
||||
NoticeLink_Thumbnail = noticeLink_Thumbnail;
|
||||
}
|
||||
|
||||
public String getNoticeLink_FullPage() {
|
||||
return NoticeLink_FullPage;
|
||||
}
|
||||
|
||||
public void setNoticeLink_FullPage(String noticeLink_FullPage) {
|
||||
NoticeLink_FullPage = noticeLink_FullPage;
|
||||
}
|
||||
|
||||
public String getFullPageTarget() {
|
||||
return FullPageTarget;
|
||||
}
|
||||
|
||||
public void setFullPageTarget(String fullPageTarget) {
|
||||
FullPageTarget = fullPageTarget;
|
||||
}
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class NoticeboardGetterSetter {
|
||||
String table_mer_noticeboard_detailer;
|
||||
ArrayList<String> NoticeBoardId = new ArrayList<>();
|
||||
ArrayList<String> NoticThumnail_Path = new ArrayList<>();
|
||||
ArrayList<String> NoticeLink_Thumbnail = new ArrayList<>();
|
||||
ArrayList<String> NoticeLink_FullPage = new ArrayList<>();
|
||||
ArrayList<String> FullPageTarget = new ArrayList<>();
|
||||
|
||||
public String getTable_mer_noticeboard_detailer() {
|
||||
return table_mer_noticeboard_detailer;
|
||||
}
|
||||
|
||||
public void setTable_mer_noticeboard_detailer(String table_mer_noticeboard_detailer) {
|
||||
this.table_mer_noticeboard_detailer = table_mer_noticeboard_detailer;
|
||||
}
|
||||
|
||||
public ArrayList<String> getNoticeBoardId() {
|
||||
return NoticeBoardId;
|
||||
}
|
||||
|
||||
public void setNoticeBoardId(String NoticeBoardId) {
|
||||
this.NoticeBoardId.add(NoticeBoardId);
|
||||
}
|
||||
|
||||
public ArrayList<String> getNoticThumnail_Path() {
|
||||
return NoticThumnail_Path;
|
||||
}
|
||||
|
||||
public void setNoticThumnail_Path(String NoticThumnail_Path) {
|
||||
this.NoticThumnail_Path.add(NoticThumnail_Path);
|
||||
}
|
||||
|
||||
public ArrayList<String> getNoticeLink_Thumbnail() {
|
||||
return NoticeLink_Thumbnail;
|
||||
}
|
||||
|
||||
public void setNoticeLink_Thumbnail(String NoticeLink_Thumbnail) {
|
||||
this.NoticeLink_Thumbnail.add(NoticeLink_Thumbnail);
|
||||
}
|
||||
|
||||
public ArrayList<String> getNoticeLink_FullPage() {
|
||||
return NoticeLink_FullPage;
|
||||
}
|
||||
|
||||
public void setNoticeLink_FullPage(String NoticeLink_FullPage) {
|
||||
this.NoticeLink_FullPage.add(NoticeLink_FullPage);
|
||||
}
|
||||
|
||||
public ArrayList<String> getFullPageTarget() {
|
||||
return FullPageTarget;
|
||||
}
|
||||
|
||||
public void setFullPageTarget(String FullPageTarget) {
|
||||
this.FullPageTarget.add(FullPageTarget);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,15 @@ public class TableBean {
|
||||
public static String NON_WORKING_REASON;
|
||||
public static String MAPPING_PROMOTION;
|
||||
public static String Master_StoreList_PDA;
|
||||
public static String NoticeboardData;
|
||||
|
||||
public static String getNoticeboardData() {
|
||||
return NoticeboardData;
|
||||
}
|
||||
|
||||
public static void setNoticeboardData(String noticeboardData) {
|
||||
NoticeboardData = noticeboardData;
|
||||
}
|
||||
|
||||
public static String getMaster_StoreList_PDA() {
|
||||
return Master_StoreList_PDA;
|
||||
|
||||
@@ -40,6 +40,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingSubReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoticeboardGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Order_Received_Status_GetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.PROMOTION_TYPE_MASTERGetterSetter;
|
||||
@@ -1875,6 +1876,44 @@ public class XMLHandlers {
|
||||
return masterStorelistPda;
|
||||
}
|
||||
|
||||
|
||||
public static NoticeboardGetterSetter Noticeboard_XMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
NoticeboardGetterSetter noticeboardGetterSetter = new NoticeboardGetterSetter();
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
noticeboardGetterSetter.setTable_mer_noticeboard_detailer(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("NoticeBoardId")) {
|
||||
noticeboardGetterSetter.setNoticeBoardId(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("NoticThumnail_Path")) {
|
||||
noticeboardGetterSetter.setNoticThumnail_Path(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("NoticeLink_Thumbnail")) {
|
||||
noticeboardGetterSetter.setNoticeLink_Thumbnail(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("NoticeLink_FullPage")) {
|
||||
noticeboardGetterSetter.setNoticeLink_FullPage(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("FullPageTarget")) {
|
||||
noticeboardGetterSetter.setFullPageTarget(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return noticeboardGetterSetter;
|
||||
}
|
||||
|
||||
// JCP XML HANDLER
|
||||
public static PD_CONFIGURATION PDConfigXMLHandler(XmlPullParser xpp) {
|
||||
PD_CONFIGURATION jcpGetterSetter = new PD_CONFIGURATION();
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="16dp"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/content_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/custom_margin"
|
||||
android:paddingLeft="@dimen/custom_margin"
|
||||
android:paddingRight="@dimen/custom_margin"
|
||||
android:paddingTop="@dimen/custom_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.MainActivity"
|
||||
tools:showIn="@layout/app_bar_main">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="12dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- ViewPager + Dots -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"/>
|
||||
<!-- ✅ Custom Dots -->
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/dotsLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_main"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/gsklogo"
|
||||
/>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/custom_margin"
|
||||
android:visibility="gone">
|
||||
</WebView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</RelativeLayout>
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
@@ -6,37 +6,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/grey_background"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<include layout="@layout/contentorderstatus"/>
|
||||
|
||||
<!– <com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/save_icon" />–>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>-->
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -28,12 +28,6 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="60dp">
|
||||
|
||||
<!-- <View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorPrimary"/>-->
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/poLL"
|
||||
android:layout_width="match_parent"
|
||||
@@ -48,107 +42,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/system_po_num"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/sys_gen_poTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:text="1234-1234-1234"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/store_po_num"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/storepoTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/po_date"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/podateTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="07/12/2022"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/line_items"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/lineitemTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="13"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<include layout="@layout/content_order_status_detail"/>
|
||||
@@ -160,6 +54,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@mipmap/save_icon" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -30,19 +31,11 @@
|
||||
android:id="@+id/sampingll"
|
||||
android:padding="5dp"
|
||||
android:weightSum="4"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- <TextView
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Order given by store"
|
||||
android:padding="10dp"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:textStyle="bold"/>-->
|
||||
|
||||
<TextView
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
@@ -52,8 +45,6 @@
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_group"
|
||||
android:layout_weight="2"
|
||||
@@ -62,7 +53,6 @@
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_yes"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -71,7 +61,6 @@
|
||||
android:button="@null"
|
||||
android:background="@mipmap/yes_white"
|
||||
android:checked="false" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_no"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -80,9 +69,220 @@
|
||||
android:background="@mipmap/no_white"
|
||||
android:button="@null"
|
||||
android:checked="false" />
|
||||
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="4">
|
||||
|
||||
<!--Additional Promo-->
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_parent_promo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".8"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/sub_category"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_subcategory"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/custom_margin"
|
||||
android:layout_marginRight="@dimen/custom_margin"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#EEEEEE" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_competitor_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:visibility="visible"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".8"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Brand"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/custom_margin"
|
||||
android:layout_marginRight="@dimen/custom_margin"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#EEEEEE" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".8"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<com.toptoche.searchablespinnerlibrary.SearchableSpinner
|
||||
android:id="@+id/sp_promotion_typ"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2" />
|
||||
|
||||
<!--<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCornerRadiusBottomEnd="4dp"
|
||||
app:boxCornerRadiusBottomStart="4dp"
|
||||
app:boxCornerRadiusTopEnd="4dp"
|
||||
app:boxCornerRadiusTopStart="4dp"
|
||||
app:boxStrokeColor="@color/black">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/sp_promotion_typ"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/select"
|
||||
android:inputType="text"
|
||||
android:completionThreshold="1"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/custom_margin"
|
||||
android:layout_marginRight="@dimen/custom_margin"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#EEEEEE" />
|
||||
<!--Brand Spinner-->
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".8"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@string/order_qty"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black"
|
||||
android:textAllCaps="false"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText_QTY"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_xsmall"
|
||||
android:inputType="numberDecimal"
|
||||
android:layout_weight="1.2"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:maxImageSize="26dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_margin="5dp"
|
||||
app:srcCompat="@drawable/add"
|
||||
app:tint="@android:color/white"
|
||||
app:shapeAppearanceOverlay="@style/RoundedFabShape"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rec_added_counterfeit_product"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
@@ -52,12 +52,14 @@
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!-- Video -->
|
||||
<VideoView
|
||||
<androidx.media3.ui.PlayerView
|
||||
android:id="@+id/videoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/custom_margin"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone"
|
||||
app:resize_mode="fit"
|
||||
app:use_controller="true"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="5dp"
|
||||
card_view:cardCornerRadius="12dp"
|
||||
card_view:cardElevation="0dp">
|
||||
|
||||
@@ -12,6 +10,6 @@
|
||||
android:id="@+id/bannerImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -283,7 +283,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_margin="5dp"
|
||||
app:srcCompat="@drawable/add" />
|
||||
app:srcCompat="@drawable/add"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:weightSum="2">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:weightSum="2">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -220,7 +220,6 @@
|
||||
android:gravity="center"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
|
||||
android:text="@string/pricing"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
@@ -12,7 +11,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text"
|
||||
android:layout_width="match_parent"
|
||||
@@ -21,7 +19,7 @@
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="@dimen/custom_margin"
|
||||
android:padding="10dp"
|
||||
android:textSize="@dimen/text_size_xsmall"
|
||||
@@ -30,7 +28,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginVertical="3dp"
|
||||
card_view:cardCornerRadius="8dp"
|
||||
card_view:cardElevation="1dp"
|
||||
card_view:cardBackgroundColor="@android:color/white">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="14dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -18,6 +18,51 @@
|
||||
android:id="@+id/lin_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:weightSum="2">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_skuName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="SKU Name Value "
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orderqtyTV"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_category1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
@@ -31,7 +76,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_skuName"
|
||||
android:id="@+id/txt_skuName1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
@@ -43,6 +88,22 @@
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="@dimen/margin_10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orderqtyTV1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -53,6 +114,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".20"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -71,6 +133,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".20"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -118,6 +181,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_weight=".20"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp">
|
||||
view
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:strokeColor="#EAEAEA"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/order_details"
|
||||
android:textColor="#1F1F1F"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text=""
|
||||
android:textColor="#2E7D32"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="#EEEEEE" />
|
||||
|
||||
<!-- Promotion Type -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sub_category"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="NA"
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Competitor -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/brand"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_competitor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Comment -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sku_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Shelf branding visible near counter."
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Order Qty -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Order Qty"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_qty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#E8F5E9"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="12"
|
||||
android:textColor="#2E7D32"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,27 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<androidx.cardview.widget.CardView
|
||||
<!–<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
android:elevation="5dp"
|
||||
android:elevation="4dp"
|
||||
card_view:cardBackgroundColor="@color/cardview_light_background"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
card_view:cardUseCompatPadding="true">–>
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
android:elevation="4dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
@@ -29,8 +36,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/system_po_num"
|
||||
/>
|
||||
@@ -39,61 +46,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:text="1234-1234-1234"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/storepoLL"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/store_po_num"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/storepoTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="PO-1234"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/po_date"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/podateTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="07/12/2022"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -107,8 +62,34 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/order_date"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/podateTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/line_items"
|
||||
/>
|
||||
@@ -117,38 +98,133 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="13"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="2">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_marginLeft="@dimen/text_size_small"
|
||||
android:text="@string/status"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/statusTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:text="Pending"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:elevation="3dp"
|
||||
card_view:cardBackgroundColor="#FFFFFF"
|
||||
card_view:cardCornerRadius="14dp"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- System PO Number -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:text="@string/system_po_num"
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sys_gen_poTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Order Date -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:text="@string/order_date"
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/podateTV"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Line Items -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:text="@string/line_items"
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lineItemTV"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#DCFCE7"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="13sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -299,11 +299,12 @@
|
||||
<string name="audit">Audit</string>
|
||||
|
||||
<string name="order_taking">Order Taking</string>
|
||||
<string name="order_confirm">Order Status</string>
|
||||
<string name="order_confirm">Order History</string>
|
||||
<string name="order_given_store">Order given by store</string>
|
||||
<string name="system_po_num">System PO Number</string>
|
||||
<string name="store_po_num">Store PO Number</string>
|
||||
<string name="po_date">PO Date</string>
|
||||
<string name="order_date">Order Date</string>
|
||||
<string name="po_image">PO Image</string>
|
||||
<string name="order_qty">Order Qty</string>
|
||||
<string name="pls_fill_order_qty">Please fill Order Quantity</string>
|
||||
@@ -313,7 +314,9 @@
|
||||
<string name="confirmed">Confirmed</string>
|
||||
<string name="pending">Pending</string>
|
||||
<string name="order_status_polist">Order Status-PO List</string>
|
||||
<string name="order_history">Order History</string>
|
||||
<string name="order_status_entry">Order Status-Entry</string>
|
||||
<string name="order_history_detail">Order History Detail</string>
|
||||
<string name="po_qty">PO Qty</string>
|
||||
<string name="status">Status</string>
|
||||
|
||||
@@ -463,6 +466,9 @@
|
||||
<string name="ir_data_upload">IR Category Data Uploading</string>
|
||||
<string name="ir_visibility_data_upload">IR Visibilty Images Data Uploading</string>
|
||||
<string name="view_report_pd">View Report</string>
|
||||
<string name="please_enter_order_qty">Please enter order qty</string>
|
||||
<string name="add_different_sku">This SKU has already been added. Please add a different SKU.</string>
|
||||
<string name="order_details">Order Details</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -8,22 +8,60 @@
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="RoundedImage">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!--<item name="alertDialogTheme">
|
||||
@style/CustomSearchDialogTheme
|
||||
</item>-->
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="roundedCornersImageView" parent="">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/margin_10dp</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomSearchDialogTheme"
|
||||
parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
|
||||
<!-- Dialog Background -->
|
||||
<item name="android:windowBackground">
|
||||
@android:color/white
|
||||
</item>
|
||||
|
||||
<!-- Remove default ugly dividers -->
|
||||
<item name="android:listDivider">
|
||||
@android:color/transparent
|
||||
</item>
|
||||
|
||||
<item name="android:dividerHeight">
|
||||
0dp
|
||||
</item>
|
||||
|
||||
<!-- Text -->
|
||||
<item name="android:textColorPrimary">
|
||||
#212121
|
||||
</item>
|
||||
|
||||
<!-- Search Hint -->
|
||||
<item name="android:textColorHint">
|
||||
#9E9E9E
|
||||
</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="RoundedFabShape">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">14dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user