Finish v1.23.5(260)
This commit is contained in:
commit
e963e03c81
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 259
|
||||
def appVersionName = '1.23.4'
|
||||
def appVersionCode = 260
|
||||
def appVersionName = '1.23.5'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -15,6 +15,8 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDo
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsModule;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleComponent;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleModule;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliComponent;
|
||||
@ -110,7 +112,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
||||
DialogChooseArtsFromListaArtsModule.class,
|
||||
DocInterniModule.class,
|
||||
DialogSelectDocInfoModule.class,
|
||||
DocInterniEditFormModule.class
|
||||
DocInterniEditFormModule.class,
|
||||
DialogSelectDocRowsModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -182,6 +185,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
DialogSelectDocInfoComponent.Factory dialogSelectMgrpDtipPairComponent();
|
||||
|
||||
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsComponent();
|
||||
|
||||
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
||||
|
||||
InfoAggiuntiveLUDialogComponent.Factory infoAggiuntiveLUDialogComponent();
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Contains;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Equals;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.EqualsIgnoreCase;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.GreaterThan;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.IsNull;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.LessThan;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Not;
|
||||
import it.integry.integrywmsnative.core.coollection.query.Query;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Coollection {
|
||||
|
||||
public static <T> Query<T> from(Collection<T> collection) {
|
||||
return new Query<T>(collection);
|
||||
}
|
||||
|
||||
public static Matcher eq(Object value) {
|
||||
return new Equals(value);
|
||||
}
|
||||
|
||||
public static Matcher contains(String value) {
|
||||
return new Contains(value);
|
||||
}
|
||||
|
||||
public static Matcher eqIgnoreCase(String value) {
|
||||
return new EqualsIgnoreCase(value);
|
||||
}
|
||||
|
||||
public static Matcher not(Matcher matcher) {
|
||||
return new Not(matcher);
|
||||
}
|
||||
|
||||
public static Matcher greaterThan(Number value) {
|
||||
return new GreaterThan(value);
|
||||
}
|
||||
|
||||
public static Matcher lessThan(Number value) {
|
||||
return new LessThan(value);
|
||||
}
|
||||
|
||||
public static Matcher isNull() {
|
||||
return new IsNull();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher;
|
||||
|
||||
public interface Matcher {
|
||||
|
||||
boolean match(Object value);
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Contains implements Matcher {
|
||||
|
||||
private final String matcherValue;
|
||||
|
||||
public Contains(String matcherValue) {
|
||||
this.matcherValue = matcherValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return String.valueOf(value).contains(matcherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Equals implements Matcher {
|
||||
|
||||
private final Object value;
|
||||
|
||||
public Equals(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object anotherValue) {
|
||||
return value.equals(anotherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class EqualsIgnoreCase implements Matcher {
|
||||
|
||||
private final String value;
|
||||
|
||||
public EqualsIgnoreCase(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object anotherValue) {
|
||||
return (value).equalsIgnoreCase((String) anotherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class GreaterThan implements Matcher {
|
||||
|
||||
private final Number value;
|
||||
|
||||
public GreaterThan(Number value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object matchValue) {
|
||||
if (matchValue == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Number) matchValue).doubleValue() > value.doubleValue();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class IsNull implements Matcher {
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return value == null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class LessThan implements Matcher {
|
||||
|
||||
private final Number value;
|
||||
|
||||
public LessThan(Number value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object matchValue) {
|
||||
if (matchValue == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Number) matchValue).doubleValue() < value.doubleValue();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Not implements Matcher {
|
||||
|
||||
private final Matcher matcher;
|
||||
|
||||
public Not(Matcher matcher) {
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return !matcher.match(value);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,90 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.CriteriaList;
|
||||
import it.integry.integrywmsnative.core.coollection.query.order.Order;
|
||||
import it.integry.integrywmsnative.core.coollection.query.order.OrderCriteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.custom.AndSpecification;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.custom.OrSpecification;
|
||||
|
||||
public class Query<T> {
|
||||
|
||||
private final Collection<T> collection;
|
||||
private CriteriaList<T> criterias;
|
||||
private OrderCriteria<T> orderCriteria;
|
||||
|
||||
public Query(Collection<T> collection) {
|
||||
this.collection = collection;
|
||||
criterias = new CriteriaList<T>();
|
||||
}
|
||||
|
||||
public Query<T> where(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> and(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criteria.setSpecification(new AndSpecification<T>());
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> or(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criteria.setSpecification(new OrSpecification<T>());
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> orderBy(String method, Order order) {
|
||||
orderCriteria = new OrderCriteria<T>(method, order);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> orderBy(String method) {
|
||||
return orderBy(method, Order.ASC);
|
||||
}
|
||||
|
||||
public List<T> all() {
|
||||
List<T> all = new ArrayList<T>();
|
||||
for (T item : collection) {
|
||||
if (criterias.match(item)) {
|
||||
all.add(item);
|
||||
}
|
||||
}
|
||||
if (orderCriteria != null) {
|
||||
all = orderCriteria.sort(all);
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
public T first() {
|
||||
List<T> all = cloneCollection(collection);
|
||||
if (orderCriteria != null) {
|
||||
all = orderCriteria.sort(all);
|
||||
}
|
||||
for (T item : all) {
|
||||
if (criterias.match(item)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<T> cloneCollection(Collection<T> collection) {
|
||||
List<T> list = new ArrayList<T>();
|
||||
for (T item : collection) {
|
||||
list.add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.criteria;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
import it.integry.integrywmsnative.core.coollection.reflection.Phanton;
|
||||
|
||||
public class Criteria<T> {
|
||||
|
||||
private final String method;
|
||||
private final Matcher matcher;
|
||||
private Specification<T> specification;
|
||||
|
||||
public Criteria(String method, Matcher matcher) {
|
||||
this.method = method;
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
public void setSpecification(Specification<T> specification) {
|
||||
this.specification = specification;
|
||||
}
|
||||
|
||||
public Specification<T> specification() {
|
||||
return specification;
|
||||
}
|
||||
|
||||
public boolean match(T item) {
|
||||
try {
|
||||
Object value = Phanton.from(item).call(method);
|
||||
return matcher.match(value);
|
||||
} catch (Exception err) {
|
||||
throw new RuntimeException(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.criteria;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CriteriaList<T> {
|
||||
|
||||
private List<Criteria<T>> criterias;
|
||||
|
||||
public CriteriaList() {
|
||||
criterias = new ArrayList<Criteria<T>>();
|
||||
}
|
||||
|
||||
public void add(Criteria<T> criteria) {
|
||||
criterias.add(criteria);
|
||||
}
|
||||
|
||||
public boolean match(T item) {
|
||||
if (criterias.size() == 0) {
|
||||
return true;
|
||||
}
|
||||
if (criterias.size() == 1) {
|
||||
return criterias.get(0).match(item);
|
||||
}
|
||||
boolean matched = true;
|
||||
for (int i = criterias.size() - 1; i > 0; i--) {
|
||||
Criteria<T> one = criterias.get(i);
|
||||
Criteria<T> other = criterias.get(i - 1);
|
||||
matched = matched && one.specification().match(item, one, other);
|
||||
}
|
||||
return matched;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
public enum Order {
|
||||
ASC, DESC
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.reflection.Phanton;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class OrderComparator<T> implements Comparator<T> {
|
||||
|
||||
private final String method;
|
||||
|
||||
public OrderComparator(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public int compare(T one, T other) {
|
||||
Object oneValue = Phanton.from(one).call(method);
|
||||
Object otherValue = Phanton.from(other).call(method);
|
||||
if (oneValue == null || otherValue == null) {
|
||||
return 0;
|
||||
}
|
||||
if (oneValue instanceof Comparable) {
|
||||
return ((Comparable<Object>) oneValue).compareTo(otherValue);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderCriteria<T> {
|
||||
|
||||
private final String method;
|
||||
private final Order order;
|
||||
|
||||
public OrderCriteria(String method, Order order) {
|
||||
this.method = method;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public List<T> sort(List<T> list) {
|
||||
Collections.sort(list, new OrderComparator<T>(method));
|
||||
if (order == Order.DESC) {
|
||||
Collections.reverse(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
|
||||
public interface Specification<T> {
|
||||
|
||||
boolean match(T item, Criteria<T> one, Criteria<T> other);
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
|
||||
public class AndSpecification<T> implements Specification<T> {
|
||||
|
||||
@Override
|
||||
public boolean match(T item, Criteria<T> one, Criteria<T> other) {
|
||||
return one.match(item) && other.match(item);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
|
||||
public class OrSpecification<T> implements Specification<T> {
|
||||
|
||||
@Override
|
||||
public boolean match(T item, Criteria<T> one, Criteria<T> other) {
|
||||
return one.match(item) || other.match(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.reflection;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class Phanton<T> {
|
||||
|
||||
private final T target;
|
||||
private Class<?> clazz;
|
||||
|
||||
private Phanton(T target) {
|
||||
this.target = target;
|
||||
clazz = target.getClass();
|
||||
}
|
||||
|
||||
public static <T> Phanton<T> from(T target) {
|
||||
return new Phanton<T>(target);
|
||||
}
|
||||
|
||||
public Object call(String name) {
|
||||
return invoke(name);
|
||||
}
|
||||
|
||||
private Object invoke(String name) {
|
||||
for (final Field field : clazz.getDeclaredFields()) {
|
||||
try {
|
||||
if (name.equals(field.getName())) {
|
||||
field.setAccessible(Boolean.TRUE);
|
||||
return field.get(target);
|
||||
}
|
||||
} catch (final IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No such property with name " + name);
|
||||
}
|
||||
|
||||
}
|
||||
@ -18,7 +18,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class, SqlMtbColt.class, SqlMtbColr.class}, version = 5, exportSchema = false)
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class, SqlMtbColt.class, SqlMtbColr.class}, version = 7, exportSchema = false)
|
||||
@TypeConverters({
|
||||
DateConverter.class
|
||||
})
|
||||
|
||||
@ -6,7 +6,6 @@ import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
@ -21,10 +20,13 @@ public interface ArticoloGrigliaDao {
|
||||
|
||||
@Insert
|
||||
void insertAll(List<ArticoloGriglia> articoli);
|
||||
|
||||
@Insert
|
||||
Long insert(ArticoloGriglia articolo);
|
||||
|
||||
@Update
|
||||
void updateAll(List<ArticoloGriglia> articoli);
|
||||
|
||||
@Update
|
||||
void update(ArticoloGriglia articolo);
|
||||
|
||||
@ -45,4 +47,7 @@ public interface ArticoloGrigliaDao {
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE id_griglia = :grigliaId")
|
||||
List<ArticoloGriglia> getArticoliFromGriglia(int grigliaId);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE id_griglia = :grigliaId and new_no_promo = 1")
|
||||
List<ArticoloGriglia> getNewArticoliInGriglia(int grigliaId);
|
||||
}
|
||||
|
||||
@ -71,6 +71,9 @@ public class ArticoloGriglia {
|
||||
@ColumnInfo(name = "id_griglia")
|
||||
private int idGriglia;
|
||||
|
||||
@ColumnInfo(name = "new_no_promo")
|
||||
private boolean newNoPromo = false;
|
||||
|
||||
public int getArticoloGrigliaId() {
|
||||
return articoloGrigliaId;
|
||||
}
|
||||
@ -191,6 +194,14 @@ public class ArticoloGriglia {
|
||||
this.qtaProposta = qtaProposta;
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public void setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
}
|
||||
|
||||
public ArticoloOrdine convertToArticoloOrdine(Ordine ordine) {
|
||||
ArticoloOrdine articolo = new ArticoloOrdine();
|
||||
|
||||
@ -210,6 +221,7 @@ public class ArticoloGriglia {
|
||||
articolo.setGiacenza(BigDecimal.valueOf(this.getGiacenza()));
|
||||
articolo.setQtaPrevistaVendita(BigDecimal.valueOf(this.getQtaPrevistaVendita()));
|
||||
articolo.setQtaProposta(BigDecimal.valueOf(this.getQtaProposta()));
|
||||
articolo.setNewNoPromo(this.isNewNoPromo());
|
||||
|
||||
articolo.setQtaOrd(0);
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ import java.util.Date;
|
||||
public class ArticoloOrdine {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "articolo_ordine_id")
|
||||
private int articoloOrdineId;
|
||||
private Integer articoloOrdineId;
|
||||
|
||||
@ColumnInfo(name = "cod_mart")
|
||||
private String codMart;
|
||||
@ -67,6 +67,8 @@ public class ArticoloOrdine {
|
||||
@ColumnInfo(name = "data_ins")
|
||||
private Date dataIns;
|
||||
|
||||
@ColumnInfo(name = "new_no_promo")
|
||||
private boolean newNoPromo;
|
||||
|
||||
@Ignore
|
||||
private int ggScadenza = 0;
|
||||
@ -81,7 +83,7 @@ public class ArticoloOrdine {
|
||||
private BigDecimal qtaProposta = BigDecimal.ZERO;
|
||||
|
||||
|
||||
public int getArticoloOrdineId() {
|
||||
public Integer getArticoloOrdineId() {
|
||||
return articoloOrdineId;
|
||||
}
|
||||
|
||||
@ -221,14 +223,23 @@ public class ArticoloOrdine {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfPrevistaVendita(){
|
||||
return qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf),0, RoundingMode.CEILING);
|
||||
public BigDecimal getQtaCnfPrevistaVendita() {
|
||||
return qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfProposta(){
|
||||
return qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf),0, RoundingMode.CEILING);
|
||||
public BigDecimal getQtaCnfProposta() {
|
||||
return qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
public BigDecimal getQtaCnfGiacenza(){
|
||||
return giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf),0, RoundingMode.CEILING);
|
||||
|
||||
public BigDecimal getQtaCnfGiacenza() {
|
||||
return giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public void setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,4 +16,6 @@ public interface ArticoloGrigliaRepository {
|
||||
|
||||
void findArticoloByScanAndGriglia(String scan, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findNewArticoliInGrigla(int idGriglia, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
}
|
||||
|
||||
@ -89,4 +89,14 @@ public class ArticoliGrigliaDataSource extends Repository implements ArticoloGri
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findNewArticoliInGrigla(int idGriglia, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onSuccess.run(mArticoloGrigliaDao.getNewArticoliInGriglia(idGriglia));
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,13 +28,15 @@ public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdi
|
||||
List<ArticoloOrdine> toUpdate = new ArrayList<>();
|
||||
List<ArticoloOrdine> toInsert = new ArrayList<>();
|
||||
for (ArticoloOrdine art : articoli) {
|
||||
if (art.getArticoloOrdineId() > 0) {
|
||||
if (art.getArticoloOrdineId() != null && art.getArticoloOrdineId() > 0) {
|
||||
toUpdate.add(art);
|
||||
} else {
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mArticoloOrdineDao.insertAll(toInsert);
|
||||
for (ArticoloOrdine newArt : toInsert) {
|
||||
mArticoloOrdineDao.insert(newArt);
|
||||
}
|
||||
mArticoloOrdineDao.updateAll(toUpdate);
|
||||
onSuccess.run();
|
||||
|
||||
@ -48,7 +50,7 @@ public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdi
|
||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
if (articolo.getArticoloOrdineId() > 0) {
|
||||
if (articolo.getArticoloOrdineId() != null && articolo.getArticoloOrdineId() > 0) {
|
||||
mArticoloOrdineDao.update(articolo);
|
||||
} else {
|
||||
mArticoloOrdineDao.insert(articolo);
|
||||
|
||||
@ -1,35 +1,23 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
|
||||
public class ArticoloDTO {
|
||||
|
||||
private String codMart;
|
||||
|
||||
private String descrizione;
|
||||
|
||||
private String untMis;
|
||||
|
||||
private String barcode;
|
||||
|
||||
private String flagQtaMultipla;
|
||||
|
||||
private float qtaCnf;
|
||||
|
||||
private float merceDaRic;
|
||||
|
||||
private float mediaSett;
|
||||
|
||||
private float qtaMinOrdinabile;
|
||||
|
||||
public String codMart;
|
||||
public String descrizione;
|
||||
public String untMis;
|
||||
public float qtaCnf;
|
||||
public String barcode;
|
||||
public float merceDaRic;
|
||||
public float mediaSett;
|
||||
public String flagQtaMultipla;
|
||||
public String flagTracciabilita;
|
||||
public float qtaMinOrdinabile;
|
||||
public boolean newNoPromo;
|
||||
private int ggScadenza;
|
||||
|
||||
private float giacenza;
|
||||
|
||||
private float qtaPrevistaVendita;
|
||||
|
||||
private float qtaProposta;
|
||||
|
||||
|
||||
@ -145,6 +133,24 @@ public class ArticoloDTO {
|
||||
this.qtaProposta = qtaProposta;
|
||||
}
|
||||
|
||||
public String getFlagTracciabilita() {
|
||||
return flagTracciabilita;
|
||||
}
|
||||
|
||||
public ArticoloDTO setFlagTracciabilita(String flagTracciabilita) {
|
||||
this.flagTracciabilita = flagTracciabilita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public ArticoloDTO setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArticoloGriglia toArticoloGriglia() {
|
||||
ArticoloGriglia result = new ArticoloGriglia();
|
||||
result.setBarCode(this.getBarCode());
|
||||
@ -157,6 +163,7 @@ public class ArticoloDTO {
|
||||
result.setFlagQtaMultipla(this.getFlagQtaMultipla());
|
||||
result.setQtaMinOrdinabile(this.getQtaMinOrdinabile());
|
||||
result.setGgScadenza(this.ggScadenza);
|
||||
result.setNewNoPromo(this.newNoPromo);
|
||||
result.setGiacenza(this.giacenza);
|
||||
result.setQtaPrevistaVendita(this.qtaPrevistaVendita);
|
||||
result.setQtaProposta(this.qtaProposta);
|
||||
|
||||
@ -3,10 +3,10 @@ package it.integry.integrywmsnative.core.settings;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
||||
|
||||
public class DBSettingsModel {
|
||||
|
||||
@ -36,6 +36,8 @@ public class DBSettingsModel {
|
||||
private boolean flagSpedizioneCanSelectMultipleOrders;
|
||||
private List<String> notePerditaDocInterni = new ArrayList<>();
|
||||
private boolean flagSpedizioneUseQtaOrd;
|
||||
private boolean flagOrdinaNuoviArticoliInGriglia;
|
||||
private String docInterniCheckFornitore;
|
||||
private String produzioneDefaultCodAnag;
|
||||
private String reportNameSpedizionChiudiOrdine;
|
||||
private int onNumCnfInputChanged = 1;
|
||||
@ -72,7 +74,7 @@ public class DBSettingsModel {
|
||||
}
|
||||
|
||||
public DBSettingsModel setDatiAzienda(Azienda datiAzienda) {
|
||||
this.datiAzienda = datiAzienda;
|
||||
this.datiAzienda = datiAzienda;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -247,6 +249,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagOrdinaNuoviArticoliInGriglia(boolean flagOrdinaNuoviArticoliInGriglia) {
|
||||
this.flagOrdinaNuoviArticoliInGriglia = flagOrdinaNuoviArticoliInGriglia;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getFlagOrdinaNuoviArticoliInGriglia() {
|
||||
return this.flagOrdinaNuoviArticoliInGriglia;
|
||||
}
|
||||
|
||||
public String getProduzioneDefaultCodAnag() {
|
||||
return produzioneDefaultCodAnag;
|
||||
}
|
||||
@ -282,4 +293,13 @@ public class DBSettingsModel {
|
||||
this.notePerditaDocInterni = notePerditaDocInterni;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDocInterniCheckFornitore() {
|
||||
return docInterniCheckFornitore;
|
||||
}
|
||||
|
||||
public DBSettingsModel setDocInterniCheckFornitore(String docInterniCheckFornitore) {
|
||||
this.docInterniCheckFornitore = docInterniCheckFornitore;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,6 +270,14 @@ public class SettingsManager {
|
||||
.setGestName("PVM")
|
||||
.setSection("DOC_INTERNI")
|
||||
.setKeySection("NOTE_PERDITA"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PVM")
|
||||
.setSection("ORDINI_A")
|
||||
.setKeySection("ORDINA_NUOVI_ARTICOLI"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PVM")
|
||||
.setSection("DOC_INTERNI")
|
||||
.setKeySection("CHECK_FORNITORE"));
|
||||
|
||||
|
||||
GestSetupRESTConsumer.getValues(stbGestSetupList, list -> {
|
||||
@ -294,8 +302,11 @@ public class SettingsManager {
|
||||
dbSettingsModelIstance.setFlagSpedizioneCanSelectMultipleOrders(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_SELECT_MULTIPLE_ORDERS", Boolean.class));
|
||||
dbSettingsModelIstance.setReportNameSpedizionChiudiOrdine(getValueFromList(list, "SPEDIZIONE", "REPORT_PACKING_LIST", String.class));
|
||||
dbSettingsModelIstance.setFlagSpedizioneUseQtaOrd(getValueFromList(list, "SPEDIZIONE", "FLAG_USE_QTA_ORD", Boolean.class));
|
||||
String notePerdita = getValueFromList(list,"DOC_INTERNI","NOTE_PERDITA",String.class);
|
||||
if (notePerdita != null){
|
||||
dbSettingsModelIstance.setFlagOrdinaNuoviArticoliInGriglia(getValueFromList(list, "ORDINI_A", "ORDINA_NUOVI_ARTICOLI", Boolean.class));
|
||||
dbSettingsModelIstance.setDocInterniCheckFornitore(getValueFromList(list, "DOC_INTERNI", "CHECK_FORNITORE", String.class));
|
||||
|
||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
||||
if (notePerdita != null) {
|
||||
dbSettingsModelIstance.setNotePerditaDocInterni(Arrays.asList(notePerdita.split("\\|")));
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,8 @@ public class UtilityFocus {
|
||||
|
||||
public static void focusTextBox(Context context, EditText editTextToFocus) {
|
||||
editTextToFocus.requestFocus();
|
||||
|
||||
editTextToFocus.setSelectAllOnFocus(true);
|
||||
editTextToFocus.selectAll();
|
||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(editTextToFocus, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
|
||||
public class DialogChooseRowFromListaDocRowsListModel {
|
||||
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String qtaOrdReadable;
|
||||
private String barcode;
|
||||
private boolean isNew;
|
||||
private SqlMtbColr originalModel;
|
||||
private BindableBoolean checked = new BindableBoolean(false);
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel() {
|
||||
}
|
||||
|
||||
public BindableBoolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setChecked(BindableBoolean checked) {
|
||||
this.checked = checked;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void toggleCheck() {
|
||||
this.checked.set(!this.checked.get());
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getQtaOrdReadable() {
|
||||
return qtaOrdReadable;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setQtaOrdReadable(String qtaOrdReadable) {
|
||||
this.qtaOrdReadable = qtaOrdReadable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcode() {
|
||||
return barcode;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setBarcode(String barcode) {
|
||||
this.barcode = barcode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNew() {
|
||||
return isNew;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setNew(boolean aNew) {
|
||||
isNew = aNew;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SqlMtbColr getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
public DialogChooseRowFromListaDocRowsListModel setOriginalModel(SqlMtbColr originalModel) {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,7 @@ public class GrigliaAcquistiChildDTO {
|
||||
public String flagQtaMultipla;
|
||||
public String flagTracciabilita;
|
||||
public BigDecimal qtaMinOrdinabile;
|
||||
public boolean newNoPromo;
|
||||
private int ggScadenza;
|
||||
private float giacenza;
|
||||
private float qtaPrevistaVendita;
|
||||
@ -144,4 +145,13 @@ public class GrigliaAcquistiChildDTO {
|
||||
this.qtaProposta = qtaProposta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public GrigliaAcquistiChildDTO setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.ActivityContabDocInterniEditBinding;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.ui.DocumentRowsListAdapter;
|
||||
import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
@ -133,6 +134,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
|
||||
private void initViewModel(SqlMtbColt document, List<GrigliaAcquistiChildDTO> productList) {
|
||||
this.viewModel.init();
|
||||
this.viewModel.setListeners(this);
|
||||
this.viewModel.setDocument(document);
|
||||
this.viewModel.setProductsList(productList);
|
||||
@ -280,6 +282,16 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
this.viewModel.deleteRow(entityToSql(mtbColr));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMultipleRowsFound(List<SqlMtbColr> rows, GrigliaAcquistiChildDTO articolo) {
|
||||
DialogSelectDocRowsView.newInstance(rows, (row) -> {
|
||||
this.onLoadingEnded();
|
||||
if (row != null) {
|
||||
this.viewModel.editRow(row, (articolo.getFlagTracciabilita().equalsIgnoreCase("S")));
|
||||
}
|
||||
}
|
||||
).show(this.getSupportFragmentManager(), "dialogSelectDocRows");
|
||||
}
|
||||
|
||||
private MtbColr sqlToEntity(SqlMtbColr sqlMtbColr) {
|
||||
MtbColr entity = new MtbColr();
|
||||
|
||||
@ -5,6 +5,8 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@ -18,6 +20,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColrRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ColloDTO;
|
||||
@ -35,7 +38,8 @@ public class DocInterniEditFormViewModel {
|
||||
private final DocInterniRESTConsumer docInterniRESTConsumer;
|
||||
private DocInterniEditFormViewModel.Listener listener;
|
||||
private List<GrigliaAcquistiChildDTO> productsList;
|
||||
|
||||
private boolean isCheckPartitaMag = false;
|
||||
private JSONObject checkFornitoreRules = null;
|
||||
public MutableLiveData<SqlMtbColt> document = new MutableLiveData<>();
|
||||
public MutableLiveData<List<SqlMtbColr>> docRows = new MutableLiveData<>();
|
||||
|
||||
@ -47,6 +51,16 @@ public class DocInterniEditFormViewModel {
|
||||
this.docRows.setValue(new ArrayList<>());
|
||||
}
|
||||
|
||||
public void init() {
|
||||
try {
|
||||
var docInterniCheckFornitore = SettingsManager.iDB().getDocInterniCheckFornitore();
|
||||
this.checkFornitoreRules = docInterniCheckFornitore != null ? new JSONObject(docInterniCheckFornitore) : null;
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.listener != null) listener.onLoadingStarted();
|
||||
}
|
||||
@ -71,7 +85,7 @@ public class DocInterniEditFormViewModel {
|
||||
}
|
||||
|
||||
public void editRow(SqlMtbColr row, boolean flagTracciabilita) {
|
||||
this.listener.onEditRowRequest(row, flagTracciabilita);
|
||||
this.listener.onEditRowRequest(row, flagTracciabilita && this.isCheckPartitaMag);
|
||||
}
|
||||
|
||||
private Integer getNextIdRiga() {
|
||||
@ -113,41 +127,46 @@ public class DocInterniEditFormViewModel {
|
||||
public void onSearch(String search) {
|
||||
this.sendOnLoadingStarted();
|
||||
GrigliaAcquistiChildDTO articolo = this.searchArticolo(search);
|
||||
this.sendOnLoadingEnded();
|
||||
if (articolo == null) {
|
||||
this.sendError(new Exception("Nessun articolo corrispondente al codice fornito!"));
|
||||
this.sendOnLoadingEnded();
|
||||
return;
|
||||
}
|
||||
SqlMtbColr row = this.getRowForArticolo(articolo);
|
||||
this.sendOnLoadingEnded();
|
||||
this.editRow(row, articolo.getFlagTracciabilita().equalsIgnoreCase("S"));
|
||||
List<SqlMtbColr> rows = this.getRowsForArticolo(articolo);
|
||||
if (rows.isEmpty()) {
|
||||
this.sendError(new Exception("Nessun articolo corrispondente al codice fornito!"));
|
||||
}
|
||||
if (rows.size() > 1) {
|
||||
this.listener.onMultipleRowsFound(rows, articolo);
|
||||
} else {
|
||||
this.editRow(rows.get(0), (articolo.getFlagTracciabilita().equalsIgnoreCase("S")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private SqlMtbColr getRowForArticolo(GrigliaAcquistiChildDTO articolo) {
|
||||
private List<SqlMtbColr> getRowsForArticolo(GrigliaAcquistiChildDTO articolo) {
|
||||
List<SqlMtbColr> docRows = this.docRows.getValue();
|
||||
if (docRows == null) {
|
||||
docRows = new ArrayList<>();
|
||||
}
|
||||
SqlMtbColt document = this.document.getValue();
|
||||
SqlMtbColr row = Stream.of(docRows).filter(docRow -> docRow.getCodMart().equalsIgnoreCase(articolo.getCodMart())).findFirstOrElse(null);
|
||||
if (row == null) {
|
||||
row = new SqlMtbColr();
|
||||
row.setIdCollo(document.getId());
|
||||
row.setRiga(getNextIdRiga());
|
||||
row.setCodMart(articolo.getCodMart());
|
||||
row.setSerCollo(document.getSerCollo());
|
||||
row.setGestione(document.getGestione());
|
||||
row.setNumCollo(document.getNumCollo());
|
||||
row.setDataCollo(document.getDataCollo());
|
||||
row.setDescrizione(articolo.getDescrizione());
|
||||
row.setUntMis(articolo.getUntMis());
|
||||
row.setCodBarre(articolo.getBarcode());
|
||||
row.setQtaCnf(articolo.getQtaCnf().floatValue());
|
||||
row.setNumCnf(0f);
|
||||
row.setQtaCol(0f);
|
||||
}
|
||||
return row;
|
||||
SqlMtbColr row = new SqlMtbColr();
|
||||
row.setIdCollo(document.getId());
|
||||
row.setRiga(getNextIdRiga());
|
||||
row.setCodMart(articolo.getCodMart());
|
||||
row.setSerCollo(document.getSerCollo());
|
||||
row.setGestione(document.getGestione());
|
||||
row.setNumCollo(document.getNumCollo());
|
||||
row.setDataCollo(document.getDataCollo());
|
||||
row.setDescrizione(articolo.getDescrizione());
|
||||
row.setUntMis(articolo.getUntMis());
|
||||
row.setCodBarre(articolo.getBarcode());
|
||||
row.setQtaCnf(articolo.getQtaCnf().floatValue());
|
||||
row.setNumCnf(0f);
|
||||
row.setQtaCol(0f);
|
||||
List<SqlMtbColr> rows = Stream.of(docRows).filter(docRow -> docRow.getCodMart().equalsIgnoreCase(articolo.getCodMart())).toList();
|
||||
rows.add(row);
|
||||
return rows;
|
||||
}
|
||||
|
||||
private GrigliaAcquistiChildDTO searchArticolo(String filter) {
|
||||
@ -208,6 +227,26 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
public void setDocument(SqlMtbColt document) {
|
||||
this.document.setValue(document);
|
||||
this.initCheckFornitore();
|
||||
}
|
||||
|
||||
private void initCheckFornitore() {
|
||||
SqlMtbColt doc = this.document.getValue();
|
||||
boolean isCheckPartitaMag = false;
|
||||
if (doc != null && this.checkFornitoreRules != null) {
|
||||
String key = doc.getCodAnag();
|
||||
if (doc.getCodVdes() != null && !doc.getCodVdes().isEmpty()) {
|
||||
key += "-" + doc.getCodVdes();
|
||||
}
|
||||
try {
|
||||
if (this.checkFornitoreRules.has(key) && ((String) ((JSONObject) this.checkFornitoreRules.get(key)).get(doc.getCodDtipProvv())).equalsIgnoreCase("check-partitaMag")) {
|
||||
isCheckPartitaMag = true;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
}
|
||||
this.isCheckPartitaMag = isCheckPartitaMag;
|
||||
}
|
||||
|
||||
public SqlMtbColt getDocument() {
|
||||
@ -270,6 +309,8 @@ public class DocInterniEditFormViewModel {
|
||||
|
||||
void onEditRowRequest(SqlMtbColr row, boolean flagTracciabilita);
|
||||
|
||||
void onMultipleRowsFound(List<SqlMtbColr> rows, GrigliaAcquistiChildDTO articolo);
|
||||
|
||||
void onDocumentHoldRequest();
|
||||
|
||||
void onDocExported();
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogSelectDocRowsComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogSelectDocRowsComponent create();
|
||||
}
|
||||
|
||||
|
||||
void inject(DialogSelectDocRowsView dialogSelectDocInfoView);
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = DialogSelectDocRowsComponent.class)
|
||||
public class DialogSelectDocRowsModule {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,143 @@
|
||||
package it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseRowFromListaDocRowsLayoutBinding;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DialogChooseRowFromListaDocRowsListModel;
|
||||
import kotlin.Unit;
|
||||
|
||||
public class DialogSelectDocRowsView extends BaseDialogFragment {
|
||||
|
||||
private final RunnableArgs<SqlMtbColr> onRowSelected;
|
||||
private final List<SqlMtbColr> listArts;
|
||||
private final MutableLiveData<List<DialogChooseRowFromListaDocRowsListModel>> listModels = new MutableLiveData<>();
|
||||
private DialogChooseRowFromListaDocRowsLayoutBinding binding;
|
||||
public MutableLiveData<SqlMtbColr> selectedRow = new MutableLiveData<>();
|
||||
|
||||
public static DialogSelectDocRowsView newInstance(
|
||||
List<SqlMtbColr> listArts,
|
||||
RunnableArgs<SqlMtbColr> onDismiss
|
||||
) {
|
||||
return new DialogSelectDocRowsView(listArts, onDismiss);
|
||||
}
|
||||
|
||||
|
||||
private DialogSelectDocRowsView(List<SqlMtbColr> listArts, RunnableArgs<SqlMtbColr> onDismiss) {
|
||||
super();
|
||||
this.onRowSelected = onDismiss;
|
||||
this.listArts = listArts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
if (onRowSelected != null) onRowSelected.run(this.selectedRow.getValue());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
binding = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_row_from_lista_doc_rows_layout, container, false);
|
||||
binding.setLifecycleOwner(this);
|
||||
MainApplication
|
||||
.appComponent
|
||||
.dialogSelectDocRowsComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
binding.setView(this);
|
||||
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
initView();
|
||||
this.refreshList();
|
||||
|
||||
|
||||
binding.positiveButton.setOnClickListener(view -> {
|
||||
getDialog().dismiss();
|
||||
});
|
||||
|
||||
binding.negativeButton.setOnClickListener(view -> {
|
||||
this.selectedRow.setValue(null);
|
||||
getDialog().dismiss();
|
||||
});
|
||||
|
||||
|
||||
this.onLoadingEnded();
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void refreshList() {
|
||||
var list = Stream.of(this.listArts).map(row -> {
|
||||
DialogChooseRowFromListaDocRowsListModel model = new DialogChooseRowFromListaDocRowsListModel();
|
||||
model.setCodMart(row.getCodMart());
|
||||
model.setBarcode(row.getCodMart());
|
||||
model.setOriginalModel(row);
|
||||
model.setNew(row.getId() < 1);
|
||||
model.setDescrizione(row.getDescrizione());
|
||||
model.setQtaOrdReadable(row.getQtaCol() + "\n" + row.getUntMis());
|
||||
model.getChecked().addOnPropertyChangedCallback(() -> {
|
||||
this.checkRow(row, model.getChecked().get());
|
||||
});
|
||||
return model;
|
||||
}).toList();
|
||||
this.listModels.postValue(list);
|
||||
|
||||
}
|
||||
|
||||
private void checkRow(SqlMtbColr row, boolean checked) {
|
||||
if (checked) {
|
||||
this.selectedRow.setValue(row);
|
||||
var models = this.listModels.getValue();
|
||||
if (models != null && !models.isEmpty()) {
|
||||
Stream.of(models).filter(model -> model.getOriginalModel().getId() != row.getId()).forEach(model -> {
|
||||
model.getChecked().set(false);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var selectedRow = this.selectedRow.getValue();
|
||||
if (selectedRow != null && selectedRow.getId() == row.getId()) {
|
||||
this.selectedRow.setValue(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
initArrayAdapters();
|
||||
}
|
||||
|
||||
private void initArrayAdapters() {
|
||||
|
||||
new LiveAdapter(listModels, getViewLifecycleOwner(), BR.row)
|
||||
.map(DialogChooseRowFromListaDocRowsListModel.class, R.layout.dialog_choose_row_from_lista_doc_rows__item_model)
|
||||
.onNoData(noData -> {
|
||||
binding.emptyView.setVisibility(noData ? View.VISIBLE : View.GONE);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
).into(binding.listaDocRows);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,6 +12,8 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -32,6 +34,7 @@ import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaReposito
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.OrdineRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PVOrdiniAcquistoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.ActivityPvOrdineAcquistoEditBinding;
|
||||
@ -65,7 +68,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
ArticoloGrigliaRepository mArticoloGrigliaRepository;
|
||||
|
||||
|
||||
public static Intent newInstance(Context context, Ordine ordine){
|
||||
public static Intent newInstance(Context context, Ordine ordine) {
|
||||
Intent myIntent = new Intent(context, PVOrdineAcquistoEditActivity.class);
|
||||
String keyOrdine = DataCache.addItem(ordine);
|
||||
myIntent.putExtra(DATA_KEY_ORDER, keyOrdine);
|
||||
@ -111,6 +114,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
onBackPressed();
|
||||
@ -159,6 +163,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
|
||||
private void handleException(Exception ex) {
|
||||
runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
UtilityExceptions.defaultException(this, ex, false);
|
||||
});
|
||||
@ -198,6 +203,32 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
fetchArticoli();
|
||||
}
|
||||
|
||||
private void orderNewProducts() {
|
||||
this.openProgress();
|
||||
mhelper.getNewArticoli(mOrdine.getIdGriglia(), articoli -> {
|
||||
if (articoli != null && !articoli.isEmpty()) {
|
||||
List<ArticoloOrdine> articoliToSave = new ArrayList<>();
|
||||
Stream.of(articoli).forEach(articolo -> {
|
||||
if (
|
||||
Stream.of(mArticoli).filter(x -> x.getCodMart().equalsIgnoreCase(articolo.getCodMart())).findFirst().isEmpty()
|
||||
&& Stream.of(articoliToSave).filter(x -> x.getCodMart().equalsIgnoreCase(articolo.getCodMart())).findFirst().isEmpty()
|
||||
) {
|
||||
ArticoloOrdine dto = articolo.convertToArticoloOrdine(mOrdine);
|
||||
dto.setQtaOrd(dto.getQtaCnf());
|
||||
articoliToSave.add(dto);
|
||||
}
|
||||
});
|
||||
if (!articoliToSave.isEmpty()) {
|
||||
mhelper.saveArticoliToOrdine(articoliToSave, this::fetchArticoli, this::handleException);
|
||||
} else {
|
||||
this.closeProgress();
|
||||
}
|
||||
} else {
|
||||
this.closeProgress();
|
||||
}
|
||||
}, this::handleException);
|
||||
}
|
||||
|
||||
private void fetchGriglia() {
|
||||
mhelper.loadGriglia(mOrdine.getIdGriglia(), griglia -> {
|
||||
runOnUiThread(() -> {
|
||||
@ -218,6 +249,9 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
mBinding.pvOrdineExport.setVisibility(mArticoli.size() > 0 ? View.INVISIBLE : View.GONE);
|
||||
mBinding.closeActivityFab.close(false);
|
||||
mBinding.scanArtSpinner.setVisibility(mArticoli.size() > 0 ? View.GONE : View.VISIBLE);
|
||||
if (mArticoli.isEmpty() && isOrderNewProdsForced()) {
|
||||
orderNewProducts();
|
||||
}
|
||||
});
|
||||
}, this::handleException);
|
||||
}
|
||||
@ -253,9 +287,9 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
public void manualSearch(){
|
||||
public void manualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this,"Inserisci il codice a barre/codice articolo da cercare",codice->{
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il codice a barre/codice articolo da cercare", codice -> {
|
||||
this.openProgress();
|
||||
mhelper.checkArticolo(
|
||||
mOrdine,
|
||||
@ -272,4 +306,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity {
|
||||
}, BarcodeManager::enable).show();
|
||||
}
|
||||
|
||||
private boolean isOrderNewProdsForced() {
|
||||
return SettingsManager.iDB().getFlagOrdinaNuoviArticoliInGriglia();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -27,7 +28,6 @@ import it.integry.integrywmsnative.core.di.BindableInteger;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityFocus;
|
||||
import it.integry.integrywmsnative.databinding.DialogPvEditArticoloBinding;
|
||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.helper.PVEditOrderHelper;
|
||||
|
||||
@ -53,7 +53,7 @@ public class EditArticoloDialog extends BaseDialogFragment {
|
||||
mArticolo.setValue(articolo);
|
||||
mHelper = helper;
|
||||
qtaOrd.set(BigDecimal.valueOf(articolo.getQtaOrd()));
|
||||
numCnf.set(BigDecimal.valueOf(articolo.getQtaOrd()).divide(BigDecimal.valueOf(articolo.getQtaCnf()),0,RoundingMode.CEILING).intValue());
|
||||
numCnf.set(BigDecimal.valueOf(articolo.getQtaOrd()).divide(BigDecimal.valueOf(articolo.getQtaCnf()), 0, RoundingMode.CEILING).intValue());
|
||||
qtaCnf.set(BigDecimal.valueOf(articolo.getQtaCnf()));
|
||||
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
@ -71,7 +71,7 @@ public class EditArticoloDialog extends BaseDialogFragment {
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
ArticoloOrdine articolo = mArticolo.getValue();
|
||||
if (articolo != null && articolo.getQtaOrd() <= 0f){
|
||||
if (articolo != null && articolo.getQtaOrd() <= 0f) {
|
||||
articolo = null;
|
||||
}
|
||||
onDialogDismiss.run(articolo);
|
||||
@ -87,14 +87,12 @@ public class EditArticoloDialog extends BaseDialogFragment {
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
initBindings();
|
||||
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
UtilityFocus.focusTextBox(mContext, mBinding.inputQtaOrd);
|
||||
}
|
||||
|
||||
private void initBindings() {
|
||||
@ -106,17 +104,17 @@ public class EditArticoloDialog extends BaseDialogFragment {
|
||||
ArticoloOrdine articoloOrdine = mArticolo.getValue();
|
||||
BigDecimal qtaCnf = BigDecimal.valueOf(articoloOrdine.getQtaCnf());
|
||||
int cnf = 0;
|
||||
if (qtaOrd.get() != null && qtaOrd.get().compareTo(BigDecimal.ZERO) > 0){
|
||||
if (qtaOrd.get() != null && qtaOrd.get().compareTo(BigDecimal.ZERO) > 0) {
|
||||
cnf = qtaOrd.get().divide(qtaCnf, 0, RoundingMode.CEILING).intValue();
|
||||
}
|
||||
this.numCnf.set( cnf);
|
||||
this.numCnf.set(cnf);
|
||||
this.mBinding.executePendingBindings();
|
||||
|
||||
mLockedInput = false;
|
||||
}
|
||||
});
|
||||
BindableInteger.registerListener(numCnf, qta -> {
|
||||
if (!mLockedInput){
|
||||
if (!mLockedInput) {
|
||||
mLockedInput = true;
|
||||
|
||||
ArticoloOrdine articoloOrdine = mArticolo.getValue();
|
||||
@ -127,6 +125,22 @@ public class EditArticoloDialog extends BaseDialogFragment {
|
||||
mLockedInput = false;
|
||||
}
|
||||
});
|
||||
mBinding.inputQtaOrd.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
// saveAndExit();
|
||||
mBinding.inputNumCnfText.requestFocus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
mBinding.inputNumCnfText.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
saveAndExit();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
public void saveAndExit() {
|
||||
|
||||
@ -2,11 +2,12 @@ package it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.helper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
@ -63,7 +64,15 @@ public class PVEditOrderHelper {
|
||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, onSave, onFail);
|
||||
}
|
||||
|
||||
public void removeArticoloFromOrdine(ArticoloOrdine articolo, Runnable onSave, RunnableArgs<Exception> onError){
|
||||
public void saveArticoliToOrdine(List<ArticoloOrdine> articoli, Runnable onSave, RunnableArgs<Exception> onFail) {
|
||||
mArticoliOrdineRepository.saveArticoliToOrdine(articoli, onSave, onFail);
|
||||
}
|
||||
|
||||
public void removeArticoloFromOrdine(ArticoloOrdine articolo, Runnable onSave, RunnableArgs<Exception> onError) {
|
||||
mArticoliOrdineRepository.deleteArticolo(articolo, onSave, onError);
|
||||
}
|
||||
|
||||
public void getNewArticoli(int idGrigla, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
mArticoliGrigliaRepository.findNewArticoliInGrigla(idGrigla, onSuccess, onError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ public class DialogScanLisA {
|
||||
private BaseDialog mDialog;
|
||||
private Dialog mCurrentProgress;
|
||||
|
||||
private DialogScanCodiceGrigliaBinding mBinding;
|
||||
private final DialogScanCodiceGrigliaBinding mBinding;
|
||||
|
||||
private RunnableArgs<Griglia> mOnDialogDismiss;
|
||||
|
||||
@ -54,6 +54,7 @@ public class DialogScanLisA {
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
mOnDialogDismiss = onDialogDismiss;
|
||||
initBarcode();
|
||||
|
||||
}
|
||||
|
||||
public static Dialog make(Activity context, GrigliaRepository grigliaRepository, OrdineAcquistoPvHelper helper, RunnableArgs<Griglia> onDialogDismiss) {
|
||||
@ -75,7 +76,6 @@ public class DialogScanLisA {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
|
||||
10
app/src/main/res/drawable/ic_baseline_alert_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_alert_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_baseline_new_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_new_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4H4C2.89,4 2.01,4.89 2.01,6L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2V6C22,4.89 21.11,4 20,4zM8.5,15H7.3l-2.55,-3.5V15H3.5V9h1.25l2.5,3.5V9H8.5V15zM13.5,10.26H11v1.12h2.5v1.26H11v1.11h2.5V15h-4V9h4V10.26zM20.5,14c0,0.55 -0.45,1 -1,1h-4c-0.55,0 -1,-0.45 -1,-1V9h1.25v4.51h1.13V9.99h1.25v3.51h1.12V9h1.25V14z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_baseline_stars_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_stars_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM16.23,18L12,15.45 7.77,18l1.12,-4.81 -3.73,-3.23 4.92,-0.42L12,5l1.92,4.53 4.92,0.42 -3.73,3.23L16.23,18z"/>
|
||||
</vector>
|
||||
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="row"
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.dto.DialogChooseRowFromListaDocRowsListModel" />
|
||||
</data>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_checked_layout"
|
||||
app:backgroundTintResID="@{row.checked.get() ? R.color.bg_checked_layout : android.R.color.transparent}"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:onClick="@{() -> row.toggleCheck()}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:checked="@{row.checked}" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_toEndOf="@id/checkbox"
|
||||
android:layout_toStartOf="@id/qta_box">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bottom_sheet_actions_delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@android:color/white"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:src="@drawable/ic_baseline_new_24"
|
||||
android:textSize="14sp"
|
||||
android:tint="@color/orange_600"
|
||||
android:visibility="@{row.isNew ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{row.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{row.barcode}"
|
||||
android:textColor="@color/red_600"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0000000000000" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:text="@{row.descrizione}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/qta_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="12dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@{row.qtaOrdReadable}"
|
||||
tools:text="280.45\nCONF" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView" />
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/buttons"
|
||||
android:layout_below="@id/title_container"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_item_to_pick_text"
|
||||
android:textColor="@color/empty_view_gray"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lista_doc_rows"
|
||||
android:layout_width="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/title_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/doc_interni_select_row_to_edit" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/negative_button"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/abort"
|
||||
app:layout_constrainedHeight="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/positive_button"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constrainedHeight="true"
|
||||
android:enabled="@{view.selectedRow != null}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@ -7,6 +7,7 @@
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@ -84,6 +85,29 @@
|
||||
android:textColor="@color/red_600"
|
||||
tools:text="BOSCAIOLA DI POLLO" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="@{view.articolo.newNoPromo ? View.VISIBLE : View.GONE}"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bottom_sheet_actions_delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:src="@drawable/ic_baseline_new_24"
|
||||
android:tint="@color/orange_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="2dp"
|
||||
android:textColor="@color/mainOrange"
|
||||
android:text='@string/newly_inserted_prod'
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -105,6 +129,15 @@
|
||||
android:textStyle="bold"
|
||||
tools:text="5" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@string/days'
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="days" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -310,8 +343,7 @@
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
>
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@ -411,8 +443,6 @@
|
||||
android:background="@color/gray_400" />
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -435,6 +465,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/num_pcks"
|
||||
android:imeOptions="actionDone"
|
||||
android:selectAllOnFocus="true"
|
||||
android:inputType="number"
|
||||
app:binding="@{view.numCnf}" />
|
||||
|
||||
@ -480,6 +511,7 @@
|
||||
android:digits="0123456789"
|
||||
android:hint="@string/tot_qty"
|
||||
android:inputType="number"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.qtaOrd}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -29,15 +29,31 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{articolo.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bottom_sheet_actions_delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:scaleX="1"
|
||||
android:scaleY="1"
|
||||
android:visibility="@{articolo.newNoPromo ? View.VISIBLE : View.GONE}"
|
||||
android:src="@drawable/ic_baseline_new_24"
|
||||
android:tint="@color/orange_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{articolo.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<TextView
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View"/>
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
@ -15,132 +16,121 @@
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/full_white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/gray_detail_background_round8"
|
||||
android:orientation="vertical"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:paddingTop="8dp">
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/gray_detail_background_round8"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="16dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:text="@string/cod_alis_name"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cod_alis_name"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cod_alis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="4SECCO"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/cod_alis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
tools:text="4SECCO"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/descrizione_griglia"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descr_lis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="LISTINO FORMAT CEDI SECCO"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="italic" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/descr_lis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/descrizione_deposito"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descr_depo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="LISTINO FORMAT CEDI SECCO"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="italic" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/articoli_in_griglia"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/count_art_lis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="10"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
tools:text="LISTINO FORMAT CEDI SECCO"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textStyle="italic" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/deposit"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descr_depo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="D09-PRIMO PREZZO - TRAETTA"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="italic" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/articoli_in_griglia"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/count_art_lis"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="10"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
>
|
||||
|
||||
>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/ordini_a_aperti_main_list"
|
||||
android:layout_width="match_parent"
|
||||
@ -148,7 +138,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@color/full_white"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"/>
|
||||
android:paddingEnd="2dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_a_empty_view"
|
||||
@ -191,7 +181,7 @@
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -199,19 +189,17 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/no_orders_found_message"/>
|
||||
android:text="@string/no_orders_found_message" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -222,7 +210,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.3"/>
|
||||
app:layout_constraintGuide_percent="0.3" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/free_picking__suggestion_1__guideline_left"
|
||||
@ -241,8 +229,6 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/fab_newOrder"
|
||||
android:layout_width="wrap_content"
|
||||
@ -255,7 +241,7 @@
|
||||
android:visibility="gone"
|
||||
fab:fab_colorNormal="@color/success_color"
|
||||
fab:fab_colorPressed="@color/green_500"
|
||||
fab:fab_colorRipple="#66FFFFFF"/>
|
||||
fab:fab_colorRipple="#66FFFFFF" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
@ -375,4 +375,7 @@
|
||||
<string name="selling_prediction">Previsione di vendita</string>
|
||||
<string name="giacenza">Giacenza</string>
|
||||
<string name="order_suggestion">Qtà proposta</string>
|
||||
<string name="days">giorni</string>
|
||||
<string name="newly_inserted_prod">Nuovo articolo in griglia</string>
|
||||
<string name="doc_interni_select_row_to_edit">Seleziona la riga da modificare</string>
|
||||
</resources>
|
||||
@ -384,4 +384,7 @@
|
||||
<string name="selling_prediction">Sales prediction</string>
|
||||
<string name="giacenza">Stock</string>
|
||||
<string name="order_suggestion">Suggested Qty</string>
|
||||
<string name="days">days</string>
|
||||
<string name="newly_inserted_prod">Newly added product</string>
|
||||
<string name="doc_interni_select_row_to_edit">Select document row to edit</string>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user