|
@@ -266,7 +266,7 @@ namespace UAS_LabelMachine
|
|
|
if (CurrentUnit == "KPCS")
|
|
if (CurrentUnit == "KPCS")
|
|
|
{
|
|
{
|
|
|
//如果单位是KPCS则必须是1000的整数倍
|
|
//如果单位是KPCS则必须是1000的整数倍
|
|
|
- if ((int.Parse(Data["QTY"]) > 1000 && int.Parse(Data["QTY"]) % 1000 != 0) || int.Parse(Data["QTY"]) / 1000 % double.Parse(CurrentZXBZ) != 0)
|
|
|
|
|
|
|
+ if (Convert.ToDouble((double.Parse(Data["QTY"]) / 1000).ToString("0.000")) % Convert.ToDouble(double.Parse(CurrentZXBZ).ToString("0.000")) != 0)
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分", "提示");
|
|
MessageBox.Show("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分", "提示");
|
|
|
Input.SelectAll();
|
|
Input.SelectAll();
|
|
@@ -310,7 +310,7 @@ namespace UAS_LabelMachine
|
|
|
//计算当前采集数量
|
|
//计算当前采集数量
|
|
|
string collectqty = (LabelInfDataTable.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
|
|
string collectqty = (LabelInfDataTable.Compute("sum(pib_qty)", "pib_prodcode='" + CurrentPrCode + "' and pib_pdno='" + CurrentPDNO + "'").ToString());
|
|
|
double CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
|
|
double CollectQty = (collectqty == "" ? 0 : double.Parse(collectqty));
|
|
|
- if (Convert.ToDouble((CollectQty + CollectNum).ToString("0.000")) > double.Parse(CurrentPrCount))
|
|
|
|
|
|
|
+ if (Convert.ToDouble((CollectQty + CollectNum).ToString("0.000")) > Convert.ToDouble(double.Parse(CurrentPrCount).ToString("0.000")))
|
|
|
{
|
|
{
|
|
|
MessageBox.Show("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount, "提示");
|
|
MessageBox.Show("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount, "提示");
|
|
|
Input.SelectAll();
|
|
Input.SelectAll();
|
|
@@ -925,11 +925,11 @@ namespace UAS_LabelMachine
|
|
|
DataTable dt;
|
|
DataTable dt;
|
|
|
if (MidLabelAutoPrint.Checked)
|
|
if (MidLabelAutoPrint.Checked)
|
|
|
{
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in("+ pib_outboxcode1 + ")", "select");
|
|
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ")", "select");
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in("+ pib_outboxcode1 + ") and 中盒标识='外'", "select");
|
|
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ") and 中盒标识='外'", "select");
|
|
|
}
|
|
}
|
|
|
if (dt.Rows.Count > 0)
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
{
|