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