Compare commits
25 Commits
v1.16.3(18
...
v1.16.9(19
| Author | SHA1 | Date | |
|---|---|---|---|
| c4c4013995 | |||
| e9230aba11 | |||
| d044c2ab26 | |||
| 843679620b | |||
| 7346357b8e | |||
| b29a64a75a | |||
| 163a8cb27a | |||
| 8311f56154 | |||
| 0a76cc856c | |||
| 0ed536b0d5 | |||
| c8f8ccd64f | |||
| ecd0678aab | |||
| 3d7fb9e14f | |||
| 489687d392 | |||
| 5aa360af7c | |||
| e43ba3341f | |||
| db21ce554a | |||
| 86c9f3464c | |||
| 6376668d15 | |||
| 669bc1a8f5 | |||
| d78d99094f | |||
| c2c23c37a4 | |||
| b30bdb3df1 | |||
| 8e7ad53ec9 | |||
| e36441db73 |
@@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 185
|
||||
def appVersionName = '1.16.3'
|
||||
def appVersionCode = 191
|
||||
def appVersionName = '1.16.9'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -289,6 +289,10 @@ public class MainActivity extends BaseActivity
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.VISIBLE);
|
||||
((ITitledFragment) fragment).onCreateActionBar(mBinding.appBarMain.toolbarTitleLeft, this);
|
||||
((IScrollableFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.GONE);
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.GONE);
|
||||
@@ -296,7 +300,7 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
if(fragment instanceof IScrollableFragment) {
|
||||
((IScrollableFragment) fragment).setScrollToolbar(mBinding.appBarMain.elevatedToolbar);
|
||||
((IScrollableFragment) fragment).setScrollableOnPreDestroy(() -> {
|
||||
((IScrollableFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.elevatedToolbar.resetAll();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setTitleText(R.string.vendita_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_picking)
|
||||
|
||||
@@ -25,6 +25,7 @@ public class BaseDialogFragment extends DialogFragment {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean isControlKey(KeyEvent keyEvent) {
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
public interface IDestroyableFragment {
|
||||
|
||||
void addOnPreDestroy(Runnable onPreDestroy);
|
||||
|
||||
}
|
||||
@@ -2,10 +2,8 @@ package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
|
||||
public interface IScrollableFragment {
|
||||
public interface IScrollableFragment extends IDestroyableFragment {
|
||||
|
||||
void setScrollToolbar(ElevatedToolbar toolbar);
|
||||
|
||||
void setScrollableOnPreDestroy(Runnable onPreDestroy);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,10 +8,8 @@ import androidx.appcompat.widget.AppCompatTextView;
|
||||
* Created by GiuseppeS on 07/03/2018.
|
||||
*/
|
||||
|
||||
public interface ITitledFragment {
|
||||
public interface ITitledFragment extends IDestroyableFragment {
|
||||
|
||||
void onCreateActionBar(AppCompatTextView titleText, Context context);
|
||||
|
||||
void onActionBarPreDestroy(Runnable onActionBarPreDestroy);
|
||||
|
||||
}
|
||||
|
||||
@@ -111,6 +111,14 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, GestioneEnum gestione, int segno, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
String whereCondGestione = "";
|
||||
|
||||
if(gestione != null) {
|
||||
whereCondGestione = "mtb_colt.gestione = " + UtilityDB.valueToString(gestione.getText()) + " ";
|
||||
} else {
|
||||
whereCondGestione = "(mtb_colt.gestione = 'V' OR mtb_colt.gestione = 'L') ";
|
||||
}
|
||||
|
||||
String baseSql = "SELECT DISTINCT mtb_colt.* " +
|
||||
"FROM mtb_colt, " +
|
||||
" mtb_colr " +
|
||||
@@ -118,7 +126,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
" AND mtb_colt.ser_collo = mtb_colr.ser_collo " +
|
||||
" AND mtb_colt.data_collo = mtb_colr.data_collo " +
|
||||
" AND mtb_colt.num_collo = mtb_colr.num_collo " +
|
||||
" AND mtb_colt.gestione = " + UtilityDB.valueToString(gestione.getText()) + " " +
|
||||
" AND " + whereCondGestione +
|
||||
" AND mtb_colt.segno = " + UtilityDB.valueToString(segno) + " " +
|
||||
" AND mtb_colt.data_doc IS NULL AND ";
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
|
||||
public class MainAccettazioneFragment extends Fragment implements ISearcableFragment, ITitledFragment, IScrollableFragment {
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private ElevatedToolbar mToolbar;
|
||||
|
||||
private FragmentMainAccettazioneBinding mBinding;
|
||||
@@ -54,7 +54,7 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
private MainListAccettazioneAdapter mAdapter;
|
||||
|
||||
private List<OrdineAccettazioneInevasoDTO> mOriginalOrderList;
|
||||
private List<OrdineAccettazioneInevasoDTO> mRenderedOrderList = new ArrayList<>();
|
||||
private final List<OrdineAccettazioneInevasoDTO> mRenderedOrderList = new ArrayList<>();
|
||||
|
||||
private AppCompatTextView mAppBarTitle;
|
||||
|
||||
@@ -81,24 +81,14 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
mAppBarTitle.setText(context.getText(R.string.accettazione_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_accettazione, container, false);
|
||||
|
||||
init();
|
||||
|
||||
mBinding.setView(this);
|
||||
mBinding.accettazioneMainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
mBinding.accettazioneMainFab.hide();
|
||||
@@ -159,7 +149,7 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
|
||||
|
||||
|
||||
private RunnableArgs<OrdineAccettazioneInevasoDTO> onSingleSelectionChanged = dto -> {
|
||||
private final RunnableArgs<OrdineAccettazioneInevasoDTO> onSingleSelectionChanged = dto -> {
|
||||
List<OrdineAccettazioneInevasoDTO> selectedOrders = mHelper.getSelectedOrders(mOriginalOrderList);
|
||||
|
||||
if(dto.isSelected()) {
|
||||
@@ -254,8 +244,9 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ public class AccettazionePickingViewModel {
|
||||
|
||||
|
||||
if (qtaColDaPrelevare != null && numCnfDaPrelevare == null) {
|
||||
numCnfDaPrelevare = UtilityBigDecimal.divideToInteger(qtaColDaPrelevare, mtbAart.getQtaCnf());
|
||||
numCnfDaPrelevare = UtilityBigDecimal.divideAndRoundToInteger(qtaColDaPrelevare, mtbAart.getQtaCnf());
|
||||
|
||||
if (!mtbAart.isFlagQtaCnfFissaBoolean()) {
|
||||
if (UtilityBigDecimal.equalsTo(numCnfDaPrelevare, BigDecimal.ZERO))
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
|
||||
private FragmentMainBinding mBindings;
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private ElevatedToolbar mToolbar;
|
||||
|
||||
private LayoutInflater mLayoutInflater;
|
||||
@@ -210,21 +210,11 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
titleText.setText(context.getText(R.string.app_name).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
private void initGestMenu() {
|
||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
||||
@@ -264,4 +254,9 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
String appVersion = UtilityResources.getAppVersion();
|
||||
mBindings.currentAppVersionName.setText("v" + appVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -63,14 +64,14 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
|
||||
private FragmentMainOrdiniUscitaBinding mBindings = null;
|
||||
|
||||
private ObservableArrayList<OrdiniUscitaElencoListModel> mOrdiniInevasiMutableData = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<OrdiniUscitaElencoListModel> mOrdiniInevasiMutableData = new ObservableArrayList<>();
|
||||
|
||||
private GestioneEnum mCurrentGestioneOrd = null;
|
||||
private GestioneEnum mCurrentGestioneCol = null;
|
||||
private int mCurrentSegnoCol = 0;
|
||||
|
||||
private ElevatedToolbar mToolbar;
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private Dialog mCurrentProgress;
|
||||
@@ -85,7 +86,7 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
Bundle args = new Bundle();
|
||||
|
||||
args.putString("gestioneOrd", gestioneOrd.getText());
|
||||
args.putString("gestioneCol", gestioneCol.getText());
|
||||
args.putString("gestioneCol", gestioneCol != null ? gestioneCol.getText() : null);
|
||||
args.putInt("segnoCol", segnoCol);
|
||||
|
||||
fragment.setArguments(args);
|
||||
@@ -96,7 +97,8 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mCurrentGestioneOrd = GestioneEnum.fromString(getArguments().getString("gestioneOrd"));
|
||||
mCurrentGestioneCol = GestioneEnum.fromString(getArguments().getString("gestioneCol"));
|
||||
String gestioneCol = getArguments().getString("gestioneCol");
|
||||
mCurrentGestioneCol = gestioneCol != null ? GestioneEnum.fromString(gestioneCol) : null;
|
||||
mCurrentSegnoCol = getArguments().getInt("segnoCol");
|
||||
}
|
||||
|
||||
@@ -131,6 +133,14 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
|
||||
boolean canSelectMultipleOrdini = SettingsManager.iDB().isFlagSpedizioneCanSelectMultipleOrders();
|
||||
@@ -209,6 +219,14 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
.map(x -> {
|
||||
OrdiniUscitaElencoListModel listModel = new OrdiniUscitaElencoListModel();
|
||||
|
||||
if (x.isFlagEvaso()) {
|
||||
listModel.setEtichettaColor(ResourcesCompat.getColor(getResources(), R.color.mainGreen, null));
|
||||
} else if (x.isExistColloBoolean()) {
|
||||
listModel.setEtichettaColor(ResourcesCompat.getColor(getResources(), R.color.colorPrimary, null));
|
||||
} else {
|
||||
listModel.setEtichettaColor(ResourcesCompat.getColor(getResources(), android.R.color.transparent, null));
|
||||
}
|
||||
|
||||
listModel.setGroupTitle(x.getRagSocOrd());
|
||||
|
||||
String testataOrdString = String.format(getString(R.string.ord_ven_testata), String.valueOf(x.getNumOrd()), UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
@@ -237,10 +255,6 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
onComplete.run();
|
||||
}
|
||||
@@ -250,11 +264,6 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
titleText.setText(context.getText(R.string.prod_ordine_lavorazione_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
public void dispatchOrders() {
|
||||
List<OrdiniUscitaElencoDTO> selectedOrders = Stream.of(this.mOrdiniInevasiMutableData)
|
||||
@@ -335,11 +344,6 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelectAllButtonEnabled() {
|
||||
return SettingsManager.iDB().isFlagMultiClienteOrdV();
|
||||
@@ -379,4 +383,9 @@ public class OrdiniUscitaElencoFragment extends Fragment implements ITitledFragm
|
||||
|
||||
}).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
@@ -127,6 +128,10 @@ public class OrdiniUscitaElencoAdapter extends SectionedRecyclerViewAdapter<Ordi
|
||||
|
||||
listModel.getSelectedObservable().resetOnPropertyChangedCallback();
|
||||
|
||||
if(listModel.getEtichettaColor() != null)
|
||||
holder.mBinding.emptyView.setBackgroundColor(listModel.getEtichettaColor());
|
||||
else holder.mBinding.emptyView.setBackgroundColor(ResourcesCompat.getColor(mContext.getResources(), android.R.color.transparent, null));
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(listModel.getDescription()))
|
||||
holder.mBinding.descrizione.setText(Html.fromHtml(listModel.getDescription()));
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.ordini_uscita_elenco.list;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoDTO;
|
||||
|
||||
@@ -11,6 +13,8 @@ public class OrdiniUscitaElencoListModel implements Cloneable {
|
||||
private String rightDescription;
|
||||
private String rightSubDescription;
|
||||
|
||||
private @ColorInt Integer etichettaColor;
|
||||
|
||||
private boolean hidden;
|
||||
private BindableBoolean selected = new BindableBoolean();
|
||||
|
||||
@@ -63,6 +67,15 @@ public class OrdiniUscitaElencoListModel implements Cloneable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public @ColorInt Integer getEtichettaColor() {
|
||||
return etichettaColor;
|
||||
}
|
||||
|
||||
public OrdiniUscitaElencoListModel setEtichettaColor(@ColorInt Integer etichettaColor) {
|
||||
this.etichettaColor = etichettaColor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isHidden() {
|
||||
return hidden;
|
||||
}
|
||||
|
||||
@@ -108,11 +108,6 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
mToolbarTitleText.setText(context.getText(R.string.free_picking_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -236,11 +231,11 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
public void onDestroy() {
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
super.onDestroyView();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -248,11 +243,6 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onLoadingStarted() {
|
||||
@@ -413,4 +403,9 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment,
|
||||
if(thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
|
||||
else onComplete.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,11 +117,6 @@ public class ProdOrdineProduzioneElencoFragment extends Fragment implements ITit
|
||||
mAppBarTitle.setText(context.getText(R.string.prod_ordine_produzione_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
final Dialog progress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||
@@ -152,12 +147,6 @@ public class ProdOrdineProduzioneElencoFragment extends Fragment implements ITit
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
private void initRecyclerView() {
|
||||
mAdapter = new OrdineProduzioneListAdapter(getActivity(), mRenderedOrderList, onSingleSelectionChanged);
|
||||
mBinding.ordineProduzioneMainList.setAdapter(mAdapter);
|
||||
@@ -260,4 +249,9 @@ public class ProdOrdineProduzioneElencoFragment extends Fragment implements ITit
|
||||
mRenderedOrderList.clear();
|
||||
mRenderedOrderList.addAll(ordini);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import javax.inject.Inject;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
@@ -38,12 +37,12 @@ import it.integry.integrywmsnative.gest.spedizione.SpedizioneActivity;
|
||||
* Use the {@link ProdFabbisognoLineeProdFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITitledFragment, ILifecycleFragment, ProdFabbisognoLineeProdViewModel.Listener {
|
||||
public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITitledFragment, ProdFabbisognoLineeProdViewModel.Listener {
|
||||
|
||||
@Inject
|
||||
ProdFabbisognoLineeProdViewModel mViewModel;
|
||||
|
||||
private ArrayList<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final ArrayList<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
private FragmentProdFabbisognoLineeProdBinding mBindings;
|
||||
|
||||
@@ -97,10 +96,6 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
@@ -116,11 +111,6 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
||||
titleText.setText(context.getText(R.string.prod_fabbisogno_linee_prod_title).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
@@ -159,4 +149,9 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
@@ -36,53 +36,92 @@ public class ProdFabbisognoLineeProdViewModel {
|
||||
" SELECT " + UtilityDB.valueToString(startDate) + " AS data_inizio, " +
|
||||
" " + UtilityDB.valueToString(endDate) + " AS data_fine, " +
|
||||
" " + UtilityDB.valueToString(lineaProd) + " AS linea_prod, " +
|
||||
" " + UtilityDB.valueToString(codMdep) + " AS cod_mdep " +
|
||||
"), " +
|
||||
" custom_mtb_colr AS ( " +
|
||||
" " + UtilityDB.valueToString(codMdep) + " AS cod_mdep), " +
|
||||
" withdraw_mtb_colr AS ( " +
|
||||
" SELECT cod_mart, " +
|
||||
" SUM(qta_col) as qta_col, " +
|
||||
" SUM(num_cnf) as num_cnf, " +
|
||||
" mtb_colr.data_ord, " +
|
||||
" mtb_colr.num_ord, " +
|
||||
" mtb_colr.gestione " +
|
||||
" FROM mtb_colr " +
|
||||
" INNER JOIN mtb_colt mc on mtb_colr.gestione = mc.gestione and mtb_colr.data_collo = mc.data_collo and " +
|
||||
" mtb_colr.ser_collo = mc.ser_collo and mtb_colr.num_collo = mc.num_collo " +
|
||||
" WHERE segno = -1 " +
|
||||
" GROUP BY cod_mart, " +
|
||||
" mtb_colr.data_ord, " +
|
||||
" mtb_colr.num_ord, " +
|
||||
" mtb_colr.gestione " +
|
||||
" ), " +
|
||||
" custom_mtb_colr AS (SELECT cod_mart, " +
|
||||
" sum(qta_col) AS qta_col, " +
|
||||
" sum(num_cnf) AS num_cnf, " +
|
||||
" sum(qta_col) / sum(num_cnf) AS qta_cnf, " +
|
||||
" posizione " +
|
||||
" FROM mvw_sitart_udc_det_inventario " +
|
||||
" GROUP BY cod_mart, posizione " +
|
||||
" ), " +
|
||||
" tmp_ord AS ( " +
|
||||
" GROUP BY cod_mart, posizione), " +
|
||||
" grouped_ord AS ( " +
|
||||
" SELECT dtb_ordr.cod_mart, " +
|
||||
" dtb_ordt.cod_jfas, " +
|
||||
" dtb_ordt.cod_mdep, " +
|
||||
" dtb_ordt.gestione, " +
|
||||
" CONVERT(NUMERIC(15, 5), SUM(dtb_ordr.qta_ord * dtb_ordr.rap_conv) - " +
|
||||
" SUM(dtb_ordr.qta_evasa * dtb_ordr.rap_conv)) AS qta_ord, " +
|
||||
" SUM(dtb_ordr.num_cnf - dtb_ordr.num_cnf_evasa) AS num_cnf_ord, " +
|
||||
" mtb_aart.unt_mis, " +
|
||||
" SUM(ISNULL(custom_mtb_colr.qta_col, 0)) AS qta_col_versata, " +
|
||||
" SUM(ISNULL(custom_mtb_colr.qta_cnf, 0)) AS qta_cnf_versata, " +
|
||||
" SUM(ISNULL(custom_mtb_colr.num_cnf, 0)) AS num_cnf_versata" +
|
||||
" SUM(ISNULL(withdraw_mtb_colr.qta_col, 0)) AS qta_col_scaricata, " +
|
||||
" SUM(ISNULL(withdraw_mtb_colr.num_cnf, 0)) AS num_cnf_scaricata, " +
|
||||
" jrl_fase_posizioni.posizione " +
|
||||
" FROM dtb_ordr " +
|
||||
" INNER JOIN dtb_ordt " +
|
||||
" on dtb_ordr.gestione = dtb_ordt.gestione AND dtb_ordr.data_ord = dtb_ordt.data_ord AND " +
|
||||
" INNER JOIN dtb_ordt on dtb_ordr.gestione = dtb_ordt.gestione AND " +
|
||||
" dtb_ordr.data_ord = dtb_ordt.data_ord AND " +
|
||||
" dtb_ordr.num_ord = dtb_ordt.num_ord " +
|
||||
" INNER JOIN jrl_fase_posizioni ON dtb_ordt.cod_jfas = jrl_fase_posizioni.cod_jfas " +
|
||||
" LEFT OUTER JOIN custom_mtb_colr ON custom_mtb_colr.posizione = jrl_fase_posizioni.posizione AND " +
|
||||
" dtb_ordr.cod_mart = custom_mtb_colr.cod_mart " +
|
||||
" INNER JOIN mtb_aart ON dtb_ordr.cod_mart = mtb_aart.cod_mart " +
|
||||
" LEFT OUTER JOIN withdraw_mtb_colr " +
|
||||
" ON withdraw_mtb_colr.gestione = dtb_ordt.gestione AND " +
|
||||
" withdraw_mtb_colr.num_ord = dtb_ordt.num_ord AND " +
|
||||
" withdraw_mtb_colr.data_ord = dtb_ordt.data_ord AND " +
|
||||
" withdraw_mtb_colr.cod_mart = dtb_ordr.cod_mart " +
|
||||
" CROSS APPLY input_values " +
|
||||
" WHERE dtb_ordt.gestione = 'L' " +
|
||||
" AND dtb_ordt.cod_mdep = input_values.cod_mdep " +
|
||||
" AND jrl_fase_posizioni.posizione = input_values.linea_prod " +
|
||||
" AND flag_evaso = 'I' " +
|
||||
" AND dtb_ordr.flag_evaso_forzato = 'N' " +
|
||||
" AND flag_annulla = 'N' " +
|
||||
" AND dtb_ordt.cod_mdep = input_values.cod_mdep " +
|
||||
" AND dtb_ordt.data_ord BETWEEN input_values.data_inizio AND input_values.data_fine " +
|
||||
" GROUP BY dtb_ordr.cod_mart, " +
|
||||
" mtb_aart.unt_mis " +
|
||||
" ) " +
|
||||
" AND jrl_fase_posizioni.posizione = input_values.linea_prod " +
|
||||
" GROUP BY dtb_ordr.cod_mart, dtb_ordt.cod_jfas, dtb_ordt.cod_mdep, dtb_ordt.gestione, " +
|
||||
" jrl_fase_posizioni.posizione " +
|
||||
" ), " +
|
||||
" tmp_ord AS (SELECT grouped_ord.cod_mart, " +
|
||||
" mtb_aart.unt_mis, " +
|
||||
" SUM(qta_ord) AS qta_ord, " +
|
||||
" SUM(num_cnf_ord) AS num_cnf_ord, " +
|
||||
" SUM(qta_col_scaricata) AS qta_col_scaricata, " +
|
||||
" SUM(num_cnf_scaricata) AS num_cnf_scaricata, " +
|
||||
" SUM(ISNULL(custom_mtb_colr.qta_col, 0)) AS qta_col_versata, " +
|
||||
" SUM(ISNULL(custom_mtb_colr.num_cnf, 0)) AS num_cnf_versata " +
|
||||
" " +
|
||||
" FROM grouped_ord " +
|
||||
" LEFT OUTER JOIN custom_mtb_colr " +
|
||||
" ON custom_mtb_colr.posizione = grouped_ord.posizione AND " +
|
||||
" grouped_ord.cod_mart = custom_mtb_colr.cod_mart " +
|
||||
" INNER JOIN mtb_aart ON grouped_ord.cod_mart = mtb_aart.cod_mart " +
|
||||
" CROSS APPLY input_values " +
|
||||
" GROUP BY grouped_ord.cod_mart, mtb_aart.unt_mis) " +
|
||||
" " +
|
||||
"SELECT cod_mart, " +
|
||||
" qta_ord, " +
|
||||
" num_cnf_ord, " +
|
||||
" unt_mis, " +
|
||||
" qta_col_versata, " +
|
||||
" num_cnf_versata, " +
|
||||
" CASE WHEN qta_ord - qta_col_versata < 0 THEN 0 ELSE qta_ord - qta_col_versata END AS qta_fabbisogno, " +
|
||||
" CASE WHEN num_cnf_ord - num_cnf_versata < 0 THEN 0 ELSE num_cnf_ord - num_cnf_versata END AS num_cnf_fabbisogno " +
|
||||
" qta_col_scaricata, " +
|
||||
" num_cnf_scaricata, " +
|
||||
" CASE " +
|
||||
" WHEN qta_ord - qta_col_versata - qta_col_scaricata < 0 THEN 0 " +
|
||||
" ELSE qta_ord - qta_col_versata - qta_col_scaricata END AS qta_fabbisogno, " +
|
||||
" CASE " +
|
||||
" WHEN num_cnf_ord - num_cnf_versata - num_cnf_scaricata < 0 THEN 0 " +
|
||||
" ELSE num_cnf_ord - num_cnf_versata - num_cnf_scaricata END AS num_cnf_fabbisogno " +
|
||||
"FROM tmp_ord " +
|
||||
"ORDER BY cod_mart";
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ProdRecuperoMaterialeFragment extends Fragment implements ITitledFr
|
||||
private ProdRecuperoMaterialeViewModel mViewmodel;
|
||||
private ProdRecuperoMaterialeHelper mHelper;
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
public ProdRecuperoMaterialeFragment() {
|
||||
// Required empty public constructor
|
||||
@@ -72,12 +72,6 @@ public class ProdRecuperoMaterialeFragment extends Fragment implements ITitledFr
|
||||
titleText.setText(context.getText(R.string.prod_recupero_materiale_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
@@ -86,4 +80,8 @@ public class ProdRecuperoMaterialeFragment extends Fragment implements ITitledFr
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ProdVersamentoMaterialeFragment extends Fragment implements ITitled
|
||||
private ProdVersamentoMaterialViewModel mViewmodel;
|
||||
private ProdVersamentoMaterialHelper mHelper;
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
public ProdVersamentoMaterialeFragment() {
|
||||
// Required empty public constructor
|
||||
@@ -87,7 +87,7 @@ public class ProdVersamentoMaterialeFragment extends Fragment implements ITitled
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class PVOrdiniAcquistoGrigliaFragment extends Fragment implements ITitled
|
||||
private OrdineAcquistoPvHelper mHelper;
|
||||
private Griglia mGriglia;
|
||||
private OrdineAcquistoPvOpenListAdapter mAdapter;
|
||||
private List<OrdineWrapper> mRenderedOrderList = new ArrayList<>();
|
||||
private final List<OrdineWrapper> mRenderedOrderList = new ArrayList<>();
|
||||
private boolean mRedirectToNewOrder = true;
|
||||
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
@@ -122,11 +122,6 @@ public class PVOrdiniAcquistoGrigliaFragment extends Fragment implements ITitled
|
||||
titleText.setText(context.getText(R.string.pv_elenco_ordiniA_title_fragment).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
private void setGriglia(Griglia griglia) {
|
||||
mGriglia = griglia;
|
||||
mBinding.fabNewOrder.setVisibility(View.VISIBLE);
|
||||
@@ -238,11 +233,6 @@ public class PVOrdiniAcquistoGrigliaFragment extends Fragment implements ITitled
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -259,4 +249,9 @@ public class PVOrdiniAcquistoGrigliaFragment extends Fragment implements ITitled
|
||||
onPreDestroy.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,11 +215,6 @@ public class RettificaGiacenzeFragment extends Fragment implements ITitledFragme
|
||||
titleText.setText(context.getText(R.string.rettifica_giacenze_fragment_title).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
@@ -527,7 +522,12 @@ public class RettificaGiacenzeFragment extends Fragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
mViewModel.closeLU(false, onComplete);
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
mViewModel.closeLU(false, onComplete);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,14 +18,13 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
titleText.setText(context.getText(R.string.settings_category).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
setPreferencesFromResource(R.xml.app_preferences, rootKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
|
||||
public class UltimeConsegneClienteFragment extends Fragment implements ITitledFragment, IScrollableFragment, IFilterableFragment {
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private ElevatedToolbar mToolbar;
|
||||
|
||||
private UltimeConsegneClienteViewModel mViewModel;
|
||||
@@ -71,23 +71,18 @@ public class UltimeConsegneClienteFragment extends Fragment implements ITitledFr
|
||||
titleText.setText(context.getText(R.string.ultime_consegne_cliente_title).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFilterClick() {
|
||||
mViewModel.openFilterDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
*/
|
||||
public class UltimiArriviFornitoreFragment extends Fragment implements ITitledFragment, IScrollableFragment, IFilterableFragment {
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private ElevatedToolbar mToolbar;
|
||||
|
||||
private UltimiArriviFornitoreViewModel mViewModel;
|
||||
@@ -74,20 +74,11 @@ public class UltimiArriviFornitoreFragment extends Fragment implements ITitledFr
|
||||
titleText.setText(context.getText(R.string.ultime_arrivi_fornitore_title).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollableOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,5 +89,8 @@ public class UltimiArriviFornitoreFragment extends Fragment implements ITitledFr
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class VersamentoMerceFragment extends Fragment implements ITitledFragment
|
||||
private VersamentoMerceViewModel mVersamentoMerceViewModel;
|
||||
private VersamentoMerceHelper mHelper;
|
||||
|
||||
private List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class VersamentoMerceFragment extends Fragment implements ITitledFragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActionBarPreDestroy(Runnable onActionBarPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onActionBarPreDestroy);
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,13 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.mtbAart.get().getBarCode() != null &&
|
||||
(ean13PesoModel.getPrecode().contains(this.mtbAart.get().getBarCode()) || this.mtbAart.get().getBarCode().contains(ean13PesoModel.getPrecode()))) {
|
||||
this.setQtaTot(BigDecimal.valueOf(ean13PesoModel.getPeso()));
|
||||
this.setNumCnf(UtilityBigDecimal.divideAndRoundToInteger(this.getQtaTot(), this.mtbAart.get().getQtaCnf()));
|
||||
|
||||
if (!this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
if (UtilityBigDecimal.equalsTo(this.getNumCnf(), BigDecimal.ZERO))
|
||||
this.setNumCnf(BigDecimal.ONE);
|
||||
this.setQtaCnf(UtilityBigDecimal.divide(this.getQtaTot(), this.getNumCnf()));
|
||||
}
|
||||
}
|
||||
|
||||
onComplete.run();
|
||||
@@ -146,6 +153,13 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.setNumCnf(BigDecimal.valueOf(ean128Model.Count));
|
||||
} else if (ean128Model.NetWeightKg != null && ean128Model.NetWeightKg > 0) {
|
||||
this.setQtaTot(BigDecimal.valueOf(ean128Model.NetWeightKg));
|
||||
this.setNumCnf(UtilityBigDecimal.divideAndRoundToInteger(this.getQtaTot(), this.mtbAart.get().getQtaCnf()));
|
||||
|
||||
if (!this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
if (UtilityBigDecimal.equalsTo(this.getNumCnf(), BigDecimal.ZERO))
|
||||
this.setNumCnf(BigDecimal.ONE);
|
||||
this.setQtaCnf(UtilityBigDecimal.divide(this.getQtaTot(), this.getNumCnf()));
|
||||
}
|
||||
}
|
||||
|
||||
this.mListener.onDataChanged();
|
||||
@@ -306,7 +320,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
newValue = UtilityBigDecimal.getLowerBetween(newValue, totalQtaAvailable);
|
||||
|
||||
//Se è piu' grande della qta da prelevare e non posso aggiungere qta extra allora ricalcolo
|
||||
if (!canOverflowOrderQuantity) {
|
||||
if (!canOverflowOrderQuantity && this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
newValue = UtilityBigDecimal.getLowerBetween(newValue, totalQtaOrd);
|
||||
this.internalQtaTot = newValue;
|
||||
this.mListener.onDataChanged();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.scan_art;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
@@ -55,17 +56,11 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
||||
mOnItemChoosed = onItemChoosed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.initBarcode();
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = getActivity();
|
||||
this.initBarcode();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_scan_art, container, false);
|
||||
|
||||
@@ -85,17 +80,19 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
||||
dismiss();
|
||||
});
|
||||
|
||||
|
||||
getDialog().setOnDismissListener(dialog -> {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
BarcodeManager.enable();
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
|
||||
private void initBarcode() {
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessfull)
|
||||
|
||||
@@ -11,14 +11,23 @@
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="4dp">
|
||||
android:paddingEnd="4dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ordine_lavorazione_main_list_group_item_container_root"
|
||||
android:layout_width="match_parent"
|
||||
@@ -89,7 +98,7 @@
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</layout>
|
||||
@@ -27,7 +27,7 @@ public class MenuConfigurationFRUDIS extends BaseMenuConfiguration {
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.vendita_title_fragment)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_free_picking)
|
||||
|
||||
@@ -47,7 +47,7 @@ public class MenuConfigurationGRAMM extends BaseMenuConfiguration {
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.vendita_title_fragment)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_free_picking)
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MenuConfigurationIME extends BaseMenuConfiguration {
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.vendita_title_fragment)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_free_picking)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MenuConfigurationVG extends BaseMenuConfiguration {
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.vendita_title_fragment)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_free_picking)
|
||||
|
||||
Reference in New Issue
Block a user