|
|
@@ -97,7 +97,7 @@ namespace UAS_MES.Warehouse
|
|
|
sql.Append("select pim_type,pim_outboxcode from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='BOX' GROUP BY pim_outboxcode,pim_type");
|
|
|
DataTable dtout = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
boxqtycount += dtout.Rows.Count;
|
|
|
- boxqtycount += int.Parse(dh.getFieldDataByCondition("package", "count(1)", " pa_mothercode in (select pim_outboxcode from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='PALLET' GROUP BY pim_outboxcode) and pa_outno is null").ToString());
|
|
|
+ boxqtycount += int.Parse(dh.getFieldDataByCondition("package left join PACKAGEDETAIL on pd_outboxcode = pa_outboxcode left join prodiomac on pim_mac =pd_barcode and pim_prodcode = pd_prodcode and pa_mothercode = pim_outboxcode", "count(DISTINCT pa_outboxcode)", " pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='PALLET'").ToString());
|
|
|
boxqty.Text = boxqtycount.ToString();
|
|
|
}
|
|
|
pi_type_check.Checked = true;
|
|
|
@@ -115,7 +115,7 @@ namespace UAS_MES.Warehouse
|
|
|
sql.Append("select pim_type,pim_outboxcode from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='BOX' GROUP BY pim_outboxcode,pim_type");
|
|
|
DataTable dtout = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
boxqtycount += dtout.Rows.Count;
|
|
|
- boxqtycount += int.Parse(dh.getFieldDataByCondition("package", "count(1)", " pa_mothercode in (select pim_outboxcode from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='PALLET' GROUP BY pim_outboxcode) and pa_outno is null").ToString());
|
|
|
+ boxqtycount += int.Parse(dh.getFieldDataByCondition("package left join PACKAGEDETAIL on pd_outboxcode = pa_outboxcode left join prodiomac on pim_mac =pd_barcode and pim_prodcode = pd_prodcode and pa_mothercode = pim_outboxcode", "count(DISTINCT pa_outboxcode)", " pim_inoutno='" + pi_inoutno.Text + "' and NVL(PIM_OUTBOXCODE,' ')<>' ' AND pim_type ='PALLET'").ToString());
|
|
|
boxqty.Text = boxqtycount.ToString();
|
|
|
}
|
|
|
pi_type_check.Checked = false;
|