Commit 16841bab by Ramesh Babu Puvvadi

added with allow single barcode multiple times

parent 6bc2510d
...@@ -44,10 +44,9 @@ dependencies { ...@@ -44,10 +44,9 @@ dependencies {
implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics:18.2.1' implementation 'com.google.firebase:firebase-crashlytics:18.2.1'
implementation 'com.karumi:dexter:6.2.3' implementation 'com.karumi:dexter:6.2.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:1.0.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ package w.soulofpluto.posstockauditrecieving; ...@@ -3,7 +3,7 @@ package w.soulofpluto.posstockauditrecieving;
import android.content.Context; import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="w.soulofpluto.posstockauditrecieving"> package="w.soulofpluto.posstockauditrecieving">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true" android:requestLegacyExternalStorage="true"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:exported="true"
android:networkSecurityConfig="@xml/network_security_config"> android:networkSecurityConfig="@xml/network_security_config">
<!--android:roundIcon="@drawable/adaptive_icon" <!--android:roundIcon="@drawable/adaptive_icon"
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
--> -->
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.SplashActivity" android:name=".SplashActivity"
android:windowSoftInputMode="adjustNothing" android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:exported="true"> android:exported="true">
...@@ -45,47 +46,47 @@ ...@@ -45,47 +46,47 @@
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.Login" android:name=".Login"
android:windowSoftInputMode="adjustResize|stateHidden" android:windowSoftInputMode="adjustResize|stateHidden"
android:screenOrientation="portrait"> android:screenOrientation="portrait">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.HomeActivity" android:name=".HomeActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"> android:configChanges="keyboardHidden|screenSize">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.DashBoardActivity" android:name=".DashBoardActivity"
android:windowSoftInputMode="adjustNothing" android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"> android:configChanges="keyboardHidden|screenSize">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.MainActivity" android:name=".MainActivity"
android:windowSoftInputMode="adjustResize" android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"> android:configChanges="keyboardHidden|screenSize">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.PlanDetails" android:name=".PlanDetails"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize" android:configChanges="keyboardHidden|screenSize"
android:windowSoftInputMode="adjustNothing"> android:windowSoftInputMode="adjustNothing">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.RackWiseQty" android:name=".RackWiseQty"
android:windowSoftInputMode="adjustNothing" android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"> android:configChanges="keyboardHidden|screenSize">
</activity> </activity>
<activity <activity
android:name="w.soulofpluto.posstockauditrecieving.SearchByBarcode" android:name=".SearchByBarcode"
android:windowSoftInputMode="adjustNothing" android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"> android:configChanges="keyboardHidden|screenSize">
......
...@@ -176,6 +176,9 @@ public class Constants{ ...@@ -176,6 +176,9 @@ public class Constants{
public static Boolean Existing(ArrayList<Plans> plans, String barcode){ public static Boolean Existing(ArrayList<Plans> plans, String barcode){
for(Plans plan : plans){ for(Plans plan : plans){
if(plan.getBarcode().contains(barcode)){ if(plan.getBarcode().contains(barcode)){
if(plan.IsGroupbarcode.equals("Y")){
return false;
}
return true; return true;
} }
} }
......
...@@ -446,11 +446,16 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen ...@@ -446,11 +446,16 @@ public class PlanDetails extends AppCompatActivity implements View.OnClickListen
if (response.code() == 200) { if (response.code() == 200) {
if(object1.has(getResources().getString(R.string.success))) { if(object1.has(getResources().getString(R.string.success))) {
if(object1.getInt(getResources().getString(R.string.success)) == 1){ if(object1.getInt(getResources().getString(R.string.success)) == 1){
//Log.e("Testing Data =================>" ,object1.toString());
JSONObject jsonObject = object1.getJSONObject("barcode_attrs");
//Log.e("Testing Data1 =================>" ,jsonObject.toString());
barcode.requestFocus(); barcode.requestFocus();
Plans plans = new Plans(); Plans plans = new Plans();
plans.setQty(qty); plans.setQty(qty);
plans.setPlanId(Id); plans.setPlanId(Id);
plans.setBarcode(Barcode); plans.setBarcode(Barcode);
plans.setIsGroupbarcode(jsonObject.getString("is_group_barcode"));
//Log.e("Testing =====>",jsonObject.getString("is_group_barcode"));
if (arrayList.size()>0) { if (arrayList.size()>0) {
plans.setColumnId(arrayList.size() + 1); plans.setColumnId(arrayList.size() + 1);
} else { } else {
......
...@@ -18,6 +18,16 @@ public class Plans implements Parcelable { ...@@ -18,6 +18,16 @@ public class Plans implements Parcelable {
String Qty; String Qty;
int ColumnId; int ColumnId;
public static void setSortById(Comparator<Plans> sortById) {
Plans.sortById = sortById;
}
String IsGroupbarcode;
public int getColumnId() { public int getColumnId() {
return ColumnId; return ColumnId;
} }
...@@ -34,6 +44,7 @@ public class Plans implements Parcelable { ...@@ -34,6 +44,7 @@ public class Plans implements Parcelable {
Barcode = in.readString(); Barcode = in.readString();
Qty = in.readString(); Qty = in.readString();
ColumnId = in.readInt(); ColumnId = in.readInt();
IsGroupbarcode = in.readString();
} }
public static final Creator<Plans> CREATOR = new Creator<Plans>() { public static final Creator<Plans> CREATOR = new Creator<Plans>() {
...@@ -102,6 +113,14 @@ public class Plans implements Parcelable { ...@@ -102,6 +113,14 @@ public class Plans implements Parcelable {
return 0; return 0;
} }
public String getIsGroupbarcode() {
return IsGroupbarcode;
}
public void setIsGroupbarcode(String isGroupbarcode) {
IsGroupbarcode = isGroupbarcode;
}
@Override @Override
public void writeToParcel(Parcel parcel, int i) { public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(PlanId); parcel.writeString(PlanId);
...@@ -111,6 +130,7 @@ public class Plans implements Parcelable { ...@@ -111,6 +130,7 @@ public class Plans implements Parcelable {
parcel.writeString(Barcode); parcel.writeString(Barcode);
parcel.writeString(Qty); parcel.writeString(Qty);
parcel.writeInt(ColumnId); parcel.writeInt(ColumnId);
parcel.writeString(IsGroupbarcode);
} }
public String toString() { public String toString() {
......
<resources> <resources>
<string name="app_name">Pos Stock Receive And Transfer</string> <string name="app_name">Pos Stock Audit</string>
<string name="success" translatable="false">success</string> <string name="success" translatable="false">success</string>
<string name="msg" translatable="false">msg</string> <string name="msg" translatable="false">msg</string>
<string name="data" translatable="false">data</string> <string name="data" translatable="false">data</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment