Implementato blocco per scansione EAN128 nel caso non sia abilitato il Picking Manuale
This commit is contained in:
parent
cbf36ec962
commit
fef57622cf
@ -267,7 +267,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
((SettingsManager.iDB().isFlagSpedizioneEnableManualPick() &&
|
||||
clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale()) ||
|
||||
clickedItem.getTempPickData() != null)) {
|
||||
this.mViewmodel.dispatchOrdineRow(clickedItem, refMtbColt);
|
||||
this.mViewmodel.dispatchOrdineRow(clickedItem, refMtbColt,
|
||||
SettingsManager.iDB().isFlagSpedizioneEnableManualPick() && clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -798,6 +799,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
String partitaMag,
|
||||
Date dataScad,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
@ -816,7 +818,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setPartitaMag(partitaMag)
|
||||
.setDataScad(dataScad)
|
||||
.setCanOverflowOrderQuantity(canOverflowOrderQuantity)
|
||||
.setCanLUBeClosed(true);
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged);
|
||||
|
||||
DialogInputQuantityV2View
|
||||
.newInstance(dialogInputQuantityV2DTO, (resultDTO, shouldCloseLU) -> {
|
||||
|
||||
@ -364,6 +364,7 @@ public class SpedizioneViewModel {
|
||||
String partitaMag,
|
||||
Date dataScad,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canBatchLotBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(pickingObjectDTO,
|
||||
mtbAart,
|
||||
@ -382,6 +383,7 @@ public class SpedizioneViewModel {
|
||||
partitaMag,
|
||||
dataScad,
|
||||
canOverflowOrderQuantity,
|
||||
canBatchLotBeChanged,
|
||||
onComplete);
|
||||
}
|
||||
|
||||
@ -735,7 +737,7 @@ public class SpedizioneViewModel {
|
||||
this.sendFilterApplied(null);
|
||||
this.getPickingList().postValue(pickingList);
|
||||
} else {
|
||||
this.dispatchOrdineRow(matchedItem, matchedItem.getRefMtbColt());
|
||||
this.dispatchOrdineRow(matchedItem, matchedItem.getRefMtbColt(), false);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -754,7 +756,7 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt) {
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, boolean canPartitaMagBeChanged) {
|
||||
|
||||
BigDecimal totalQtaOrd = pickingObjectDTO.getSitArtOrdDTO().getQtaOrd();
|
||||
BigDecimal totalNumCnfOrd = pickingObjectDTO.getSitArtOrdDTO().getNumCnfOrd();
|
||||
@ -918,6 +920,7 @@ public class SpedizioneViewModel {
|
||||
partitaMag,
|
||||
dataScad,
|
||||
mCanOverflowOrderQuantity,
|
||||
canPartitaMagBeChanged,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
finalRefMtbColt,
|
||||
@ -1057,6 +1060,7 @@ public class SpedizioneViewModel {
|
||||
partitaMag,
|
||||
dataScad,
|
||||
mCanOverflowOrderQuantity,
|
||||
true,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
finalRefMtbColt,
|
||||
@ -1193,6 +1197,7 @@ public class SpedizioneViewModel {
|
||||
partitaMag,
|
||||
dataScad,
|
||||
mCanOverflowOrderQuantity,
|
||||
false,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveEditedRow(mtbColrToEdit,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
@ -1853,6 +1858,7 @@ public class SpedizioneViewModel {
|
||||
String partitaMag,
|
||||
Date dataScad,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canBatchLotBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ public class DialogInputQuantityV2DTO {
|
||||
private BigDecimal totalNumCnfAvailable;
|
||||
private BigDecimal qtaCnfAvailable;
|
||||
|
||||
private boolean canPartitaMagBeChanged;
|
||||
private boolean canPartitaMagBeChanged = true;
|
||||
private boolean canLUBeClosed;
|
||||
|
||||
private String partitaMag;
|
||||
|
||||
@ -319,6 +319,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}));
|
||||
|
||||
|
||||
this.mViewModel.setCanPartitaMagBeChanged(this.mDialogInputQuantityV2DTO.isCanPartitaMagBeChanged());
|
||||
this.enabledChangePartitaMag.set(this.mDialogInputQuantityV2DTO.isCanPartitaMagBeChanged());
|
||||
this.enabledLUCloseButton.set(this.mDialogInputQuantityV2DTO.isCanLUBeClosed());
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
private Date internalDataScad;
|
||||
|
||||
private boolean canOverflowOrderQuantity;
|
||||
private boolean canPartitaMagBeChanged;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@ -135,18 +136,21 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||
this.setPartitaMag(ean128Model.BatchLot);
|
||||
}
|
||||
if(canPartitaMagBeChanged) {
|
||||
|
||||
try {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.BestBefore)) {
|
||||
this.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
||||
} else if (!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||
this.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||
this.setPartitaMag(ean128Model.BatchLot);
|
||||
}
|
||||
|
||||
try {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.BestBefore)) {
|
||||
this.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
||||
} else if (!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||
this.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
this.mListener.onError(ex);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
this.mListener.onError(ex);
|
||||
}
|
||||
|
||||
if (ean128Model.Count != null && ean128Model.Count > 0) {
|
||||
@ -265,6 +269,11 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setCanPartitaMagBeChanged(boolean canPartitaMagBeChanged) {
|
||||
this.canPartitaMagBeChanged = canPartitaMagBeChanged;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setPartitaMag(String internalPartitaMag) {
|
||||
this.internalPartitaMag = internalPartitaMag;
|
||||
return this;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user