Finish v1.32.28(368)

This commit is contained in:
Giuseppe Scorrano 2023-04-04 10:36:59 +02:00
commit 46d0510ed8
6 changed files with 27 additions and 41 deletions

View File

@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 367
def appVersionName = '1.32.27'
def appVersionCode = 368
def appVersionName = '1.32.28'
signingConfigs {
release {

View File

@ -58,6 +58,7 @@ public class DBSettingsModel {
private boolean flagCanAddUnknownItemsInventario = true;
private boolean flagShouldAskToCreateOrUpdateRowInventario = false;
private String commessaMagazzino;
private boolean flagGeneraDocumentoSpedizione = false;
public boolean isFlagSpedizioneEnableFakeGiacenza() {
return flagSpedizioneEnableFakeGiacenza;
@ -446,4 +447,13 @@ public class DBSettingsModel {
this.commessaMagazzino = commessaMagazzino;
return this;
}
public boolean isFlagGeneraDocumentoSpedizione() {
return flagGeneraDocumentoSpedizione;
}
public DBSettingsModel setFlagGeneraDocumentoSpedizione(boolean flagGeneraDocumentoSpedizione) {
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
return this;
}
}

View File

@ -372,6 +372,10 @@ public class SettingsManager {
.setGestName("PICKING")
.setSection("SETUP")
.setKeySection("COMMESSA_MAGAZZINO"));
stbGestSetupList.add(new StbGestSetup()
.setGestName("PICKING")
.setSection("SPEDIZIONE")
.setKeySection("GENERA_DOC"));
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
@ -409,6 +413,7 @@ public class SettingsManager {
dbSettingsModelIstance.setFlagCanAddUnknownItemsInventario(getValueFromList(list, "INVENTARIO", "FLAG_CAN_ADD_UNKNOWN_ITEMS", Boolean.class, Boolean.TRUE));
dbSettingsModelIstance.setFlagShouldAskToCreateOrUpdateRowInventario(getValueFromList(list, "INVENTARIO", "FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW", Boolean.class, Boolean.FALSE));
dbSettingsModelIstance.setCommessaMagazzino(getValueFromList(list, "SETUP", "COMMESSA_MAGAZZINO", String.class, CommonConst.Config.COMMESSA_MAG));
dbSettingsModelIstance.setFlagGeneraDocumentoSpedizione(getValueFromList(list, "SPEDIZIONE", "GENERA_DOC", Boolean.class, Boolean.FALSE));
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
if (notePerdita != null)

View File

@ -217,7 +217,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
mViewModel.init(
SettingsManager.i().getUser().getFullname(),
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
mCurrentGestione);
mCurrentGestione,
SettingsManager.iDB().isFlagGeneraDocumentoSpedizione());
}
@Override

View File

@ -57,6 +57,7 @@ public class RettificaGiacenzeViewModel {
private String mCurrentUser;
private String mCurrentCodMdep;
private boolean mIsCreatedLU;
private boolean generaDocIfVendita;
private boolean mAnyEditDone = false;
@ -74,10 +75,11 @@ public class RettificaGiacenzeViewModel {
}
public void init(String currentUser, String currentCodMdep, GestioneEnum defaultGestione) {
public void init(String currentUser, String currentCodMdep, GestioneEnum defaultGestione, boolean generaDocIfVendita) {
this.mCurrentUser = currentUser;
this.mCurrentCodMdep = currentCodMdep;
this.mDefaultGestione = defaultGestione;
this.generaDocIfVendita = generaDocIfVendita;
this.sendOnLoadingStarted();
@ -352,7 +354,6 @@ public class RettificaGiacenzeViewModel {
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
// if (!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
mtbColr
.setQtaCol(BigDecimal.ZERO)
.setNumCnf(BigDecimal.ZERO)
@ -382,39 +383,6 @@ public class RettificaGiacenzeViewModel {
if (shouldCloseLU) closeLU(true, null);
}, this::sendError);
// } else {
// mtbColr
// .setQtaCol(qtaTot)
// .setQtaCnf(qtaCnf)
// .setNumCnf(numCnf);
//
// MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
// cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
//
// cloneMtbColt.setMtbColr(new ObservableArrayList<>());
//
// cloneMtbColt.getMtbColr().add(mtbColr);
//
// mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
// mtbColr
// .setDataCollo(value.getDataColloS())
// .setNumCollo(value.getNumCollo())
// .setGestione(value.getGestione())
// .setSerCollo(value.getSerCollo())
// .setRiga(value.getMtbColr().get(0).getRiga())
// .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
// .setMtbAart(pickingObjectDTO.getMtbAart());
//
// mCurrentMtbColt.getMtbColr().add(mtbColr);
//
// this.mAnyEditDone = true;
//
// this.sendOnRowSaved();
// this.sendOnLoadingEnded();
//
// if (shouldCloseLU) closeLU(true, null);
// }, this::sendError);
// }
}
@ -482,7 +450,7 @@ public class RettificaGiacenzeViewModel {
}
private void createDoc(MtbColt mtbColt, Runnable onComplete) {
if (!(mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1)) {
if (!(mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1) || !generaDocIfVendita) {
onComplete.run();
return;
}

View File

@ -483,7 +483,8 @@ public class DialogInputQuantityV2ViewModel {
return false;
}
if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfOrd)) {
if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfOrd) &&
!this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
this.mListener.onError(new OverflowNumCnfOrderedQuantityException());
return false;
@ -495,7 +496,8 @@ public class DialogInputQuantityV2ViewModel {
return false;
}
if (UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfAvailable)) {
if (UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfAvailable) &&
!this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
this.mListener.onError(new OverflowNumCnfAvailableQuantityException());
return false;