Aggiunto messaggio della quantità da prelevare minore della quantità totale disponibile anche in fase di chiusura o salvataggio ul
This commit is contained in:
@@ -101,6 +101,8 @@ public class DBSettingsModel {
|
||||
private boolean flagViewSwitchDepoButton = true;
|
||||
private boolean flagProduzioneSkipAskVersamentoAutomatico;
|
||||
private boolean flagAccettazioneViewLotto = false;
|
||||
private boolean flagSpedizioneUnderflowQuantityWarning = false;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
}
|
||||
@@ -852,4 +854,13 @@ public class DBSettingsModel {
|
||||
this.flagAccettazioneViewLotto = flagAccettazioneViewLotto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagSpedizioneUnderflowQuantityWarning() {
|
||||
return flagSpedizioneUnderflowQuantityWarning;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagSpedizioneUnderflowQuantityWarning(boolean flagSpedizioneUnderflowQuantityWarning) {
|
||||
this.flagSpedizioneUnderflowQuantityWarning = flagSpedizioneUnderflowQuantityWarning;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,6 +264,11 @@ public class SettingsManager {
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_CAN_ADD_EXTRA_QUANTITY")
|
||||
.setSetter(dbSettingsModelIstance::setFlagCanAddExtraQuantitySpedizione));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_UNDERFLOW_QUANTITY_WARNING")
|
||||
.setSetter(dbSettingsModelIstance::setFlagSpedizioneUnderflowQuantityWarning));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
|
||||
@@ -97,6 +97,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
private boolean disableTracciabilitaCheck;
|
||||
private boolean warnOnQuantityOverflow;
|
||||
private boolean enableSSCCRead;
|
||||
private boolean quantityCheckMessageAlreadyView;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@@ -119,6 +120,8 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.onNumCnfInputChanged = onNumCnfInputChanged;
|
||||
this.onQtaTotInputChanged = onQtaTotInputChanged;
|
||||
|
||||
this.quantityCheckMessageAlreadyView = false;
|
||||
|
||||
if (this.initialNumCnf != null && this.initialQtaTot != null && this.initialQtaCnf != null) {
|
||||
this.internalNumCnf = this.initialNumCnf;
|
||||
this.internalQtaCnf = this.initialQtaCnf;
|
||||
@@ -216,7 +219,8 @@ public class DialogInputQuantityV2ViewModel {
|
||||
//Close current UDS and open another one with new SSCC
|
||||
if (enableSSCCRead) {
|
||||
|
||||
if (UtilityBigDecimal.lowerThan(totalNumCnfToBeTaken, totalNumCnfAvailable)){
|
||||
if (UtilityBigDecimal.lowerThan(totalNumCnfToBeTaken, totalNumCnfAvailable)) {
|
||||
this.quantityCheckMessageAlreadyView = true;
|
||||
this.sendWarning(UtilityResources.getString(R.string.qta_to_be_taken_lower_then_qta_available), false);
|
||||
return;
|
||||
}
|
||||
@@ -670,6 +674,14 @@ public class DialogInputQuantityV2ViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
if (!quantityCheckMessageAlreadyView && SettingsManager.iDB().isFlagSpedizioneUnderflowQuantityWarning() && UtilityBigDecimal.lowerThan(totalNumCnfToBeTaken, totalNumCnfAvailable)) {
|
||||
boolean result = runWarningDialogSyncronized(UtilityResources.getString(R.string.confirm_qta_to_be_taken_lower_then_qta_available));
|
||||
if (!result) {
|
||||
onValidated.run(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
onValidated.run(true);
|
||||
|
||||
});
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
<string name="check_box_preference_summary">This is a regular preference</string>
|
||||
<string name="confirm_anomalie"><![CDATA[Sono state riscontrate <b>%d</b> anomalie. Continuare?]]></string>
|
||||
<string name="qta_to_be_taken_lower_then_qta_available"><![CDATA[La <b>quantità</b> da prelevare risulta inferiore alla <b>quantità</b> totale disponibile. <br> Chiudere manualmente la UL.]]></string>
|
||||
<string name="confirm_qta_to_be_taken_lower_then_qta_available"><![CDATA[La <b>quantità</b> da prelevare risulta inferiore alla <b>quantità</b> totale disponibile. Continuare?]]></string>
|
||||
|
||||
<string name="alert_delete_UL">Stai per eliminare una UL. Confermi?</string>
|
||||
<string name="alert_delete_mtb_colr">Stai per eliminare una riga. Confermi?</string>
|
||||
|
||||
@@ -225,6 +225,7 @@
|
||||
<string name="check_box_preference_summary">This is a regular preference</string>
|
||||
<string name="confirm_anomalie"><![CDATA[<b>%d</b> anomalies were found. To continue?]]></string>
|
||||
<string name="qta_to_be_taken_lower_then_qta_available"><![CDATA[The <b>quantity</b> to be withdrawn is less than the total <b>quantity</b> available. Close the UL manually.]]></string>
|
||||
<string name="confirm_qta_to_be_taken_lower_then_qta_available"><![CDATA[The <b>quantity</b> to be withdrawn is less than the total <b>quantity</b> available. Close the UL manually. To continue?]]></string>
|
||||
|
||||
<string name="alert_delete_UL">Are you sure you want to delete this UL? Please confirm</string>
|
||||
<string name="alert_delete_mtb_colr">Are you sure to delete? Please confirm</string>
|
||||
|
||||
Reference in New Issue
Block a user