Reso obbligatorio il posizionamento in Approvvigionamento Linee

This commit is contained in:
2025-12-04 19:25:12 +01:00
parent 64875c10c3
commit 49d099c339
2 changed files with 20 additions and 8 deletions

View File

@@ -121,7 +121,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
private boolean mFlagShowCodForn;
private boolean mDivideByGrpMerc;
private boolean mEnableQuantityReset;
private boolean mIsApprovLinee;
private int mBarcodeScannerInstanceID = -1;
private ArrayList<SitArtOrdDTO> mSitArtOrd;
@@ -1111,16 +1110,26 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
@Override
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
Runnable askPosition = () -> {
DialogAskPositionOfLUView.newInstance(false, (status, mtbDepoPosizione) -> {
if (status == DialogConsts.Results.ABORT) {
onComplete.run(false, null);
} else {
onComplete.run(true, mtbDepoPosizione);
}
}).show(getSupportFragmentManager(), "tag");
};
if(mViewmodel.isApprovLinee()) {
//In approvvigionamento linee chiedo direttamente la posizione senza richiesta di conferma
askPosition.run();
return;
}
DialogYesNoView.newInstance(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
switch (result) {
case YES:
DialogAskPositionOfLUView.newInstance(false, (status, mtbDepoPosizione) -> {
if (status == DialogConsts.Results.ABORT) {
onComplete.run(false, null);
} else {
onComplete.run(true, mtbDepoPosizione);
}
}).show(getSupportFragmentManager(), "tag");
askPosition.run();
break;
case NO:

View File

@@ -2252,6 +2252,9 @@ public class SpedizioneViewModel {
}, this::sendError);
}
public boolean isApprovLinee() {
return mIsApprovLinee;
}
public LiveData<List<PickingObjectDTO>> getPickingList() {
return mPickingList;