Sostituite icone da PNG a SVG. Implementata voce di Rettifica spedizione che carica colli V.
This commit is contained in:
@@ -57,9 +57,17 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
.setCodMenu("MG046")
|
||||
.setTitleText(R.string.vendita_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
||||
.setDrawerIcon(R.drawable.ic_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_rettifica_spedizione)
|
||||
.setCodMenu("MG064")
|
||||
.setTitleText(R.string.rettifica_spedizione_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_rettifica_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_rettifica_spedizione_drawer)
|
||||
.setFragmentFactory(() -> RettificaGiacenzeFragment.newInstance(GestioneEnum.VENDITA)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_picking)
|
||||
.setCodMenu("MG047")
|
||||
|
||||
@@ -795,8 +795,10 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
|
||||
listModel.setSubDescription(x.getRifOrd());
|
||||
|
||||
String testataDataConsString = String.format(getString(R.string.ord_ven_testata_data_cons), UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
listModel.setRightDescription(testataDataConsString);
|
||||
if(x.getDataConsD() != null) {
|
||||
String testataDataConsString = String.format(getString(R.string.ord_ven_testata_data_cons), UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
listModel.setRightDescription(testataDataConsString);
|
||||
}
|
||||
|
||||
listModel.setOriginalModel(x);
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
|
||||
@Override
|
||||
public void onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, onComplete)
|
||||
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, true, onComplete)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
||||
}
|
||||
|
||||
private void openLU() {
|
||||
DialogScanOrCreateLUView.newInstance(false, false, true, false, (mtbColt, created) -> {
|
||||
DialogScanOrCreateLUView.newInstance(false, false, true, false, true, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
popMe();
|
||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE || mtbColt.getGestioneEnum() == GestioneEnum.VENDITA) && mtbColt.getSegno().equals(+1)) {
|
||||
|
||||
@@ -43,6 +43,7 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
@@ -83,6 +84,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
private RettificaGiacenzeMainListAdapter mAdapter;
|
||||
|
||||
private int barcodeScannerIstanceID = -1;
|
||||
private GestioneEnum mCurrentGestione;
|
||||
|
||||
public RettificaGiacenzeFragment() {
|
||||
// Required empty public constructor
|
||||
@@ -90,13 +92,28 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
|
||||
public static RettificaGiacenzeFragment newInstance() {
|
||||
return newInstance(null);
|
||||
}
|
||||
|
||||
|
||||
public static RettificaGiacenzeFragment newInstance(GestioneEnum gestione) {
|
||||
RettificaGiacenzeFragment fragment = new RettificaGiacenzeFragment();
|
||||
Bundle args = new Bundle();
|
||||
|
||||
if (gestione != null)
|
||||
args.putString("gestione", gestione.getText());
|
||||
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
|
||||
if (getArguments() != null && getArguments().containsKey("gestione"))
|
||||
mCurrentGestione = GestioneEnum.fromString(getArguments().getString("gestione"));
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@@ -198,7 +215,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
mViewModel.init(
|
||||
SettingsManager.i().getUser().getFullname(),
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||
mCurrentGestione);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -287,8 +305,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, (mtbColt, created) -> {
|
||||
public void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
popMe();
|
||||
} else {
|
||||
|
||||
@@ -24,6 +24,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
@@ -51,6 +52,8 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
private RettificaGiacenzeViewModel.Listener mListener;
|
||||
|
||||
private GestioneEnum mDefaultGestione;
|
||||
|
||||
private String mCurrentUser;
|
||||
private String mCurrentCodMdep;
|
||||
private boolean mIsCreatedLU;
|
||||
@@ -71,9 +74,10 @@ public class RettificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void init(String currentUser, String currentCodMdep) {
|
||||
public void init(String currentUser, String currentCodMdep, GestioneEnum defaultGestione) {
|
||||
this.mCurrentUser = currentUser;
|
||||
this.mCurrentCodMdep = currentCodMdep;
|
||||
this.mDefaultGestione = defaultGestione;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
@@ -87,12 +91,15 @@ public class RettificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
public void requestLU() {
|
||||
this.sendOnLUOpenRequest((mtbColt, created) -> {
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
this.mIsCreatedLU = created;
|
||||
this.sendOnLUOpenRequest(mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||
mDefaultGestione != null && mDefaultGestione == GestioneEnum.VENDITA,
|
||||
mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||
(mtbColt, created) -> {
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
this.mIsCreatedLU = created;
|
||||
|
||||
this.sendLUOpened(mtbColt);
|
||||
});
|
||||
this.sendLUOpened(mtbColt);
|
||||
});
|
||||
}
|
||||
|
||||
public RettificaGiacenzeViewModel setListener(RettificaGiacenzeViewModel.Listener listener) {
|
||||
@@ -691,8 +698,9 @@ public class RettificaGiacenzeViewModel {
|
||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||
}
|
||||
|
||||
private void sendOnLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
if (this.mListener != null) mListener.onLUOpenRequest(onComplete);
|
||||
private void sendOnLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onLUOpenRequest(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
@@ -778,7 +786,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||
|
||||
void onLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
|
||||
void onLUOpened(MtbColt mtbColt);
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
|
||||
|
||||
public void openLU() {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, (mtbColt, created) -> {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, true, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)) {
|
||||
|
||||
@@ -43,27 +43,29 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private final boolean mShouldCheckResiduo;
|
||||
private final boolean mShouldCheckIfExistDoc;
|
||||
private final boolean mEnableCreation;
|
||||
private final boolean mWarnOnOpeningVendita;
|
||||
|
||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(@NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
return new DialogScanOrCreateLUView(false, true, true, true, onComplete);
|
||||
return new DialogScanOrCreateLUView(false, true, true, true, true, onComplete);
|
||||
}
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
return new DialogScanOrCreateLUView(false, enableCreation, true, shouldCheckIfExistDoc, onComplete);
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
return new DialogScanOrCreateLUView(false, enableCreation, true, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
return new DialogScanOrCreateLUView(enableBasket, enableCreation, checkResiduo, shouldCheckIfExistDoc, onComplete);
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
return new DialogScanOrCreateLUView(enableBasket, enableCreation, checkResiduo, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
|
||||
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
super();
|
||||
mShouldCheckResiduo = checkResiduo;
|
||||
mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||
mWarnOnOpeningVendita = warnOnOpeningVendita;
|
||||
|
||||
this.basketEnabled.set(enableBasket);
|
||||
this.creationEnabled.set(enableCreation);
|
||||
@@ -90,7 +92,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
.setListener(this);
|
||||
|
||||
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation, mWarnOnOpeningVendita);
|
||||
|
||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||
this.mViewModel.createNewLU();
|
||||
|
||||
@@ -32,6 +32,7 @@ public class DialogScanOrCreateLUViewModel {
|
||||
private boolean mShouldCheckResiduo = false;
|
||||
private boolean mShouldCheckIfExistDoc = true;
|
||||
private boolean mEnableCreation = false;
|
||||
private boolean mWarnOnOpeningVendita;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@@ -43,10 +44,11 @@ public class DialogScanOrCreateLUViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation) {
|
||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation, boolean warnOnOpeningVendita) {
|
||||
this.mShouldCheckResiduo = checkResiduo;
|
||||
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||
this.mEnableCreation = enableCreation;
|
||||
this.mWarnOnOpeningVendita = warnOnOpeningVendita;
|
||||
}
|
||||
|
||||
public void createNewLU() {
|
||||
@@ -137,7 +139,7 @@ public class DialogScanOrCreateLUViewModel {
|
||||
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
||||
this.sendError(new AlreadyAttachedDocumentToLUException());
|
||||
} else {
|
||||
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1) {
|
||||
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1 && mWarnOnOpeningVendita) {
|
||||
this.sendOnLUVenditaConfirmRequired(confirmed -> {
|
||||
if (confirmed) {
|
||||
onComplete.run();
|
||||
|
||||
Reference in New Issue
Block a user