Finish v1.13.11(157)

This commit is contained in:
Giuseppe Scorrano 2020-10-16 15:34:29 +02:00
commit 4f366a4f38
4 changed files with 58 additions and 9 deletions

View File

@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 156
def appVersionName = '1.13.10'
def appVersionCode = 157
def appVersionName = '1.13.11'
signingConfigs {
release {
@ -97,6 +97,7 @@ dependencies {
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.android.gms:play-services-basement:17.4.0'
implementation 'androidx.appcompat:appcompat:1.2.0'

View File

@ -426,8 +426,18 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
spedizioneListModels.add(spedizioneListModel);
} else {
BigDecimal qtaColOrdCounter = x.getSitArtOrdDTO().getQtaOrd();
BigDecimal numCnfOrdCounter = x.getSitArtOrdDTO().getNumCnfOrd();
for (MtbColt mtbColtToPick : x.getMtbColts()) {
if(UtilityBigDecimal.equalsTo(qtaColOrdCounter, BigDecimal.ZERO) || UtilityBigDecimal.lowerThan(qtaColOrdCounter, BigDecimal.ZERO))
break;
if(UtilityBigDecimal.equalsTo(numCnfOrdCounter, BigDecimal.ZERO) || UtilityBigDecimal.lowerThan(numCnfOrdCounter, BigDecimal.ZERO))
break;
SpedizioneListModel cloneModel = (SpedizioneListModel) spedizioneListModel.clone();
@ -441,11 +451,49 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
if (SettingsManager.iDB().isFlagForceAllToColli() || (x.getMtbAart() == null || !x.getMtbAart().isFlagQtaCnfFissaBoolean())) {
cloneModel.setUntMis("col");
cloneModel.setQtaTot(mtbColrToDispatch != null ? mtbColrToDispatch.getNumCnf() : x.getSitArtOrdDTO().getNumCnfOrd());
cloneModel.setQtaEvasa(numCnfWithdrawRows.getBigDecimalValue());
BigDecimal numCnfOrdToSubstract = UtilityBigDecimal.getLowerBetween(mtbColrToDispatch.getNumCnf(), numCnfOrdCounter);
BigDecimal qtaTot = UtilityBigDecimal.getLowerBetween(mtbColrToDispatch.getNumCnf(), numCnfOrdCounter);
if(UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO) || UtilityBigDecimal.lowerThan(qtaTot, BigDecimal.ZERO)) continue;
cloneModel.setQtaTot(qtaTot);
numCnfOrdCounter = numCnfOrdCounter.subtract(numCnfOrdToSubstract);
BigDecimal qtaEvasa = Stream.of(x.getWithdrawMtbColrs())
.filter(y -> y.getRefMtbColr() != null &&
y.getRefMtbColr().getNumCollo().equals(mtbColrToDispatch.getNumCollo()) &&
y.getRefMtbColr().getDataColloD().equals(mtbColrToDispatch.getDataColloD()) &&
y.getRefMtbColr().getSerCollo().equals(mtbColrToDispatch.getSerCollo()) &&
y.getRefMtbColr().getGestioneEnum().equals(mtbColrToDispatch.getGestioneEnum()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodMart(), mtbColrToDispatch.getCodMart()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodTagl(), mtbColrToDispatch.getCodTagl()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodCol(), mtbColrToDispatch.getCodCol()))
.map(MtbColr::getNumCnf)
.reduce(BigDecimal.ZERO, BigDecimal::add);
cloneModel.setQtaEvasa(qtaEvasa);
} else {
cloneModel.setQtaTot(mtbColrToDispatch != null ? mtbColrToDispatch.getQtaCol() : x.getSitArtOrdDTO().getQtaOrd());
cloneModel.setQtaEvasa(qtaColWithdrawRows.getBigDecimalValue());
BigDecimal qtaOrdToSubstract = UtilityBigDecimal.getLowerBetween(mtbColrToDispatch.getQtaCol(), qtaColOrdCounter);
BigDecimal qtaTot = UtilityBigDecimal.getLowerBetween(mtbColrToDispatch.getQtaCol(), qtaColOrdCounter);
if(UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO) || UtilityBigDecimal.lowerThan(qtaTot, BigDecimal.ZERO)) continue;
cloneModel.setQtaTot(qtaTot);
qtaColOrdCounter = qtaColOrdCounter.subtract(qtaOrdToSubstract);
BigDecimal qtaEvasa = Stream.of(x.getWithdrawMtbColrs())
.filter(y -> y.getRefMtbColr() != null &&
y.getRefMtbColr().getNumCollo().equals(mtbColrToDispatch.getNumCollo()) &&
y.getRefMtbColr().getDataColloD().equals(mtbColrToDispatch.getDataColloD()) &&
y.getRefMtbColr().getSerCollo().equals(mtbColrToDispatch.getSerCollo()) &&
y.getRefMtbColr().getGestioneEnum().equals(mtbColrToDispatch.getGestioneEnum()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodMart(), mtbColrToDispatch.getCodMart()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodTagl(), mtbColrToDispatch.getCodTagl()) &&
UtilityString.equalsIgnoreCase(y.getRefMtbColr().getCodCol(), mtbColrToDispatch.getCodCol()))
.map(MtbColr::getQtaCol)
.reduce(BigDecimal.ZERO, BigDecimal::add);
cloneModel.setQtaEvasa(qtaEvasa);
if (x.getMtbAart() != null)
cloneModel.setUntMis(x.getMtbAart().getUntMis());
}

View File

@ -473,10 +473,10 @@ public class DialogVenditaFiltroAvanzato {
return Stream
.of(currentFilteredOrderList)
.filter(x -> x.getIdViaggio() != null)
.sortBy(x -> -x.getIdViaggio())
.map(x -> x.getIdViaggio() != null ? x.getIdViaggio().toString() : null)
.withoutNulls()
.distinct()
.sorted()
.toList();
}

View File

@ -77,7 +77,7 @@ public class DialogInputQuantityV2ViewModel {
this.internalQtaTot = totalQtaOrd;
}
this.shouldAskDataScad = mtbAart.get().isFlagQtaCnfFissaBoolean() && mtbAart.get().getGgScadPartita() != null && mtbAart.get().getGgScadPartita() > 0;
this.shouldAskDataScad = mtbAart.get().isFlagTracciabilitaBoolean() && mtbAart.get().getGgScadPartita() != null && mtbAart.get().getGgScadPartita() > 0;
this.shouldShowDataScad = this.internalDataScad != null;
this.blockedNumCnf.set(false);