diff --git a/app/build.gradle b/app/build.gradle index b8318d18..0ef51211 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services' android { - def appVersionCode = 136 - def appVersionName = '1.12.7' + def appVersionCode = 137 + def appVersionName = '1.13.0' signingConfigs { release { @@ -88,10 +88,10 @@ dependencies { }) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.orhanobut:logger:2.2.0' - implementation 'com.google.firebase:firebase-core:17.2.3' + implementation 'com.google.firebase:firebase-core:17.3.0' implementation 'com.google.firebase:firebase-crash:16.2.1' - implementation 'com.google.firebase:firebase-perf:19.0.5' - implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02' + implementation 'com.google.firebase:firebase-perf:19.0.6' + implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta04' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.google.android.material:material:1.1.0' @@ -99,9 +99,9 @@ dependencies { implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.preference:preference:1.1.0' - implementation 'com.squareup.okhttp3:okhttp:4.4.1' - implementation 'com.squareup.retrofit2:retrofit:2.8.0' - implementation 'com.squareup.retrofit2:converter-gson:2.8.0' + implementation 'com.squareup.okhttp3:okhttp:4.5.0' + implementation 'com.squareup.retrofit2:retrofit:2.8.1' + implementation 'com.squareup.retrofit2:converter-gson:2.8.1' implementation 'com.annimon:stream:1.2.1' implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' diff --git a/app/src/main/java/it/integry/integrywmsnative/MainActivity.java b/app/src/main/java/it/integry/integrywmsnative/MainActivity.java index 14977d3d..2aed548d 100644 --- a/app/src/main/java/it/integry/integrywmsnative/MainActivity.java +++ b/app/src/main/java/it/integry/integrywmsnative/MainActivity.java @@ -30,6 +30,7 @@ import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfigurati import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration; import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration; import it.integry.integrywmsnative.core.expansion.BaseActivity; +import it.integry.integrywmsnative.core.expansion.OnSingleClickListener; import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker; import it.integry.integrywmsnative.core.interfaces.IFilterableFragment; import it.integry.integrywmsnative.core.interfaces.IPoppableActivity; @@ -278,7 +279,12 @@ public class MainActivity extends BaseActivity if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) { mBinding.appBarMain.mainSelectAll.setVisibility(View.VISIBLE); - mBinding.appBarMain.mainSelectAll.setOnClickListener(v -> ((ISelectAllFragment)fragment).onSelectAll()); + mBinding.appBarMain.mainSelectAll.setOnClickListener(new OnSingleClickListener() { + @Override + public void onSingleClick(View v) { + ((ISelectAllFragment)fragment).onSelectAll(); + } + }); } else { mBinding.appBarMain.mainSelectAll.setVisibility(View.GONE); mBinding.appBarMain.mainSelectAll.setOnClickListener(null); @@ -286,7 +292,12 @@ public class MainActivity extends BaseActivity if(fragment instanceof IFilterableFragment) { mBinding.appBarMain.mainFilter.setVisibility(View.VISIBLE); - mBinding.appBarMain.mainFilter.setOnClickListener(v -> ((IFilterableFragment)fragment).onFilterClick()); + mBinding.appBarMain.mainFilter.setOnClickListener(new OnSingleClickListener() { + @Override + public void onSingleClick(View v) { + ((IFilterableFragment)fragment).onFilterClick(); + } + }); } else { mBinding.appBarMain.mainFilter.setVisibility(View.GONE); mBinding.appBarMain.mainFilter.setOnClickListener(null); diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java index 3319db48..27d97f42 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/ColliMagazzinoRESTConsumer.java @@ -117,25 +117,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer { } - public static void saveRigaCollo(MtbColr mtbColrToSave, RunnableArgs onComplete, RunnableArgs onFailed) { - - mtbColrToSave.setMtbAart(null); - mtbColrToSave.setRifPartitaMag(null); - - EntityRESTConsumer.processEntity(mtbColrToSave, new ISimpleOperationCallback() { - @Override - public void onSuccess(MtbColr value) { - if (onComplete != null) onComplete.run(value); - } - - @Override - public void onFailed(Exception ex) { - if (onFailed != null) onFailed.run(ex); - } - }, MtbColr.class); - - } - public static void createColloLavorazione(int segno, RunnableArgs onComplete, RunnableArgs onFailed) { MtbColt mtbColtToCreate = new MtbColt() .setSegno(segno) @@ -574,51 +555,25 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer { } - public static void deleteRiga(MtbColr mtbColrToDelete, Runnable onComplete, RunnableArgs onFailed) { - MtbColr newMtbColr = new MtbColr(); - - newMtbColr.setNumCollo(mtbColrToDelete.getNumCollo()); - newMtbColr.setDataCollo(mtbColrToDelete.getDataColloS()); - newMtbColr.setSerCollo(mtbColrToDelete.getSerCollo()); - newMtbColr.setGestione(mtbColrToDelete.getGestione()); - newMtbColr.setRiga(mtbColrToDelete.getRiga()); - - - newMtbColr.setOperation(CommonModelConsts.OPERATION.DELETE); - - EntityRESTConsumer.processEntity(newMtbColr, new ISimpleOperationCallback() { - @Override - public void onSuccess(MtbColr value) { - if (onComplete != null) onComplete.run(); - } - - @Override - public void onFailed(Exception ex) { - if (onFailed != null) onFailed.run(ex); - } - }, MtbColr.class); - - } - public void updateRiga(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs onFailed) { updateRigaStatic(mtbColrToUpdate, onComplete, onFailed); } public static void updateRigaStatic(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs onFailed) { + MtbColt mtbColt = new MtbColt() + .setGestione(mtbColrToUpdate.getGestioneEnum()) + .setNumCollo(mtbColrToUpdate.getNumCollo()) + .setSerCollo(mtbColrToUpdate.getSerCollo()) + .setDataCollo(mtbColrToUpdate.getDataColloS()); + mtbColt.getMtbColr().add(mtbColrToUpdate); + + mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP); mtbColrToUpdate.setOperation(CommonModelConsts.OPERATION.UPDATE); - EntityRESTConsumer.processEntity(mtbColrToUpdate, new ISimpleOperationCallback() { - @Override - public void onSuccess(MtbColr value) { - if (onComplete != null) onComplete.run(); - } - - @Override - public void onFailed(Exception ex) { - if (onFailed != null) onFailed.run(ex); - } - }, MtbColr.class); + EntityRESTConsumer.processEntity(mtbColt, value -> { + if(onComplete != null) onComplete.run(); + }, onFailed, MtbColt.class); } diff --git a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/EntityRESTConsumer.java b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/EntityRESTConsumer.java index ccfaf164..4af99fc4 100644 --- a/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/EntityRESTConsumer.java +++ b/app/src/main/java/it/integry/integrywmsnative/core/rest/consumers/EntityRESTConsumer.java @@ -22,6 +22,23 @@ import retrofit2.Response; public class EntityRESTConsumer { + public static void processEntity(T entityToSave, RunnableArgs onComplete, RunnableArgs onFailed, Class type) { + + processEntity(entityToSave, new ISimpleOperationCallback() { + @Override + public void onSuccess(T value) { + if(onComplete != null) onComplete.run(value); + } + + @Override + public void onFailed(Exception ex) { + if(onFailed != null) onFailed.run(ex); + } + }, type); + + } + + public static void processEntity(T entityToSave, final ISimpleOperationCallback callback, Class type) { RunnableArgs tmpFailed = ex -> { diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione_new/SpedizioneViewModel.java b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione_new/SpedizioneViewModel.java index 11723726..a1f5d6bc 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/spedizione_new/SpedizioneViewModel.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/spedizione_new/SpedizioneViewModel.java @@ -730,7 +730,11 @@ public class SpedizioneViewModel { if (qtaColDaPrelevare != null && numCnfDaPrelevare == null) { numCnfDaPrelevare = UtilityBigDecimal.divideToInteger(qtaColDaPrelevare, mtbAart.getQtaCnf()); - qtaCnfDaPrelevare = UtilityBigDecimal.divide(qtaColDaPrelevare, numCnfDaPrelevare); + + if(!mtbAart.isFlagQtaCnfFissaBoolean()) { + if(UtilityBigDecimal.equalsTo(numCnfDaPrelevare, BigDecimal.ZERO)) numCnfDaPrelevare = BigDecimal.ONE; + qtaCnfDaPrelevare = UtilityBigDecimal.divide(qtaColDaPrelevare, numCnfDaPrelevare); + } } else if (numCnfDaPrelevare != null && qtaColDaPrelevare == null) { qtaCnfDaPrelevare = mtbAart.getQtaCnf(); qtaColDaPrelevare = UtilityBigDecimal.multiply(numCnfDaPrelevare, qtaCnfDaPrelevare); diff --git a/app/src/main/java/it/integry/integrywmsnative/gest/vendita/MainVenditaFragment.java b/app/src/main/java/it/integry/integrywmsnative/gest/vendita/MainVenditaFragment.java index 2ec2689d..d13915f8 100644 --- a/app/src/main/java/it/integry/integrywmsnative/gest/vendita/MainVenditaFragment.java +++ b/app/src/main/java/it/integry/integrywmsnative/gest/vendita/MainVenditaFragment.java @@ -342,7 +342,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS .toList(); if (foundGestioni != null && foundGestioni.size() > 1) { - DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_gest)), null, onFailed::run).show(); + DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_gest)), null, onFailed).show(); return; } @@ -354,7 +354,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS .toList(); if (foundCodMdep != null && foundCodMdep.size() > 1) { - DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_cod_mdep_ordv)), null, onFailed::run).show(); + DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_cod_mdep_ordv)), null, onFailed).show(); return; } diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 352485ac..3902b296 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -11,7 +11,7 @@ - @@ -77,7 +77,7 @@ android:paddingBottom="16dp"> - @@ -184,7 +184,7 @@ - + @@ -211,7 +211,7 @@ - + \ No newline at end of file diff --git a/barcode_kaiteki/build.gradle b/barcode_kaiteki/build.gradle index 7ecaf43f..e495e8da 100644 --- a/barcode_kaiteki/build.gradle +++ b/barcode_kaiteki/build.gradle @@ -31,7 +31,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' - implementation 'com.google.android.material:material:1.1.0-alpha10' + implementation 'com.google.android.material:material:1.2.0-alpha06' api 'androidx.camera:camera-core:1.0.0-alpha03' api 'androidx.camera:camera-camera2:1.0.0-alpha03' diff --git a/build.gradle b/build.gradle index 4ffe709e..a60642f9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext { - kotlin_version = '1.3.71' + kotlin_version = '1.3.72' } repositories {