fix conteggio pezzi stampabili

This commit is contained in:
Samuele E. Locatelli
2021-01-13 13:52:11 +01:00
parent c05e542e5b
commit 47ddb7498b
+9 -2
View File
@@ -19,7 +19,7 @@ namespace MP_MAG.WebUserControls
int answ = 0;
try
{
answ = currData.QtaOdl;
answ = currData.QtaConf;
// cerco UDC
var tabUDC = MagDataLayerObj.taEUdc.getByOdl(currData.IdxOdl);
if (tabUDC.Rows.Count > 0)
@@ -29,7 +29,7 @@ namespace MP_MAG.WebUserControls
{
numPrinted += (int)item.Qta;
}
answ = currData.QtaOdl - numPrinted;
answ = currData.QtaConf - numPrinted;
}
}
catch
@@ -76,6 +76,10 @@ namespace MP_MAG.WebUserControls
int numPz2print = calcPzRem;
lblNumPz2Print.Text = $"{numPz2print}";
lbtPrint.Visible = numPz2print > 0;
if (numPz2print > 0)
{
numPzUdc = numPz2print > currData.QtaUdc ? currData.QtaUdc : numPz2print;
}
}
#endregion Private Methods
@@ -101,10 +105,13 @@ namespace MP_MAG.WebUserControls
protected void Page_Load(object sender, EventArgs e)
{
#if false
if (!Page.IsPostBack)
{
// sistemo pezzi
numPzUdc = currData.QtaUdc;
}
#endif
checkPrint();
}