出入库单判定依据调整
This commit is contained in:
@@ -262,6 +262,15 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
.Where(it => it.TransactionType == "生产入库")
|
||||
.Where(it => it.Remarks != "已撤销")
|
||||
.First();
|
||||
MmMaterial mmMaterial = Context
|
||||
.Queryable<MmMaterial>()
|
||||
.Where(it => it.MaterialCode == proWorkorder.productionCode)
|
||||
.First();
|
||||
if (mmMaterial == null)
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception($"物料档案不存在,无法成品入库:{proWorkorder.productionCode}");
|
||||
}
|
||||
if (inboundRecord == null)
|
||||
{
|
||||
//做生产入库单
|
||||
@@ -272,7 +281,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
BatchNo = proWorkorder.FeedOrder,
|
||||
LocationCode = "CP001",
|
||||
WarehouseCode = "WH001",
|
||||
SupplierCode = "",
|
||||
SupplierCode = mmMaterial.SupplierCode,
|
||||
StoveCode = proWorkorder.StoveCode,
|
||||
Workorder = workorder,
|
||||
Operator = Worker,
|
||||
|
||||
Reference in New Issue
Block a user