|
|
@@ -101,9 +101,12 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
NowQTY.Text = qty.ToString();
|
|
|
string ma_endqty = dh.getFieldDataByCondition("make", "nvl(ma_endqty,0)", "ma_code='" + ma_code.Text + "'").ToString();
|
|
|
- dh.ExecuteSql("update make set ma_endqty=nvl(ma_endqty,0)+'" + (qty - lastqty) + "' where ma_code='" + ma_code.Text + "' ", "update");
|
|
|
- dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_qty,mhc_sourcecode,mhc_inman,mhc_linecode,mhc_stepcode,mhc_pcbcount)" +
|
|
|
- "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + (qty - lastqty) + "','" + User.UserSourceCode + "','" + User.UserCode + "','" + User.UserLineCode + "','" + User.CurrentStepCode + "','" + pr_pcbacount.Value + "')", "insert");
|
|
|
+ //dh.ExecuteSql("update make set ma_endqty=nvl(ma_endqty,0)+'" + (qty - lastqty) + "' where ma_code='" + ma_code.Text + "' ", "update");
|
|
|
+ if (qty - lastqty > 0) {
|
|
|
+ dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_qty,mhc_sourcecode,mhc_inman,mhc_linecode,mhc_stepcode,mhc_pcbcount)" +
|
|
|
+ "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + (qty - lastqty) + "','" + User.UserSourceCode + "','" + User.UserCode + "','" + User.UserLineCode + "','" + User.CurrentStepCode + "','" + pr_pcbacount.Value + "')", "insert");
|
|
|
+ }
|
|
|
+
|
|
|
lastqty = qty;
|
|
|
}
|
|
|
}
|