|
|
@ -800,7 +800,41 @@ a.ExtensionID |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#region 销售出库(合并发料)
|
|
|
|
else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription()) |
|
|
|
else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription()|| TransType == TransTypeEnum.DisPatchInspect.GetDescription()) |
|
|
|
{ |
|
|
|
sqlCheckSign = @"select * from ICSConfiguration where code = 'OutWithLocationCode007' and enable = '1'"; |
|
|
|
flag = DBHelper.SQlReturnData(sqlCheckSign, cmd); |
|
|
|
isMerge = true; |
|
|
|
columnsMerge = @"mer.MergeID+'~'+a.SDNCode AS TransCode,
|
|
|
|
a.SDNDetailID AS DetailID, |
|
|
|
a.SOCode, |
|
|
|
a.Type, |
|
|
|
a.Sequence AS TransSequence, |
|
|
|
ISNULL(a.SDNQuantity,0) AS IssueQuantity,";
|
|
|
|
|
|
|
|
tableNameMerge = @"ICSSDN a
|
|
|
|
INNER JOIN ICSMOPickMerge mer ON a.id=mer.SourceID AND a.WorkPoint=mer.WorkPoint";
|
|
|
|
|
|
|
|
columns = @"a.SDNCode AS TransCode,
|
|
|
|
a.SDNDetailID AS DetailID, |
|
|
|
a.SOCode, |
|
|
|
a.Type, |
|
|
|
a.Sequence AS TransSequence, |
|
|
|
ISNULL(a.SDNQuantity,0) AS IssueQuantity,";
|
|
|
|
|
|
|
|
tableName = @"ICSSDN a "; |
|
|
|
|
|
|
|
where = @" a.SDNCode='{0}' AND a.WorkPoint='{1}' AND a.Type='1' AND a.Status<>'3'
|
|
|
|
AND a.Quantity-ISNULL(a.SDNQuantity,0)>0 and a.EATTRIBUTE5='已检验'";
|
|
|
|
|
|
|
|
singleWhere = @" a.SDNCode='{0}' AND a.WorkPoint='{1}'"; |
|
|
|
|
|
|
|
completeWhere = @" a.SDNCode='{0}' AND a.WorkPoint='{1}' AND a.Quantity>ISNULL(a.SDNQuantity,0)"; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 销售出库(合并发料)
|
|
|
|
else if ( TransType == TransTypeEnum.DisPatchInspect.GetDescription()) |
|
|
|
{ |
|
|
|
sqlCheckSign = @"select * from ICSConfiguration where code = 'OutWithLocationCode007' and enable = '1'"; |
|
|
|
flag = DBHelper.SQlReturnData(sqlCheckSign, cmd); |
|
|
@ -8588,7 +8622,7 @@ ISNULL(c.MTIME,'') AS MTIME,'' AS VenCode,'' AS cVenName,d.InvUnit,'' AS POCode, |
|
|
|
|| TransType == TransTypeEnum.BrrowDoc.GetDescription() || TransType == TransTypeEnum.StepTransferDocIn.GetDescription() |
|
|
|
|| TransType == TransTypeEnum.TwoStepTransferDocOut.GetDescription() || TransType == TransTypeEnum.MOReplenishment.GetDescription() |
|
|
|
|| TransType == TransTypeEnum.OtherInRedDoc.GetDescription() || TransType == TransTypeEnum.MOIssueAutoDoc.GetDescription() |
|
|
|
|| TransType == TransTypeEnum.SalesShipmentOutDoc.GetDescription()) |
|
|
|
|| TransType == TransTypeEnum.SalesShipmentOutDoc.GetDescription() || TransType == TransTypeEnum.DisPatchInspect.GetDescription()) |
|
|
|
{ |
|
|
|
if (JsonData.IsPick != "1") |
|
|
|
{ |
|
|
@ -8600,7 +8634,10 @@ ISNULL(c.MTIME,'') AS MTIME,'' AS VenCode,'' AS cVenName,d.InvUnit,'' AS POCode, |
|
|
|
|
|
|
|
for (int i = 0; i < ZLtable.Rows.Count; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
if (TransType == TransTypeEnum.DisPatchInspect.GetDescription()) |
|
|
|
{ |
|
|
|
JsonData.TransType = "销售发货-销售发货单"; |
|
|
|
} |
|
|
|
string zlName = ZLtable.Rows[i]["Name"].ToString(); |
|
|
|
string zlTransCode = ZLtable.Rows[i]["BusinessCode"].ToString(); |
|
|
|
string Enable = ZLtable.Rows[i]["Enable"].ToString(); |
|
|
@ -11528,6 +11565,23 @@ BEGIN |
|
|
|
item.User, item.WorkPoint, "3", TransTypeEnum.SalesShipmentDoc.GetDescription<DBValue>(), cmd, language, itemInfo.LogID, item.TransID, MergeID); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#region 销售出库
|
|
|
|
else if (TransType == TransTypeEnum.DisPatchInspect.GetDescription()) |
|
|
|
{ |
|
|
|
BusinessCode = TransTypeEnum.DisPatchInspect.GetDescription<DBValue>(); |
|
|
|
//更新源头单据数量
|
|
|
|
ICSSalesService.SalesShipmentInspectDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language, item.TransID, item.CourierCode); |
|
|
|
|
|
|
|
//foreach (var itemInfo in item.detail)
|
|
|
|
//{
|
|
|
|
// workPoint = item.WorkPoint;
|
|
|
|
// //出库
|
|
|
|
// printTable = ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity,
|
|
|
|
// item.User, item.WorkPoint, "3", TransTypeEnum.SalesShipmentDoc.GetDescription<DBValue>(), cmd, language, itemInfo.LogID, item.TransID, MergeID);
|
|
|
|
//}
|
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#region 销售出库-出库单
|
|
|
|