| | |
| | | HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | } |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HSourceBillNos = "0"; |
| | | string HUnitIDs = "0"; |
| | | //查询采购订单 |
| | | ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a with(nolock) inner join Cg_POOrderBillSub b with(nolock) on a.HInterID = b.HInterID where HBillNo='" + str[3] + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "条码解析失败,请确认条码采购订单是否正确!"; |
| | | //return false; |
| | | } |
| | | else |
| | | { |
| | | HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HSourceBillNos = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | |
| | | string HInnerBillNos = ""; |
| | | //查询内部采购订单号 |
| | | ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where 采购订单号= '" + str[3] + "' ", "h_v_IF_POInStockList"); |
| | | ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where 内部采购订单号= '" + str[3] + "' ", "h_v_IF_POInStockList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | HInnerBillNos = str[3]; |
| | |
| | | else |
| | | { |
| | | HInnerBillNos = ds.Tables[0].Rows[0]["内部采购订单号"].ToString(); |
| | | HSourceBillNos = ds.Tables[0].Rows[0]["采购订单号"].ToString(); |
| | | } |
| | | |
| | | string HSourceInterIDs = "0"; |
| | | string HSourceEntryIDs = "0"; |
| | | string HUnitIDs = "0"; |
| | | //查询采购订单 |
| | | ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a with(nolock) inner join Cg_POOrderBillSub b with(nolock) on a.HInterID = b.HInterID where HBillNo='" + HSourceBillNos + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //sErrMsg = "条码解析失败,请确认条码采购订单是否正确!"; |
| | | //return false; |
| | | } |
| | | else |
| | | { |
| | | HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); |
| | | HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); |
| | | } |
| | | |
| | | |
| | | if (HQty == 0) |
| | | { |
| | | HQty = double.Parse(str[6]); |