|
|
|
@ -61,7 +61,11 @@ namespace NFine.Application |
|
|
|
FROM ICSDeliveryNotice a |
|
|
|
left join ICSPurchaseOrder b on a.PODetailID=b.PODetailID |
|
|
|
group by b.POCode,b.Sequence,a.DNType,a.WorkPoint having a.DNType='2' |
|
|
|
|
|
|
|
UNION ALL |
|
|
|
select b.POCode,b.Sequence,sum(cast(a.EATTRIBUTE30 as decimal)) as returnqty,a.WorkPoint from ICSPurchaseReceive a |
|
|
|
left join ICSPurchaseOrder b on a.SourceCode=b.POCode and a.SourceSequence=b.Sequence and a.WorkPoint=b.WorkPoint |
|
|
|
where a.Type='2' |
|
|
|
group by b.POCode,b.Sequence,a.WorkPoint |
|
|
|
UNION ALL |
|
|
|
SELECT b.POCode,b.Sequence,sum(isnull(a.RCVQuantity,0)) returnqty ,a.WorkPoint |
|
|
|
FROM ICSPurchaseReceive a |
|
|
|
@ -75,7 +79,7 @@ namespace NFine.Application |
|
|
|
group by a.RCVCode,b.POCode,b.Sequence,a.WorkPoint ) dd |
|
|
|
on a.POCode=dd.POCode and a.Sequence=dd.Sequence AND a.WorkPoint=dd.WorkPoint |
|
|
|
left join ICSVendor ee on a.VenCode=ee.VenCode and a.WorkPoint=ee.WorkPoint |
|
|
|
WHERE 1=1 AND a.ReleaseState = '1' and a.Status<>'3'";
|
|
|
|
WHERE 1=1 AND a.ReleaseState = '1' and a.Status<>'3'";
|
|
|
|
if (!string.IsNullOrWhiteSpace(queryJson)) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrWhiteSpace(queryParam["ORDERNO"].ToString())) |
|
|
|
@ -676,6 +680,11 @@ namespace NFine.Application |
|
|
|
FROM ICSDeliveryNotice a |
|
|
|
left join ICSPurchaseOrder b on a.PODetailID=b.PODetailID |
|
|
|
group by b.POCode,b.Sequence,a.DNType,a.WorkPoint having a.DNType='2' |
|
|
|
UNION ALL |
|
|
|
select b.POCode,b.Sequence,sum(cast(a.EATTRIBUTE30 as decimal)) as returnqty,a.WorkPoint from ICSPurchaseReceive a |
|
|
|
left join ICSPurchaseOrder b on a.SourceCode=b.POCode and a.SourceSequence=b.Sequence and a.WorkPoint=b.WorkPoint |
|
|
|
where a.Type='2' |
|
|
|
group by b.POCode,b.Sequence,a.WorkPoint |
|
|
|
|
|
|
|
UNION ALL |
|
|
|
SELECT b.POCode,b.Sequence,sum(isnull(a.RCVQuantity,0)) returnqty ,a.WorkPoint |
|
|
|
|