Merge branch 'develop' into feature/Refactoring_Spedizione
This commit is contained in:
commit
9d5e3d7d94
@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 134
|
def appVersionCode = 135
|
||||||
def appVersionName = '1.12.5'
|
def appVersionName = '1.12.6'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -4,14 +4,18 @@ import android.app.Activity;
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
@ -83,7 +87,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
public BindableBoolean isMtbColtLoaded = new BindableBoolean();
|
public BindableBoolean isMtbColtLoaded = new BindableBoolean();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void init(Activity context, FragmentMainRettificaGiacenzeBinding binding, RettificaGiacenzeHelper helper) {
|
public void init(Activity context, FragmentMainRettificaGiacenzeBinding binding, RettificaGiacenzeHelper helper) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mBinding = binding;
|
mBinding = binding;
|
||||||
@ -96,7 +99,8 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
isFabVisible.set(mtbColt != null);
|
isFabVisible.set(mtbColt != null);
|
||||||
isMtbColtLoaded.set(mtbColt != null);
|
isMtbColtLoaded.set(mtbColt != null);
|
||||||
|
|
||||||
if(this.mtbColt.get().getMtbColr() == null) this.mtbColt.get().setMtbColr(new ObservableArrayList<>());
|
if (this.mtbColt.get().getMtbColr() == null)
|
||||||
|
this.mtbColt.get().setMtbColr(new ObservableArrayList<>());
|
||||||
else {
|
else {
|
||||||
ObservableArrayList<MtbColr> mtbColrList = this.mtbColt.get().getMtbColr();
|
ObservableArrayList<MtbColr> mtbColrList = this.mtbColt.get().getMtbColr();
|
||||||
|
|
||||||
@ -184,7 +188,8 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Content)) barcodeProd = ean128Model.Content;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||||
|
barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||||
@ -407,7 +412,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void onPostDispatch(MtbAart mtbAart, QuantityDTO quantityDTO) {
|
private void onPostDispatch(MtbAart mtbAart, QuantityDTO quantityDTO) {
|
||||||
|
|
||||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
final Dialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
@ -460,8 +464,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(MtbColr item, int position) {
|
public void onItemClick(MtbColr item, int position) {
|
||||||
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
@ -490,6 +492,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
public boolean thereIsAnOpenedUL() {
|
public boolean thereIsAnOpenedUL() {
|
||||||
return mtbColt.get() != null;
|
return mtbColt.get() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean thereIsAnyRowInUL() {
|
public boolean thereIsAnyRowInUL() {
|
||||||
return mtbColt.get() != null &&
|
return mtbColt.get() != null &&
|
||||||
mtbColt.get().getMtbColr() != null &&
|
mtbColt.get().getMtbColr() != null &&
|
||||||
@ -552,21 +555,14 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.get().clone();
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.get().clone();
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||||
|
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
cloneMtbColt.setMtbCols(new ArrayList<>());
|
cloneMtbColt.setMtbCols(new ArrayList<>());
|
||||||
cloneMtbColt.getMtbCols().add(mtbCols);
|
cloneMtbColt.getMtbCols().add(mtbCols);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, new ISimpleOperationCallback<MtbColt>() {
|
ColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, mtbColt -> onComplete.run(), ex -> {
|
||||||
@Override
|
|
||||||
public void onSuccess(MtbColt value) {
|
|
||||||
onComplete.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailed(Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(mContext, ex, progress);
|
UtilityExceptions.defaultException(mContext, ex, progress);
|
||||||
DialogCommon.showRestError(mContext, ex, onComplete::run);
|
DialogCommon.showRestError(mContext, ex, onComplete::run);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,7 +692,6 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void printCollo(Dialog progress) {
|
private void printCollo(Dialog progress) {
|
||||||
|
|
||||||
this.showAskPrint(shouldPrint -> {
|
this.showAskPrint(shouldPrint -> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user