Reso obbligatorio il posizionamento in Approvvigionamento Linee
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -2252,6 +2252,9 @@ public class SpedizioneViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public boolean isApprovLinee() {
|
||||
return mIsApprovLinee;
|
||||
}
|
||||
|
||||
public LiveData<List<PickingObjectDTO>> getPickingList() {
|
||||
return mPickingList;
|
||||
|
||||
Reference in New Issue
Block a user