| | |
| | | ",HEmpID,HGroupID,HDeptID,HPRDORGID" + |
| | | ") " + |
| | | " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HEmpID.ToString() + "," + oMain.HGroupID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HPRDORGID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HEmpID,HGroupID,HDeptID,HPRDORGID" + |
| | | ") " + |
| | | " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HEmpID.ToString() + "," + oMain.HGroupID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HPRDORGID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | |
| | | if (oSystemParameterMain.Sc_ICMOReportBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | |
| | | //根据单号、资源ID、订单主ID、订单子ID、制单人过滤产量汇报报检申请提交数据 |
| | | string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set |
| | | HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); |
| | | HRelationInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); |
| | | oCn.RunProc(sql); |
| | | |
| | | //根据生产订单号查询生产订单表,拿到组织、车间 |
| | |
| | | ",HEmpID,HGroupID,HDeptID,HPRDORGID" + |
| | | ") " + |
| | | " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HEmpID.ToString() + "," + oMain.HGroupID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HPRDORGID.ToString() + |
| | | ") "); |
| | | |
| | |
| | | if (oSystemParameterMain.Sc_ICMOReportBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Sc_ICMOReportBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.Sc_ICMOReportBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Sc_ProcessReportMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Sc_ProcessReportMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | |
| | | if (oSystemParameterMain.Kf_MoveStockBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | //返工生产调拨 回填条码档案源单信息 |
| | | if (oSystemParameterMain.WMS_CampanyName == "韩电") //系统参数 客户定制化名称 空白为通用 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo," + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_MoveStockBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Sc_UpDateMoveStockPPBomRelation_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_WWPPBomToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_SeOutStockToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_StockOutRequestToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_MateOutRequestToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | //更新关联数量 |
| | | oCn.RunProc("exec h_p_Kf_UpDateRelation_PrepareMTRLToMoveStock_Add " + oMain.HInterID.ToString()); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HStockStyle,HTransferDirect,HShipType" + |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + |
| | | ") "); |
| | | |
| | | sRemark = sRemark + " ;生成出入库单据" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "','" + oMain.HTransferDirect + "','" + oMain.HShipType + "'" + |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | sErrMsg = "生成直接调拨单成功!单据号为:" + oMain.HBillNo; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1251','1251'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HStockInOrgID.ToString() + "," + oMain.HStockOutOrgID.ToString() + ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1247','1247'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | | //更新K3库存 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1203','1203'," + HOtherInInterID + ",'" + HOtherInBillNo + "',convert(varchar(10),getdate(),120),'" + HMainSourceType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + sHSupID + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "',0" + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HOtherInInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HOtherInInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBill_Check_New " + HOtherInInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HOtherInInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HOtherInInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBill_Check_New " + HOtherInInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1239','1239'," + HPInBackInterID + ",'" + HPInBackBillNo + "',convert(varchar(10),getdate(),120),'" + HMainSourceType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + sHSupID + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPInBackInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPInBackInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + HPInBackInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPInBackInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPInBackInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + HPInBackInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1247','1247'," + HNewInterID + ",'" + HNewBillNo + "',convert(varchar(10),getdate(),120),'" + HMainSourceType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + HCusID + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBackBill_Check " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBackBill_Check " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPOStockInBackInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPOStockInBackInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + HPOStockInBackInterID + "," + oMain.HBillerID.ToString()); |
| | | } |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPOStockInBackInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPOStockInBackInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + HPOStockInBackInterID + "," + oMain.HBillerID.ToString()); |
| | | //更新K3库存 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1247','1247'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1247','1247'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1247','1247'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1205','1205'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | | } |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | | //更新K3库存 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1205','1205'," + HNewInterID + ",'" + HNewBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + HCusID + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBill_Check_New " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HNewInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HNewInterID); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_SellOutBill_Check_New " + HNewInterID + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPOStockInInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPOStockInInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + HPOStockInInterID + "," + oMain.HBillerID.ToString()); |
| | | } |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HPOStockInInterID); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HPOStockInInterID); |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + HPOStockInInterID + "," + oMain.HBillerID.ToString()); |
| | | //更新K3库存 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1205','1205'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1205','1205'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1205','1205'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | sErrMsg = "生成销售出库单成功!单据号为:" + oMain.HBillNo; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";生成销售出库单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | if (oSystemParameterMain.Kf_SellOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | DataSet ds2 = oCn.RunProcReturn("exec h_p_Kf_CheckSellOutBill_CrediControl " + oMain.HInterID.ToString(), "h_p_Kf_CheckSellOutBill_CrediControl"); |
| | | if (ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "生成销售出库单成功,审核单据失败!单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";审核销售出库单,信用控制判断错误!"; |
| | | return true; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "生成销售出库单成功,审核单据失败!单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_Kf_SellOutBill_Check " + oMain.HInterID.ToString() + ",'1205','" + oMain.HMaker + "'", "h_p_Kf_SellOutBill_Check"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "生成销售出库单成功,审核单据失败!单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";审核销售出库单判断错误!"; |
| | | return true; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "生成销售出库单成功,审核单据失败!单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "生成并审核销售出库单成功!单据号为:" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "生成销售出库单成功!单据号为:" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | } |
| | | |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1205','1205'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1244','1244'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1244','1244'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1204','1204'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1204','1204'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1204','1204'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1204','1204'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1204','1204'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 信息 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1238','1238'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1238','1238'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustOutBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'," + oMain.HBillerID.ToString() + ",'" + sHSourceType + "'"); |
| | | |
| | | //更新关联数量 |
| | | if (sHSourceType == "3720") //委外订单-投料 |
| | | if (sHSourceType == "1604") //委外订单-投料 |
| | | { |
| | | oCn.RunProc("exec h_p_WW_UpDateRelation_WWPPBomToEntrustOut_Add " + oMain.HInterID.ToString()); |
| | | //回填K3关联数量 |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_EntrustOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1249','1249'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_OtherOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_OtherOutBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherOutBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_OtherOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_OtherOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherOutBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | sErrMsg = "生成其他出库单成功!单据号为:" + oMain.HBillNo; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1206','1206'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1239','1239'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1239','1239'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1239','1239'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1239','1239'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HArrivalDate" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HArrivalDate.ToShortDateString() + "'" + |
| | | ") "); |
| | | |
| | | //新增K3子表、主表 |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_POStockInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_POStockInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | //根据单据ID获取扫描的组织有哪几个 |
| | | string tt = ""; |
| | |
| | | ",HSPID,HWHID,HSCWHID,HSCSPID,HOWNERID" + |
| | | ") " + |
| | | " values('1299','1299'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),''" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSPID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HSCSPID.ToString() + "," + oMain.HOrgID.ToString() + |
| | | ") "); |
| | | //插入主表 |
| | |
| | | ",HSPID,HWHID,HSCWHID,HSCSPID,HQty,HMaterID,HOWNERID" + |
| | | ") " + |
| | | " values('1299','1299'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),''" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSPID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HSCSPID.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HMaterID.ToString() + "," + oMain.HOrgID.ToString() + |
| | | ") "); |
| | | return true; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1245','1245'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToProductIn_Add " + oMain.HInterID.ToString()); |
| | | //回填K3关联数量 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_ICMO_New " + oMain.HInterID.ToString()); |
| | | } |
| | | else if (sHSourceType == "3711") //生产汇报单 |
| | | { |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOReportToProductIn_Add " + oMain.HInterID.ToString()); |
| | | //回填K3关联数量 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_IICMOReport_New " + oMain.HInterID.ToString()); |
| | | } |
| | | else //无源单 |
| | | { |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1246','1246'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_EntrustInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_EntrustInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_EntrustInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1248','1248'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBackBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBackBill_Check " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //审核K3单据 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_OtherInBill_Check_New " + oMain.HInterID.ToString() + "," + oMain.HBillerID.ToString()); |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | sErrMsg = "生成其他入库单成功!单据号为:" + oMain.HBillNo; |
| | |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3801','3801'," + oMain.HInterID.ToString() + ",convert(varchar(10),getdate(),120),'" + oMain.HBillNo + "'" + |
| | | ", '" + oMain.HBillStatus + "','" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)," + oMain.HSCWHID.ToString() + |
| | | ", '" + oMain.HBillStatus + "','" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()," + oMain.HSCWHID.ToString() + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ") "); |
| | |
| | | //if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | //{ |
| | | // //审核单据 |
| | | // //oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | // //oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | //} |
| | | return true; |
| | | } |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ",2012,1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ",'" + oMain.HStockStyle + "'" + |
| | |
| | | if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | oCn.Commit(); |
| | | } |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1204','1204'," + HOutBillID.ToString() + ",'" + HOutBillNo + "',convert(varchar(10),getdate(),120),'生产任务单-投料'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_MateOutBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HOutBillID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HOutBillID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 信息 |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1202','1202'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | oCn.Commit(); |
| | | } |
| | |
| | | ",HSTOCKORGID,HOWNERID" + |
| | | ") " + |
| | | " values('1207','1207'," + HOutBillID.ToString() + ",'" + HOutBillNo + "',convert(varchar(10),getdate(),120),'生产任务单-投料'" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() + |
| | | ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) + |
| | | ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + |
| | |
| | | if (oSystemParameterMain.Kf_MoveStockBill_AutoCheck == "Y") //系统参数 自动审核 |
| | | { |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + HOutBillID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate() where HInterID= " + HOutBillID.ToString()); |
| | | } |
| | | |
| | | //根据TMP表 返回 信息 |
| | |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (sHBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y")) //分步式调出单-先进先出控制 |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (sHBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y")) //生产补料单-先进先出控制 |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | |
| | | |
| | | #region 直接扫描源单条码调用 |
| | | |
| | | #region 生产汇报 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_ICMOReport(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | Int64 HAccessFlag = 0; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | oBar = get_SourceBill_ICMOReport(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 生产入库 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | |
| | | |
| | | Int64 HAccessFlag = 0; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | oBar = get_SourceBill_POStockIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 委外入库 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_EntrustIn(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | Int64 HAccessFlag = 0; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | oBar = get_SourceBill_EntrustIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | return null; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 生产补料 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_MateReplenishOut(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | Int64 sMulSourceFlag = 0; //多源单标志(0为非多源单模式,1为多源单模式) |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBill_MulSourceBill.ToUpper() == "Y") //系统参数 生产补料单-多源单模式 |
| | | { |
| | | sMulSourceFlag = 1; |
| | | } |
| | | |
| | | //将源单信息存入条码出入库临时表 |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MateReplenishOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_MateReplenishOut"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | //先进先出控制 |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y") //系统参数 生产补料单-先进先出控制 |
| | | { |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_MateReplenishOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_MateReplenishOut"); |
| | | if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | //先进先出下架清单 |
| | | else if (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y") //系统参数 生产补料单-先进先出下架清单 |
| | | { |
| | | DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_MateReplenishOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFOList_MateReplenishOut"); |
| | | if (FIFOList == null || FIFOList.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";存入先进先出下架清单失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(FIFOList.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(FIFOList.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | oBar.HBarType = "源单条码"; |
| | | oBar.HMulSourceFlag = sMulSourceFlag; |
| | | oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); |
| | | oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]); |
| | | oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 直接调拨 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | |
| | | oBar.HStockInOrgID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HStockInOrgID"]); |
| | | oBar.HStockInOrgName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockInOrgName"]); |
| | | oBar.HStockStyle = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockStyle"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 采购退料 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_POStockInBack(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | Int64 sMulSourceFlag = 0; //多源单标志(0为非多源单模式,1为多源单模式) |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBill_MulSourceBill.ToUpper() == "Y") //系统参数 采购退料单-多源单模式 |
| | | { |
| | | sMulSourceFlag = 1; |
| | | } |
| | | |
| | | //将源单信息存入条码出入库临时表 |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_POStockInBack " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSourceBarCode_POStockInBack"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | oBar.HBarType = "源单条码"; |
| | | oBar.HMulSourceFlag = sMulSourceFlag; |
| | | oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); |
| | | oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]); |
| | | oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]); |
| | | oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]); |
| | | oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 生产退料 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_MateOutBack(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | Int64 sMulSourceFlag = 0; //多源单标志(0为非多源单模式,1为多源单模式) |
| | | |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBill_MulSourceBill.ToUpper() == "Y") //系统参数 生产退料单-多源单模式 |
| | | { |
| | | sMulSourceFlag = 1; |
| | | } |
| | | |
| | | //将源单信息存入条码出入库临时表 |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MateOutBack " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSourceBarCode_MateOutBack"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | oBar.HBarType = "源单条码"; |
| | | oBar.HMulSourceFlag = sMulSourceFlag; |
| | | oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); |
| | | oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]); |
| | | oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]); |
| | | return oBar; |
| | | } |
| | | else |
| | |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBill_BillTypeOneScan.ToUpper() == "Y") |
| | | { |
| | | sOneScanCtl = "Y"; |
| | | } |
| | | //先进先出控制('Y'为控制) |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y") |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | //是否启用多源单扫码模式('Y'为启用) |
| | | if (oSystemParameterMain.Kf_MateReplenishOutBill_MustQtyCtl.ToUpper() == "Y") |
| | |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | Model.ClsKF_PonderationBillMain_Temp oMain = new Model.ClsKF_PonderationBillMain_Temp(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | | string sLogNote = "开始扫码:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff") ; |
| | | |
| | | string HMaterNumber; //物料代码 |
| | | string sSourceBillCtl = "N"; //是否进行源单信息核对('Y'为核对源单信息) |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | sLogNote = sLogNote + ",1-获取系统参数:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | //蓝字入库、汇报模块,非无源单扫码、条码类型为 唯一条码 且为有源单生成的物料条码,扫描条码时自动带出源单信息,第一次扫码或启用多源单扫码模式 |
| | | //采购入库(1201)、生产入库(1202)、其他入库(1203)、委外入库(1210)、生产汇报(3711) |
| | | if (HSourceBillType != "-1" && omodel_View.HBarCodeType == "唯一条码" && omodel_View.HSourceBillNo != "" && (SourceFlag == false || sMulSourceCtl == "Y") |
| | |
| | | HSourceBillType = "-1"; |
| | | } |
| | | } |
| | | |
| | | sLogNote = sLogNote + ",2-扫描条码时自动带出源单信息:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | //1、首次扫码防串单判断; 2、源单类型是否在源单列表里判断; 3、唯一条码是否存在相同条码判断; 4、有源单,物料是否在源单中判断 |
| | | DataSet dsSource = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_SourceInterID " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + "," + DBUtility.ClsPub.BoolToString(SourceFlag) + "," + sSourceBillCtl + ",'" + sBatchNoCtl + "','" + sMultilineCtl + "','" + sMaterWHSPCtl + "','" + sSourceWHSPCtl + "'", "h_p_WMS_AddBarCode_SourceInterID"); |
| | | if (dsSource == null || dsSource.Tables[0].Rows.Count == 0) |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | sLogNote = sLogNote + ",3-条码判断是否在原单中:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | double sRelQty = 0; |
| | | //获取扫码数量 |
| | | if (omodel_View.HBarCodeType == "唯一条码") |
| | |
| | | } |
| | | } |
| | | |
| | | sLogNote = sLogNote + ",4-条码数量获取:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | //生产领料(1204)、销售出库(1205)、其他出库蓝字(1206)、委外出库(1211)、生产补料(1254) |
| | | //外购退料(1239)、产品退库(1245)、其他入库红字(1248)、委外退库(1246) |
| | | //出库、红字入库,判断条码库存、ERP库存 |
| | |
| | | //先进先出控制 |
| | | if (HSourceBillType != "-1" && sFIFOCtl == "Y") |
| | | { |
| | | DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | //DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | DataSet dsFIFO = oCn.RunProcReturn("exec h_p_WMS_FIFOCheck " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_FIFOCheck"); |
| | | if (dsFIFO == null || dsFIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断先进先出控制发生错误!"; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(sRelQty==0) |
| | | { |
| | | sErrMsg = "所扫描物料条码: " + omodel_View.HBarCode + " ,数量不允许为0!"; |
| | | return null; |
| | | } |
| | | sLogNote = sLogNote + ",5-条码库存判断:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | //唯一条码,是否启用一次扫码控制('Y'为启用) |
| | | if (omodel_View.HBarCodeType == "唯一条码" && sOneScanCtl == "Y") |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | sLogNote = sLogNote + ",6-一次扫码控制:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | //赋值,写入出入库临时表 |
| | | double sSumQty = 0; |
| | | double sRemQty = 0; |
| | |
| | | break; |
| | | } |
| | | } |
| | | sLogNote = sLogNote + ",7-写入临时表:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | LogService.Write(oMain.HInterID.ToString() + ";" + oMain.HBillNo + ";" + oMain.HBarCode + ",条码扫码" + sLogNote); //写入txt文本 |
| | | oBar.HBarType = "物料条码"; |
| | | return oBar; |
| | | } |
| | |
| | | { |
| | | //分步式调入单 |
| | | oBar = get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HStockOrgID, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | else if (HBillType == "1254") |
| | | { |
| | | //生产补料单 |
| | | oBar = get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | return null; |
| | |
| | | //先进先出控制 |
| | | if (HSourceBillType != "-1" && HBillType != "1251" && sFIFOCtl == "Y") |
| | | { |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | //DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_FIFOCheck " + HBillID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + oMain.HQty.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HOutStockPlaceID.ToString(), "h_p_WMS_FIFOCheck"); |
| | | if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "判断先进先出控制发生错误!"; |
| | |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y")) //分步式调出单-先进先出控制 |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList == "Y")) //生产补料单-先进先出控制 |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //审核WMS单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + HInterID.ToString()); |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + HInterID.ToString()); |
| | | |
| | | //提交、审核金蝶云单据 |
| | | HReturn = ""; |