生成送货单条件判断(订单数量-已发货数量+退货数量)金蝶数据库引用安瑞的
| | |
| | | var HinterID = mylist[i].ToString(); |
| | | oCn.RunProc($"exec h_p_SRM_UpDatePPBomRelationQty {HinterID}"); |
| | | } |
| | | |
| | | //判断未关联数量是否为0 |
| | | DataSet ds = oCn.RunProcReturn($"select T1.hqty-T1.hrelationqty as hqty,单据号,物料编码 from H_v_SRM_POOrderBillList t1 where hentryid in ({string.Join(", ", entryList)}) ", "H_v_SRM_POOrderBillList"); |
| | | DataSet ds = oCn.RunProcReturn($"select T1.hqty-T1.hrelationqty+q.FMRBQTY as hqty,单据号,物料编码 from H_v_SRM_POOrderBillList t1 left join AIS20220914133941..T_PUR_POORDERENTRY_R q on q.FENTRYID=t1.HEntryID where hentryid in ({string.Join(", ", entryList)}) ", "H_v_SRM_POOrderBillList"); |
| | | DataTable dt = ds.Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |