[BUG] Sistemato controllo sulle qta in fase di recupero materiale da produzione

This commit is contained in:
Giuseppe Scorrano 2019-09-25 11:37:22 +02:00
parent 481c3b7658
commit 5b17d8ef81
2 changed files with 1 additions and 38 deletions

View File

@ -57,7 +57,6 @@ public class ProdRecuperoMaterialeHelper {
"LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
"WHERE jtb_fasi.cod_jfas IS NOT NULL " +
"AND segno = -1 " +
"AND qta_col > 0 " +
"GROUP BY jtb_fasi.cod_jfas, " +
"jtb_fasi.descrizione, " +
"mtb_colr.gestione, " +
@ -74,6 +73,7 @@ public class ProdRecuperoMaterialeHelper {
"mtb_aart.descrizione, " +
"mtb_aart.unt_mis, " +
"mtb_colt.segno " +
"HAVING SUM(mtb_colr.qta_col) > 0 " +
"ORDER BY data_collo DESC";
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdUL>>() {}.getType();

View File

@ -72,43 +72,6 @@ public class ProdRecuperoMaterialeViewModel {
refreshAdapter();
}
public void openLU() {
DialogScanOrCreateLU.make(mContext, true, false, true, mtbColt -> {
if(mtbColt == null) {
((IPoppableActivity)mContext).pop();
} else if((mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(-1)){
if (!UtilityString.isNullOrEmpty(mtbColt.getPosizione()) && UtilityPosizione.isLineaProduzione(mtbColt.getPosizione())) {
if(mtbColt.getMtbColr() == null || mtbColt.getMtbColr().size() == 0) {
DialogSimpleMessageHelper.makeWarningDialog(mContext,
new SpannableString(Html.fromHtml("E' stata scansionata una UL già vuota")),
null, this::openLU).show();
} else {
setMtbColt(mtbColt);
// chooseQuantityToReturn();
}
} else {
DialogSimpleMessageHelper.makeWarningDialog(mContext,
new SpannableString(Html.fromHtml("Sono accettate solamente UL di provenienti da una linea di lavoro")),
null, this::openLU).show();
}
} else {
DialogSimpleMessageHelper.makeWarningDialog(mContext,
new SpannableString(Html.fromHtml("Sono accettate solamente UL di <b>Lavorazione</b> di <b>SCARICO</b>")),
null, this::openLU).show();
}
}).show();
}
private void chooseQuantityToReturn(MtbAart mtbAart, BigDecimal min, BigDecimal max) {
}
public void setMtbColt(MtbColt mtbColt) {