Prima implementazione Resi Cliente
This commit is contained in:
parent
b227d8f6ed
commit
24a0e17fd5
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -84,10 +84,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dynamicFeatures = [":dynamic__base",":dynamic_vgalimenti",":dynamic_ime"]
|
dynamicFeatures = [":dynamic__base",":dynamic_vgalimenti",":dynamic_ime"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -97,17 +93,17 @@ dependencies {
|
|||||||
})
|
})
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:17.0.0'
|
implementation 'com.google.firebase:firebase-core:17.0.1'
|
||||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||||
implementation 'com.google.firebase:firebase-perf:18.0.1'
|
implementation 'com.google.firebase:firebase-perf:18.0.1'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha07'
|
implementation 'com.google.android.material:material:1.1.0-alpha08'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha06'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta01'
|
||||||
implementation 'androidx.preference:preference:1.1.0-beta01'
|
implementation 'androidx.preference:preference:1.1.0-rc01'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
||||||
|
|||||||
@ -16,18 +16,22 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:usesCleartextTraffic="true"
|
android:theme="@style/AppTheme"
|
||||||
android:theme="@style/AppTheme">
|
android:usesCleartextTraffic="true">
|
||||||
|
<activity
|
||||||
|
android:name=".gest.ultime_consegne_cliente_picking.UltimeConsegneClientePickingActivity"
|
||||||
|
android:label="@string/activity_ultime_consegne_title"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Light" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustPan">
|
android:windowSoftInputMode="adjustPan">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY"/>
|
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
@ -82,7 +86,6 @@
|
|||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
android:resource="@xml/provider_paths" />
|
android:resource="@xml/provider_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@ -1,7 +1,12 @@
|
|||||||
package it.integry.integrywmsnative.core.REST;
|
package it.integry.integrywmsnative.core.REST;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
|
import java.sql.Date;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.REST.deserializer.DateDeserializer;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import retrofit2.Retrofit;
|
import retrofit2.Retrofit;
|
||||||
@ -47,10 +52,16 @@ public class RESTBuilder {
|
|||||||
|
|
||||||
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
|
Gson gson = new GsonBuilder()
|
||||||
|
.registerTypeAdapter(Date.class, new DateDeserializer())
|
||||||
|
.create();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.baseUrl(endpoint)
|
.baseUrl(endpoint)
|
||||||
.client(client)
|
.client(client)
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.core.REST.deserializer;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
|
public class DateDeserializer implements JsonDeserializer<Date> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date deserialize(JsonElement element, Type arg1, JsonDeserializationContext arg2) throws JsonParseException {
|
||||||
|
String date = element.getAsString();
|
||||||
|
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(date);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,28 +11,21 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
this
|
this
|
||||||
.addGroup(
|
.addGroup(
|
||||||
new MenuGroup()
|
new MenuGroup()
|
||||||
.setGroupText(R.string.general)
|
.setGroupText(R.string.purchase)
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_accettazione)
|
.setID(R.id.nav_accettazione)
|
||||||
.setTitleText(R.string.accettazione_title_fragment)
|
.setTitleText(R.string.accettazione_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione))
|
.setTitleIcon(R.drawable.ic_dashboard_accettazione))
|
||||||
|
).addGroup(
|
||||||
|
new MenuGroup()
|
||||||
|
.setGroupText(R.string.checkout)
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_spedizione)
|
.setID(R.id.nav_spedizione)
|
||||||
.setTitleText(R.string.vendita_title_fragment)
|
.setTitleText(R.string.vendita_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione))
|
.setTitleIcon(R.drawable.ic_dashboard_spedizione))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
|
||||||
.setID(R.id.nav_rettifica_giacenze)
|
|
||||||
.setTitleText(R.string.rettifica_giacenze_fragment_title)
|
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze))
|
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
|
||||||
.setID(R.id.nav_versamento_merce)
|
|
||||||
.setTitleText(R.string.versamento_merce_fragment_title)
|
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_versamento_merce))
|
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_free_picking)
|
.setID(R.id.nav_free_picking)
|
||||||
.setTitleText(R.string.free_picking)
|
.setTitleText(R.string.free_picking)
|
||||||
@ -42,10 +35,8 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setID(R.id.nav_resi_cliente)
|
.setID(R.id.nav_resi_cliente)
|
||||||
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
|
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
|
||||||
.setTitleIcon(R.drawable.ic_latest_delivery))
|
.setTitleIcon(R.drawable.ic_latest_delivery))
|
||||||
)
|
).addGroup(new MenuGroup()
|
||||||
.addGroup(
|
.setGroupText(R.string.manufacture)
|
||||||
new MenuGroup()
|
|
||||||
.setGroupText(R.string.production)
|
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_prod_ordine_produzione)
|
.setID(R.id.nav_prod_ordine_produzione)
|
||||||
@ -66,6 +57,22 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setID(R.id.nav_prod_recupero_materiale)
|
.setID(R.id.nav_prod_recupero_materiale)
|
||||||
.setTitleText(R.string.prod_recupero_materiale_title_fragment)
|
.setTitleText(R.string.prod_recupero_materiale_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_prod_recupero_materiale))
|
.setTitleIcon(R.drawable.ic_dashboard_prod_recupero_materiale))
|
||||||
|
)
|
||||||
|
.addGroup(
|
||||||
|
new MenuGroup()
|
||||||
|
.setGroupText(R.string.internal_handling)
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_versamento_merce)
|
||||||
|
.setTitleText(R.string.versamento_merce_fragment_title)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_versamento_merce))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_rettifica_giacenze)
|
||||||
|
.setTitleText(R.string.rettifica_giacenze_fragment_title)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze))
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,739 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
|
public class DtbDocr {
|
||||||
|
|
||||||
|
private String codAnag;
|
||||||
|
|
||||||
|
private String codDtip;
|
||||||
|
|
||||||
|
private String dataDoc;
|
||||||
|
|
||||||
|
private Integer idRiga;
|
||||||
|
|
||||||
|
private Integer numDoc;
|
||||||
|
|
||||||
|
private String serDoc;
|
||||||
|
|
||||||
|
private String codAliq;
|
||||||
|
|
||||||
|
private String codAnagComp;
|
||||||
|
|
||||||
|
private String codArtFor;
|
||||||
|
|
||||||
|
private String codCol;
|
||||||
|
|
||||||
|
private String codDtipComp;
|
||||||
|
|
||||||
|
private String codJcom;
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
|
||||||
|
private String codMdep;
|
||||||
|
|
||||||
|
private String codPromo;
|
||||||
|
|
||||||
|
private String codTagl;
|
||||||
|
|
||||||
|
private BigDecimal costoUnt;
|
||||||
|
|
||||||
|
private String dataDocComp;
|
||||||
|
|
||||||
|
private String dataOrd;
|
||||||
|
|
||||||
|
private String descrizione;
|
||||||
|
|
||||||
|
private String descrizioneEstesa;
|
||||||
|
|
||||||
|
private String flagEvasoForzato;
|
||||||
|
|
||||||
|
private BigDecimal importoRiga;
|
||||||
|
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
|
||||||
|
private Integer numDocComp;
|
||||||
|
|
||||||
|
private Integer numOrd;
|
||||||
|
|
||||||
|
private String partitaMag;
|
||||||
|
|
||||||
|
private BigDecimal percGest;
|
||||||
|
|
||||||
|
private BigDecimal percIspe;
|
||||||
|
|
||||||
|
private BigDecimal percOneri;
|
||||||
|
|
||||||
|
private BigDecimal percPromo;
|
||||||
|
|
||||||
|
private BigDecimal percProv;
|
||||||
|
|
||||||
|
private BigDecimal percProv2;
|
||||||
|
|
||||||
|
private BigDecimal pesoLordo;
|
||||||
|
|
||||||
|
private String posizione;
|
||||||
|
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
|
||||||
|
private BigDecimal qtaDoc;
|
||||||
|
|
||||||
|
private BigDecimal qtaDoc2;
|
||||||
|
|
||||||
|
private BigDecimal qtaDoc3;
|
||||||
|
|
||||||
|
private BigDecimal rapConv;
|
||||||
|
|
||||||
|
private Integer rigaOrd;
|
||||||
|
|
||||||
|
private BigDecimal sconto5;
|
||||||
|
|
||||||
|
private BigDecimal sconto6;
|
||||||
|
|
||||||
|
private BigDecimal sconto7;
|
||||||
|
|
||||||
|
private BigDecimal sconto8;
|
||||||
|
|
||||||
|
private String serDocComp;
|
||||||
|
|
||||||
|
private String untDoc;
|
||||||
|
|
||||||
|
private String untDoc2;
|
||||||
|
|
||||||
|
private String untDoc3;
|
||||||
|
|
||||||
|
private BigDecimal valGest;
|
||||||
|
|
||||||
|
private BigDecimal valIspe;
|
||||||
|
|
||||||
|
private BigDecimal valOneri;
|
||||||
|
|
||||||
|
private BigDecimal valPromo;
|
||||||
|
|
||||||
|
private BigDecimal valProv;
|
||||||
|
|
||||||
|
private BigDecimal valProv2;
|
||||||
|
|
||||||
|
private BigDecimal valUnt;
|
||||||
|
|
||||||
|
private BigDecimal valUntIva;
|
||||||
|
|
||||||
|
private String codMtip;
|
||||||
|
|
||||||
|
private String matricola;
|
||||||
|
|
||||||
|
private String dataInizComp;
|
||||||
|
|
||||||
|
private String dataFineComp;
|
||||||
|
|
||||||
|
private String codKit;
|
||||||
|
|
||||||
|
private String codAlis;
|
||||||
|
|
||||||
|
private String dataInsRow;
|
||||||
|
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
private int rigaKit;
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodDtip(String codDtip) {
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataDocS() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataDocD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataDocS());
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataDoc(String dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIdRiga() {
|
||||||
|
return idRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setIdRiga(Integer idRiga) {
|
||||||
|
this.idRiga = idRiga;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setNumDoc(Integer numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSerDoc(String serDoc) {
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAliq() {
|
||||||
|
return codAliq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodAliq(String codAliq) {
|
||||||
|
this.codAliq = codAliq;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnagComp() {
|
||||||
|
return codAnagComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodAnagComp(String codAnagComp) {
|
||||||
|
this.codAnagComp = codAnagComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodArtFor() {
|
||||||
|
return codArtFor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodArtFor(String codArtFor) {
|
||||||
|
this.codArtFor = codArtFor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodCol() {
|
||||||
|
return codCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodCol(String codCol) {
|
||||||
|
this.codCol = codCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtipComp() {
|
||||||
|
return codDtipComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodDtipComp(String codDtipComp) {
|
||||||
|
this.codDtipComp = codDtipComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodPromo() {
|
||||||
|
return codPromo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodPromo(String codPromo) {
|
||||||
|
this.codPromo = codPromo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTagl() {
|
||||||
|
return codTagl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodTagl(String codTagl) {
|
||||||
|
this.codTagl = codTagl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCostoUnt() {
|
||||||
|
return costoUnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCostoUnt(BigDecimal costoUnt) {
|
||||||
|
this.costoUnt = costoUnt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataDocComp() {
|
||||||
|
return dataDocComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataDocComp(String dataDocComp) {
|
||||||
|
this.dataDocComp = dataDocComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataOrd(String dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneEstesa() {
|
||||||
|
return descrizioneEstesa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDescrizioneEstesa(String descrizioneEstesa) {
|
||||||
|
this.descrizioneEstesa = descrizioneEstesa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagEvasoForzato() {
|
||||||
|
return flagEvasoForzato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setFlagEvasoForzato(String flagEvasoForzato) {
|
||||||
|
this.flagEvasoForzato = flagEvasoForzato;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getImportoRiga() {
|
||||||
|
return importoRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setImportoRiga(BigDecimal importoRiga) {
|
||||||
|
this.importoRiga = importoRiga;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumDocComp() {
|
||||||
|
return numDocComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setNumDocComp(Integer numDocComp) {
|
||||||
|
this.numDocComp = numDocComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercGest() {
|
||||||
|
return percGest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercGest(BigDecimal percGest) {
|
||||||
|
this.percGest = percGest;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercIspe() {
|
||||||
|
return percIspe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercIspe(BigDecimal percIspe) {
|
||||||
|
this.percIspe = percIspe;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercOneri() {
|
||||||
|
return percOneri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercOneri(BigDecimal percOneri) {
|
||||||
|
this.percOneri = percOneri;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercPromo() {
|
||||||
|
return percPromo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercPromo(BigDecimal percPromo) {
|
||||||
|
this.percPromo = percPromo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercProv() {
|
||||||
|
return percProv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercProv(BigDecimal percProv) {
|
||||||
|
this.percProv = percProv;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercProv2() {
|
||||||
|
return percProv2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPercProv2(BigDecimal percProv2) {
|
||||||
|
this.percProv2 = percProv2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordo() {
|
||||||
|
return pesoLordo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPesoLordo(BigDecimal pesoLordo) {
|
||||||
|
this.pesoLordo = pesoLordo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizione() {
|
||||||
|
return posizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setPosizione(String posizione) {
|
||||||
|
this.posizione = posizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDoc() {
|
||||||
|
return qtaDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setQtaDoc(BigDecimal qtaDoc) {
|
||||||
|
this.qtaDoc = qtaDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDoc2() {
|
||||||
|
return qtaDoc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setQtaDoc2(BigDecimal qtaDoc2) {
|
||||||
|
this.qtaDoc2 = qtaDoc2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDoc3() {
|
||||||
|
return qtaDoc3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setQtaDoc3(BigDecimal qtaDoc3) {
|
||||||
|
this.qtaDoc3 = qtaDoc3;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRapConv() {
|
||||||
|
return rapConv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setRapConv(BigDecimal rapConv) {
|
||||||
|
this.rapConv = rapConv;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrd() {
|
||||||
|
return rigaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setRigaOrd(Integer rigaOrd) {
|
||||||
|
this.rigaOrd = rigaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSconto5() {
|
||||||
|
return sconto5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSconto5(BigDecimal sconto5) {
|
||||||
|
this.sconto5 = sconto5;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSconto6() {
|
||||||
|
return sconto6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSconto6(BigDecimal sconto6) {
|
||||||
|
this.sconto6 = sconto6;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSconto7() {
|
||||||
|
return sconto7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSconto7(BigDecimal sconto7) {
|
||||||
|
this.sconto7 = sconto7;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSconto8() {
|
||||||
|
return sconto8;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSconto8(BigDecimal sconto8) {
|
||||||
|
this.sconto8 = sconto8;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDocComp() {
|
||||||
|
return serDocComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setSerDocComp(String serDocComp) {
|
||||||
|
this.serDocComp = serDocComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntDoc() {
|
||||||
|
return untDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setUntDoc(String untDoc) {
|
||||||
|
this.untDoc = untDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntDoc2() {
|
||||||
|
return untDoc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setUntDoc2(String untDoc2) {
|
||||||
|
this.untDoc2 = untDoc2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntDoc3() {
|
||||||
|
return untDoc3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setUntDoc3(String untDoc3) {
|
||||||
|
this.untDoc3 = untDoc3;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValGest() {
|
||||||
|
return valGest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValGest(BigDecimal valGest) {
|
||||||
|
this.valGest = valGest;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValIspe() {
|
||||||
|
return valIspe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValIspe(BigDecimal valIspe) {
|
||||||
|
this.valIspe = valIspe;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValOneri() {
|
||||||
|
return valOneri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValOneri(BigDecimal valOneri) {
|
||||||
|
this.valOneri = valOneri;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValPromo() {
|
||||||
|
return valPromo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValPromo(BigDecimal valPromo) {
|
||||||
|
this.valPromo = valPromo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValProv() {
|
||||||
|
return valProv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValProv(BigDecimal valProv) {
|
||||||
|
this.valProv = valProv;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValProv2() {
|
||||||
|
return valProv2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValProv2(BigDecimal valProv2) {
|
||||||
|
this.valProv2 = valProv2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValUnt() {
|
||||||
|
return valUnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValUnt(BigDecimal valUnt) {
|
||||||
|
this.valUnt = valUnt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValUntIva() {
|
||||||
|
return valUntIva;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setValUntIva(BigDecimal valUntIva) {
|
||||||
|
this.valUntIva = valUntIva;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMtip() {
|
||||||
|
return codMtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodMtip(String codMtip) {
|
||||||
|
this.codMtip = codMtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMatricola() {
|
||||||
|
return matricola;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setMatricola(String matricola) {
|
||||||
|
this.matricola = matricola;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataInizComp() {
|
||||||
|
return dataInizComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataInizComp(String dataInizComp) {
|
||||||
|
this.dataInizComp = dataInizComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataFineComp() {
|
||||||
|
return dataFineComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataFineComp(String dataFineComp) {
|
||||||
|
this.dataFineComp = dataFineComp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodKit() {
|
||||||
|
return codKit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodKit(String codKit) {
|
||||||
|
this.codKit = codKit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAlis() {
|
||||||
|
return codAlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setCodAlis(String codAlis) {
|
||||||
|
this.codAlis = codAlis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataInsRow() {
|
||||||
|
return dataInsRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setDataInsRow(String dataInsRow) {
|
||||||
|
this.dataInsRow = dataInsRow;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRigaKit() {
|
||||||
|
return rigaKit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbDocr setRigaKit(int rigaKit) {
|
||||||
|
this.rigaKit = rigaKit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto;
|
|
||||||
|
|
||||||
import androidx.databinding.Observable;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
|
||||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
|
||||||
|
|
||||||
public class CheckableConsegnaClienteDTO {
|
|
||||||
|
|
||||||
private ConsegnaClienteDTO mItem;
|
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
|
||||||
|
|
||||||
public CheckableConsegnaClienteDTO(ConsegnaClienteDTO item) {
|
|
||||||
this.mItem = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConsegnaClienteDTO getItem() {
|
|
||||||
return mItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableConsegnaClienteDTO setItem(ConsegnaClienteDTO item) {
|
|
||||||
this.mItem = item;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BindableBoolean getChecked() {
|
|
||||||
return checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isChecked() {
|
|
||||||
return checked.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableConsegnaClienteDTO setChecked(BindableBoolean checked) {
|
|
||||||
this.checked = checked;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckableConsegnaClienteDTO setCheckedValue(boolean value) {
|
|
||||||
this.checked.set(value);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void toggleCheck() {
|
|
||||||
this.checked.set(!this.checked.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -9,7 +9,9 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbDocr;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||||
|
|
||||||
@ -48,4 +50,46 @@ public class UltimeConsegneClienteRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void loadDocRowFromConsegna(List<ConsegnaClienteDTO> consegne, RunnableArgs<ArrayList<DtbDocr>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
StringBuilder sbWhereCond = new StringBuilder();
|
||||||
|
|
||||||
|
for(int i = 0; i < consegne.size(); i++) {
|
||||||
|
sbWhereCond.append(String.format("(data_doc = '%s' AND num_doc = %d AND ser_doc = '%s' AND cod_anag = '%s' AND cod_dtip = '%s')",
|
||||||
|
UtilityDate.formatDate(consegne.get(i).getDataDocD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH),
|
||||||
|
consegne.get(i).getNumDoc(),
|
||||||
|
consegne.get(i).getSerDoc(),
|
||||||
|
consegne.get(i).getCodAnag(),
|
||||||
|
consegne.get(i).getCodDtip()));
|
||||||
|
|
||||||
|
if(i < consegne.size()-1) sbWhereCond.append(" OR ");
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = "SELECT dtb_docr.* " +
|
||||||
|
"FROM dtb_docr " +
|
||||||
|
"INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart " +
|
||||||
|
"LEFT OUTER JOIN ctb_cont ON mtb_aart.cod_ccon_ricavi = ctb_cont.cod_ccon " +
|
||||||
|
"LEFT OUTER JOIN ctb_grup ON ctb_cont.cod_cgrp = ctb_grup.cod_cgrp " +
|
||||||
|
"WHERE " +
|
||||||
|
" (ctb_grup.sezione <> 1 OR ctb_grup.sezione IS NULL) AND " +
|
||||||
|
" ( " +
|
||||||
|
sbWhereCond.toString() +
|
||||||
|
" ) " +
|
||||||
|
"ORDER BY cod_mart";
|
||||||
|
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<DtbDocr>>() {}.getType();
|
||||||
|
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<DtbDocr>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ArrayList<DtbDocr> value) {
|
||||||
|
if(onComplete != null) onComplete.run(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Exception ex) {
|
||||||
|
if(onFailed != null) onFailed.run(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,11 @@ package it.integry.integrywmsnative.gest.ultime_consegne_cliente.viewmodel;
|
|||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteBinding;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.rest.UltimeConsegneClienteRESTConsumer;
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.rest.UltimeConsegneClienteRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente_picking.UltimeConsegneClientePickingActivity;
|
||||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||||
|
|
||||||
public class UltimeConsegneClienteViewModel {
|
public class UltimeConsegneClienteViewModel {
|
||||||
@ -22,11 +23,18 @@ public class UltimeConsegneClienteViewModel {
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
private FragmentMainUltimeConsegneClienteBinding mBinding;
|
private FragmentMainUltimeConsegneClienteBinding mBinding;
|
||||||
|
|
||||||
|
private List<ConsegnaClienteDTO> mItems;
|
||||||
|
|
||||||
public UltimeConsegneClienteViewModel(Context context, FragmentMainUltimeConsegneClienteBinding binding) {
|
public UltimeConsegneClienteViewModel(Context context, FragmentMainUltimeConsegneClienteBinding binding) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
this.mBinding = binding;
|
this.mBinding = binding;
|
||||||
|
|
||||||
this.initList();
|
this.initList();
|
||||||
|
|
||||||
|
this.mBinding.mainFab.hide();
|
||||||
|
this.mBinding.mainFab.setOnClickListener(v -> {
|
||||||
|
dispatchConsegne();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +47,7 @@ public class UltimeConsegneClienteViewModel {
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
consegne -> {
|
consegne -> {
|
||||||
|
this.mItems = consegne;
|
||||||
this.initDataAdapter(consegne);
|
this.initDataAdapter(consegne);
|
||||||
|
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -49,19 +58,45 @@ public class UltimeConsegneClienteViewModel {
|
|||||||
|
|
||||||
private void initDataAdapter(ArrayList<ConsegnaClienteDTO> dataset) {
|
private void initDataAdapter(ArrayList<ConsegnaClienteDTO> dataset) {
|
||||||
UltimeConsegneMainListAdapter adapter = new UltimeConsegneMainListAdapter(mContext, dataset);
|
UltimeConsegneMainListAdapter adapter = new UltimeConsegneMainListAdapter(mContext, dataset);
|
||||||
adapter.setOnItemClickListener(consegna -> {
|
adapter.setOnSelectionChanged(this::onSingleSelectionChanged);
|
||||||
Toast.makeText(mContext, String.format("Selezionato doc n° %d del %s", consegna.getNumDoc(), consegna.getDataDocS()), Toast.LENGTH_SHORT).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
mBinding.recyclerView.setHasFixedSize(true);
|
mBinding.recyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
|
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
|
||||||
|
|
||||||
mBinding.recyclerView.setAdapter(adapter);
|
mBinding.recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
mBinding.fastscroll.setRecyclerView(mBinding.recyclerView);
|
mBinding.fastscroll.setRecyclerView(mBinding.recyclerView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void onSingleSelectionChanged(ConsegnaClienteDTO dto) {
|
||||||
|
List<ConsegnaClienteDTO> selectedOrders = getSelectedItems();
|
||||||
|
|
||||||
|
if(dto.isSelected()) {
|
||||||
|
Stream.of(selectedOrders)
|
||||||
|
.filter(x -> !x.getRagSoc().equalsIgnoreCase(dto.getRagSoc()))
|
||||||
|
.forEach(x -> x.setSelected(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectedOrders != null && selectedOrders.size() > 0) {
|
||||||
|
mBinding.mainFab.show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mBinding.mainFab.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ConsegnaClienteDTO> getSelectedItems() {
|
||||||
|
return Stream.of(this.mItems)
|
||||||
|
.filter(ConsegnaClienteDTO::isSelected)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void dispatchConsegne() {
|
||||||
|
List<ConsegnaClienteDTO> selectedConsegne = getSelectedItems();
|
||||||
|
|
||||||
|
UltimeConsegneClientePickingActivity.startActivity(mContext, selectedConsegne);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,17 +16,16 @@ import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListHeaderBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListHeaderBinding;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListSingleItemBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListSingleItemBinding;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto.CheckableConsegnaClienteDTO;
|
|
||||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||||
import it.integry.integrywmsnative.ui.fastscroll.SectionTitleProvider;
|
import it.integry.integrywmsnative.ui.fastscroll.SectionTitleProvider;
|
||||||
|
|
||||||
@ -36,7 +35,7 @@ public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<
|
|||||||
private List<ConsegnaClienteDTO> mDataset;
|
private List<ConsegnaClienteDTO> mDataset;
|
||||||
private ArrayList<String> mSectionTitleItems;
|
private ArrayList<String> mSectionTitleItems;
|
||||||
|
|
||||||
private OnItemClickListener onItemClickListener;
|
private RunnableArgs<ConsegnaClienteDTO> mOnSelectionChanged;
|
||||||
|
|
||||||
private TextDrawable.IShapeBuilder smallIconBuilder;
|
private TextDrawable.IShapeBuilder smallIconBuilder;
|
||||||
private TextDrawable.IShapeBuilder mediumIconBuilder;
|
private TextDrawable.IShapeBuilder mediumIconBuilder;
|
||||||
@ -48,11 +47,6 @@ public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public interface OnItemClickListener {
|
|
||||||
void onItemClicked(ConsegnaClienteDTO consegna);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
FragmentMainUltimeConsegneClienteListHeaderBinding mBinding;
|
FragmentMainUltimeConsegneClienteListHeaderBinding mBinding;
|
||||||
@ -150,6 +144,8 @@ public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<
|
|||||||
public void onBindItemViewHolder(final SingleItemViewHolder holder, final int position) {
|
public void onBindItemViewHolder(final SingleItemViewHolder holder, final int position) {
|
||||||
final ConsegnaClienteDTO consegna = this.mDataset.get(position);
|
final ConsegnaClienteDTO consegna = this.mDataset.get(position);
|
||||||
|
|
||||||
|
holder.mBinding.setConsegna(consegna);
|
||||||
|
|
||||||
holder.mBinding.descriptionMain.setText(UtilityString.isNullOrEmpty(consegna.getIndirizzo()) ? "" : consegna.getIndirizzo());
|
holder.mBinding.descriptionMain.setText(UtilityString.isNullOrEmpty(consegna.getIndirizzo()) ? "" : consegna.getIndirizzo());
|
||||||
|
|
||||||
if(consegna.getDataInizTraspD() != null) {
|
if(consegna.getDataInizTraspD() != null) {
|
||||||
@ -188,9 +184,13 @@ public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<
|
|||||||
UtilityExceptions.defaultException(mContext, ex);
|
UtilityExceptions.defaultException(mContext, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.mBinding.getRoot().setOnClickListener(l -> {
|
|
||||||
if(onItemClickListener != null) onItemClickListener.onItemClicked(consegna);
|
holder.mBinding.getRoot().setOnClickListener(v -> {
|
||||||
|
consegna.setSelected(!consegna.isSelected());
|
||||||
|
|
||||||
|
if(this.mOnSelectionChanged != null) mOnSelectionChanged.run(consegna);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -214,8 +214,8 @@ public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
public void setOnSelectionChanged(RunnableArgs<ConsegnaClienteDTO> mSelectionChanged) {
|
||||||
this.onItemClickListener = onItemClickListener;
|
this.mOnSelectionChanged = mSelectionChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,194 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.ultime_consegne_cliente_picking;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
|
import com.tfb.fbtoast.FBToast;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
|
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbDocr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
|
import it.integry.integrywmsnative.databinding.ActivityUltimeConsegneClientePickingBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.rest.UltimeConsegneClienteRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente_picking.core.UltimeConsegneClientePickingListAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||||
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
|
|
||||||
|
public class UltimeConsegneClientePickingActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private List<ConsegnaClienteDTO> consegneToPick;
|
||||||
|
private List<DtbDocr> mDtbDocrList;
|
||||||
|
|
||||||
|
private ActivityUltimeConsegneClientePickingBinding mBinding;
|
||||||
|
|
||||||
|
public ObservableField<MtbColt> currentMtbColt;
|
||||||
|
|
||||||
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
|
||||||
|
public static void startActivity(Context context, List<ConsegnaClienteDTO> consegnaClienteDTOList) {
|
||||||
|
String consegneCacheKey = DataCache.addItem(consegnaClienteDTOList);
|
||||||
|
|
||||||
|
Intent intent = new Intent(context, UltimeConsegneClientePickingActivity.class);
|
||||||
|
intent.putExtra("key", consegneCacheKey);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
mBinding = DataBindingUtil.setContentView(this, R.layout.activity_ultime_consegne_cliente_picking);
|
||||||
|
mBinding.setViewmodel(this);
|
||||||
|
|
||||||
|
consegneToPick = DataCache.retrieveItem(getIntent().getStringExtra("key"));
|
||||||
|
|
||||||
|
this.initView();
|
||||||
|
|
||||||
|
this.initDatiPicking();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onSupportNavigateUp() {
|
||||||
|
onBackPressed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
// if(mArticoliInColloBottomSheetViewModel.isExpanded()){
|
||||||
|
// mArticoliInColloBottomSheetViewModel.collapse();
|
||||||
|
// } else if(mVenditaOrdineInevasoViewModel.thereIsAnOpenedUL()) {
|
||||||
|
// mArticoliInColloBottomSheetViewModel.closeCurrentUL(() -> {
|
||||||
|
// BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
// super.onBackPressed();
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
super.onBackPressed();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessfull(this::onScanSuccessful)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(this, ex, false)));
|
||||||
|
|
||||||
|
|
||||||
|
setSupportActionBar(this.mBinding.toolbar);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
this.mBinding.elevatedToolbar.setRecyclerView(this.mBinding.mainList);
|
||||||
|
|
||||||
|
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(this);
|
||||||
|
UltimeConsegneClienteRESTConsumer.loadDocRowFromConsegna(consegneToPick, dtbDocrToPick -> {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
this.initList(dtbDocrToPick);
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(this, ex, progressDialog);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initList(List<DtbDocr> dtbDocrList) {
|
||||||
|
this.mDtbDocrList = dtbDocrList;
|
||||||
|
|
||||||
|
UltimeConsegneClientePickingListAdapter adapter = new UltimeConsegneClientePickingListAdapter(this, dtbDocrList);
|
||||||
|
|
||||||
|
this.mBinding.mainList.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
this.mBinding.mainList.setAdapter(adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initDatiPicking() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void onScanSuccessful(BarcodeScanDTO data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createNewUL() {
|
||||||
|
this.createNewUL(null, null, null, false, true, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createNewUL(Integer customNumCollo, String customSerCollo, ProgressDialog progress, boolean disablePrint, boolean closeProgress, Runnable onComplete) {
|
||||||
|
this.mBinding.mainFab.close(true);
|
||||||
|
|
||||||
|
if (progress == null){
|
||||||
|
progress = UtilityProgress.createDefaultProgressDialog(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
MtbColt mtbColt = new MtbColt();
|
||||||
|
mtbColt.initDefaultFields();
|
||||||
|
// mtbColt .setGestione(defaultGestioneOfUL)
|
||||||
|
// .setSegno(-1)
|
||||||
|
// .setRifOrd(defaultRifOrdOfUL)
|
||||||
|
// .setNumOrd(defaultNumOrdOfUL)
|
||||||
|
// .setDataOrdD(defaultDataOrdOfUL)
|
||||||
|
// .setCodAnag(defaultCodAnagOfUL)
|
||||||
|
// .setCodMdep(defaultCodMdepOfUL)
|
||||||
|
// .setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
//
|
||||||
|
// if(defaultGestioneOfUL == GestioneEnum.LAVORAZIONE) {
|
||||||
|
// mtbColt.setPosizione(defaultCodJFasOfUL);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if(customNumCollo != null) {
|
||||||
|
// mtbColt.setNumCollo(customNumCollo);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if(!UtilityString.isNullOrEmpty(customSerCollo)) {
|
||||||
|
// mtbColt.setSerCollo(customSerCollo);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// mtbColt.generaFiltroOrdineFromDTO(defaultFiltroOrdine);
|
||||||
|
//
|
||||||
|
// ProgressDialog finalProgress = progress;
|
||||||
|
// ColliMagazzinoRESTConsumer.saveCollo(mtbColt, value -> {
|
||||||
|
//
|
||||||
|
// mtbColt
|
||||||
|
// .setNumCollo(value.getNumCollo())
|
||||||
|
// .setDataCollo(value.getDataColloS());
|
||||||
|
// mtbColtSessionID = ColliDataRecover.startNewSession(mtbColt);
|
||||||
|
//
|
||||||
|
// value
|
||||||
|
// .setDisablePrint(disablePrint)
|
||||||
|
// .setMtbColr(new ObservableArrayList<>());
|
||||||
|
//
|
||||||
|
// setULToCurrentContext(value);
|
||||||
|
//
|
||||||
|
// if(closeProgress) finalProgress.dismiss();
|
||||||
|
//
|
||||||
|
// FBToast.successToast(this, getResources().getString(R.string.data_saved) ,FBToast.LENGTH_SHORT);
|
||||||
|
//
|
||||||
|
// if(onComplete != null) onComplete.run();
|
||||||
|
//
|
||||||
|
// }, ex -> {
|
||||||
|
// UtilityExceptions.defaultException(mActivity, ex, finalProgress);
|
||||||
|
// });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.ultime_consegne_cliente_picking.core;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.android.gms.common.internal.service.Common;
|
||||||
|
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbDocr;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.UltimeConsegneMainListItemBinding;
|
||||||
|
import it.integry.integrywmsnative.databinding.UltimeConsegneMainListItemHeaderBinding;
|
||||||
|
|
||||||
|
public class UltimeConsegneClientePickingListAdapter extends SectionedRecyclerViewAdapter<UltimeConsegneClientePickingListAdapter.SubheaderHolder, UltimeConsegneClientePickingListAdapter.SingleItemViewHolder> {
|
||||||
|
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private List<DtbDocr> mDataset;
|
||||||
|
private LayoutInflater mInflater;
|
||||||
|
|
||||||
|
|
||||||
|
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
UltimeConsegneMainListItemHeaderBinding mBinding;
|
||||||
|
|
||||||
|
SubheaderHolder(UltimeConsegneMainListItemHeaderBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class SingleItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
UltimeConsegneMainListItemBinding mBinding;
|
||||||
|
|
||||||
|
SingleItemViewHolder(UltimeConsegneMainListItemBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public UltimeConsegneClientePickingListAdapter(Context context, List<DtbDocr> data) {
|
||||||
|
this.mContext = context;
|
||||||
|
this.mInflater = LayoutInflater.from(context);
|
||||||
|
this.mDataset = Stream.of(data)
|
||||||
|
.sortBy(x -> x.getNumDoc() + " " + x.getDataDocS() + " " + x.getCodDtip() + " " + x.getSerDoc() + " " + x.getCodAnag())
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
UltimeConsegneMainListItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.ultime_consegne_main_list__item, parent, false);
|
||||||
|
return new SingleItemViewHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
UltimeConsegneMainListItemHeaderBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.ultime_consegne_main_list__item_header, parent, false);
|
||||||
|
return new SubheaderHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindItemViewHolder(final SingleItemViewHolder holder, final int position) {
|
||||||
|
final DtbDocr dtbDocr = this.mDataset.get(position);
|
||||||
|
|
||||||
|
holder.mBinding.badge1.setText(dtbDocr.getCodMart());
|
||||||
|
holder.mBinding.qtaEvasa.setText(String.valueOf(0));
|
||||||
|
holder.mBinding.qtaTot.setText(UtilityNumber.decimalToString(dtbDocr.getQtaDoc()));
|
||||||
|
holder.mBinding.descrizione.setText(UtilityString.isNullOrEmpty(dtbDocr.getDescrizioneEstesa()) ? dtbDocr.getDescrizioneEstesa() : dtbDocr.getDescrizione());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindSubheaderViewHolder(SubheaderHolder subheaderHolder, int nextItemPosition) {
|
||||||
|
DtbDocr nextDtbDocr = this.mDataset.get(nextItemPosition);
|
||||||
|
subheaderHolder.mBinding.descrizione.setText(nextDtbDocr.getCodDtip() + " - N° " + nextDtbDocr.getNumDoc() + " del " + UtilityDate.formatDate(nextDtbDocr.getDataDocD(), UtilityDate.COMMONS_DATE_FORMATS.DM_HUMAN));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlaceSubheaderBetweenItems(int position) {
|
||||||
|
|
||||||
|
DtbDocr compare1 = this.mDataset.get(position);
|
||||||
|
DtbDocr compare2 = this.mDataset.get(position + 1);
|
||||||
|
|
||||||
|
if( !compare1.getDataDocS().equalsIgnoreCase(compare2.getDataDocS()) ||
|
||||||
|
!compare1.getSerDoc().equalsIgnoreCase(compare2.getSerDoc()) ||
|
||||||
|
!compare1.getNumDoc().equals(compare2.getNumDoc()) ||
|
||||||
|
!compare1.getCodAnag().equalsIgnoreCase(compare2.getCodAnag()) ||
|
||||||
|
!compare1.getCodDtip().equalsIgnoreCase(compare2.getCodDtip())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemSize() {
|
||||||
|
return this.mDataset.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import java.text.ParseException;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@ -23,8 +24,17 @@ public class ConsegnaClienteDTO {
|
|||||||
private String compilatoDa;
|
private String compilatoDa;
|
||||||
private String rifOrd;
|
private String rifOrd;
|
||||||
private String dataOrd;
|
private String dataOrd;
|
||||||
|
private Integer numOrd;
|
||||||
private String dataInizTrasp;
|
private String dataInizTrasp;
|
||||||
|
|
||||||
|
|
||||||
|
public BindableBoolean selected;
|
||||||
|
|
||||||
|
public ConsegnaClienteDTO() {
|
||||||
|
this.selected = new BindableBoolean(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
}
|
}
|
||||||
@ -142,6 +152,15 @@ public class ConsegnaClienteDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConsegnaClienteDTO setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDataInizTraspS() {
|
public String getDataInizTraspS() {
|
||||||
return dataInizTrasp;
|
return dataInizTrasp;
|
||||||
}
|
}
|
||||||
@ -154,4 +173,17 @@ public class ConsegnaClienteDTO {
|
|||||||
this.dataInizTrasp = dataInizTrasp;
|
this.dataInizTrasp = dataInizTrasp;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getSelected() {
|
||||||
|
return this.selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSelected() {
|
||||||
|
return this.selected.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConsegnaClienteDTO setSelected(boolean selected) {
|
||||||
|
this.selected.set(selected);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -854,19 +854,9 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
if(closeProgress) finalProgress.dismiss();
|
if(closeProgress) finalProgress.dismiss();
|
||||||
|
|
||||||
FBToast.successToast(mActivity,mActivity.getResources().getString(R.string.data_saved) ,FBToast.LENGTH_SHORT);
|
FBToast.successToast(mActivity, mActivity.getResources().getString(R.string.data_saved) ,FBToast.LENGTH_SHORT);
|
||||||
|
|
||||||
|
|
||||||
// new StatusBarAlert.Builder(mActivity)
|
|
||||||
// .autoHide(true)
|
|
||||||
// .withDuration(2500)
|
|
||||||
// .showProgress(false)
|
|
||||||
// .withText(R.string.data_saved)
|
|
||||||
// .withAlertColor(R.color.mainGreen)
|
|
||||||
// .build();
|
|
||||||
|
|
||||||
if(onComplete != null) onComplete.run();
|
if(onComplete != null) onComplete.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -181,8 +181,8 @@
|
|||||||
fab:menu_animationDelayPerItem="50"
|
fab:menu_animationDelayPerItem="50"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
fab:menu_buttonSpacing="0dp"
|
fab:menu_buttonSpacing="0dp"
|
||||||
fab:menu_colorNormal="@color/colorPrimary"
|
fab:menu_colorNormal="@color/colorSecondary"
|
||||||
fab:menu_colorPressed="@color/colorPrimaryDark"
|
fab:menu_colorPressed="@color/colorSecondaryDark"
|
||||||
fab:menu_fab_size="normal"
|
fab:menu_fab_size="normal"
|
||||||
fab:menu_labels_colorNormal="@color/white"
|
fab:menu_labels_colorNormal="@color/white"
|
||||||
fab:menu_labels_colorPressed="@color/white_pressed"
|
fab:menu_labels_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@ -197,8 +197,8 @@
|
|||||||
fab:menu_animationDelayPerItem="50"
|
fab:menu_animationDelayPerItem="50"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
fab:menu_buttonSpacing="0dp"
|
fab:menu_buttonSpacing="0dp"
|
||||||
fab:menu_colorNormal="@color/colorPrimary"
|
fab:menu_colorNormal="@color/colorSecondary"
|
||||||
fab:menu_colorPressed="@color/colorPrimaryDark"
|
fab:menu_colorPressed="@color/colorSecondaryDark"
|
||||||
fab:menu_fab_size="normal"
|
fab:menu_fab_size="normal"
|
||||||
fab:menu_labels_colorNormal="@color/white"
|
fab:menu_labels_colorNormal="@color/white"
|
||||||
fab:menu_labels_colorPressed="@color/white_pressed"
|
fab:menu_labels_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||||
|
<data>
|
||||||
|
<import type="android.view.View" />
|
||||||
|
<variable
|
||||||
|
name="viewmodel"
|
||||||
|
type="it.integry.integrywmsnative.gest.ultime_consegne_cliente_picking.UltimeConsegneClientePickingActivity" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/full_white"
|
||||||
|
tools:context=".gest.ultime_consegne_cliente_picking.UltimeConsegneClientePickingActivity">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<it.integry.integrywmsnative.ui.ElevatedToolbar
|
||||||
|
android:id="@+id/elevated_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?actionBarSize"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
style="@style/MaterialToolbar.Event">
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/main_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/elevated_toolbar" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.github.clans.fab.FloatingActionMenu
|
||||||
|
android:id="@+id/main_fab"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:visibility="@{viewmodel.currentMtbColt == null ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
||||||
|
fab:menu_animationDelayPerItem="50"
|
||||||
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
|
fab:menu_buttonSpacing="0dp"
|
||||||
|
fab:menu_colorNormal="@color/colorSecondary"
|
||||||
|
fab:menu_colorPressed="@color/colorSecondaryDark"
|
||||||
|
fab:menu_fab_size="normal"
|
||||||
|
fab:menu_labels_colorNormal="@color/white"
|
||||||
|
fab:menu_labels_colorPressed="@color/white_pressed"
|
||||||
|
fab:menu_labels_colorRipple="#66FFFFFF"
|
||||||
|
fab:menu_labels_cornerRadius="3dp"
|
||||||
|
fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
|
||||||
|
fab:menu_labels_margin="0dp"
|
||||||
|
fab:menu_labels_padding="8dp"
|
||||||
|
fab:menu_labels_paddingBottom="4dp"
|
||||||
|
fab:menu_labels_paddingLeft="8dp"
|
||||||
|
fab:menu_labels_paddingRight="8dp"
|
||||||
|
fab:menu_labels_paddingTop="4dp"
|
||||||
|
fab:menu_labels_position="left"
|
||||||
|
fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
|
||||||
|
fab:menu_labels_showShadow="true"
|
||||||
|
fab:menu_labels_textColor="@color/black_semi_transparent"
|
||||||
|
fab:menu_labels_textSize="18sp"
|
||||||
|
fab:menu_openDirection="up"
|
||||||
|
fab:menu_shadowColor="#66000000"
|
||||||
|
fab:menu_shadowRadius="4dp"
|
||||||
|
fab:menu_shadowXOffset="1dp"
|
||||||
|
fab:menu_shadowYOffset="3dp"
|
||||||
|
fab:menu_showShadow="true">
|
||||||
|
|
||||||
|
<com.github.clans.fab.FloatingActionButton
|
||||||
|
android:id="@+id/vendita_ordine_inevaso_fab_item2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_add_24dp"
|
||||||
|
app:fab_colorNormal="@color/white"
|
||||||
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
|
app:fab_colorRipple="#66FFFFFF"
|
||||||
|
app:onClick="@{() -> viewmodel.createNewUL()}"
|
||||||
|
fab:fab_label="@string/action_create_ul" />
|
||||||
|
|
||||||
|
</com.github.clans.fab.FloatingActionMenu>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -21,8 +21,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -203,8 +202,8 @@
|
|||||||
fab:menu_animationDelayPerItem="50"
|
fab:menu_animationDelayPerItem="50"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
fab:menu_buttonSpacing="0dp"
|
fab:menu_buttonSpacing="0dp"
|
||||||
fab:menu_colorNormal="@color/colorPrimary"
|
fab:menu_colorNormal="@color/colorSecondary"
|
||||||
fab:menu_colorPressed="@color/colorPrimaryDark"
|
fab:menu_colorPressed="@color/colorSecondaryDark"
|
||||||
fab:menu_fab_size="normal"
|
fab:menu_fab_size="normal"
|
||||||
fab:menu_labels_colorNormal="@color/white"
|
fab:menu_labels_colorNormal="@color/white"
|
||||||
fab:menu_labels_colorPressed="@color/white_pressed"
|
fab:menu_labels_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@ -55,10 +55,12 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/toolbar_title_left"
|
android:id="@+id/toolbar_title_left"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:gravity="left"
|
||||||
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"/>
|
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.SearchView
|
<androidx.appcompat.widget.SearchView
|
||||||
@ -69,27 +71,30 @@
|
|||||||
app:defaultQueryHint="@string/search"
|
app:defaultQueryHint="@string/search"
|
||||||
app:iconifiedByDefault="true"
|
app:iconifiedByDefault="true"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:tint="@android:color/black"/>
|
android:tint="@android:color/black"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/main_filter"
|
android:id="@+id/main_filter"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:src="@drawable/ic_search_black_24dp"
|
android:src="@drawable/ic_search_black_24dp"
|
||||||
android:tint="@android:color/black"/>
|
android:tint="@android:color/black"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/main_select_all"
|
android:id="@+id/main_select_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:layout_toStartOf="@id/main_filter"
|
||||||
android:src="@drawable/ic_check_black_24dp"
|
android:src="@drawable/ic_check_black_24dp"
|
||||||
android:tint="@android:color/black"/>
|
android:tint="@android:color/black"/>
|
||||||
|
|
||||||
|
|||||||
@ -88,6 +88,7 @@
|
|||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
android:tint="@android:color/white"
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
app:srcCompat="@drawable/ic_check_black_24dp" />
|
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|||||||
@ -277,6 +277,7 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:tint="@android:color/white"
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||||
android:onClick="@{() -> viewmodel.closeLU(true, true)}"
|
android:onClick="@{() -> viewmodel.closeLU(true, true)}"
|
||||||
android:visibility="@{viewmodel.isFabVisible.get() ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewmodel.isFabVisible.get() ? View.VISIBLE : View.GONE}"
|
||||||
|
|||||||
@ -10,12 +10,17 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<FrameLayout
|
||||||
android:background="@android:color/white"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/white"
|
||||||
tools:context=".gest.ultime_consegne_cliente.UltimeConsegneClienteFragment">
|
tools:context=".gest.ultime_consegne_cliente.UltimeConsegneClienteFragment">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:background="@android:color/white"
|
android:background="@android:color/white"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -33,5 +38,19 @@
|
|||||||
android:layout_alignParentEnd="true"/>
|
android:layout_alignParentEnd="true"/>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/main_fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
|
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||||
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -18,14 +18,24 @@
|
|||||||
<!--card_view:cardCornerRadius="4dp"-->
|
<!--card_view:cardCornerRadius="4dp"-->
|
||||||
<!--card_view:cardElevation="4dp">-->
|
<!--card_view:cardElevation="4dp">-->
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="4dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="4dp">
|
android:paddingBottom="8dp"
|
||||||
|
android:background="@color/colorAccent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
@ -37,6 +47,8 @@
|
|||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
tools:text="Title here"/>
|
tools:text="Title here"/>
|
||||||
|
|
||||||
<!--<com.google.android.material.button.MaterialButton-->
|
<!--<com.google.android.material.button.MaterialButton-->
|
||||||
@ -50,6 +62,7 @@
|
|||||||
<!--android:text="@string/action_select_all"/>-->
|
<!--android:text="@string/action_select_all"/>-->
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
<!--</androidx.cardview.widget.CardView>-->
|
<!--</androidx.cardview.widget.CardView>-->
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
<data>
|
<data>
|
||||||
<import type="it.integry.integrywmsnative.R" />
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
<variable
|
<variable
|
||||||
name="checkableItem"
|
name="consegna"
|
||||||
type="it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto.CheckableConsegnaClienteDTO" />
|
type="it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -13,14 +13,16 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_checked_layout"
|
||||||
|
app:backgroundTintResID="@{consegna.selected.get() ? R.color.bg_checked_layout : android.R.color.transparent}" >
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/start_icon"
|
android:id="@+id/start_icon"
|
||||||
|
|||||||
@ -86,6 +86,7 @@
|
|||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
android:tint="@android:color/white"
|
android:tint="@android:color/white"
|
||||||
|
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
app:srcCompat="@drawable/ic_check_black_24dp" />
|
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout>
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="it.integry.integrywmsnative.core.model.MtbColt"></import>
|
<import type="it.integry.integrywmsnative.core.model.MtbColt"></import>
|
||||||
@ -27,6 +27,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
89
app/src/main/res/layout/ultime_consegne_main_list__item.xml
Normal file
89
app/src/main/res/layout/ultime_consegne_main_list__item.xml
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:background="@drawable/ripple_effect"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/badge1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="BADGE 1"
|
||||||
|
android:background="@drawable/badge1_round_corner"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="right">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qta_evasa"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/green_700"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="QTA"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:text=" / "/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qta_tot"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
tools:text="QTA"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/descrizione"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
tools:text="DESCRIZIONE"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/mainGreen">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/descrizione"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="DESCRIZIONE"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</layout>
|
||||||
@ -145,6 +145,7 @@
|
|||||||
<string name="activity_lista_bancali_title">Lista UL</string>
|
<string name="activity_lista_bancali_title">Lista UL</string>
|
||||||
<string name="activity_contenuto_bancale_title">Contenuto UL</string>
|
<string name="activity_contenuto_bancale_title">Contenuto UL</string>
|
||||||
<string name="activity_vendita_inevaso_title">Spedizione merce</string>
|
<string name="activity_vendita_inevaso_title">Spedizione merce</string>
|
||||||
|
<string name="activity_ultime_consegne_title">Ultime consegne</string>
|
||||||
|
|
||||||
<string name="lu_number_data_text"><![CDATA[UL n° <b>%d</b> - <b>%s</b>]]></string>
|
<string name="lu_number_data_text"><![CDATA[UL n° <b>%d</b> - <b>%s</b>]]></string>
|
||||||
<string name="lu_number_text"><![CDATA[UL n° %d]]></string>
|
<string name="lu_number_text"><![CDATA[UL n° %d]]></string>
|
||||||
@ -228,7 +229,11 @@
|
|||||||
<string name="action_select_all">Seleziona tutto</string>
|
<string name="action_select_all">Seleziona tutto</string>
|
||||||
|
|
||||||
<string name="general">Generale</string>
|
<string name="general">Generale</string>
|
||||||
|
<string name="purchase">Acquisti</string>
|
||||||
|
<string name="checkout">Vendita</string>
|
||||||
|
<string name="manufacture">Lavorazione</string>
|
||||||
<string name="production">Produzione</string>
|
<string name="production">Produzione</string>
|
||||||
|
<string name="internal_handling">Movimentazione interna</string>
|
||||||
<string name="prod_ordine_produzione_title_fragment">Accettazione da produzione</string>
|
<string name="prod_ordine_produzione_title_fragment">Accettazione da produzione</string>
|
||||||
<string name="prod_ordine_lavorazione_title_fragment">Picking per lavorazione</string>
|
<string name="prod_ordine_lavorazione_title_fragment">Picking per lavorazione</string>
|
||||||
<string name="prod_versamento_materiale_title_fragment">Versamento materiale</string>
|
<string name="prod_versamento_materiale_title_fragment">Versamento materiale</string>
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#1A73E8</color>
|
<color name="colorPrimary">#1A73E8</color>
|
||||||
<color name="colorPrimaryDark">#0049b4</color>
|
<color name="colorPrimaryDark">#0049b4</color>
|
||||||
|
<color name="colorSecondary">#4db6ac</color>
|
||||||
|
<color name="colorSecondaryDark">#459B90</color>
|
||||||
<color name="colorAccent">#387ef5</color>
|
<color name="colorAccent">#387ef5</color>
|
||||||
<color name="colorRipple">#3f3f51b5</color>
|
<color name="colorRipple">#3f3f51b5</color>
|
||||||
<color name="colorPrimaryGray">#757575</color>
|
<color name="colorPrimaryGray">#757575</color>
|
||||||
|
|||||||
@ -146,6 +146,7 @@
|
|||||||
<string name="activity_lista_bancali_title">LU List</string>
|
<string name="activity_lista_bancali_title">LU List</string>
|
||||||
<string name="activity_contenuto_bancale_title">LU Content</string>
|
<string name="activity_contenuto_bancale_title">LU Content</string>
|
||||||
<string name="activity_vendita_inevaso_title">Shipping goods</string>
|
<string name="activity_vendita_inevaso_title">Shipping goods</string>
|
||||||
|
<string name="activity_ultime_consegne_title">Latest deliveries</string>
|
||||||
|
|
||||||
<string name="lu_number_data_text"><![CDATA[LU n° <b>%d</b> - <b>%s</b>]]></string>
|
<string name="lu_number_data_text"><![CDATA[LU n° <b>%d</b> - <b>%s</b>]]></string>
|
||||||
<string name="lu_number_text"><![CDATA[LU n° %d]]></string>
|
<string name="lu_number_text"><![CDATA[LU n° %d]]></string>
|
||||||
@ -232,7 +233,11 @@
|
|||||||
<string name="action_select_all">Select all</string>
|
<string name="action_select_all">Select all</string>
|
||||||
|
|
||||||
<string name="general">General</string>
|
<string name="general">General</string>
|
||||||
|
<string name="purchase">Purchase</string>
|
||||||
|
<string name="checkout">Check out</string>
|
||||||
|
<string name="manufacture">Manufacture</string>
|
||||||
<string name="production">Production</string>
|
<string name="production">Production</string>
|
||||||
|
<string name="internal_handling">Internal handling</string>
|
||||||
<string name="prod_ordine_produzione_title_fragment">Production picking</string>
|
<string name="prod_ordine_produzione_title_fragment">Production picking</string>
|
||||||
<string name="prod_ordine_lavorazione_title_fragment">Manufacture picking</string>
|
<string name="prod_ordine_lavorazione_title_fragment">Manufacture picking</string>
|
||||||
<string name="prod_versamento_materiale_title_fragment">Deposit raw material</string>
|
<string name="prod_versamento_materiale_title_fragment">Deposit raw material</string>
|
||||||
|
|||||||
@ -28,6 +28,14 @@
|
|||||||
<item name="android:textColor">@color/gray_600</item>
|
<item name="android:textColor">@color/gray_600</item>
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">14sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
<style name="AppTheme.NewMaterial.Text.Medium" parent = "AppTheme.NewMaterial.Text">
|
||||||
|
<item name="android:textColor">@color/gray_600</item>
|
||||||
|
<item name="android:textSize">18sp</item>
|
||||||
|
</style>
|
||||||
|
<style name="AppTheme.NewMaterial.Text.Large" parent = "AppTheme.NewMaterial.Text">
|
||||||
|
<item name="android:textColor">@color/gray_600</item>
|
||||||
|
<item name="android:textSize">22sp</item>
|
||||||
|
</style>
|
||||||
<style name="AppTheme.NewMaterial.Text.Badge" parent = "AppTheme.NewMaterial">
|
<style name="AppTheme.NewMaterial.Text.Badge" parent = "AppTheme.NewMaterial">
|
||||||
<item name="android:fontFamily">@font/google_sans_regular</item>
|
<item name="android:fontFamily">@font/google_sans_regular</item>
|
||||||
<item name="android:textStyle">normal</item>
|
<item name="android:textStyle">normal</item>
|
||||||
@ -47,7 +55,7 @@
|
|||||||
<style name="AppTheme.NewMaterial.Text.ListDivider" parent="AppTheme.NewMaterial.Text">
|
<style name="AppTheme.NewMaterial.Text.ListDivider" parent="AppTheme.NewMaterial.Text">
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:textColor">#5F6368</item>
|
<item name="android:textColor">#5F6368</item>
|
||||||
<item name="android:letterSpacing">+0.03</item>
|
<!--<item name="android:letterSpacing">+0.03</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -135,7 +143,16 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="MaterialToolbar.Base" parent="">
|
||||||
|
<item name="popupTheme">@style/AppTheme.PopupOverlay</item>
|
||||||
|
<item name="theme">@style/Theme.MaterialComponents.Light</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MaterialToolbar" parent="MaterialToolbar.Base"/>
|
||||||
|
|
||||||
|
<style name="MaterialToolbar.Event" parent="MaterialToolbar">
|
||||||
|
<item name="titleTextAppearance">@style/AppTheme.NewMaterial.Text.ToolbarTitle</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user