inserito blocco UDC ingresso di particolare diverso da uno eventualmente già caricato (verificare...)
This commit is contained in:
@@ -263,9 +263,11 @@ namespace GMW.WebUserControls
|
||||
tipoCodiceBarcode tipoBC = MagClass.tipoBCode_L5(barcodeIn);
|
||||
// per prima cosa se non ho almeno un UDC trattamenti od un AL (che ne porti uno) sollevo un errore...
|
||||
int numUdcCella = 0;
|
||||
DS_magazzino.v_UdcDetailDataTable tabUdcIn = new DS_magazzino.v_UdcDetailDataTable();
|
||||
try
|
||||
{
|
||||
numUdcCella = MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(idxCella).Rows.Count;
|
||||
tabUdcIn = MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(idxCella);
|
||||
numUdcCella = tabUdcIn.Rows.Count;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
@@ -349,7 +351,7 @@ namespace GMW.WebUserControls
|
||||
// verifico stato (statoUdc/statoUdc_pre) e posizioni (IdxPosizioneIn/IdxPosizioneOut): tratt a sx da consumare, fin a dx da stampare/ricaricare...
|
||||
if (cartUDC.CodStato == statoUDC_pre && cartUDC.IdxPosizione == IdxPosizioneIn)
|
||||
{
|
||||
bool partOk = false;
|
||||
bool partOkOut = false;
|
||||
// recupero elenco UDC in uscita...
|
||||
DS_magazzino.v_A2U2DDataTable tab = MagClass.magazzino.taA2U2D.getByAL(destAL);
|
||||
if (tab.Rows.Count > 0)
|
||||
@@ -357,64 +359,87 @@ namespace GMW.WebUserControls
|
||||
// verifico se particolare NON corrisponde....
|
||||
if (tab.Select(string.Format("Particolare = '{0}'", cartUDC.Particolare)).Length == 1)
|
||||
{
|
||||
partOk = true;
|
||||
partOkOut = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
partOk = true;
|
||||
partOkOut = true;
|
||||
}
|
||||
// se part NON ok..
|
||||
if (!partOk)
|
||||
// se part NON ok rispetto OUT..
|
||||
if (!partOkOut)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-UDC-DTX-006");
|
||||
Postazione.CssClass = cssErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
// verifico che abbia attributo trattamento
|
||||
int numTratt = MagClass.magazzino.taAtt2UDC.getByUdc(barcodeIn).Select("CodAttr = 'NT'").Length;
|
||||
if (numTratt == 0)
|
||||
// verifico se ci sia già un UDC in ingresso e che abbia lo stesso particolare...
|
||||
bool partOkIn = false;
|
||||
if (numUdcCella > 0)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-UDC-DTX-003");
|
||||
// controllo particolare IN...
|
||||
if (tabUdcIn[0].Particolare == cartUDC.Particolare)
|
||||
{
|
||||
partOkIn = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
partOkIn = true;
|
||||
}
|
||||
// se part NON ok rispetto OUT..
|
||||
if (!partOkIn)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-UDC-DTX-009");
|
||||
Postazione.CssClass = cssErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
currParticolare = cartUDC.Particolare;
|
||||
origParticolare = cartUDC.Particolare;
|
||||
// procedo a caricare UDC a SX, eventualmente consumando precedente...
|
||||
if (currParticolare != "")
|
||||
// verifico che abbia attributo trattamento
|
||||
int numTratt = MagClass.magazzino.taAtt2UDC.getByUdc(barcodeIn).Select("CodAttr = 'NT'").Length;
|
||||
if (numTratt == 0)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-UDC-DTX-003");
|
||||
Postazione.CssClass = cssErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
currParticolare = cartUDC.Particolare;
|
||||
origParticolare = cartUDC.Particolare;
|
||||
// procedo a caricare UDC a SX, eventualmente consumando precedente...
|
||||
if (currParticolare != "")
|
||||
{
|
||||
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string codBloccoCurr = "";
|
||||
int idxBlocco = 0;
|
||||
try
|
||||
{
|
||||
idxBlocco = MagClass.magazzino.taCelle.getByIdxCella(idxCellaCurr)[0].IdxBlocco;
|
||||
codBloccoCurr = MagClass.magazzino.taBlocchi.getByIdx(idxBlocco)[0].CodBlocco;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// 2015.01.12 controllo UDC non già su altre postazioni...
|
||||
if (codBloccoCurr == Postazione.currCodBlocco && idxCellaCurr != Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato su ALTRA LINEA!";
|
||||
Postazione.CssClass = cssErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
// imposto qta STD...
|
||||
qta = maxQta;
|
||||
// processo (eventualmente creando UDC...
|
||||
processUdcInOut(idxCellaCurr);
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
string codBloccoCurr = "";
|
||||
int idxBlocco = 0;
|
||||
try
|
||||
{
|
||||
idxBlocco = MagClass.magazzino.taCelle.getByIdxCella(idxCellaCurr)[0].IdxBlocco;
|
||||
codBloccoCurr = MagClass.magazzino.taBlocchi.getByIdx(idxBlocco)[0].CodBlocco;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// 2015.01.12 controllo UDC non già su altre postazioni...
|
||||
if (codBloccoCurr == Postazione.currCodBlocco && idxCellaCurr != Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato su ALTRA LINEA!";
|
||||
Postazione.CssClass = cssErr;
|
||||
}
|
||||
else
|
||||
{
|
||||
// imposto qta STD...
|
||||
qta = maxQta;
|
||||
// processo (eventualmente creando UDC...
|
||||
processUdcInOut(idxCellaCurr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user