|
|
@@ -869,14 +869,17 @@ namespace UAS_MES.Make
|
|
|
dh.ExecuteSQLTran(SQLS1.ToArray());
|
|
|
string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
|
|
|
string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
|
|
|
- if (standqty != "")
|
|
|
- {
|
|
|
- //置空原箱
|
|
|
- dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
- }
|
|
|
- else
|
|
|
- //置空原箱
|
|
|
- dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ //if (standqty != "")
|
|
|
+ //{
|
|
|
+ // //置空原箱
|
|
|
+ // dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ // //置空原箱
|
|
|
+ // dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ dh.ExecuteSql("insert into PACKAGEBACKUP select * from package where pa_outboxcode='" + pa_outboxcode.Text + "'", "insert");
|
|
|
+ dh.ExecuteSql("insert into PACKAGEBACKUPDETAIL select * from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "insert");
|
|
|
+ dh.ExecuteSql("delete from package where pa_outboxcode = '" + pa_outboxcode.Text + "'", "delete");
|
|
|
pa_status.Text = "0";
|
|
|
//删除箱的明细
|
|
|
dh.ExecuteSql("delete from labelprintlog where lpl_value='" + pa_outboxcode.Text + "'", "delete");
|