Aggiunto PickData su UL in vendita.
Cambiata toolbar in FullWhite
This commit is contained in:
parent
7207b83f39
commit
ae154e55f3
@ -17,7 +17,7 @@
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
android:theme="@style/Light">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@ -26,23 +26,23 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".gest.accettazione_ordine_inevaso.AccettazioneOrdineInevasoActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.login.LoginActivity"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
android:theme="@style/Light" />
|
||||
<activity
|
||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||
android:label="@string/activity_lista_bancali_title"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
android:theme="@style/Light" />
|
||||
<activity
|
||||
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
||||
android:label="@string/activity_contenuto_bancale_title"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
android:theme="@style/Light" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -129,6 +129,7 @@ public class MainActivity extends AppCompatActivity
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(MenuItem item) {
|
||||
|
||||
mWaterfallToolbar.resetElevation();
|
||||
mWaterfallToolbar.setRecyclerView(null);
|
||||
|
||||
// Handle navigation view item clicks here.
|
||||
@ -170,6 +171,14 @@ public class MainActivity extends AppCompatActivity
|
||||
return true;
|
||||
}
|
||||
|
||||
public void popToMain() {
|
||||
MainFragment mainFragment = MainFragment.newInstance();
|
||||
|
||||
adaptViewToFragment(mainFragment);
|
||||
|
||||
changeContentFragment(mainFragment);
|
||||
}
|
||||
|
||||
private void adaptViewToFragment(Fragment fragment){
|
||||
if(fragment instanceof SearchView.OnQueryTextListener) {
|
||||
mSearchView.setOnQueryTextListener((SearchView.OnQueryTextListener) fragment);
|
||||
|
||||
@ -27,7 +27,7 @@ public class ServiceRESTResponse<T> {
|
||||
public Date getExecDate() {
|
||||
try {
|
||||
return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse(execDate);
|
||||
} catch (ParseException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -8,6 +8,7 @@ import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
|
||||
public class MtbColr extends EntityBase implements Parcelable {
|
||||
@ -516,9 +517,14 @@ public class MtbColr extends EntityBase implements Parcelable {
|
||||
return dataScadPartita;
|
||||
}
|
||||
|
||||
public Date getDataScadPartitaD() throws ParseException {
|
||||
public Date getDataScadPartitaD() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
return sdf.parse(getDataScadPartitaS());
|
||||
try {
|
||||
return sdf.parse(getDataScadPartitaS());
|
||||
} catch (Exception ex) {
|
||||
UtilityLogger.errorMe(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public MtbColr setDataScadPartita(String dataScadPartita) {
|
||||
|
||||
@ -310,7 +310,7 @@ public class MtbColt extends EntityBase implements Parcelable {
|
||||
Date dataColloD = null;
|
||||
try {
|
||||
dataColloD = getDataColloD();
|
||||
} catch (ParseException ex){
|
||||
} catch (Exception ex){
|
||||
UtilityLogger.errorMe(ex);
|
||||
}
|
||||
|
||||
@ -661,7 +661,7 @@ public class MtbColt extends EntityBase implements Parcelable {
|
||||
|
||||
try {
|
||||
xmlContent.append("<DTB_ORDT COND=\"OR\"><GESTIONE type=\"V\">" + x.getGestioneOrd() + "</GESTIONE><DATA_ORD type=\"D\">" + UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH) + "</DATA_ORD><NUM_ORD type=\"N\">" + x.getNumOrd() + "</NUM_ORD></DTB_ORDT>");
|
||||
} catch (ParseException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ public class DBSettingsModel {
|
||||
private List<AvailableCodMdepsDTO> availableCodMdep = null;
|
||||
|
||||
private boolean enableCheckPartitaMagCheckPickingV;
|
||||
private boolean flagMultiClienteOrdV;
|
||||
private String defaultCodAnag;
|
||||
|
||||
public List<String> getAvailableProfiles() {
|
||||
@ -37,6 +38,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagMultiClienteOrdV() {
|
||||
return flagMultiClienteOrdV;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagMultiClienteOrdV(boolean flagMultiClienteOrdV) {
|
||||
this.flagMultiClienteOrdV = flagMultiClienteOrdV;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDefaultCodAnag() {
|
||||
return defaultCodAnag;
|
||||
}
|
||||
|
||||
@ -133,10 +133,17 @@ public class SettingsManager {
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SETUP", "ENABLE_CHECK_PARTITA_MAG_PICKING_V", valueEnableCheckPartitaMag -> {
|
||||
dbSettingsModelIstance.setEnableCheckPartitaMagCheckPickingV(valueEnableCheckPartitaMag);
|
||||
|
||||
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "COD_ANAG_DEFAULT", valueCodAnagDefault -> {
|
||||
dbSettingsModelIstance.setDefaultCodAnag(valueCodAnagDefault.value);
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SETUP", "FLAG_MULTI_CLIENTE_ORD_VENDITA", valueFlagMultiClienteOrdVendita -> {
|
||||
dbSettingsModelIstance.setFlagMultiClienteOrdV(valueFlagMultiClienteOrdVendita);
|
||||
|
||||
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "COD_ANAG_DEFAULT", valueCodAnagDefault -> {
|
||||
dbSettingsModelIstance.setDefaultCodAnag(valueCodAnagDefault.value);
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
|
||||
@ -106,7 +106,7 @@ public class ListaBancaliViewModel implements IRecyclerItemClicked<MtbColt> {
|
||||
|
||||
|
||||
|
||||
} catch (ParseException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e, progress);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.main;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
@ -15,6 +16,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ISingleValueOperationCallback;
|
||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.wifi.WiFiCheckerViewHolder;
|
||||
|
||||
@ -23,7 +25,7 @@ import it.integry.integrywmsnative.core.wifi.WiFiCheckerViewHolder;
|
||||
* Use the {@link MainFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class MainFragment extends Fragment {
|
||||
public class MainFragment extends Fragment implements ITitledFragment {
|
||||
|
||||
|
||||
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
||||
@ -85,5 +87,8 @@ public class MainFragment extends Fragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getTitle(Context context) {
|
||||
return context.getString(R.string.app_name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import it.integry.integrywmsnative.MainActivity;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
@ -78,7 +79,11 @@ public class RettificaGiacenzeFragment extends Fragment implements ITitledFragme
|
||||
});
|
||||
|
||||
DialogScanOrCreateLU.makeBase(getActivity(), mtbColt -> {
|
||||
mRettificaGiacenzeViewModel.setMtbColt(mtbColt);
|
||||
if(mtbColt == null) {
|
||||
((MainActivity)getActivity()).popToMain();
|
||||
} else {
|
||||
mRettificaGiacenzeViewModel.setMtbColt(mtbColt);
|
||||
}
|
||||
}).show();
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainVenditaBinding;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
@ -208,10 +209,13 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
||||
RunnableArgs<OrdineVenditaGroupedInevasoDTO> onGroupSelectionChanged = dto -> {
|
||||
List<OrdineVenditaGroupedInevasoDTO> selectedOrders = mHelper.getSelectedOrders(groupedOrdiniInevasi);
|
||||
|
||||
if(selectedOrders != null && selectedOrders.size() > 1){
|
||||
for (OrdineVenditaGroupedInevasoDTO selectedOrder : selectedOrders) {
|
||||
if(!dto.codAnagClie.equalsIgnoreCase(selectedOrder.codAnagClie)) {
|
||||
Stream.of(selectedOrder.ordini).forEach(x -> x.setCheckbox(false));
|
||||
if(!SettingsManager.iDB().isFlagMultiClienteOrdV()){
|
||||
|
||||
if(selectedOrders != null && selectedOrders.size() > 1){
|
||||
for (OrdineVenditaGroupedInevasoDTO selectedOrder : selectedOrders) {
|
||||
if(!dto.codAnagClie.equalsIgnoreCase(selectedOrder.codAnagClie)) {
|
||||
Stream.of(selectedOrder.ordini).forEach(x -> x.setCheckbox(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ public class PickingObjectDTO implements Parcelable {
|
||||
Date dataColloD = null;
|
||||
try {
|
||||
dataColloD = getDataColloD();
|
||||
} catch (ParseException ex){
|
||||
} catch (Exception ex){
|
||||
UtilityLogger.errorMe(ex);
|
||||
}
|
||||
|
||||
@ -411,14 +411,57 @@ public class PickingObjectDTO implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public class PickData {
|
||||
public static class PickData {
|
||||
private String batchLot;
|
||||
private BigDecimal qtaDaEvadere;
|
||||
private BigDecimal qtaEvasa;
|
||||
private BigDecimal qtaOrd;
|
||||
private BigDecimal qtaTot;
|
||||
private BigDecimal qtaCnf;
|
||||
private Integer numCnf;
|
||||
private BigDecimal numCnf;
|
||||
private Date dataScad;
|
||||
|
||||
|
||||
public String getBatchLot() {
|
||||
return batchLot;
|
||||
}
|
||||
|
||||
public PickData setBatchLot(String batchLot) {
|
||||
this.batchLot = batchLot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaTot() {
|
||||
return qtaTot;
|
||||
}
|
||||
|
||||
public PickData setQtaTot(BigDecimal qtaTot) {
|
||||
this.qtaTot = qtaTot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public PickData setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public PickData setNumCnf(BigDecimal numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public PickData setDataScad(Date dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.dto.VenditaOrdineInevasoListViewModel;
|
||||
@ -135,10 +136,9 @@ public class VenditaOrdineInevasoHelper {
|
||||
List<MtbColr> filteredMtbColrs = Stream.of(mtbColrs).filter(
|
||||
x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()) &&
|
||||
((x.getCodJcom() == null && item.getCodJcom() == null) || (x.getCodJcom() != null && x.getCodJcom().equalsIgnoreCase(item.getCodJcom()))) &&
|
||||
((x.getPartitaMag() == null && item.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(item.getPartitaMag()))) &&
|
||||
(!SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() || (SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() && ((x.getPartitaMag() == null && item.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(item.getPartitaMag()))))) &&
|
||||
((x.getNumColloRif() == null && item.getNumCollo() == null) || (x.getNumColloRif() != null && x.getNumColloRif().equals(item.getNumCollo())))).toList();
|
||||
|
||||
|
||||
for (MtbColr mtbColr : filteredMtbColrs) {
|
||||
currentQtaEvasa = currentQtaEvasa.add(mtbColr.getQtaCol());
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
public void removeListFilter() {
|
||||
for(int i = 0; i < mPickingList.size(); i++) {
|
||||
mPickingList.get(i).setTempHidden(false);
|
||||
// mPickingList.get(i).setTempEan128Model(null);
|
||||
mPickingList.get(i).setTempPickData(null);
|
||||
}
|
||||
|
||||
refreshOrderBy(false);
|
||||
@ -285,7 +285,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
} else {
|
||||
if(UtilityBarcode.isEtichettaAnonima(data)){
|
||||
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
||||
this.executeEtichettaLU(data.getStringValue(), null, progressDialog);
|
||||
this.executeEtichettaLU(data.getStringValue(), progressDialog);
|
||||
} else if(data.getType() == BarcodeType.EAN128) {
|
||||
|
||||
this.executeEtichettaEan128(data, progressDialog);
|
||||
@ -323,10 +323,11 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaLU(String SSCC, Ean128Model ean128Model, ProgressDialog progressDialog) {
|
||||
private void executeEtichettaLU(String SSCC, ProgressDialog progressDialog) {
|
||||
ColliMagazzinoRESTConsumer.getBySSCC(SSCC, true, false, mtbColt -> {
|
||||
|
||||
if(mtbColt != null) {
|
||||
|
||||
if(mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||
searchArtFromUL(mtbColt, progressDialog);
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
@ -356,7 +357,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
||||
this.executeEtichettaLU(ean128Model.Sscc, ean128Model, progressDialog);
|
||||
this.executeEtichettaLU(ean128Model.Sscc, progressDialog);
|
||||
} else {
|
||||
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
@ -364,6 +365,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
|
||||
// this.loadArticolo(barcodeProd, ean128Model, progressDialog);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -412,16 +414,54 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
for (int i = 0; i < matchPickingObject.size(); i++) {
|
||||
PickingObjectDTO tmpPickObj = matchPickingObject.get(i);
|
||||
|
||||
boolean anyMatch = Stream.of(scannedUL.getMtbColr())
|
||||
.anyMatch(x -> x.getCodMart().equalsIgnoreCase(tmpPickObj.getCodMart()) &&
|
||||
Objects.equals(x.getPartitaMag(), tmpPickObj.getPartitaMag()));
|
||||
|
||||
|
||||
List<MtbColr> matchWithPartitaMag = Stream.of(scannedUL.getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(tmpPickObj.getCodMart()) &&
|
||||
Objects.equals(x.getPartitaMag(), tmpPickObj.getPartitaMag())).toList();
|
||||
|
||||
boolean anyMatch = matchWithPartitaMag.size() > 0;
|
||||
|
||||
if(!anyMatch) {
|
||||
matchPickingObject.remove(i);
|
||||
i--;
|
||||
} else if(matchWithPartitaMag.size() == 1){
|
||||
MtbColr matchRow = matchWithPartitaMag.get(0);
|
||||
|
||||
PickingObjectDTO.PickData pickData = new PickingObjectDTO.PickData()
|
||||
.setBatchLot(matchRow.getPartitaMag())
|
||||
.setDataScad(matchRow.getDataScadPartitaD())
|
||||
.setNumCnf(matchRow.getNumCnf())
|
||||
.setQtaCnf(matchRow.getQtaCnf())
|
||||
.setQtaTot(matchRow.getQtaCol());
|
||||
|
||||
tmpPickObj.setTempPickData(pickData);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < matchPickingObject.size(); i++) {
|
||||
|
||||
PickingObjectDTO tmpPickObj = matchPickingObject.get(i);
|
||||
List<MtbColr> matchWithColloRow = Stream.of(scannedUL.getMtbColr())
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(tmpPickObj.getCodMart())).toList();
|
||||
|
||||
if(matchWithColloRow.size() == 1){
|
||||
MtbColr matchRow = matchWithColloRow.get(0);
|
||||
|
||||
PickingObjectDTO.PickData pickData = new PickingObjectDTO.PickData()
|
||||
.setBatchLot(matchRow.getPartitaMag())
|
||||
.setDataScad(matchRow.getDataScadPartitaD())
|
||||
.setNumCnf(matchRow.getNumCnf())
|
||||
.setQtaCnf(matchRow.getQtaCnf())
|
||||
.setQtaTot(matchRow.getQtaCol());
|
||||
|
||||
tmpPickObj.setTempPickData(pickData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.loadMatchedRows(matchPickingObject);
|
||||
@ -441,13 +481,11 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
if(matchedRows == null || matchedRows.size() == 0) {
|
||||
showNoArtFoundDialog();
|
||||
} else if(matchedRows.size() == 1) {
|
||||
// matchedRows.get(0).setTempEan128Model(ean128Model);
|
||||
onOrdineRowDispatch(matchedRows.get(0));
|
||||
} else {
|
||||
for(int i = 0; i < mPickingList.size(); i++) {
|
||||
if(!matchedRows.contains(mPickingList.get(i))) {
|
||||
mPickingList.get(i).setTempHidden(true);
|
||||
// mPickingList.get(i).setTempEan128Model(ean128Model);
|
||||
}
|
||||
}
|
||||
|
||||
@ -624,9 +662,9 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
() -> postCloseOperations()).show();
|
||||
});
|
||||
|
||||
}, ex -> UtilityExceptions.defaultException(mActivity, ex, progress)
|
||||
}, ex -> UtilityExceptions.defaultException(mActivity, ex, progress)
|
||||
);
|
||||
} catch (Exception ex){
|
||||
} catch (Exception ex) {
|
||||
UtilityExceptions.defaultException(mActivity, ex, progress);
|
||||
postCloseOperations();
|
||||
}
|
||||
@ -691,11 +729,14 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
.filter(currentRow ->
|
||||
x.getCodMart().equalsIgnoreCase(currentRow.getCodMart()) &&
|
||||
((x.getCodJcom() == null && currentRow.getCodJcom() == null) || (x.getCodJcom() != null && x.getCodJcom().equalsIgnoreCase(currentRow.getCodJcom()))) &&
|
||||
((x.getPartitaMag() == null && currentRow.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(currentRow.getPartitaMag()))) &&
|
||||
(!SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() || (SettingsManager.iDB().isEnableCheckPartitaMagCheckPickingV() && ((x.getPartitaMag() == null && currentRow.getPartitaMag() == null) || (x.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(currentRow.getPartitaMag()))))) &&
|
||||
((x.getNumColloRif() == null && currentRow.getNumCollo() == null) || (x.getNumColloRif() != null && x.getNumColloRif().equals(currentRow.getNumCollo())))
|
||||
)
|
||||
|
||||
.forEach(currentRow -> currentRow.setQtaCollo(currentRow.getQtaCollo().add(x.getQtaCol())));
|
||||
.forEach(currentRow -> {
|
||||
currentRow.setQtaCollo(currentRow.getQtaCollo().subtract(x.getQtaCol()));
|
||||
currentRow.setQtaOrd(currentRow.getQtaOrd().subtract(x.getQtaCol()));
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -737,45 +778,46 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
.setCanPartitaMagBeChanged(false)
|
||||
.setMaxQta(item.getQtaOrd());
|
||||
|
||||
// if(item.getTempEan128Model() != null){
|
||||
// Ean128Model ean128Model = item.getTempEan128Model();
|
||||
//
|
||||
// if(!UtilityString.isNullOrEmpty(ean128Model.BatchLot)) {
|
||||
// dto.setBatchLot(ean128Model.BatchLot);
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// if(!UtilityString.isNullOrEmpty(ean128Model.BestBefore)){
|
||||
// dto.setDataScad(UtilityDate.recognizeDate(ean128Model.BestBefore));
|
||||
// } else if(!UtilityString.isNullOrEmpty(ean128Model.Expiry)) {
|
||||
// dto.setDataScad(UtilityDate.recognizeDate(ean128Model.Expiry));
|
||||
// }
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// UtilityLogger.errorMe(e);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if(ean128Model.Count != null && ean128Model.Count > 0) {
|
||||
// //if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
// dto.setNumCnf(ean128Model.Count);
|
||||
// //} else {
|
||||
// // dto.setQtaTot(new BigDecimal(ean128Model.Count));
|
||||
// //}
|
||||
// }
|
||||
//
|
||||
// if (ean128Model.NetWeightKg != null && ean128Model.NetWeightKg > 0) {
|
||||
// dto.setQtaTot(new BigDecimal(ean128Model.NetWeightKg));
|
||||
// }
|
||||
//
|
||||
// if(dto.getQtaTot() != null && dto.getQtaTot().floatValue() > 0 && dto.getNumCnf() != null && dto.getNumCnf() > 0) {
|
||||
// dto.setQtaCnf(dto.getQtaTot().divide(new BigDecimal(dto.getNumCnf())));
|
||||
// }
|
||||
//
|
||||
// dto.setCanPartitaMagBeChanged(false);
|
||||
// dto.setCanDataScadBeChanged(false);
|
||||
// dto.setShouldAskDataScad(true);
|
||||
// }
|
||||
if(item.getTempPickData() != null) {
|
||||
PickingObjectDTO.PickData tmpPickData = item.getTempPickData();
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(tmpPickData.getBatchLot())) {
|
||||
dto.setBatchLot(tmpPickData.getBatchLot());
|
||||
}
|
||||
|
||||
if(tmpPickData.getDataScad() != null){
|
||||
dto.setDataScad(tmpPickData.getDataScad());
|
||||
dto.setShouldAskDataScad(true);
|
||||
}
|
||||
|
||||
boolean useQtaDaEvadere;
|
||||
|
||||
if(tmpPickData.getQtaTot() != null) {
|
||||
useQtaDaEvadere = qtaDaEvadere.floatValue() < tmpPickData.getQtaTot().floatValue();
|
||||
if(useQtaDaEvadere){
|
||||
dto.setQtaTot(qtaDaEvadere);
|
||||
dto.setMaxQta(qtaDaEvadere);
|
||||
} else {
|
||||
dto.setQtaTot(tmpPickData.getQtaTot());
|
||||
dto.setMaxQta(tmpPickData.getQtaTot());
|
||||
}
|
||||
|
||||
|
||||
if (tmpPickData.getQtaCnf() != null && useQtaDaEvadere) {
|
||||
dto.setQtaCnf(tmpPickData.getQtaCnf());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(dto.getQtaTot() != null && dto.getQtaTot().floatValue() > 0 && dto.getQtaCnf() != null && dto.getQtaCnf().floatValue() > 0) {
|
||||
dto.setNumCnf(dto.getQtaTot().divide(dto.getQtaCnf()).intValue());
|
||||
}
|
||||
|
||||
|
||||
dto.setCanPartitaMagBeChanged(false);
|
||||
dto.setCanDataScadBeChanged(false);
|
||||
|
||||
}
|
||||
|
||||
DialogInputQuantity.makeBase(mActivity, dto, true, value -> onOrdineRowDispatched(item, value)).show();
|
||||
}
|
||||
@ -827,6 +869,8 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
.setMtbAart(item.getMtbAart());
|
||||
|
||||
mArticoliInColloBottomSheetViewModel.mtbColt.get().getMtbColr().add(mtbColr);
|
||||
|
||||
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||
removeListFilter();
|
||||
|
||||
new StatusBarAlert.Builder(mActivity)
|
||||
|
||||
@ -37,8 +37,13 @@ public class DialogScanOrCreateLU {
|
||||
|
||||
private static RunnableArgs<MtbColt> mOnDialogDismiss;
|
||||
|
||||
private static MtbColt currentMtbColt;
|
||||
|
||||
|
||||
public static AlertDialog makeBase(final Context context, RunnableArgs<MtbColt> onDialogDismiss) {
|
||||
mOnDialogDismiss = null;
|
||||
currentMtbColt = null;
|
||||
|
||||
currentContext = context;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
@ -81,6 +86,9 @@ public class DialogScanOrCreateLU {
|
||||
|
||||
currentAlert.setOnDismissListener(dialog -> {
|
||||
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||
if(currentMtbColt == null) {
|
||||
mOnDialogDismiss.run(null);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@ -180,6 +188,7 @@ public class DialogScanOrCreateLU {
|
||||
}
|
||||
|
||||
private static void sendMtbColt(MtbColt mtbColtToSend, ProgressDialog progressDialog) {
|
||||
currentMtbColt = mtbColtToSend;
|
||||
progressDialog.dismiss();
|
||||
currentAlert.dismiss();
|
||||
mOnDialogDismiss.run(mtbColtToSend);
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -33,19 +33,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:background="?attr/colorPrimary">
|
||||
android:background="@color/full_white">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
app:titleTextColor="@android:color/white"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
|
||||
android:layout_width="match_parent">
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="false"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/full_white"
|
||||
android:layout_gravity="top">
|
||||
|
||||
|
||||
@ -33,19 +34,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:background="?attr/colorPrimary">
|
||||
android:background="@color/full_white">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
app:titleTextColor="@android:color/white"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
|
||||
android:layout_width="match_parent">
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/full_white"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@ -9,11 +9,11 @@
|
||||
<item
|
||||
android:id="@+id/nav_gallery"
|
||||
android:icon="@drawable/ic_menu_gallery"
|
||||
android:title="Gallery" />
|
||||
android:title="Spedizione" />
|
||||
<item
|
||||
android:id="@+id/nav_slideshow"
|
||||
android:icon="@drawable/ic_menu_slideshow"
|
||||
android:title="Slideshow" />
|
||||
android:title="Rettifica Giacenze" />
|
||||
<item
|
||||
android:id="@+id/nav_manage"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
|
||||
@ -19,15 +19,21 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppCompat.Dark.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="Light" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<!--<style name="AppTheme.AppCompat.Dark.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">-->
|
||||
<!--<item name="colorPrimary">@color/colorPrimary</item>-->
|
||||
<!--<item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
|
||||
<!--<item name="colorAccent">@color/colorAccent</item>-->
|
||||
|
||||
<!--<item name="windowActionBar">false</item>-->
|
||||
<!--<item name="windowNoTitle">true</item>-->
|
||||
<!--</style>-->
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark" />
|
||||
|
||||
@ -145,6 +145,11 @@ open class WaterfallToolbar : CardView {
|
||||
init(context, attrs)
|
||||
}
|
||||
|
||||
public fun resetElevation() {
|
||||
realPosition = Px(0)
|
||||
cardElevation = 0f
|
||||
}
|
||||
|
||||
private fun init(context: Context?, attrs: AttributeSet?) {
|
||||
// leave card corners square
|
||||
radius = 0f
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user