In versamento se si versa una pedana già versata l'app crasha
permettere il versamento di un articolo non compatibile con gli ordini aperti dopo richiesta conferma precompilare input risorse da allocare in input qta mantenere fissa la qtaCnf in entrambe le direzioni di calcolo togliere popup di notifica versamento completato
This commit is contained in:
parent
08d332e2c6
commit
0dd662518e
@ -45,6 +45,7 @@ public class DBSettingsModel {
|
|||||||
private boolean flagPrintPackingListOnOrderClose;
|
private boolean flagPrintPackingListOnOrderClose;
|
||||||
private boolean flagPrintEtichetteOnOrderClose;
|
private boolean flagPrintEtichetteOnOrderClose;
|
||||||
private int onNumCnfInputChanged = 1;
|
private int onNumCnfInputChanged = 1;
|
||||||
|
private int onQtaTotInputChanged = 1;
|
||||||
private boolean flagAccettazioneUseQtaOrd = false;
|
private boolean flagAccettazioneUseQtaOrd = false;
|
||||||
private boolean flagPickLiberoAllowEmptyDest = false;
|
private boolean flagPickLiberoAllowEmptyDest = false;
|
||||||
|
|
||||||
@ -309,6 +310,15 @@ public class DBSettingsModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getOnQtaTotInputChanged() {
|
||||||
|
return onQtaTotInputChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setOnQtaTotInputChanged(int onQtaTotInputChanged) {
|
||||||
|
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getNotePerditaDocInterni() {
|
public List<String> getNotePerditaDocInterni() {
|
||||||
return notePerditaDocInterni;
|
return notePerditaDocInterni;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -278,6 +278,10 @@ public class SettingsManager {
|
|||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SETUP")
|
||||||
|
.setKeySection("ON_QTA_TOT_INPUT_CHANGED"));
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("DOC_INTERNI")
|
.setSection("DOC_INTERNI")
|
||||||
@ -339,6 +343,11 @@ public class SettingsManager {
|
|||||||
if (onNumCnfInputChanged != null) {
|
if (onNumCnfInputChanged != null) {
|
||||||
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Integer onQtaTotInputChanged = getValueFromList(list, "SETUP", "ON_QTA_TOT_INPUT_CHANGED", Integer.class);
|
||||||
|
if (onQtaTotInputChanged != null) {
|
||||||
|
dbSettingsModelIstance.setOnQtaTotInputChanged(onQtaTotInputChanged);
|
||||||
|
}
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
||||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
import it.integry.integrywmsnative.databinding.ActivityProdDettaglioLineaBinding;
|
import it.integry.integrywmsnative.databinding.ActivityProdDettaglioLineaBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction;
|
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.BottomSheetLineAction;
|
||||||
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.DialogStartProduction;
|
import it.integry.integrywmsnative.gest.prod_dettaglio_linea.dialogs.DialogStartProduction;
|
||||||
@ -141,11 +142,28 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onSettingsRequest(ProdLineStatusDTO lineaProd) {
|
public void onSettingsRequest(ProdLineStatusDTO lineaProd) {
|
||||||
BottomSheetLineAction.newInstance(lineaProd, this::requestResources, this::requestOrderChange, this::requestProductionStop, this::requestMaterialRecover, BarcodeManager::enable).show(getSupportFragmentManager(), "BottomSheetLineAction");
|
BottomSheetLineAction.newInstance(lineaProd, this::requestResources, this::requestOrderChange, this::requestProductionStop, this::requestMaterialRecover, BarcodeManager::enable).show(getSupportFragmentManager(), "BottomSheetLineAction");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void confirmInconsistentDeposit(Runnable onConfirm) {
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
DialogSimpleMessageView.makeWarningDialog(
|
||||||
|
Html.fromHtml("L'articolo che si vuole versare non è compatibile con nessun ordine presente sulla linea!"
|
||||||
|
+ "<br /> <br/>" +
|
||||||
|
"Vuoi versarlo comunque?"),
|
||||||
|
null,
|
||||||
|
onConfirm,
|
||||||
|
() -> {
|
||||||
|
onLoadingEnded();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestQtaVersamento(MtbColr mtbColr,
|
public void requestQtaVersamento(MtbColr mtbColr,
|
||||||
RunnableArgs<PickedQuantityDTO> onComplete) {
|
RunnableArgs<PickedQuantityDTO> onComplete) {
|
||||||
@ -218,7 +236,7 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
|||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
this.runOnUiThread(() -> {
|
this.runOnUiThread(() -> {
|
||||||
|
|
||||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", qta -> {
|
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il numero di risorse da allocare", this.hrNum.get(), "n. risorse", qta -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
try {
|
try {
|
||||||
Integer hrNum = Integer.parseInt(qta);
|
Integer hrNum = Integer.parseInt(qta);
|
||||||
@ -279,6 +297,14 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showToast(String message, Runnable onComplete) {
|
||||||
|
this.runOnUiThread(() -> {
|
||||||
|
UtilityToast.showToast(message);
|
||||||
|
onComplete.run();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
|
|||||||
@ -63,11 +63,10 @@ public class ProdDettaglioLineaViewModel {
|
|||||||
} else {
|
} else {
|
||||||
if (mtbColt.getMtbColr().size() <= 0) {
|
if (mtbColt.getMtbColr().size() <= 0) {
|
||||||
this.sendError(new Exception("E' stata scansionata una UL già vuota"));
|
this.sendError(new Exception("E' stata scansionata una UL già vuota"));
|
||||||
}
|
} else {
|
||||||
onComplete.run();
|
|
||||||
this.sendOnLUSelected(mtbColt);
|
this.sendOnLUSelected(mtbColt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +91,7 @@ public class ProdDettaglioLineaViewModel {
|
|||||||
this.colliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt, posizione,
|
this.colliMagazzinoRESTConsumer.createColloScaricoDaCarico(mtbColt, posizione,
|
||||||
generatedMtbColt -> {
|
generatedMtbColt -> {
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
this.mListener.successDialog("Versamento completato!", BarcodeManager::enable);
|
this.mListener.showToast("Versamento completato!", BarcodeManager::enable);
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -103,7 +102,7 @@ public class ProdDettaglioLineaViewModel {
|
|||||||
if (ordini != null && ordini.size() > 0) {
|
if (ordini != null && ordini.size() > 0) {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new Exception("Nessun ordine compatibile disponibile sulla linea selezionata"));
|
this.mListener.confirmInconsistentDeposit(onComplete);
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
@ -219,10 +218,14 @@ public class ProdDettaglioLineaViewModel {
|
|||||||
|
|
||||||
void successDialog(String message, Runnable onComplete);
|
void successDialog(String message, Runnable onComplete);
|
||||||
|
|
||||||
|
void showToast(String message, Runnable onComplete);
|
||||||
|
|
||||||
void requestQtaVersamento(MtbColr mtbColr, RunnableArgs<PickedQuantityDTO> onComplete);
|
void requestQtaVersamento(MtbColr mtbColr, RunnableArgs<PickedQuantityDTO> onComplete);
|
||||||
|
|
||||||
void onSettingsRequest(ProdLineStatusDTO lineaProd);
|
void onSettingsRequest(ProdLineStatusDTO lineaProd);
|
||||||
|
|
||||||
|
void confirmInconsistentDeposit(Runnable onConfirm);
|
||||||
|
|
||||||
void onLineStop();
|
void onLineStop();
|
||||||
|
|
||||||
void askForLUBarcode();
|
void askForLUBarcode();
|
||||||
|
|||||||
@ -112,7 +112,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
|
|
||||||
DialogSimpleInputHelper.makeInputDialog(requireContext(), "Inserisci il numero di risorse da allocare", qta -> {
|
DialogSimpleInputHelper.makeInputDialog(requireContext(), "Inserisci il numero di risorse da allocare", prodLine.getQtaAllocate().toString(), "n. risorse", qta -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
try {
|
try {
|
||||||
Integer hrNum = Integer.parseInt(qta);
|
Integer hrNum = Integer.parseInt(qta);
|
||||||
|
|||||||
@ -89,7 +89,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
private boolean mObservablesInitated = false;
|
private boolean mObservablesInitated = false;
|
||||||
|
|
||||||
private int mBarcodeScannerIstanceID;
|
private int mBarcodeScannerIstanceID;
|
||||||
private boolean mFirstStart = true;
|
|
||||||
private boolean mAbort = true;
|
private boolean mAbort = true;
|
||||||
|
|
||||||
|
|
||||||
@ -185,9 +184,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||||
this.onLoadingEnded();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
@ -217,15 +214,13 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
// if(!mFirstStart) {
|
|
||||||
this.init();
|
this.init();
|
||||||
// mFirstStart = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
||||||
|
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
||||||
|
|
||||||
this.mViewModel.setListener(this);
|
this.mViewModel.setListener(this);
|
||||||
this.mViewModel.init(onNumCnfInputChanged);
|
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViewObservables() {
|
private void initViewObservables() {
|
||||||
|
|||||||
@ -70,6 +70,7 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
private boolean canOverflowOrderQuantity;
|
private boolean canOverflowOrderQuantity;
|
||||||
private boolean canPartitaMagBeChanged;
|
private boolean canPartitaMagBeChanged;
|
||||||
private int onNumCnfInputChanged;
|
private int onNumCnfInputChanged;
|
||||||
|
private int onQtaTotInputChanged;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@ -80,8 +81,9 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
this.mBarcodeRESTConsumer = barcodeRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(int onNumCnfInputChanged) {
|
public void init(int onNumCnfInputChanged, int onQtaTotInputChanged) {
|
||||||
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
||||||
|
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||||
|
|
||||||
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
||||||
this.internalNumCnf = this.initialNumCnf;
|
this.internalNumCnf = this.initialNumCnf;
|
||||||
@ -379,10 +381,22 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch (onNumCnfInputChanged) {
|
||||||
|
case UPDATE_QTA_CNF:
|
||||||
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
||||||
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
||||||
else if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
else if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
||||||
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPDATE_QTA_TOT:
|
||||||
|
if (!this.blockedNumCnf.get() && this.internalQtaCnf != null)
|
||||||
|
this.internalNumCnf = UtilityBigDecimal.divide(newValue, internalQtaCnf);
|
||||||
|
else if (!this.blockedQtaCnf.get() && !this.mtbAart.get().isFlagQtaCnfFissaBoolean() && this.internalNumCnf != null)
|
||||||
|
this.internalQtaCnf = UtilityBigDecimal.divide(newValue, internalNumCnf);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
this.mListener.onDataChanged();
|
this.mListener.onDataChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -624,7 +624,6 @@
|
|||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
android:enabled="@{view.enabledQtaTot}"
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
android:focusableInTouchMode="false"
|
android:focusableInTouchMode="false"
|
||||||
android:imeOptions="actionDone"
|
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
@ -636,6 +635,7 @@
|
|||||||
android:hint="@string/tot_qty"
|
android:hint="@string/tot_qty"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
app:binding="@{view.currentQtaTot}" />
|
app:binding="@{view.currentQtaTot}" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user